05-26-2025, 02:04 AM
(This post was last modified: 05-26-2025, 02:11 AM by DerVVulfman.)
Upon examination, I must make a correction. But not entirely to my statements.
Within RPGMaker XP, there is a method that removes the 'immortal' flag. However, it only exists if an event directly applied a KNOCKOUT state. It does so within the INTERPRETER CLASS shown here:
#--------------------------------------------------------------------------
# * Change Enemy State
#--------------------------------------------------------------------------
def command_333
# Process with iterator
iterate_enemy(@parameters[0]) do |enemy|
# If [regard HP 0] state option is valid
if $data_states[@parameters[2]].zero_hp
# Clear immortal flag
enemy.immortal = false
end
# Change
The code checks to see if a state applied has the 'Zero HP' flag enabled within the state, and is not reliant on a state ID number. Ergo, you could create THREE different KNOCKOUT states (call them KO'ed, DEAD MEAT, whatever)... and you could have three terminal states that would work.
As towards Remi's statement that VX has this feature, she is correct. However, it is much more limited as the code below dictates:
#--------------------------------------------------------------------------
# * Change Enemy State
#--------------------------------------------------------------------------
def command_333
iterate_enemy_index(@params[0]) do |enemy|
if @params[2] == 1 # If change of incapacitation
enemy.immortal = false # Clear immortal flag
end
Here, it only checks to see if the state itself was state #1, the "Incapacitated" state. It does not check to see if the state deals with 0HP in any way. Likewise, other methods within RPGMaker VX streamlined the system to force that only the first state is the KNOCKOUT state, such as this line within Game_Battler (beginning line 464):
#--------------------------------------------------------------------------
# * Add State
# state_id : state ID
#--------------------------------------------------------------------------
def add_state(state_id)
state = $data_states[state_id] # Get state data
return if state == nil # Is data invalid?
return if state_ignore?(state_id) # Is it a state should be ignored?
unless state?(state_id) # Is this state not added?
unless state_offset?(state_id) # Is it a state should be offset?
@states.push(state_id) # Add the ID to the @states array
end
if state_id == 1 # If it is incapacitated (state 1)
@hp = 0 # Change HP to 0
end
Here, it treats only the state by its ID of 1 as the incapacitated state, a difference indeed where they streamlined the code.
And for RPGMaker VXAce, it is actually worse. It does not have an immortal flag at all, evident in its own Change Enemy State method within Game_Interpreter, and again forcing only the first state to be the KNOCKOUT state. This too on investigation within my copy of the RPGMaker MV scripts.
So indeed, there was never an easy way to remove the immortal state with either RPGMaker XP nor VX, but there is no code within any subsequent versions depicting an immortal state. And RPGMaker XP has more flexibility in that you can create a knockout state anywhere in your States database rather than have it fixed as all subsequent versions require.
Or for MV, you could use Yanfly Action Sequences which creates an Immortal state.
Within RPGMaker XP, there is a method that removes the 'immortal' flag. However, it only exists if an event directly applied a KNOCKOUT state. It does so within the INTERPRETER CLASS shown here:
#--------------------------------------------------------------------------
# * Change Enemy State
#--------------------------------------------------------------------------
def command_333
# Process with iterator
iterate_enemy(@parameters[0]) do |enemy|
# If [regard HP 0] state option is valid
if $data_states[@parameters[2]].zero_hp
# Clear immortal flag
enemy.immortal = false
end
# Change
The code checks to see if a state applied has the 'Zero HP' flag enabled within the state, and is not reliant on a state ID number. Ergo, you could create THREE different KNOCKOUT states (call them KO'ed, DEAD MEAT, whatever)... and you could have three terminal states that would work.
As towards Remi's statement that VX has this feature, she is correct. However, it is much more limited as the code below dictates:
#--------------------------------------------------------------------------
# * Change Enemy State
#--------------------------------------------------------------------------
def command_333
iterate_enemy_index(@params[0]) do |enemy|
if @params[2] == 1 # If change of incapacitation
enemy.immortal = false # Clear immortal flag
end
Here, it only checks to see if the state itself was state #1, the "Incapacitated" state. It does not check to see if the state deals with 0HP in any way. Likewise, other methods within RPGMaker VX streamlined the system to force that only the first state is the KNOCKOUT state, such as this line within Game_Battler (beginning line 464):
#--------------------------------------------------------------------------
# * Add State
# state_id : state ID
#--------------------------------------------------------------------------
def add_state(state_id)
state = $data_states[state_id] # Get state data
return if state == nil # Is data invalid?
return if state_ignore?(state_id) # Is it a state should be ignored?
unless state?(state_id) # Is this state not added?
unless state_offset?(state_id) # Is it a state should be offset?
@states.push(state_id) # Add the ID to the @states array
end
if state_id == 1 # If it is incapacitated (state 1)
@hp = 0 # Change HP to 0
end
Here, it treats only the state by its ID of 1 as the incapacitated state, a difference indeed where they streamlined the code.
And for RPGMaker VXAce, it is actually worse. It does not have an immortal flag at all, evident in its own Change Enemy State method within Game_Interpreter, and again forcing only the first state to be the KNOCKOUT state. This too on investigation within my copy of the RPGMaker MV scripts.
So indeed, there was never an easy way to remove the immortal state with either RPGMaker XP nor VX, but there is no code within any subsequent versions depicting an immortal state. And RPGMaker XP has more flexibility in that you can create a knockout state anywhere in your States database rather than have it fixed as all subsequent versions require.
Or for MV, you could use Yanfly Action Sequences which creates an Immortal state.