08-08-2013, 12:08 AM
I could certainly try to make it work for VX Ace. It's not that complicated of a system I just need to know how VX Ace applies states.
Edit: Dowloaded VX Ace Lite just for you. It is both less and more confusing than RPG Maker XP.
So, try this; I have no way to test if it works, so let me know.
Edit: Dowloaded VX Ace Lite just for you. It is both less and more confusing than RPG Maker XP.
So, try this; I have no way to test if it works, so let me know.
Code:
#=============================================================================
# * Tiered States
#=============================================================================
#===============================================================================??
# ** RPG::State
#===============================================================================??
class RPG::State
#-----------------------------------------------------------------------------
# * Tiered States
# States are applied left to right, starting at the state before the =>.
#
# The example provided allows for negative states (stat-downs) to be
# counteracted by positive states (stat-ups)
#-----------------------------------------------------------------------------
Tiered_States = {
20 => [24, 23, 22, 21, 20, 19, 18],
22 => [18, 19, 20, 21, 22, 23, 24]
}
#-----------------------------------------------------------------------------
# * has Tiered State?
#-----------------------------------------------------------------------------
def tiered?
Tiered_States.include?(@id)
end
#-----------------------------------------------------------------------------
# * How many tiers?
#-----------------------------------------------------------------------------
def tiers
return Tiered_States.fetch(@id, [])
end
end
#===============================================================================??
# ** Game_Battler
#===============================================================================??
class Game_Battler
#-----------------------------------------------------------------------------
# * Alias Listings
#-----------------------------------------------------------------------------
alias_method :mpen_default_add_state, :add_state
#-----------------------------------------------------------------------------
# * Add State
#-----------------------------------------------------------------------------
def add_state(state_id)
if $data_states[state_id].tiered?
for i in 0...$data_states[state_id].tiers.size
current_tier = $data_states[state_id].tiers[i]
next_tier = $data_states[state_id].tiers[i+1]
if self.state?(current_tier)
if next_tier == nil
#tier at maximum, regular state rules apply
mpen_default_add_state(current_tier)
return
else
remove_state(current_tier)
mpen_default_add_state(next_tier)
return
end
end
end
#no tiers applyed yet, default behavior.
mpen_default_add_state(state_id)
else
#no tiers exist, default behavior
mpen_default_add_state(state_id)
end
end
end