[RESOLVED] Mission system like the ones in Final Fantasy Tactics pubs

Started by ramonbastos, June 26, 2008, 08:56:45 pm

Previous topic - Next topic

ramonbastos

Hey there, is it possible to make a script like:

You are the leader of a Guild, basement, whatever, and you can recruit members when u talk to someone and select HIRE. then u can choose, example, Hire warrior lvl 1, lvl 2, bla bla bla, u have to pay money to hire someone, then u can acess ur "hired members" to see what u got.. ok.
Why u need to hire? There will be some missions to u choose, like "go rob a bank" then u choose "how many are going",wich class, how many days it will take.. example: Choose mission "rob a bank" "5 thiefs lvl 1" it will take 2 days. then after 2 days u go back there and check, its like the missions in the pubs of Final Fantasy Tactics...
there is a % to suceed or fail.. depends on how many u sent, and wich lvl are they..

GOD, PLEASE, TELL ME ITS POSSIBLE!



Ryex

so you want some thing where you can pay money and have people do missions for you?
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

Calintz


ramonbastos

oh i cant do that with events =/

And yes, i need something where i can pay money to hire them, they can do missions, and they can die too.

Starrodkirby86

It seems to me the only thing that would need more scripting or something of that sort would be an easy or user-friendly interface that occupies the whole screen.

I can easily see how the easiness of scripting it would be. But this is possible with eventing, just that...it probably won't be as random when you do so...:\

What's osu!? It's a rhythm game. Thought I should have a signature with a working rank. ;P It's now clickable!
Still Aqua's biggest fan (Or am I?).




ramonbastos


Starrodkirby86

June 28, 2008, 10:49:24 am #6 Last Edit: June 28, 2008, 12:37:03 pm by Starrodkirby86
I have to play a little Final Fantasy Tactics.  ;)

The only exposure I had to that game is the GBA remake, so I'll take a look into this. I'm not sure if I'm going to do extraordinarily well on the system, but I will try. And trying is the first step towards failure! :D

EDIT: The system is probably going to be a pain depending on how many missions you want in the game overall.
---
To my knowledge it goes like this:

Pub Owner: (Random saying)
Rumors
Missions
Quit Mission
Exit

Missions:
(Shows available missions)

Specific Mission:
(Shows pages of mission info and such)

Accept:
Pub Owner: Do you want to do this mission?
Yes or No

Then you report to that location and if the mission switch is on you'll work on that mission...The pain is the level of detail and the requirements you need in order to activate the mission in itself as the Final Fantasy Tactics I'm playing required location planting and all that stuff...(Including days, gil, whatnot). I suppose it's not hard if you tackle it, but doing this eventing is such an ugly thing to go for, especially the GUI (Graphic User Interface)...

What's osu!? It's a rhythm game. Thought I should have a signature with a working rank. ;P It's now clickable!
Still Aqua's biggest fan (Or am I?).




ramonbastos

QuoteThen you report to that location and if the mission switch is on you'll work on that mission...The pain is the level of detail and the requirements you need in order to activate the mission in itself as the Final Fantasy Tactics I'm playing required location planting and all that stuff...(Including days, gil, whatnot). I suppose it's not hard if you tackle it, but doing this eventing is such an ugly thing to go for, especially the GUI (Graphic User Interface)...


Hummm, dont need to be that way, i mean, i'll activate the missions when i want, by a switch =]

Starrodkirby86

Quote from: ramonbastos on June 29, 2008, 08:31:18 pm
QuoteThen you report to that location and if the mission switch is on you'll work on that mission...The pain is the level of detail and the requirements you need in order to activate the mission in itself as the Final Fantasy Tactics I'm playing required location planting and all that stuff...(Including days, gil, whatnot). I suppose it's not hard if you tackle it, but doing this eventing is such an ugly thing to go for, especially the GUI (Graphic User Interface)...


Hummm, dont need to be that way, i mean, i'll activate the missions when i want, by a switch =]

I don't want to use a lot of switches...D:

There are Oh so many switches you can put (Either 500 or 999, I'm thinking 999 though), and I don't want to waste your switch amount. Making an eventing system costs more resources than a scripting one, so that's why I'm a little daunted too. >_<

What's osu!? It's a rhythm game. Thought I should have a signature with a working rank. ;P It's now clickable!
Still Aqua's biggest fan (Or am I?).




Blizzard

Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Phasedscar

July 01, 2008, 02:21:27 pm #10 Last Edit: July 01, 2008, 03:16:40 pm by Phasedscar
All you really need is a switch for each mission and a few variable to figure out the success rate.  Eight Variables should be enough to completely figure out everything you need.

S1: Timer
S2: Fight Bandits
S3: Steal Treasure
S4: Play Tetris

V1: Mission level
V2: Hired level
V3: Your level
V4: Random
V5: Success rate
V6: Class
V7: Completion time
V8: Time

Code: Event coding example

If V3 => 10 then
Label: mission
Show choice:
  >Fight bandits
   If S2 = OFF
    V1 = 10
     Show choice:
      Bosly  Lv 11 Warrior
       Show choice:
         Yes:
          V7 = 600
          Switch: Timer = ON
          If V7 =< V8
           V2 = 11
           V4 = RAND (1-5)
           V6 = 3
           V5 = (V2 / V6)
           V5 = V5 X V4
           If V5 > V1
            Show Message: SUCCESS
            Change gold: +1000
            Change Item: Potion 15
            Switch: Timer = OFF
            Switch: Fight Bandit = ON
            V8 = 0
           Else
            Show Message: FAIL
            Switch: Timer = OFF
            V8 = 0
          Else
           Show Message: Bosly hasn't come back from his mission yet.
         No:
          Goto Label: mission
      Kris Lv 8 Thief:
       Show choice:
         Yes:
          V7 = 600
          Switch: Timer = ON
          If V7 =< V8
           V2 = 8
           V4 = RAND (1-5)
           V6 = 4
           V5 = (V2 / V6)
           V5 = V5 X V4
           If V5 > V1
            Show Message: SUCCESS
            Change gold: +1000
            Change Item: Potion 15
            Switch: Timer = OFF
            Switch: Fight Bandit = ON
            V8 = 0
           Else
            Show Message: FAIL
            Switch: Timer = OFF
            V8 = 0
          Else
           Show Message: Kris hasn't come back from his mission yet.
         No:
          Goto Label: mission
      Greg Lv 12 Summoner:
       Show choice:
         Yes:
          V7 = 600
          Switch: Timer = ON
          If V7 =< V8
           V2 = 12
           V4 = RAND (1-5)
           V6 = 2
           V5 = (V2 / V6)
           V5 = V5 X V4
           If V5 > V1
            Show Message: SUCCESS
            Change gold: +1000
            Change Item: Potion 15
            Switch: Timer = OFF
            Switch: Fight Bandit = ON
            V8 = 0
           Else
            Show Message: FAIL
            Switch: Timer = OFF
            V8 = 0
          Else
           Show Message: Greg hasn't come back from his mission yet.
         No:
          Goto Label: mission
      Else
       Show Message: You've completed that mission.
 
>Steal Tresure

   If S3 = OFF
    V1 = 20
     Show choice:
      Vosh  Lv 16 Mage
       Show choice:
         Yes:
          V7 = 600
          Switch: Timer = ON
          If V7 =< V8
           V2 = 16
           V4 = RAND (1-5)
           V6 = 4
           V5 = (V2 / V6)
           V5 = V5 X V4
           If V5 > V1
            Show Message: SUCCESS
            Change gold: +5000
            Change Item: Potion 99
            Switch: Timer = OFF
            Switch: Steal Treasure = ON
            V8 = 0
           Else
            Show Message: FAIL
            Switch: Timer = OFF
            V8 = 0
          Else
           Show Message: Vosh hasn't come back from his mission yet.
         No:
          Goto Label: mission
      Sommy Lv 19 Thief:
       Show choice:
         Yes:
          V7 = 600
          Switch: Timer = ON
          If V7 =< V8
           V2 = 19
           V4 = RAND (1-5)
           V6 = 2
           V5 = (V2 / V6)
           V5 = V5 X V4
           If V5 > V1
            Show Message: SUCCESS
            Change gold: +5000
            Change Item: Potion 99
            Switch: Timer = OFF
            Switch: Steal Treasure = ON
            V8 = 0
           Else
            Show Message: FAIL
            Switch: Timer = OFF
            V8 = 0
          Else
           Show Message: Sommy hasn't come back from his mission yet.
         No:
          Goto Label: mission
      Tipp Lv 22 Ranger:
       Show choice:
         Yes:
          V7 = 600
          Switch: Timer = ON
          If V7 =< V8
           V2 = 22
           V4 = RAND (1-5)
           V6 = 3
           V5 = (V2 / V6)
           V5 = V5 X V4
           If V5 > V1
            Show Message: SUCCESS
            Change gold: +5000
            Change Item: Potion 99
            Switch: Timer = OFF
            Switch: Steal Treasure = ON
            V8 = 0
           Else
            Show Message: FAIL
            Switch: Timer = OFF
            V8 = 0
          Else
           Show Message: Tipp hasn't come back from his mission yet.
         No:
          Goto Label: mission
      Else
       Show Message: You've completed that mission.

  >Play Tetris

   If S4 = OFF
    V1 = 5
     Show choice:
      Bess  Lv 4 Mage
       Show choice:
         Yes:
          V7 = 600
          Switch: Timer = ON
          If V7 =< V8
           V2 = 5
           V4 = RAND (1-5)
           V6 = 2
           V5 = (V2 / V6)
           V5 = V5 X V4
           If V5 > V1
            Show Message: SUCCESS
            Change gold: +5000
            Change Item: Potion 99
            Switch: Timer = OFF
            Switch: Play Tetris = ON
            V8 = 0
           Else
            Show Message: FAIL
            Switch: Timer = OFF
            V8 = 0
          Else
           Show Message: Bess hasn't come back from his mission yet.
         No:
          Goto Label: mission
      Epie Lv 5 Barbarian:
       Show choice:
         Yes:
          V7 = 600
          Switch: Timer = ON
          If V7 =< V8
           V2 = 5
           V4 = RAND (1-5)
           V6 = 5
           V5 = (V2 / V6)
           V5 = V5 X V4
           If V5 > V1
            Show Message: SUCCESS
            Change gold: +5000
            Change Item: Potion 99
            Switch: Timer = OFF
            Switch: Play Tetris = ON
            V8 = 0
           Else
            Show Message: FAIL
            Switch: Timer = OFF
            V8 = 0
          Else
           Show Message: Epie hasn't come back from his mission yet.
         No:
          Goto Label: mission
      Sipp Lv 3 Ranger:
       Show choice:
         Yes:
          V7 = 600
          Switch: Timer = ON
          If V7 =< V8
           V2 = 3
           V4 = RAND (1-5)
           V6 = 1
           V5 = (V2 / V6)
           V5 = V5 X V4
           If V5 > V1
            Show Message: SUCCESS
            Change gold: +5000
            Change Item: Potion 99
            Switch: Timer = OFF
            Switch: Play Tetris = ON
            V8 = 0
           Else
            Show Message: FAIL
            Switch: Timer = OFF
            V8 = 0
          Else
           Show Message: Sipp hasn't come back from his mission yet.
         No:
          Goto Label: mission
      Else
       Show Message: You've completed that mission.


Then have a common event with:
Trigger: Switch: Timer = ON
Wait 20
V8 + 1


Success works by taking the level of your hired guy, dividing it by his class, then multiplying it by the random number to see if it's larger than the mission level. Keep in mind that the larger the V6: class variable is, the harder the mission will be.  With the example you have a slightly less than 50% chance for success, however if V6 was set to 2, you'd have over a 60% chance of success.  Also, obviously higher level characters will dramatically increase success rates.  If the character was level 12, and class was 3, there would be a 60% chance of success.  12 and 2 and there would be an 80% chance of success. 

If you look at the mage in Steal Treasure you'll see he's level 16 and his class is 4.  This means that 16 / 4 = 4 X V4, meaning you'll end up with 4, 8, 12, 16, 20 as your possible outcomes, to succeed you need 20 or higher since the mission level is 20, so the mage's chance of success is 20%. You may want to use larger numbers to get more accurate amounts (I would personally increase all the numbers by a factor of 10).

A higher V4 variable, RAND (1-100) for example, would give you many more outcomes which means that your chances of success increase in smaller amounts but MANY more times.  To help keep yourself from guaranteed success, increase the mission level or make the increases in increments even smaller.  So instead of 16 / 4, it'd be 16 / 6 or 8. Or as I suggested earlier 160 / 6 and make the requirement 2000.

I know what you're thinking, why have 2 variables to determine the success when RMXP ignores decimals?  Well, it has more to do with flexability.  You can change the numbers just slightly to change your odds of success and it gives people a baseline for comparison since you're using an easily see-able variable (the hired guy's level).

On the timer, make sure the common event is a parallel process if the switch to trigger it.  At V7 = 600 and a wait time of 20 frames, it should take 10 game time minutes before the mission is completed.  If you want to have multiple missions going at the same time you'll need a new condition branch for each mission and a switch of each mission until you hit your limit (which will be 4 if you're using the standard text interface) and a new common event for each.

I hope that helps you a little bit in the actual eventing.  As far as I can tell that should fulfil everything you need for the missions, the only downside is you can only have 4 mission at a time based on your character's level.  I'd see about trying to make a custom menu system to handle all the mission availability, but otherwise this should work just fine.  Also you'd need another conditional branch for the payment part of it, but I just wanted to get an example going for you.
Spoiler: ShowHide
My own game project & My resource workshop! (respectively)
http://forum.chaos-project.com/index.php?topic=608.0 http://forum.chaos-project.com/index.php?topic=682.0



What that is? Affection area for flails. - Blizz-ABS, the ultimate ABS

The pictures in your signature may altogether be no more than 200kB. The height must not exceed 200 px and the width must not exceed 800 px. Altogether they may take up an area of 160000 px2. Every signature not matching this criteria is a subject of the moderator team to remove and leave this rule as message in your signature.

ramonbastos

hey guy thank you VERY MUCH for the help and the time you wasted ^^
ill try it now.

Phasedscar

not sure if I was clear, but each of those "if" statements is a conditional branch and the V# = ??? are Set Variables...

Just to be clear lol.

Anyway, I really do hope that helps.  It'll get your a basic mission system, but nothing terribly complicated.
Spoiler: ShowHide
My own game project & My resource workshop! (respectively)
http://forum.chaos-project.com/index.php?topic=608.0 http://forum.chaos-project.com/index.php?topic=682.0



What that is? Affection area for flails. - Blizz-ABS, the ultimate ABS

The pictures in your signature may altogether be no more than 200kB. The height must not exceed 200 px and the width must not exceed 800 px. Altogether they may take up an area of 160000 px2. Every signature not matching this criteria is a subject of the moderator team to remove and leave this rule as message in your signature.