gothic-1-community-patch icon indicating copy to clipboard operation
gothic-1-community-patch copied to clipboard

Natalia acts as if Y'Berion is alive

Open OrcPriestPsychologist opened this issue 2 years ago • 6 comments

Describe the bug Natalia acts as if Y'Berion is alive.

natalia

Expected behavior Natalia doesn't act as if Y'Berian is alive when he is dead.

Steps to reproduce the issue

  1. Be in Chapter 3 or further.
  2. Visit the temple of the Swamp Camp
  3. Look at Natalia's behaviour or check her schedule(J key in the test mode)

Additional context The function that should switch her behaviour is B_Story_PrepareRitual()

https://github.com/AmProsius/gothic-1-community-patch/blob/2892a60a3edf33340d7907fe7b3c137d079e8474/scriptbase/_work/Data/Scripts/Content/Story/Chapters/B_Story_PrepareRitual.d#L41-L42

It works for Chani but doesn't work for Natalia.

I guess the reason is a wrong routine's name in GUR_1207_Natalia.d

https://github.com/AmProsius/gothic-1-community-patch/blob/2892a60a3edf33340d7907fe7b3c137d079e8474/scriptbase/_work/Data/Scripts/Content/Story/NPC/GUR_1207_Natalia.d#L62-L66

If I understand correctly how routines work the name should be RTN_dead_1207 because Natalia's id is 1207.

OrcPriestPsychologist avatar Nov 04 '22 00:11 OrcPriestPsychologist

~~It is correct that the routine name does not match the NPC's ID, but that is no error. The routine 1421 is correctly started for NPC Natalia.~~

Scratch that.

AmProsius avatar Feb 19 '24 13:02 AmProsius

The routine 1421 is correctly started for NPC Natalia.

How can I check the running procedure? Because looks like for me she still has the procedure Rtn_start_1421() and not Rtn_dead_1421():

natalia

And Chani has the correct schedule: chani

OrcPriestPsychologist avatar Feb 19 '24 20:02 OrcPriestPsychologist

How can I check the running procedure? Because looks like for me she still has the procedure Rtn_start_1421() and not Rtn_dead_1421()

Sorry, there might have been a misunderstanding. Just from the script's point of view, the routine is correctly started with the ID of 1421:

https://github.com/AmProsius/gothic-1-community-patch/blob/2892a60a3edf33340d7907fe7b3c137d079e8474/scriptbase/_work/Data/Scripts/Content/Story/NPC/GUR_1207_Natalia.d#L35

~~Just to clarify that the routine's ID doesn't necessarily need to match the NPC's ID. But we'll investigate this further.~~

AmProsius avatar Feb 20 '24 07:02 AmProsius

the routine's ID doesn't necessarily need to match the NPC's ID

I think they should match for the case when B_ExchangeRoutine() is called. I assume B_ExchangeRoutine() combines the NPC's ID and a passed string to get the name of a procedure.

https://github.com/AmProsius/gothic-1-community-patch/blob/2892a60a3edf33340d7907fe7b3c137d079e8474/scriptbase/_work/Data/Scripts/Content/Story/Chapters/B_Story_PrepareRitual.d#L41-L42

For Chani it does "1205" + "dead" = "Rtn_dead_1205". Then finds the procedure and assigns it.

For Natalia it does "1207" + "dead" = Rtn_dead_1207". Such procedure doesn't exist. So the schedule switch in ch. 3 doesn't happen.

OrcPriestPsychologist avatar Feb 20 '24 10:02 OrcPriestPsychologist

Looks similar to #124

OrcPriestPsychologist avatar Feb 21 '24 20:02 OrcPriestPsychologist

You are totally right!

Provided fix:

https://github.com/AmProsius/gothic-1-community-patch/blob/2892a60a3edf33340d7907fe7b3c137d079e8474/scriptbase/_work/Data/Scripts/Content/Story/NPC/GUR_1207_Natalia.d#L10

changed to

    id          =   1421;

I've checked that no other NPC uses the ID 1421.

AmProsius avatar Feb 21 '24 20:02 AmProsius