5ed Death System problem

So I am almost there on my death system.

When the player goes down it makes the death saving throws and either kills / raises them (3 fails, or a 20).

The spot I am having some trouble with is the “stabilized” part. The NPC keeps attacking the player when they are down forcing them beyond -10 HP and killing them.

I have been playing around with some options there but I figured I could save myself a couple of days of messing around asking here.

What I would like to happen is when the player goes down then THAT player is no longer attacked by the monsters unless they get up. This will be used in a multi-player environment though so I would still want them to attack the other PC’s. Because of this I don’t believe changing faction reputation would work.

It leaves me not sure where to look for getting this to work but I am going to guess people here will have a good idea or three.

Thanks in advance.

This has been done in a number of ways, but I checked in the ole’ CRAP scripts for this little bit from the OnDying script

    AssignCommand(oDying, ClearAllActions());

    //Stop enemies from attacking...
    int nNth = 1;
    object oEnemy = GetNearestObject(OBJECT_TYPE_CREATURE, oDying, nNth);
    while(GetIsObjectValid(oEnemy) && nNth <= 15)
        if(GetReputation(oEnemy, oDying) <= 10)
            //SendMessageToPC(oDying, GetName(oEnemy));
            AssignCommand(oEnemy, ClearAllActions());
            SetIsTemporaryNeutral(oDying, oEnemy, TRUE, 66.0);
            DelayCommand(1.0, AssignCommand(oEnemy, DetermineCombatRound()));
        oEnemy = GetNearestObject(OBJECT_TYPE_CREATURE, oDying, nNth);

You could add an effect ethereal (which is like sanctuary but without saving throws) to the dying characters.

if you’re willing to tinker with AI scripts (including core ai) you might be able to find what determination is used to consider a creature “dead dead” – and replace it with GetCurrentHitPoints(oCreature) < 1

ie. ignore that creature and move on to another

Eg. replace

if (!GetIsDead(oCreature)) // etc
    // attack, cast spell, etc


if (GetCurrentHitPoints(oCreature) > 0) // etc
    // attack, cast spell, etc

Some really good ideas here, thanks guys.

Anyone know if taking massive damage (say 30 points when you have 2 HP left) just kills you outright or does it still fire the OnPlayerDying script or does it take you straight to dead?

For the record if you die outright it jumps straight to the ondeath script.

In my case I replaced ondeath with a resurrection, set HP to 1 and then 1 magic damage applied so you drop and then it jumps into the onplayerDying Script. in retrospect it might have made more sense to run the system in the OnDeath and have the dying script just kill the PC but I needed the player “alive” for some of the other scripting I am doing. It’s not perfect but it works.