Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Natalia acts as if Y'Berion is alive #360

Open
OrcPriestPsychologist opened this issue Nov 4, 2022 · 6 comments
Open

Natalia acts as if Y'Berion is alive #360

OrcPriestPsychologist opened this issue Nov 4, 2022 · 6 comments
Assignees
Labels
compatibility: easy This issue is easy to make compatible. impl: modify/analyze script func This issue requires analyzing and/or modifying the bytecode of script functions. provided fix This issue has a fix provided in the comments. type: session fix The fix for this issues is persistent across a session. validation: validated This issue is still present even with Systempack/Union.
Milestone

Comments

@OrcPriestPsychologist
Copy link

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()

B_ExchangeRoutine (Gur_1205_Chani, "dead");
B_ExchangeRoutine (Gur_1207_Natalia, "dead");

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

FUNC VOID Rtn_dead_1421()
{
TA_Babe_SitAround (00,00,06,00, "PSI_TEMPLE_ROOMS_IN_03");
TA_Babe_SitAround (06,00,00,00, "PSI_TEMPLE_ROOMS_IN_03");
};

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

@OrcPriestPsychologist OrcPriestPsychologist added the validation: required This issue needs validation from one of the validators. label Nov 4, 2022
@AmProsius
Copy link
Owner

AmProsius commented Feb 19, 2024

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 AmProsius self-assigned this Feb 19, 2024
@AmProsius AmProsius added this to To Do in v1.3.0 via automation Feb 19, 2024
@AmProsius AmProsius added this to the v1.3.0 milestone Feb 19, 2024
@AmProsius AmProsius added type: session fix The fix for this issues is persistent across a session. compatibility: easy This issue is easy to make compatible. provided fix This issue has a fix provided in the comments. impl: replace assign/push str This issue requires replacing pushed strings or string assignments in the scripts. labels Feb 19, 2024
@AmProsius AmProsius added this to Change daily routine waypoint in Fix templates Feb 19, 2024
@OrcPriestPsychologist
Copy link
Author

OrcPriestPsychologist commented Feb 19, 2024

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

@AmProsius AmProsius removed type: session fix The fix for this issues is persistent across a session. compatibility: easy This issue is easy to make compatible. provided fix This issue has a fix provided in the comments. impl: replace assign/push str This issue requires replacing pushed strings or string assignments in the scripts. labels Feb 20, 2024
@AmProsius AmProsius removed this from To Do in v1.3.0 Feb 20, 2024
@AmProsius AmProsius removed this from Change daily routine waypoint in Fix templates Feb 20, 2024
@AmProsius AmProsius removed this from the v1.3.0 milestone Feb 20, 2024
@AmProsius
Copy link
Owner

AmProsius commented Feb 20, 2024

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:

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

@OrcPriestPsychologist
Copy link
Author

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.

B_ExchangeRoutine (Gur_1205_Chani, "dead");
B_ExchangeRoutine (Gur_1207_Natalia, "dead");

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
Copy link
Author

Looks similar to #124

@AmProsius AmProsius added type: session fix The fix for this issues is persistent across a session. compatibility: easy This issue is easy to make compatible. validation: validated This issue is still present even with Systempack/Union. provided fix This issue has a fix provided in the comments. impl: modify/analyze script func This issue requires analyzing and/or modifying the bytecode of script functions. and removed validation: required This issue needs validation from one of the validators. labels Feb 21, 2024
@AmProsius
Copy link
Owner

You are totally right!

Provided fix:

changed to

    id          =   1421;

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

@AmProsius AmProsius added this to To Do in v1.3.0 via automation Feb 21, 2024
@AmProsius AmProsius added this to the v1.3.0 milestone Feb 21, 2024
@AmProsius AmProsius added this to Change NPC instance variable (int) in Fix templates Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility: easy This issue is easy to make compatible. impl: modify/analyze script func This issue requires analyzing and/or modifying the bytecode of script functions. provided fix This issue has a fix provided in the comments. type: session fix The fix for this issues is persistent across a session. validation: validated This issue is still present even with Systempack/Union.
Projects
Fix templates
Change NPC instance variable (int)
v1.3.0
  
To Do
Development

No branches or pull requests

2 participants