Death system oddities

Scripted ALFA systems & related tech discussions (ACR)

Moderators: ALFA Administrators, Staff - Technical

Locked
User avatar
AcadiusLost
Chosen of Forumamus, God of Forums
Posts: 5061
Joined: Tue Oct 19, 2004 8:38 am
Location: Montara, CA [GMT -8]
Contact:

Death system oddities

Post by AcadiusLost »

A few observations/bugs I'd like to fix, if possible- would welcome any advice on what may be causing them / how best to address them.

1. Nondecaying corpses: I haven't been able to replicate this independently, but it seems under some combination of conditions, we're ending up with PC corpses that no longer have "body" items contained inside. As such, they become immobile, and seem to persist in this "permanent" persistent state long after they should have been cleared by natural scripted decay. This may have to do with some combination of moving the corpse (CorpseOnAcquire, CorpseOnUnAquire), server reset(s), and/or subsequent PC deaths from the same player. Interested in angles on a clean fix, as well as ideas for a stopgap kludge (destroy corpse if there is no body inside,etc).

2. Deaths while in the morgue/fugue: Two dead PCs are in the morgue. One inadvertantly attacks the other, triggering the OnDying() events again on a PC already flagged as dead. Status effect blocks the double-dead PC from moving inside the morgue, and interferes with subsequent rez attempts. We could add some sort of invulnurability to PCs in the morgue/fugue, but then we'd need a pointer to the effect to clear it on resurrection, and there would be the danger of exceptions leading to the "dead" PC getting back out into the gameworld while enjoying invulnerability. Should we just check for the death flag OnDying, and heal back to 1 hp in that case? Seems like a fugue/morgue death is the only likely place for firing the OnPlayerDying event with the PC already flagged as dead in the database.

3. Resurrection Penalty 1: The Raise Dead spell triggers the ACR_DeathOnRessurect() hook, which is coded to apply PnP penalties to PCs who are the recipients of this spell. The standard penalty is loss of one level (adjusts PC to halfway through their prior level in terms of XP). This penalty cannot be applied properly to a level one PC receiving a rez, so the PhB offers a permanent loss of 2 points of constitution to reflect the traumatic nature of the resurrection. We currently do not have this CON penalty coded, but instead drop such PCs back down to 1 xp. The DMA has expressed a sentiment that the -2 CON penalty, while appropriate for PnP, is too great a penalty in a PW. As such, I will leave the scripts as is, though I could code the CON loss with a configuration switch in case there are mixed feelings on this.

4. Resurrection Penalty 2: Currently, the XP penalty is not applied when the caster of the spells is: 1. A DM Avatar, or 2. An NPC Possessed by a DM Avatar. I believe this is meant to put more control in the hands of the DMs- but in practice it means the death penalty must be applied manually whenever a DM is involved in any way with the rez. I propose to change this, so a casting DM avatar skips the penalty (but gets a warning sent to the DM channel, and a Tech Rez flagged to the central logs), while a DM-possessed NPC caster applies the scripted penalty as normal. If there is a compelling reason why possessed NPCs should skip the rez penalty, it'd be useful to know- to me a possessed NPC indicates an IC rez.
HEEGZ
Dungeon Master
Posts: 7085
Joined: Wed Dec 28, 2005 4:17 pm
Location: US CST

Post by HEEGZ »

If this system is on the OAS2 i'll be happy to check into it later this week once MotB arrives.
User avatar
AcadiusLost
Chosen of Forumamus, God of Forums
Posts: 5061
Joined: Tue Oct 19, 2004 8:38 am
Location: Montara, CA [GMT -8]
Contact:

Post by AcadiusLost »

This system is on the OAS2, as it has been for months. It is also in use for Live play on Exodus's server, Amn. I'm more interested in getting Cipher and/or other scripters' suggestions on how to implement fixes, possible sources of bugs, and why things like the exception for DM-Possessed NPCs are in the code. Most of the behaviours above have already been pretty well characterized in playtesting.
User avatar
ç i p h é r
Retired
Posts: 2904
Joined: Fri Oct 21, 2005 4:12 pm
Location: US Central (GMT - 6)

Re: Death system oddities

Post by ç i p h é r »

1. I thought we had a cleanup script OnModuleLoad to purge decayed corpses. If not, maybe that's the best place for a check.

2. The simplest solution is to not allow any PVP in the morgue.

3. I think this is fine.

4. A good compromise, AL.
User avatar
AcadiusLost
Chosen of Forumamus, God of Forums
Posts: 5061
Joined: Tue Oct 19, 2004 8:38 am
Location: Montara, CA [GMT -8]
Contact:

Re: Death system oddities

Post by AcadiusLost »

AcadiusLost wrote:1. Nondecaying corpses:
I noticed that the tags on the corpse placeables and body items were being set to the public CDkey of the player, which means a GetCorpseFromPlayer() wouldn't necessarily pick up the correct corpse for the frequent-death crowd. Not sure that this is the cause, but figured it would be a good thing to address while I was in there. All references have been changed to PublicCDKey_CharID, just like the database entries. This is in place on the OAS2, checked it for death, corpse looting, replacing, relooting, then scripted rez, seems to be functioning.

I did notice, though, that logging in with the "dead" PC gives the "Your corpse has decayed, this PC is no longer playable" message, even though little time had passed since the death, and examination and movement of the corpse with another PC revealed that it certainly wasn't decayed. May be a problem with the ACR_GetIsCorpseDecayed() timecheck function.
AcadiusLost wrote:2. Deaths while in the morgue/fugue:
I like your solution, Cipher- simple and effective. Will switch the morgue on the OAS2 tonight.
AcadiusLost wrote:3. Resurrection Penalty 1:
Coded the Supernatural/instant effect of CON loss as an alternative to the XP loss for 1st level PCs, set by an integer at the top of acr_death_i - it appears to work reliably, though the stat shows up as "red", and a "constitution decreased" effect always shows on the sheet. Disabled this handling in favor of the "lose all XP" system we had before after testing.
AcadiusLost wrote:4. Resurrection Penalty 2:
Change applied, logging added. All rezes will report to logs and DM channel, with the recipient, caster, and whether or not a penalty was applied included.

Other assorted fixes: Think I've got RP XP set not to accrue/award if a PC logs in bleeding or dead, which should avoid the unlikely chance of RP XP from lying around unconscious/stabilized from leveling a PC out of death. It's set to start up again when a PC is resurrected as well, though that may need more testing. In place on the OAS2 now.
User avatar
Runestaff
Dire Badger
Posts: 151
Joined: Sun Sep 05, 2004 11:47 pm

Re: Death system oddities

Post by Runestaff »

AcadiusLost wrote:If there is a compelling reason why possessed NPCs should skip the rez penalty, it'd be useful to know- to me a possessed NPC indicates an IC rez.
This statement presupposes that a DM will never opt to handle a tech raise in a IC manner. I've seen PCs killed due to DM error or overzealousness granted resurrections from possessed NPCs following corpse retrieval by the rest of the party. Perhaps that doesn't fit the definition of "tech" raise.

If memory serves, the ALFA1 system de-levelled you when you died, not when you were resurrected. Doing it that way allowed DMs to restore lost xp if it was decided the circumstances warranted it. Taking the same approach would skirt the issue of possessed vs. unpossessed NPCs.
User avatar
ç i p h é r
Retired
Posts: 2904
Joined: Fri Oct 21, 2005 4:12 pm
Location: US Central (GMT - 6)

Post by ç i p h é r »

Staying IC is a DM's prerogative but a tech raise is still an OOC action.

The primary reason we applied the penalties on resurrection was to accommodate tech raises. Deleveling someone intentionally is one thing, but doing it unintentionally means that the player has to rebuild the level, and apparently this has happened often enough that it was a problem many folks wanted to avoid this time around.

The secondary reason we applied the penalties on resurrection is that there are no death penalties in actuality. Per the rules, the penalties are incurred as a result of bringing someone back from the dead.
Locked