How do I switch Immortality OFF?
#10
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.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply


Messages In This Thread
How do I switch Immortality OFF? - by Ace_V - 05-20-2025, 10:00 AM
RE: How do I switch Immortality OFF? - by Ti-Max - 05-21-2025, 12:21 AM
RE: How do I switch Immortality OFF? - by Ace_V - 05-21-2025, 05:01 AM
RE: How do I switch Immortality OFF? - by Ace_V - 05-21-2025, 07:08 AM
RE: How do I switch Immortality OFF? - by Ace_V - 05-24-2025, 02:07 AM
RE: How do I switch Immortality OFF? - by Ace_V - 05-25-2025, 07:32 AM
RE: How do I switch Immortality OFF? - by DerVVulfman - 05-26-2025, 02:04 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
   Barrier Switch Not Working Dr. Ermine 3 11,072 08-19-2015, 04:26 AM
Last Post: DerVVulfman



Users browsing this thread: 3 Guest(s)