HopeFragment

H'witch Nerd
Veteran
Joined
Mar 15, 2014
Messages
121
Reaction score
11
First Language
English
Primarily Uses
RMVXA
In my game, I want to add an item that is just like the Poké Doll/Fluffy Tail/Poké Toy from Pokémon, in which you use it during battle and you are guaranteed to escape. The problem is, when I tested this item out, it even lets you escape from bosses, even though I had disabled normal escaping on that boss. You're not able to select the escape option during the battle, but when you use the escape item (Called Antique Doll in my game) you are able to escape, letting you skip the boss. Is there a way to prevent this or do I need a script?

I also want to add a skill called "Illusion" in my game that basically does the same thing, however I tested it and like the Antique Doll, you're able to escape from bosses with it that you should not be able to.

Just in case you ask, yes, I have "can escape" unchecked, and you are not able to use the escape option normally in the boss battle I tested it on.
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,789
Reaction score
14,591
First Language
English
Primarily Uses
RMVXA
The problem is the escape skill under features is a guaranteed escape, it works no matter what. Technically it was only meant for monsters as it will ignore the can escape flag, and it has many issues when used by the party (one which you noticed, to find another use it after one party member is KO'd, but the rest of the party isn't...you'll get a game over).

Probably going to need a script to make the escape item work as you wish I'm afraid.
 
Last edited by a moderator:

serp

Villager
Member
Joined
Nov 17, 2015
Messages
13
Reaction score
2
First Language
English
Primarily Uses
I know I'm answering an old thread, but I came here with the same issue, so I thought I'd post my fix. Here's a quick script that will make the escape special effect work for the party even when some characters are KO. It will not allow escape in battles where escape is not allowed.


EDIT: There is a bug with this script that causes it to say "Failed to escape" up to 4 times (one for each party member) when you try to use it will fighting a boss monster. I don't have time to fix this properly right now, but you can easily avoid the issue by changing your item to affect "The User" instead of "All Allies." It will still cause all allies to escape.

class Game_Actor < Game_Battler
  def item_effect_special(user, item, effect)
    case effect.data_id
    when SPECIAL_EFFECT_ESCAPE
      if BattleManager.can_escape?
        $game_party.battle_members.each do |mem|
          mem.escape
        end
      else
        $game_message.add('\.' + Vocab::EscapeFailure)
      end
    end
    @result.success = true
  end
  
  def escape
    hide if $game_party.in_battle
    clear_actions
    clear_states if alive?
    Sound.play_escape
  end
end



It's written so that if escape isn't allowed, you get an "escape failed" message. If you'd rather get a standard "there was no effect" item message, you can put

return @result.success = false



instead of

$game_message.add('\.' + Vocab::EscapeFailure)
 
Last edited by a moderator:

HopeFragment

H'witch Nerd
Veteran
Joined
Mar 15, 2014
Messages
121
Reaction score
11
First Language
English
Primarily Uses
RMVXA
Took me forever to respond but thank you very much for this, I found a different solution a long time ago (making a state called "no escape" which seals the skill and then giving the no escape state to the party at the start of boss battles) but I just tried this instead and it's much simpler, not to mention works better and more reliably, as I was having problems with the no escape state seemingly only working when it wanted to. This is how the escape function should have worked in the first place.
 
Last edited by a moderator:

serp

Villager
Member
Joined
Nov 17, 2015
Messages
13
Reaction score
2
First Language
English
Primarily Uses
Cool! I'm glad to hear it's useful to someone besides me. I found a bug with it, unfortunately, but it's easy to work around. I added the details in an edit to my previous post. The script itself hasn't changed.
 

Latest Threads

Latest Posts

Latest Profile Posts

Zaj
Hey morning all! I got another quick question..I just switched to RMMZ from VX Ace..so I am wondering why default scripts(is that how u call it) of VXAce is available, but not in MZ's case? How do I figure out ahh I mean could you show me
Sometimes im the biggest fool alive... Ah well, ce la vie
The worst feeling in the world is going for a walk on a nice summer day, seeing an ice cream truck, and realizing you don't have any money with you :(
Mike running through an area that's influenced by his thoughts, thus his drawings are infused into the land.
We're playing Omori by OMOCAT starting at 2pm est :D

Forum statistics

Threads
111,343
Messages
1,060,328
Members
144,669
Latest member
kINGFreak13
Top