As previously mentioned, I’ve been building an RPG using RPG Maker VX Ace and its underlining Ruby Gaming Scripting System 3 (RGSS3) framework to build “Sprawl’s Quest“.
One thing I always hate in the old school RPG was how easy it was to flee from combat to skip ahead of content. So in Sprawl’s Quest, I decided to add an XP Penalty for Escaping from battle.
As with all RPG Maker VX Ace scripts, place this in the Materials section. There shouldn’t be an compatibility issues since I am just subtracting some XP on a successful flee from battle.
=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 total XP 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"] = true module 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 end end