FF1-like escape system help

Petorius

Villager
Member
Joined
Jan 5, 2019
Messages
16
Reaction score
0
First Language
English
Primarily Uses
RMVXA
So I'm trying to make escaping work so that the actors make the action of escape, rather than the entire party, but the entire party escapes, with the chances of success depending on class, like in the first Final Fantasy, but I can't seem to get it to work. Any help would be greatly appreciated.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
What have you done so far? What have you tried? What happens when you do it? Don't say "it doesn't work" - say "nothing happens" or if there's an error, say what it is.
 

Petorius

Villager
Member
Joined
Jan 5, 2019
Messages
16
Reaction score
0
First Language
English
Primarily Uses
RMVXA
What I tried is using a script (Yanfly Engine Core, I think) to remove the "Escape" option from the "Fight" and "Escape" options at the start of the battle, and gave each class a skill that was Escape that has different success chances, and set it to the entire party as it's range. What happened was that when it was successful, that actor would be gone for the entirety of the battle scene, and if the remaining actors died, game over like usual, but if the battle was won and it went back to the main scene, the actor was back. No errors, per say, but this would obviously not be acceptable in a finished product.
 

Heirukichi

Veteran
Veteran
Joined
Sep 24, 2015
Messages
1,421
Reaction score
596
First Language
Italian
Primarily Uses
RMVXA
Do you want the whole party to run when a character casts the "run" skill?
 

Petorius

Villager
Member
Joined
Jan 5, 2019
Messages
16
Reaction score
0
First Language
English
Primarily Uses
RMVXA
Do you want the whole party to run when a character casts the "run" skill?
Yes, that is exactly what I'm trying to do. If you can help me in any way, I'd love that.
 

Heirukichi

Veteran
Veteran
Joined
Sep 24, 2015
Messages
1,421
Reaction score
596
First Language
Italian
Primarily Uses
RMVXA
If that is all you need then just have your Escape skill call a common event, add a script call to that common event (3rd page, last button on the right) and write this:
Code:
BattleManager.process_escape
This makes your whole party run away from battle.
 

Petorius

Villager
Member
Joined
Jan 5, 2019
Messages
16
Reaction score
0
First Language
English
Primarily Uses
RMVXA
Thanks! I'll try it in a bit!
 

Heirukichi

Veteran
Veteran
Joined
Sep 24, 2015
Messages
1,421
Reaction score
596
First Language
Italian
Primarily Uses
RMVXA
You re welcome. Keep in mind that it works provided that you are not using something that changes the battle system. And on top of it you escape when the character using that skill acts. You cannot escape as soon as you select "Skills > Escape" but you have to actually wait until your actor performs his/her own action to successfully run away from the battle.
 

Petorius

Villager
Member
Joined
Jan 5, 2019
Messages
16
Reaction score
0
First Language
English
Primarily Uses
RMVXA
I got the error
"Script 'Game_Interpreter' line 1411: NameError occurred

undefined local variable or method `change_event's for BattleManager:Moduler "

I am using the Ace Core Engine and Ace Battle engine, is that the problem?
 

Heirukichi

Veteran
Veteran
Joined
Sep 24, 2015
Messages
1,421
Reaction score
596
First Language
Italian
Primarily Uses
RMVXA
Then there is a high chance that one of them interacts with methods of BattleManager module. I should take a look at them to know what changes and what not.
 

Petorius

Villager
Member
Joined
Jan 5, 2019
Messages
16
Reaction score
0
First Language
English
Primarily Uses
RMVXA
I am currently busy and unable to check, but when I have a chance I'll check to see if any of the scripts I'm using have battlemanager in them, and if they don't, I'll double check to see if I made a stupid mistake. Thank you both for all the help you have offered already.
 

Petorius

Villager
Member
Joined
Jan 5, 2019
Messages
16
Reaction score
0
First Language
English
Primarily Uses
RMVXA
Wow, this makes me look really stupid, but what happened was in the Module BattleManager at line 221-222 it says

"if success
process_abort
I don't remember doing this, but for some reason I changed it to
if success
scene_change
So at that point, not even the normal escape would work. Once again, I thank you all for your help. I probably could not have done it without you, and even if I could, it would have been very frustrating and time consuming. So once again, I thank you, and am glad that RPG Maker has such an awesome community. I will be sure to credit both of you.
 

Petorius

Villager
Member
Joined
Jan 5, 2019
Messages
16
Reaction score
0
First Language
English
Primarily Uses
RMVXA
Although, one slight problem, if it's not easily taken care of, I don't need it, but escape chance is 100 percent. Even when the skill "misses". Is there a way to fix this?
 

Heirukichi

Veteran
Veteran
Joined
Sep 24, 2015
Messages
1,421
Reaction score
596
First Language
Italian
Primarily Uses
RMVXA
That is something you have to set up in your event. There are few ways you can do this and how you do it is ultimately your choice. One possible option would be to store actors' escape chance in a variable and determine success chance by comparing that variable with a randomized value.
Code:
escape_successfull = ($game_variables[your_var_id] < rand(100))
BattleManager.process_escape if escape_successfull
Another way would be to mark the actor trying to escape with a state and have a different chance based on the actor's class. If that is the case you can just have your common event check actors' states and then compare the random value with the respective escape chance for that actor.
Code:
$game_party.each.with_index do |m, i|
  if m.state?(your_escape_state_id)
    BattleManager.process_escape if ((rand(100) < $game_variables[your_var_id][i-1])
  end
end
In this example I am assuming you stored each actor escape chance in an array variable so that you can access them using your actor id later on.
 
Last edited:

Petorius

Villager
Member
Joined
Jan 5, 2019
Messages
16
Reaction score
0
First Language
English
Primarily Uses
RMVXA
So would I put this in the "Script" command on the common event page?
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,853
Messages
1,016,990
Members
137,562
Latest member
tamedeathman
Top