OpenGothic icon indicating copy to clipboard operation
OpenGothic copied to clipboard

NPC problems

Open sirsteve1 opened this issue 3 years ago • 3 comments

Dear @Try

During gameplay I experienced some human NPC bugs:

  • [ ] NPC corpses stay forever: Some dead NPCs won't disappear. I think in the original game NPCs are disappearing mostly after sleeping (or a specific time, I don't really know when). Important are quest items within the inventory. Some dead NPCs, like random bandits, are disappearing. Yet e.g. the knights in front of the entrance to the minevalley (dead when coming back first time) or the novices I killed for the mage quest Test of Fire, also most bandits I killed in the bandit camp (Franco, Esteban, Bloodwyn, Senyan, ...) remain.
  • [ ] NPCs won't heal in time: When knocking someone down (or simply fighting partly) either a human NPC or a monster, their hitpoints won't refill in time. In vanilla Gothic NPCs had their full hitpoints back after some time. I knocked down Moe in front of the tavern at the harbour during chapter 1, now I am at the end of chapter 3 and he still has no hitpoints. For some knocked down merceneraies waiting on fields like Buster having no hitpoints is critical as a simple hit from a monster will kill them.
  • [x] Interaction animations too short / no dialog pause: When handing over an item during a dialog, like giving Xardas a letter from Saturas that he will read or giving a pirate a drink, the dialog will immediately continue without waiting for the animation to finish. Also, when NPCs do read letters, they won't read the letter for longer than a split-second. Letting them read at least for 3 seconds would make letter-interaction more natural.

sirsteve1 avatar Nov 14 '22 10:11 sirsteve1

Hi, @sirsteve1

NPC corpses stay forever. Some dead NPCs won't disappear.

Some? Could it be, that they have been marked as NPCTYPE_OCMAIN (or similar)?

NPCs won't heal in time

This mechanic existed in original be accident. When player is far from npc, vanilla engine offloads it from memory, stashing only a few properties. We don't know for sure what properties are "safe" to reset and what are not. OpenGothic needs to close this difference somehow, but it's not clear to how exactly. Maybe refill HP at resetPositionToTA, maybe something else - not sure.

Interaction animations too short / no dialog pause

Can confirm for now. Need to take another look on this.

Try avatar Nov 14 '22 20:11 Try

Hi, @sirsteve1

NPC corpses stay forever. Some dead NPCs won't disappear.

Some? Could it be, that they have been marked as NPCTYPE_OCMAIN (or similar)?

How could I check this?

NPCs won't heal in time

This mechanic existed in original be accident. When player is far from npc, vanilla engine offloads it from memory, stashing only a few properties. We don't know for sure what properties are "safe" to reset and what are not. OpenGothic needs to close this difference somehow, but it's not clear to how exactly. Maybe refill HP at resetPositionToTA, maybe something else - not sure.

When does resetPositionToTA is called? Is it during sleep / world transition? Or are there also other moments when this is called? Sounds at least reasonable to refill HP then. Probably it would also be good to refill mana, just in case.

Interaction animations too short / no dialog pause

Can confirm for now. Need to take another look on this.

Sarcastic funfact: Also killing someone plays immediately the "dying cry" sound even though the person is not yet dead (at the start of the kill-with-sword-interaction).

sirsteve1 avatar Nov 16 '22 08:11 sirsteve1

How could I check this?

Share *.sav file and a list of npc's - I'll check in debug build.

When does resetPositionToTA is called?

When game-state need to be reset: sleep, transition atm.

Try avatar Nov 19 '22 23:11 Try

NPC corpses stay forever

Should be fixed in af1dfd823a7607371d63dfe44cccb1c3e4d6161f

Try avatar Jul 17 '24 21:07 Try