Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Expiration States with Atoa acbs: error
#1
Yes, my dear friends. I need your wisdom again.
I found a pretty nice little script called Expiration States here in this forum. It makes a doom state ike in the final fantasy series where there is a turn count to die for a character. I wanted to make use of it and implemented it in a blank project with just Atoa acbs in it (only his battle sytem). Whenever doom is ready to kill the infected hero I get a error message on Game battler 2 line 223. I've underlined the line. I really dont understand why I get a error message on that point, maybe because the def remove_states_auto is rewritten or because the script is SDK and contradicts everything non SDK.
[Image: bugmug2340gdi7qo19y_thumb.jpg]

From Game_Battler 2    line 218-229
#--------------------------------------------------------------------------
 # * Natural Removal of States (called up each turn)
 #--------------------------------------------------------------------------
 def remove_states_auto
   for i in @states_turn.keys.clone
    if @states_turn[i] > 0
       @states_turn[i] -= 1
     elsif rand(100) < $data_states[i].auto_release_prob
       remove_state(i)
     end
   end
 end


The script
Code:
#===============================================================================

# ** States : Expiration States
#===============================================================================

#-------------------------------------------------------------------------------
# * SDK Log
#-------------------------------------------------------------------------------
#if Object.const_defined?(:SDK)
#  SDK.log('States.ExpirationStates', 'Kain Nobel ©', 4.0, '2013.01.02')
#end

#===============================================================================
# ** RPG::State
#===============================================================================

class RPG::State
 #-----------------------------------------------------------------------------
 # * Expiration
 #-----------------------------------------------------------------------------
 Expiration = {}
 Expiration[25] = 26 # Doom 3 to Doom 2
 Expiration[26] = 27 # Doom 2 to Doom 1
 Expiration[27] = 1  # Doom 1 to Death
 #-----------------------------------------------------------------------------
 # * Expiration Default (*Don't touch*)
 #-----------------------------------------------------------------------------
 Expiration.default = []
 #-----------------------------------------------------------------------------
 # * Experation States
 #-----------------------------------------------------------------------------
 def expiration_states
   # If expiration states nil
   if @expiration_states.nil?
     # Get expiration states setting
     @expiration_states = Expiration[@id]
     # Convert to value to array if integer
     @expiration_states = [@expiration_states] if @expiration_states.is_a?(Integer)
     # If value isn't set as array, return an empty array
     @expiration_states = [] unless @expiration_states.is_a?(Array)
   end
   # Return expiration states
   @expiration_states
 end
end

#===============================================================================
# ** Game_Battler
#===============================================================================

class Game_Battler
 #-----------------------------------------------------------------------------
 # * Alias Listings
 #-----------------------------------------------------------------------------
 alias_method :expirestates_gmbattler_removestate,       :remove_state
 alias_method :expirestates_gmbattler_removestatesauto,  :remove_states_auto
 #-----------------------------------------------------------------------------
 # * Remove States Auto
 #-----------------------------------------------------------------------------
 def remove_states_auto
   # Enable flag to check for expiration states
   @check_expiration_states = true
   # The usual
   expirestates_gmbattler_removestatesauto
   # Disable flag to check for expiration states
   @check_expiration_states = nil
 end
 #-----------------------------------------------------------------------------
 # * Remove State
 #-----------------------------------------------------------------------------
 def remove_state(state_id, force = false)
   # Check if state already inflicted
   state_inflicted = state?(state_id)
   # The usual
   expirestates_gmbattler_removestate(state_id, force)
   # End method if state invalid
   return unless state_id > 0
   # End method if state still exists
   return if state?(state_id)
   # End method unless checking expiration states
   return unless @check_expiration_states
   # End method unless state was previously inflicted before removal
   return unless state_inflicted
   # Get state object
   state = $data_states[state_id]
   # End method if expiration states empty
   return if state.expiration_states.empty?
   # Force the addition of each expiration state
   state.expiration_states.each {|i| self.add_state(i)}
 end
end


Any ideas?
Reply }


Messages In This Thread
Expiration States with Atoa acbs: error - by Noctis - 01-30-2017, 02:51 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
   ACBS - Atoa Custom Battle System and TP System zlsl 2 3,668 10-20-2021, 05:09 AM
Last Post: zlsl
   I want to add an Atoa Custom Battle System command cut-in. zlsl 11 11,702 11-11-2019, 08:55 PM
Last Post: DerVVulfman
   Question about ACBS (Atoa Custom Battle System) aeliath 10 10,732 08-08-2019, 02:50 PM
Last Post: aeliath
   Remaining turns of states Melana 3 6,309 08-01-2018, 02:43 PM
Last Post: kyonides
   (RMVXace) Battle error with Tankentai's battle system, help. x( Starmage 0 3,434 02-14-2018, 04:25 PM
Last Post: Starmage
   Atoa Individual Battle Commands Geminil 3 6,096 08-02-2017, 03:17 AM
Last Post: DerVVulfman
   Scan skill should show states Tumen 5 8,158 05-02-2017, 03:33 AM
Last Post: DerVVulfman
Shocked  Help needed with Atoa's CBS jreagan406 2 5,046 02-16-2017, 12:36 PM
Last Post: jreagan406
   Problems with counteraatack addon of Atoa Custom Battle System Djigit 22 31,127 01-05-2017, 08:05 PM
Last Post: Noctis
   Atoa ACBS HP Regen Skill Lightness 11 12,143 03-11-2016, 10:43 PM
Last Post: Lightness



Users browsing this thread: