OpenGothic icon indicating copy to clipboard operation
OpenGothic copied to clipboard

[Gothic II - NOTR] Brother Garwig dead on each playthrough

Open Laminator42 opened this issue 6 months ago • 9 comments

Describe the bug On both saves (mage and paladin) brother Garwig seems to be dead at start of the game.

At least I couldn't find him on both runs, and I was attacked by the Serpentes, when I gave him the hammer back after joining the mages.

I did change the games variables on the mage run (to fix Lares not showing the option to guide me to the water mages) using set var. I did not dabble with the save game on the second run, though. My best guest would be that the save file is incorrectly initialized?

Save-game/Log-file/Screenshots/Video Note: I inserted him back into the world on the mage save, since I couldn't progress the story otherwise.

saves.tar.gz

If applicable, add screenshots or save-game file to help explain your problem.

Application log If relevant attach log.txt file or, in case of game-crash, crash.log

System Build: v1.0.3321 OS: Arch Linux

EDIT: I'm also not entirely sure if it's the game files or the engine that cause this. Initial state of each NPC should technically be part of the game files, right? On the other hand, I don't remember having that issue, when I ran the game over steam.

Laminator42 avatar Aug 27 '25 23:08 Laminator42

same

Attilar576 avatar Sep 10 '25 12:09 Attilar576

Could be related to https://github.com/Try/OpenGothic/issues/657

versable avatar Oct 27 '25 15:10 versable

I've looked only a bit into brother Garwig case. Increasing game speed and wait for a few in-game days, unfortunately want enough to reproduce this issue so far.

Try avatar Oct 27 '25 20:10 Try

This one was on me, sorry for that. PR should fix it.

thokkat avatar Oct 30 '25 17:10 thokkat

Hi, @thokkat!

It doesn't seem, that your patch addresses Garwig's issue. Brother Garwig, according to script never changes waypoint, instead always stands on "NW_MONASTERY_ENTRY_01".

Waypoint/Routines are probable related to cases like #829

Try avatar Oct 30 '25 18:10 Try

I can reproduce Garwig's dissapearing. He exists until Hero goes to sleep. If Hero went to sleep then Garwig disappears.

https://github.com/user-attachments/assets/c490d594-f8dc-48da-b8b2-5288a332b78d

save_slot_1.sav.gz

AlexJakeGreen avatar Oct 30 '25 22:10 AlexJakeGreen

I can't find Garwig either and when I try inserting him via insert garwig the game crashes (i'm using the remaster mod with remaster scripts)

crash.log

save_slot_1.sav.zip

log.txt

EDIT: sometimes the game doesn't crash but it doesn't insert Garwig. it prints the following log:

[zenkit] Parsing object [VobTree % 0 0]
[zenkit] Parsing object [EndMarker % 0 0]
[zenkit] Internal Exception: popping instance from empty stack
[zenkit] Internal Exception: popping instance from empty stack 

@Try I also just tried the newest build but the problem persists (keep getting the Internal Exception)

yankydoo avatar Nov 05 '25 20:11 yankydoo

Hi, @yankydoo !

It should be insert NOV_608_Garwig. Problem with insert garwig - it invokes variable instead of actual npc-prototype.

CC @lmichaelis Problem is reproducible on non-modded gothic2. Basically VM can't tell the difference between instance and variable pointing to npc. When insert garwig called VM eventually attempts to execute byte-code at address equal to zero.

While executing 0, it also underflow stack, resulting in _m_stack_ptr = 65'535. Crash can occur as soon as next call.

Try avatar Nov 09 '25 23:11 Try

Now I feel stupid for not finding the insert codes. Thank you for your help and your work!

yankydoo avatar Nov 10 '25 09:11 yankydoo