Try / OpenGothic

Reimplementation of Gothic 2 Notr
MIT License
1.14k stars 80 forks source link

[Gothic 1] Game freezes in Xardas' tower #646

Open Rez2557 opened 3 months ago

Rez2557 commented 3 months ago

I'm playing on Fedora Linux, GOG version. I just got to the Xardas' tower in the fourth chapter. When I enter the tower, to the left there is a Lesser Demon, that seems to autotalk with me. When in does that my character and the demon freeze mid-animation, no text pops up, but I can still move the camera up and down with the mouse. I can't seem to attach my save file, but here's the log.txt:

OpenGothic v1.0 dev
no "SystemPack.ini" file in path - using default settings
GPU = AMD Radeon Graphics (RADV RENOIR)
Depth format = Depth32F Shadow format = Depth16
[zenkit] Parsing object [MeshAndBsp % 0 0]
[zenkit] Parsing chunk c000
[zenkit] Parsing chunk c010
[zenkit] Parsing chunk c040
[zenkit] Parsing chunk c045
[zenkit] Parsing chunk c050
[zenkit] Parsing chunk c0ff
[zenkit] Parsing object [VobTree % 0 0]
[zenkit] Parsing object [WayNet % 0 0]
[zenkit] Parsing object [EndMarker % 0 0]
[zenkit] detected invalid use of KEYWORD "ani" in "Model" block. Ignoring rest of script.
unable to load sound fx: WOOD_NIGHT2
[zenkit] detected invalid use of KEYWORD "*eventSFX" in "Model" block. Ignoring rest of script.
[zenkit] Syntax error (line 138, column 55): String not terminated
comb not found: t_FIREPLACE_Stand_2_S0 -> c_FP_STAND_2_S0_(c_FP_STAND_2_S0_2)
comb not found: t_FIREPLACE_S0_2_Stand -> c_FP_STAND_2_S0_(c_FP_STAND_2_S0_2)
[zenkit] Syntax error (line 162, column 56): String not terminated
alias not found: r_Roam1 -> r_Scratch
alias not found: t_SwimF_2_Dive -> t_swim_2_dive
alias not found: t_FistWalkBL_2_FistWalk -> t_FistWalk_2_FistWalkL
[zenkit] Syntax error (line 3186, column 2): comments must start with two slashes
comb not found: t_FIREPLACE_Stand_2_S0 -> c_FP_STAND_2_S0_(c_FP_STAND_2_S0_2)
comb not found: t_FIREPLACE_S0_2_Stand -> c_FP_STAND_2_S0_(c_FP_STAND_2_S0_2)
alias not found: t_Walk_2_WalkBL -> t_walkL_2_Walk
alias not found: t_FallenB_2_Stand -> t_Fallen_2_Stand  
[zenkit] Syntax error (line 55, column 104): String not terminated
[zenkit] Syntax error (line 55, column 117): String not terminated
[zenkit] detected invalid use of KEYWORD "aniAlias" in "Model" block. Ignoring rest of script.
alias not found: t_SwimF_2_Dive -> t_swim_2_dive
[zenkit] Syntax error (line 3186, column 2): comments must start with two slashes
comb not found: t_FIREPLACE_Stand_2_S0 -> c_FP_STAND_2_S0_(c_FP_STAND_2_S0_2)
comb not found: t_FIREPLACE_S0_2_Stand -> c_FP_STAND_2_S0_(c_FP_STAND_2_S0_2)
alias not found: t_Walk_2_WalkBL -> t_walkL_2_Walk
invalid particle system: "MFX_Thunderebolt_INIT"
not implemented call [NPC_GETNEXTWP]
Rez2557 commented 2 months ago

To anyone who encounters this before the issue is fixed, here's a workaround:

  1. Enable the console by typing 'marvin' while the stats screen is opened
  2. Press F2 to open the console
  3. Type this command 'goto pos -12000 3650 -34000'

This will teleport you to Xardas' room, bypassing having to talk to the demon

Try commented 2 months ago

Hi, @Rez2557 and thanks for report!

I can't seem to attach my save file, but here's the log.txt

zipping save file should help - github usually complains about unknown extensions

thokkat commented 2 months ago

@Try looked already what's happening and found the issue plus two additional ones.

To reproduce take option Find Xardas in chapter 4 story helper dialog and then goto waypoint DT_MAINGATE.

PercTime is never set for demon leading to an infinite AI_StandUp loop. Changing the default value for perceptionTime to 1000 fixes it in a new game.

There are two other problems where I haven't found a good solution besides hacking something in.

Talking perc is linked to ZS_Talk in ZS_XardasDemon instead of the usual B_AssessTalk which doesn't trigger talk state but only executing ZS_Talk function. At a second talking attempt AIV_INVINCIBLE is still true which prevents talking.

FUNC void ZS_Talk ()
{
    PrintDebugNpc(PD_ZS_FRAME,"ZS_Talk");

    // early exit
    if (other.aivar[AIV_INVINCIBLE]==TRUE)
    {
        PrintDebugNpc       (PD_ZS_CHECK,   "...SC spricht schon!");
        AI_ContinueRoutine  (self);
        return;             
    };

    C_ZSInit(); 
    B_SetFaceExpression(self, other);

    self.aivar[AIV_INVINCIBLE]=TRUE;
    other.aivar[AIV_INVINCIBLE]=TRUE;

Third problem is that hero is still talking but can already move and camera is no longer in dialog mode when ending the dialog.

FUNC VOID  Info_XardasDemon_EXIT_Info()
{
    AI_Output (self, other,"DIA_BaalCadar_NoTalk_Hi_02_01"); //
    AI_Output (hero, self,"Info_Saturas_EXIT_15_01"); //... Mortal?... who, me?... Okay, I'm on my way!

    AI_StopProcessInfos (self); // called before Info_Saturas_EXIT_15_01; ended
};