Hello,
I've searched around and I've seen a few different escape scripts. I don't really like the idea of XP loss from escaping. The reasoning behind this is you're punishing the player for escaping. Almost forcing them to fight every battle to progress in their class. Does anybody know of/can provide a script to run a formula to check if the party can escape. If they fail to however, the encounter becomes inescapable/the escape command becomes disabled for X turns. However a certain ability tag <escape> can force the party to escape.
I realise this is quite a request, is there anything close to this around?
Escaping Battles script request
● ARCHIVED · READ-ONLY
-
-
I've been using the default escape mechanism of Ace and I never had that XP loss thing...
-
The XP loss was a script I found to make it less appealing to just escape any battle you don't want to fight. I would prefer if you failed to escape, you can't immediately keep trying to escape until you succeed. Maybe I wasn't clear in my initial post.
-
Then you need to link us to that XP loss script, so that it can be modified with your wishes.
Just adding different scripts without regard to other scripts will always risk an incompatibility, especially if they are affecting the same default area (in this case, both scripts would have to modify the escape functions). -
It's possible that the XP loss is determined via a constant on the script so you could turn it to 0 if you want. So yeah, better put a link to that script so that we could help you modify it
-
you can easily made a script by modify the constant
@can_escape = false / true
this is the constant who check if you can escape or not
after example if you want to lose the ''thing'' who make you enable to escape you need to trigger a command
def command_trigger(enable)if command(handler :escape) = fail@enable = falseelseescapeendenddef battle_startrefresh_commandendrefresh_command@enable = trueendthis is not the right solution! this is a partial part of how you can do :) -
Sorry let me clarify, I'm not using the XP loss script because I believe it punishes the player for not fighting every battle. There are no compatibility issues, I would just prefer if the party attempts to escape and fails, the battle becomes inescapable. At least without the use of a force escape ability.
@Nio Kasagami Sadly I'm not familiar enough with Ruby to finish that script. At battle start you're setting escape to true, right? What if the encounter(such as a boss battle) was already inescapable. Wouldn't that allow you to escape boss fights? :) -
As we said it might be possible for us to remove that xp loss, which is why we were asking for a link to that script.
-
I'll happily link the script, but the XP loss script doesn't disable the escaping if you fail. I mentioned it because it felt too harsh and I didn't like it.
Code:=begin#============================================================ Title: Escape_Penalty Author: Sprawl Date: August 15, 2013------------------------------------------------------------- ** Change log August 15, 2013 - Initial Release------------------------------------------------------------- ** Description This script adds an escape penalty equal to 0.5% of the totalXP per actor. ------------------------------------------------------------- ** Usage Cut and Paste in the Materials Section. If you have any other scripts that affect escape penalties, things may not work.------------------------------------------------------------- ** Licensing Feel free to use for free or commercial use, but give credit to "zSprawl".------------------------------------------------------------- ** Credits Sprawl -Wrote the Script. Merdouille44 -Replied to my post on the forums to get me motivated to fix this.==============================================================end$imported = {} if $imported.nil?$imported["Sprawl_Escape"] = truemodule BattleManager def self.process_abort replay_bgm_and_bgs SceneManager.return battle_end(1) $game_party.all_members.each do |actor| @exp_loss = -1 * actor.exp * 0.005; actor.gain_exp(@exp_loss) end @xp_loss_str = @exp_loss * -1 text = "You lose " + @xp_loss_str.to_i.to_s text = text + " experience points for fleeing." $game_message.add('\.' + text) wait_for_message return true endend -
So that's the only thing that the script does... if we remove that, then better just remove the whole script at all...
-
Yeah, that's kind of my point. XP loss isn't fun or fair, just punishes players. I was wanting a script to disable escape if an attempt to escape fails.
-
try this
Code:class Battle_Manager def self.process_escape $game_message.add(sprintf(Vocab::EscapeStart, $game_party.name)) success = @preemptive ? true : (rand < @escape_ratio) Sound.play_escape if success process_abort else @can_escape = false @escape_ratio += 0.1 $game_message.add('\.' + Vocab::EscapeFailure) $game_party.clear_actions end wait_for_message return success endend -
I tried it however I didn't really notice any effect. I can still repeatedly attempt to escape until it succeeds.
-
then probably the command selection doesn't update... XD
-
So you need the 'refresh_command' that Nio Kasgami posted. ^_^
-
true I forgot to add a value in this refresh command
def refresh_command@enable = true if can escape?endnow it should take in consideration the boss thing's -
Adiktuzmiko tried adding @can_escape to escape processing. The command window in battle didn't change/update to reflect the battle was no longer escapable. Does there need to be a way to reload the UI in battle? OR is there some other way go go about doing this?
-
you would need to refresh the party command, I'm just lazy to give a workaround right now. Sorry
-
Okay, no problem. Is the script forthcoming or is it too much work for a casual request? :)
-
It's pretty easy, I just don't have the motivation and time right now.