Menu

#1976 New NPCs do not lose spells on death

Unimplemented
closed-invalid
nobody
5
2026-01-10
2016-08-17
No

As part of my project to convert the spawned NPCs into real ones with schedules, I have come across a few bugs as detailed here: http://exult.sourceforge.net/forum/read.php?f=1&i=1717675&t=1717675

The bugs listed in this report are all on NPCs added via ES, not the prior usecode-only method. I am using the latest built 2016-08-09 for all tools, including UCC.exe.

1) New NPCs do not lose their spell shapes. Shal and Elissa, when slain, still have the items in their backpack and bag, respectively. They should disappear the way Vasculio's do. They are now in their locations from the start, so simply start a new game and teleport to them.

For this issue, I am not sure a new function for (event == DEATH) could be used to remove the items from the dying person, or if there is some other code involved that's not part of usecode.

2) Not all NPC flags and settings are saved/consistent between ES and what happens in the game. From my testing, it appears that the Ident number, SI_Tournament flag (29) and even the companions MET flag are not set/used from the start, but are somehow set after the opening sequence with Iolo's speech. So this might just need to be noted somewhere, and the function in usecode identified.

As an example, after Iolo's opening speech, if you check 293 you'll see DBeyer has the SI_Tournament flag set, but not immediately before that or in ES. Or Johnson, 285, only gets his Ident number when you are near him.

1 Attachments

Discussion

  • Knight Captain

    Knight Captain - 2016-11-18

    For the spell shape issue, I added usecode that fixes this to SIfixes. It will be included in my next merge request.

     
  • Dominik Reichardt

    • status: open --> closed-invalid
     
  • Dominik Reichardt

    In my mod, I changed the hacky way that NPCs were added in the Silver Seed (and Ernesto) from spawned by eggs to proper NPCs with schedules. It seems there is an undocumented difference between the way spawned NPCs act when killed, in that they lose any spell shapes that are on them. But "real" NPCs don't do the same thing, so I wrote some Usecode to address this. I'm not sure if I should have some technical notes document someplace official or not?

    The second issue I list is correct, there is a bunch of game start Usecode that does things like reset flags on NPCs, including party members. It's not a bug so much as something to document, I guess.
    In short this one we can consider closed.

     
MongoDB Logo MongoDB