Scripting abilities to trigger on death

Feel free to discuss anything related to the creation of new KotC 2 adventures using the toolset.

Scripting abilities to trigger on death

Postby Fungeon_Master » Sun May 21, 2023 4:18 pm

I'm looking to spice up the zombies and add the ability Undead Fortitude.

Undead Fortitude. If damage reduces the zombie to 0 hit points, it must make a Constitution saving throw with a DC of 5 + the damage taken, unless the damage is radiant or from a critical hit. On a success, the zombie drops to 1 hit point instead.

I realise that it may not be possible to script it exactly but I would like to be able to make the zombies at least have a chance to get back up with 1 hp.

Here's what I have so far:

Create variable   . Roll to Determine if Undead Fortitude Triggers   0
Assign die roll to variable   . Roll to Determine if Undead Fortitude Triggers  20
If variable   . Roll to Determine if Undead Fortitude Triggers  Is above or equal to the number  8
If character has condition    Test_Zombie_0001  Dead
Give condition   Remove from  Test_Zombie_0001  Dead  Rounds  0   0  0
End if 
Set HPs   Zombie_0001  1
End if
End script

Any help would be appreciated.
Fungeon_Master
Kobold (CR 1/4)
Knights of the Chalice
 
Posts: 1
Joined: Sun May 21, 2023 3:12 pm

Scripting abilities to trigger on death

Advert
 

Re: Scripting abilities to trigger on death

Postby BlueSalamander » Sat May 27, 2023 5:46 pm

Hello Fungeon_Master :)

First off, zombies don't have a good constitution - traditionally they don't have a constitution score, but in the game all creatures have a constitution score, so I gave them a score of 10. So anyway, they wouldn't get any bonus on a fortitude save.

Now about your request, I think that something like that would have to be hard coded.

With a Wounded Script, you could do something like the following:

Code: Select all
If the creature's Hit Points are below 10
{
     Set in variable X the result of a Fortitude saving throw (or strength ability check)
     If variable X is above the difficulty class then
     {
           Set the creature's Hit Points to 10
     }
}

That means whenever its HP would drop to between 1 and 10, it will get a chance to immediately recover to 10 HPs.

BTW 'Remove Condition - Dead' is not how you bring creatures into combat (or resurrect them). You have to use the script command that adds a new combatant to the fight.

To resurrect a creature after combat, you can use the 'Apply Temple Healing' command to the creature.

Best regards 8-)
'Say there is a chunk of meat. Pirates will have a banquet and eat it! But heroes will share it with other people. I want all the meat!!' - Luffy in One Piece
User avatar
BlueSalamander
Master Conjuror
 
Posts: 1908
Joined: Sun May 18, 2008 6:20 pm


Return to KotC 2 Forum for Adventure-Module Creation

Who is online

Users browsing this forum: No registered users and 4 guests