Tiered States
#10
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.
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
Reply }


Messages In This Thread
Tiered States - by MechanicalPen - 04-27-2013, 05:12 AM
RE: Tiered States - by MetalRenard - 04-27-2013, 10:15 AM
RE: Tiered States - by yamina-chan - 04-27-2013, 01:14 PM
RE: Tiered States - by MechanicalPen - 04-27-2013, 06:47 PM
RE: Tiered States - by yamina-chan - 04-27-2013, 09:06 PM
RE: Tiered States - by MetalRenard - 04-28-2013, 12:08 AM
RE: Tiered States - by MechanicalPen - 04-28-2013, 12:19 AM
RE: Tiered States - by Karindanslav - 08-07-2013, 10:52 PM
RE: Tiered States - by Ahzoh - 08-07-2013, 11:48 PM
RE: Tiered States - by MechanicalPen - 08-08-2013, 12:08 AM
RE: Tiered States - by Karindanslav - 08-08-2013, 03:36 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
   KDamage States XP kyonides 0 1,022 06-29-2023, 02:20 AM
Last Post: kyonides
   Kolloseum States XP kyonides 55 72,202 02-26-2019, 08:28 AM
Last Post: kyonides
   Unalterable States DerVVulfman 0 4,229 01-22-2019, 01:04 AM
Last Post: DerVVulfman
   States : Expiration States Kain Nobel 1 6,704 01-26-2017, 09:45 PM
Last Post: Noctis
   DVV's States Rotation DerVVulfman 5 10,018 04-21-2016, 05:41 AM
Last Post: DerVVulfman
   States : Toggle Kain Nobel 0 4,985 10-09-2012, 05:22 PM
Last Post: Kain Nobel
   States : Spread Kain Nobel 0 4,801 10-09-2012, 05:04 PM
Last Post: Kain Nobel
   States : Spread Kain Nobel 2 6,291 07-10-2012, 04:44 PM
Last Post: Kain Nobel
   Kristina's Map States DerVVulfman 1 6,198 06-30-2010, 09:33 AM
Last Post: Nadim
   States Activation System aka State-Based Passive Augments, Version 0.2 Charlie Fleed 7 12,916 03-06-2010, 09:26 PM
Last Post: fgsfds



Users browsing this thread: 3 Guest(s)