estriole

EST - VICTOR BATTLE PATCH

Jun 17th, 2013
287
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 2.85 KB | None | 0 0
  1. =begin
  2. EST - VE BATTLE PATCH v1.1
  3.  
  4. content of this patch
  5.  - use charset mode easily.
  6.  just tag your ALL actor with: <battler name: default_actor>
  7.  and it will automatically use charset as battler
  8.  - synchro formation changer with battler position
  9.  
  10. =end
  11.  
  12.  
  13. module Victor_Engine  
  14.   VE_SPRITE_SETTINGS_ADD = {
  15.     'default_actor'    => {frames: 3, rows: 4, mirror: false, invert: false,
  16.                     mode: :charset, action: :charset},    
  17.     'default_enemy'    => {frames: 3, rows: 4, mirror: false, invert: false,
  18.                     mode: :charset, action: :charset},
  19.   } # Don't remove  
  20.   VE_SPRITE_SETTINGS.merge!(VE_SPRITE_SETTINGS_ADD)
  21.  
  22.   VE_CUSTOM_POSITION6 = {
  23.   # Position
  24.     1 => {x: 430, y: 270}, # Position for the first actor.
  25.     2 => {x: 430, y: 235}, # Position for the second actor.
  26.     3 => {x: 430, y: 200}, # Position for the thrid actor.
  27.     4 => {x: 490, y: 270}, # Position for the fourth actor.
  28.     5 => {x: 490, y: 235}, # Position for the fifth actor.
  29.     6 => {x: 490, y: 200}, # Position for the sixth actor.
  30.   } # Don't remove  
  31.   VE_CUSTOM_POSITION = VE_CUSTOM_POSITION6.dup  
  32. end
  33.  
  34. #PATCH to rearrange the position based on battle_member_array
  35. module ESTRIOLE
  36. def self.getpos(memberid)
  37.  for i in 0..$game_party.battle_members_array.size-1
  38.    if $game_party.battle_members_array[i] == memberid
  39.     j = i+1
  40.     return j
  41.    end
  42.  end
  43. end
  44.  
  45. def self.update_ve_pos(look)
  46.   case look    
  47.   when 7;
  48.     for i in 1..look
  49.        id = $game_party.battle_members[i-1].id
  50.        j = getpos(id)
  51.       $game_custom_positions[i][:x] = Victor_Engine::VE_CUSTOM_POSITION8[j][:x]
  52.       $game_custom_positions[i][:y] = Victor_Engine::VE_CUSTOM_POSITION8[j][:y]
  53.     end        
  54.   when 8;
  55.     for i in 1..look
  56.        id = $game_party.battle_members[i-1].id
  57.        j = getpos(id)
  58.       $game_custom_positions[i][:x] = Victor_Engine::VE_CUSTOM_POSITION8[j][:x]
  59.       $game_custom_positions[i][:y] = Victor_Engine::VE_CUSTOM_POSITION8[j][:y]
  60.     end    
  61.   else
  62.     for i in 1..look
  63.        id = $game_party.battle_members[i-1].id
  64.        j = getpos(id)
  65.       $game_custom_positions[i][:x] = Victor_Engine::VE_CUSTOM_POSITION6[j][:x]      
  66.       $game_custom_positions[i][:y] = Victor_Engine::VE_CUSTOM_POSITION6[j][:y]
  67.     end              
  68.   end
  69. end #end self.update_ve_pos
  70. end #end module estriole
  71.  
  72. #patch to use the estriole position updater
  73. class Scene_Battle < Scene_Base
  74.   alias est_victor_update_form_start start
  75.   def start
  76.     ESTRIOLE.update_ve_pos($game_party.battle_members.size) if $imported["YEA-PartySystem"] == true
  77.     est_victor_update_form_start
  78.   end    
  79. end
  80.  
  81.  
  82. # patch for basic module to make anim battle 1.09 can used with older basic module
  83. class Object
  84.   def get_all_values(value1, value2 = nil)
  85.     value2 = value1 unless value2
  86.     /<#{value1}>((?:[^<]|<[^\/])*)<\/#{value2}>/im
  87.   end
  88. end
Advertisement
Add Comment
Please, Sign In to add comment