gothic-1-community-patch
gothic-1-community-patch copied to clipboard
Natalia acts as if Y'Berion is alive
Describe the bug Natalia acts as if Y'Berion is alive.
Expected behavior Natalia doesn't act as if Y'Berian is alive when he is dead.
Steps to reproduce the issue
- Be in Chapter 3 or further.
- Visit the temple of the Swamp Camp
- 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.
~~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.
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()
:
And Chani has the correct schedule:
How can I check the running procedure? Because looks like for me she still has the procedure
Rtn_start_1421()
and notRtn_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.~~
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.
Looks similar to #124
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
.