How do I switch Immortality OFF?
#1
Hi, everyone!

I want to implement a boss fight where you need to defeat other enemies before you can defeat the main boss. I switched on the Immortal state for the main boss, but I can't find a way to remove that. Change State only includes the usual status ailments, but not immortality.

I also tried doing conditional branches where defeating an enemy turns on a switch, and when all switches are on, it would set the main boss' HP to zero, but it still won't die (because it is still immortal).

Does anyone know how to do that? Headache
[Image: SP1-Writer.png]
[Image: SP1-PixelArtist.png]
Reply
#2
Hi,

Do you still have the event part you have made? The only way i think for now it's with conditionnal so i'm kind of curious for what reason yours don't work.
Reply
#3
Its not an event, its a feature built within the TROOPS database.  By right-clicking on an enemy, you can make an enemy immortal. And by that, it will not die even when its HP is reduced to 0.  The enemy does take damage, but it will not die as long as the flag is enabled.
[Image: attachment.php?aid=2903]

I do find it odd that there doesn't seem to be an event to 'disable' an enemy's immortality.  For that, I made an event and script call

[Image: attachment.php?aid=2904]

Where it says enemies[1], that's the zombie.   And of note, the enemies are sorta in REVERSE order.  If I added a Ghost, a Zombie and a Lich in order, the Lich would be enemy #0, and the Ghost being enemy #2.  Freakin backwards.

Do note, the immortality flag only prevents the enemy's death, not the prevention of taking damage.  I did nothing but POUND on the zombie for two turns.  On Turn 3, the immorality flag was removed and it immediately died.

EDIT:

IF... you intended the enemy's immortality to actually be invulnerability so it doesn't take damage until the flag is removed, I JUST wrote a script.
I ACED THIS BATTLER INVULNERABILITY. Gee, Ace_V.... Where did I get this script's name?

You run the script calls like how I ran script calls in the above example. But I would run a script call on Turn 0 to use a script call to apply invulnerability at battle start.


Attached Files Thumbnail(s)
       
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
#4
(05-21-2025, 02:02 AM)DerVVulfman Wrote: Where it says enemies[1], that's the zombie.   And of note, the enemies are sorta in REVERSE order.  If I added a Ghost, a Zombie and a Lich in order, the Lich would be enemy #0, and the Ghost being enemy #2.  Freakin backwards.

Do note, the immortality flag only prevents the enemy's death, not the prevention of taking damage.  I did nothing but POUND on the zombie for two turns.  On Turn 3, the immorality flag was removed and it immediately died.

EDIT:

IF... you intended the enemy's immortality to actually be invulnerability so it doesn't take damage until the flag is removed, I JUST wrote a script.
I ACED THIS BATTLER INVULNERABILITY.  Gee, Ace_V.... Where did I get this script's name?

You run the script calls like how I ran script calls in the above example.  But I would run a script call on Turn 0 to use a script call to apply invulnerability at battle start.

That's PERFECT! Yup, it wasn't an event, Ti-Max, but the battle bit that DerVVulfman pointed out. (I didn't know about the reversed index labels for the battlers. What an odd decision by the developers!)

Thank you! This is the exact solution I was looking for.

Laughing  And oh wow! A script inspired by me? I can cross that off my RPGM bucket list!
[Image: SP1-Writer.png]
[Image: SP1-PixelArtist.png]
Reply
#5
It works perfectly!

For any future users of this script, these are the steps I took.

For a battle versus two Imps and a Zombie, with the latter being immortal, I did the Turn 0 event page as mentioned by DerVVulfman, then added several more pages with the following:

Event Page 2 condition: Enemy 1 was at 0% HP
Conditional Branch: [2. Imp] is [Dead] Inflicted
Conditional Branch: Switch [BossImmortal] == OFF
$game_troop.dmg_unaffected(2, false)
Text: The Zombie is now vulnerable!
Control Switches: [BossImmortal] = On
Branch End
Branch End

Then I copied that event page and changed the conditional branch requirements for the second Imp.

Note: I had to use a switch so it wouldn't mention that it was now vulnerable turn after turn.
[Image: SP1-Writer.png]
[Image: SP1-PixelArtist.png]
Reply
#6
Wait, that wasn't supported baseline in rpgmaker XP?

I think I'm going to throw up! Even VX had that functionality!
Reply
#7
(05-23-2025, 11:37 PM)Remi-chan Wrote: Wait, that wasn't supported baseline in rpgmaker XP?

I think I'm going to throw up! Even VX had that functionality!

Laughing Yeah, RMXP is my favorite as it's the little engine that could, but the stock engine lacks a lot of convenient little things (in particular, linking skills to weapons/armor). This place has been a godsend for me in terms of scripts.
[Image: SP1-Writer.png]
[Image: SP1-PixelArtist.png]
Reply


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



Users browsing this thread: 2 Guest(s)