iPhone App Directory
RPG Maker VX
 
Gallery Members Search Calendar Help


Welcome Guest ( Log In | Register )

Collapse

>Announcement

Keep an eye out for the upcoming 3rd Quarter Contest!
 
Reply to this topicStart new topic
> Escape consequences
The Invisible Ma...
post Sep 29 2012, 03:42 PM
Post #1



Group Icon


Type: Writer
Alignment: True Neutral




Hey i have looked around for ages on many different sites perhaps im just dim but i was looking for a script that changed the chance of escaping in rpg maker vx. I was hoping to change it to perhaps a 25% chance of escaping so that most battles can't be simpy ran from and that if you fail an escape atempt all enemies get a pre-emptive strike on you. To make things fair i was also wondering if theres some way to include an item (consumable) that would guarantee your escape, like a smoke ball in pokemon. Thanks biggrin.gif


--------------------
Laugh and grow fat.
Go to the top of the page
 
+Quote Post
   
DP3
post Sep 29 2012, 04:07 PM
Post #2


Swinging a chain in a town near you.
Group Icon


Type: Writer
Alignment: Lawful Neutral




This will do it smile.gif

Spoiler:
CODE
# Control Escape Ratio
# Code Snippet by DiamondandPlatinum3

class Scene_Battle
  
  #=========================================================
  #               EDITABLE REGION
  #=========================================================
  
  ESCAPE_RATIO              = 25 # out of 100
  GUARANTEE_ESCAPE_ITEM_ID  = 2  # Item ID of item that will guarantee you can escape
  
  #=========================================================
  
  
  
  
  
  
  
  
  #--------------------------------------------------------------------------
  # * Create Escape Ratio
  #--------------------------------------------------------------------------
  def make_escape_ratio
    @escape_ratio = ESCAPE_RATIO
  end
  
  
  #--------------------------------------------------------------------------
  # * Execute Battle Action: Item
  #--------------------------------------------------------------------------
  alias dp3_mod_escrat_sb_exec_act_itm_845wc execute_action_item
  def execute_action_item
    # Call Original Method
    dp3_mod_escrat_sb_exec_act_itm_845wc
    
    @escape_ratio = 100 if @active_battler.action.item.id == GUARANTEE_ESCAPE_ITEM_ID
  end
end


This post has been edited by DP3: Sep 29 2012, 04:10 PM


--------------------
Go to the top of the page
 
+Quote Post
   
The Invisible Ma...
post Sep 29 2012, 04:22 PM
Post #3



Group Icon


Type: Writer
Alignment: True Neutral




QUOTE (DP3 @ Sep 29 2012, 05:07 PM) *
This will do it smile.gif

Spoiler:
CODE
# Control Escape Ratio
# Code Snippet by DiamondandPlatinum3

class Scene_Battle
  
  #=========================================================
  #               EDITABLE REGION
  #=========================================================
  
  ESCAPE_RATIO              = 25 # out of 100
  GUARANTEE_ESCAPE_ITEM_ID  = 2  # Item ID of item that will guarantee you can escape
  
  #=========================================================
  
  
  
  
  
  
  
  
  #--------------------------------------------------------------------------
  # * Create Escape Ratio
  #--------------------------------------------------------------------------
  def make_escape_ratio
    @escape_ratio = ESCAPE_RATIO
  end
  
  
  #--------------------------------------------------------------------------
  # * Execute Battle Action: Item
  #--------------------------------------------------------------------------
  alias dp3_mod_escrat_sb_exec_act_itm_845wc execute_action_item
  def execute_action_item
    # Call Original Method
    dp3_mod_escrat_sb_exec_act_itm_845wc
    
    @escape_ratio = 100 if @active_battler.action.item.id == GUARANTEE_ESCAPE_ITEM_ID
  end
end


Thank you so much for this! since im clueless with scripts i was wondering where abouts you put this, also is it possible to add a cooldown to the escape option in battle such as once you have tried to escape you must wait five turns before using it again. Thank so much for this Diamond!


--------------------
Laugh and grow fat.
Go to the top of the page
 
+Quote Post
   

Fast ReplyReply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 23rd September 2014 - 05:26 AM

RPGMakerVX.net is an Privacy Policy, Legal.