{"id":1265,"date":"2013-09-07T15:30:38","date_gmt":"2013-09-07T22:30:38","guid":{"rendered":"http:\/\/zsprawl.com\/iOS\/?p=1265"},"modified":"2013-09-07T21:11:57","modified_gmt":"2013-09-08T04:11:57","slug":"adding-an-escape-penalty-in-rpg-maker-vx-ace","status":"publish","type":"post","link":"https:\/\/zsprawl.com\/iOS\/2013\/09\/adding-an-escape-penalty-in-rpg-maker-vx-ace\/","title":{"rendered":"Adding an Escape Penalty in RPG Maker VX Ace"},"content":{"rendered":"<p>As previously mentioned, I&#8217;ve been building an RPG using RPG Maker VX Ace and its underlining Ruby Gaming Scripting System 3 (RGSS3) framework to build &#8220;<a href=\"http:\/\/zsprawl.com\/iOS\/2013\/08\/making-an-rpg-game-a-la-final-fantasy\/\">Sprawl&#8217;s Quest<\/a>&#8220;. <\/p>\n<p>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&#8217;s Quest, I decided to add an XP Penalty for Escaping from battle.<\/p>\n<p><a href=\"http:\/\/zsprawl.com\/iOS\/wp-content\/uploads\/2013\/09\/flee.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/zsprawl.com\/iOS\/wp-content\/uploads\/2013\/09\/flee-300x171.jpg\" alt=\"flee\" width=\"300\" height=\"171\" class=\"aligncenter size-medium wp-image-1272\" \/><\/a><br \/>\n<!--more--><br \/>\nAs with all RPG Maker VX Ace scripts, place this in the Materials section. There shouldn&#8217;t be an compatibility issues since I am just subtracting some XP on a successful flee from battle.<\/p>\n<p><code><\/p>\n<pre>=begin\r\n#============================================================\r\n Title: Escape_Penalty\r\n Author: Sprawl\r\n Date: August 15, 2013\r\n-------------------------------------------------------------\r\n ** Change log\r\n August 15, 2013\r\n   - Initial Release\r\n-------------------------------------------------------------\r\n ** Description\r\n \r\nThis script adds an escape penalty equal to 0.5% of the total\r\nXP per actor.\r\n \r\n-------------------------------------------------------------\r\n ** Usage\r\n \r\nCut and Paste in the Materials Section. If you have any other \r\nscripts that affect escape penalties, things may not work.\r\n-------------------------------------------------------------\r\n ** Licensing \r\n\r\nFeel free to use for free or commercial use, but give credit \r\nto \"zSprawl\".\r\n\r\n-------------------------------------------------------------\r\n ** Credits\r\n \r\n  Sprawl\r\n    -Wrote the Script.\r\n  Merdouille44\r\n    -Replied to my post on the forums to get me motivated \r\nto fix this.\r\n=============================================================\r\n=end\r\n\r\n$imported = {} if $imported.nil?\r\n$imported[\"Sprawl_Escape\"] = true\r\n\r\nmodule BattleManager\r\n  def self.process_abort\r\n    replay_bgm_and_bgs\r\n    SceneManager.return\r\n    battle_end(1)\r\n        \r\n    $game_party.all_members.each do |actor|\r\n      @exp_loss = -1 * actor.exp * 0.005;\r\n      actor.gain_exp(@exp_loss)\r\n    end\r\n    \r\n    @xp_loss_str = @exp_loss * -1\r\n    \r\n    text = \"You lose \" + @xp_loss_str.to_i.to_s\r\n    text = text + \" experience points for fleeing.\"\r\n    $game_message.add('\\.' + text)\r\n    wait_for_message\r\n    return true\r\n  end\r\nend<\/pre>\n<p><\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>As previously mentioned, I&#8217;ve been building an RPG using RPG Maker VX Ace and its underlining Ruby Gaming Scripting System 3 (RGSS3) framework to build &#8220;Sprawl&#8217;s Quest&#8220;. 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&#8217;s Quest, <a href=\"https:\/\/zsprawl.com\/iOS\/2013\/09\/adding-an-escape-penalty-in-rpg-maker-vx-ace\/#more-'\" class=\"more-link\"><br \/>more \u00bb<\/a><\/p>\n","protected":false},"author":318,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24,82,80],"tags":[85,83,86,84,127],"class_list":["post-1265","post","type-post","status-publish","format-standard","hentry","category-blog","category-rpgmakervxace","category-windows","tag-rgss3","tag-rpg","tag-rpg-maker-vx-ace","tag-sprawls-quest","tag-windows-8"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/zsprawl.com\/iOS\/wp-json\/wp\/v2\/posts\/1265"}],"collection":[{"href":"https:\/\/zsprawl.com\/iOS\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zsprawl.com\/iOS\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zsprawl.com\/iOS\/wp-json\/wp\/v2\/users\/318"}],"replies":[{"embeddable":true,"href":"https:\/\/zsprawl.com\/iOS\/wp-json\/wp\/v2\/comments?post=1265"}],"version-history":[{"count":9,"href":"https:\/\/zsprawl.com\/iOS\/wp-json\/wp\/v2\/posts\/1265\/revisions"}],"predecessor-version":[{"id":1277,"href":"https:\/\/zsprawl.com\/iOS\/wp-json\/wp\/v2\/posts\/1265\/revisions\/1277"}],"wp:attachment":[{"href":"https:\/\/zsprawl.com\/iOS\/wp-json\/wp\/v2\/media?parent=1265"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zsprawl.com\/iOS\/wp-json\/wp\/v2\/categories?post=1265"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zsprawl.com\/iOS\/wp-json\/wp\/v2\/tags?post=1265"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}