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

Cavalorn not listed as tutor #204

Merged
merged 3 commits into from Apr 18, 2021
Merged

Cavalorn not listed as tutor #204

merged 3 commits into from Apr 18, 2021

Conversation

AmProsius
Copy link
Owner

@AmProsius AmProsius commented Apr 16, 2021

Describe the bug
When asking Fingers about Cavalorn, he is not listed in "Diary/General Info/Tutor outside the camps" if the topic wasn't previously created.

Expected behavior
When asking Fingers about Cavalorn, he is now listed in "Tutor outside the camps" in the journal.

Additional context
Similar to #37 and #203.

@AmProsius AmProsius added type: revert on save compatibility: difficult validation: validated provided fix impl: modify/analyze script func labels Mar 26, 2021
@AmProsius AmProsius added this to the v1.1.0 milestone Mar 26, 2021
@AmProsius AmProsius added this to To Do in v1.1.0 via automation Mar 26, 2021
@AmProsius AmProsius added this to Dialog: Info function in Fix templates Mar 26, 2021
@AmProsius
Copy link
Owner Author

@AmProsius AmProsius commented Mar 26, 2021

FUNC VOID DIA_Fingers_WhereCavalorn_Info()
{
AI_Output (other, self,"DIA_Fingers_WhereCavalorn_15_00"); //Where can I find Cavalorn?
AI_Output (self, other,"DIA_Fingers_WhereCavalorn_05_01"); //He's hunting out in the wild. You'll find him at the path to the New Camp. Westwards of the Old Camp there's a wide canyon.
AI_Output (self, other,"DIA_Fingers_WhereCavalorn_05_02"); //In this canyon there's an old woodcutters' hut. You'll find him there.
B_LogEntry( GE_TeacherOW,"Cavalorn can teach me to sneak. His hut is in a canyon to the west of the Old Camp, in the direction of the New Camp.");
};

changed to

FUNC VOID DIA_Fingers_WhereCavalorn_Info()
{
    AI_Output (other, self,"DIA_Fingers_WhereCavalorn_15_00"); //Where can I find Cavalorn?
    AI_Output (self, other,"DIA_Fingers_WhereCavalorn_05_01"); //He's hunting out in the wild. You'll find him at the path to the New Camp. Westwards of the Old Camp there's a wide canyon.
    AI_Output (self, other,"DIA_Fingers_WhereCavalorn_05_02"); //In this canyon there's an old woodcutters' hut. You'll find him there.

    Log_CreateTopic(GE_TeacherOW, LOG_NOTE);
    B_LogEntry( GE_TeacherOW,"Cavalorn can teach me to sneak. His hut is in a canyon to the west of the Old Camp, in the direction of the New Camp.");
};

@AmProsius AmProsius self-assigned this Mar 26, 2021
@AmProsius AmProsius marked this pull request as draft Apr 16, 2021
@AmProsius AmProsius requested a review from szapp Apr 16, 2021
@AmProsius
Copy link
Owner Author

@AmProsius AmProsius commented Apr 16, 2021

Both the fix and the test have not been tested ingame yet.

@AmProsius AmProsius moved this from To Do to In Progress in v1.1.0 Apr 16, 2021
@AmProsius
Copy link
Owner Author

@AmProsius AmProsius commented Apr 16, 2021

Currently I get Log topic was not auto-created on applying the fix when running test 204, but I don't have a clue why. Also the fix is not applied.

@szapp
Copy link
Collaborator

@szapp szapp commented Apr 17, 2021

This fix is special, because the dialog is permanent. It's told status will always be false. That means two things:

  1. We cannot add the dialog entry post-hoc, since we don't know whether the dialog has been told in the game before.
  2. The log entry should be infinite, if I am not mistaken, because the dialog can be triggered indefinitely.

@szapp
Copy link
Collaborator

@szapp szapp commented Apr 17, 2021

So this fix will have to be implemented differently:

  1. Intercept B_LogEntry and create the log topic if it did not exist before (as done in the current implementation already).
  2. But also check if that entry already exists and prevent adding it again.
  3. Nothing will be applied reverted on saving and loading, because it cannot be checked whether the dialog has been spoken or not. This fix will thereby be no longer a revertible fix.

I will make the necessary adjustments.

@szapp szapp assigned szapp and unassigned AmProsius Apr 17, 2021
@szapp szapp added impl: replace func call type: session fix and removed type: revert on save labels Apr 17, 2021
@szapp szapp removed their request for review Apr 17, 2021
There are two log entries concerning Cavalorn. The one that is refered
to here is specific to Finger's dialog. That's why the changelog entry
is adjusted.
@szapp
Copy link
Collaborator

@szapp szapp commented Apr 17, 2021

I rewrote the fix. Please note the commit message body above, as to why I adjusted the changelog as well.

@szapp szapp removed their assignment Apr 17, 2021
@szapp szapp marked this pull request as ready for review Apr 17, 2021
@szapp
Copy link
Collaborator

@szapp szapp commented Apr 17, 2021

@AmProsius I cannot assign you as reviewer as you opened the pull request.

@AmProsius AmProsius self-assigned this Apr 17, 2021
@AmProsius AmProsius merged commit 7ec2bb7 into master Apr 18, 2021
v1.1.0 automation moved this from In Progress to Done Apr 18, 2021
@AmProsius AmProsius deleted the bug204 branch Apr 18, 2021
szapp added a commit that referenced this issue Apr 25, 2021
@szapp szapp moved this from Modify dialog function to Add missing log creation in Fix templates Feb 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility: difficult impl: modify/analyze script func impl: replace func call provided fix type: session fix validation: validated
Projects
Fix templates
Create log topic in dialog function
v1.1.0
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants