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

Gate guard doesn't close castle gate in chapter 4 #124

Closed
i5sue5 opened this issue Feb 14, 2021 · 12 comments · Fixed by #162
Closed

Gate guard doesn't close castle gate in chapter 4 #124

i5sue5 opened this issue Feb 14, 2021 · 12 comments · Fixed by #162
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.
Milestone

Comments

@i5sue5
Copy link

i5sue5 commented Feb 14, 2021

Describe the bug
Grd_280_Gardist has ID 230 instead of 280. Therefore he uses the routines of another NPC and the inner gate of the OC stays open in chapter IV.

Expected behavior
Gate guard of the castle now has the correct routine and stands at the gate.

@AmProsius
Copy link
Owner

Possibly

name = NAME_Gardist;
npctype = npctype_guard;
flags = NPC_FLAG_IMMORTAL; // weil Windenwache !!! wird in Kapitel 4 gelöscht!
guild = GIL_GRD;
level = 20;
voice = 6;
id = 230;

changed to

    name        =   NAME_Gardist;
    npctype     =   npctype_guard;
    flags       =   NPC_FLAG_IMMORTAL;  // weil Windenwache !!! wird in Kapitel 4 gelöscht!
    guild       =   GIL_GRD;
    level       =   20;
    voice       =   6;
    id          =   280;

@AmProsius AmProsius added the provided fix This issue has a fix provided in the comments. label Feb 16, 2021
@szapp szapp added compatibility: easy This issue is easy to make compatible. type: revert on save The fix for this issue impacts the game and should be reverted when saving. labels Feb 16, 2021
@szapp
Copy link
Collaborator

szapp commented Feb 16, 2021

This fix might be a bit tricky, because it both relies on a game-save fix (if the NPC is already in the world) and a session-fix (if the NPC is yet to be spawned). Splitting a fix like this is currently not easily supported by our current script setup. I will have a look how to implement it.

@szapp szapp added compatibility: difficult This issue is difficult to make compatible. type: session fix The fix for this issues is persistent across a session. and removed compatibility: easy This issue is easy to make compatible. type: session fix The fix for this issues is persistent across a session. labels Feb 16, 2021
@szapp
Copy link
Collaborator

szapp commented Feb 17, 2021

Scratch that. It would in fact be an issue if the NPC was created during a running game. This particular NPC is only created once at new game. As game-save fixes are applied after the new game started, they will suffice. No session-fix necessary here.

@szapp szapp added compatibility: easy This issue is easy to make compatible. and removed compatibility: difficult This issue is difficult to make compatible. labels Feb 17, 2021
@AmProsius AmProsius changed the title Grd_280_Gardist uses the wrong ID Gate guard doesn't close inner gate in chapter 4 Feb 18, 2021
@AmProsius AmProsius added the validation: required This issue needs validation from one of the validators. label Feb 20, 2021
@AmProsius AmProsius added this to To Do in v1.0.0 via automation Feb 21, 2021
@AmProsius AmProsius added this to the v1.0.0 milestone Feb 21, 2021
@szapp
Copy link
Collaborator

szapp commented Feb 21, 2021

Gate guard now correctly closes the inner gate of the Old Camp in chapter 4.

Just out of curiosity: Which one is the inner gate? Is that the castle gate?

@AmProsius
Copy link
Owner

Which one is the inner gate? Is that the castle gate?

If I'm not mistaken the inner gate is the castle gate, right.

@AmProsius AmProsius changed the title Gate guard doesn't close inner gate in chapter 4 Gate guard doesn't close castle gate in chapter 4 Feb 21, 2021
@AmProsius AmProsius added this to To Do in v1.1.0 Feb 24, 2021
@AmProsius AmProsius removed this from To Do in v1.1.0 Feb 24, 2021
szapp added a commit that referenced this issue Feb 27, 2021
@szapp
Copy link
Collaborator

szapp commented Feb 27, 2021

I noticed that changing the NPC's ID does in fact correct the daily routine (the NPC now stands beside the gate wheel). Nevertheless, the gate is not closing, even when manually turning the wheel. It looks to me that the wheel is not triggering the gate.

@szapp szapp moved this from To Do to In Progress in v1.0.0 Feb 27, 2021
@szapp
Copy link
Collaborator

szapp commented Feb 27, 2021

Here are screenshots for the gate EVT_OC_INNERMAINGATE (first image) and the switch EVT_OC_INNERMAINGATE_SWITCH (second image) from the spacer. Within the spacer, triggering the switch closes the gate. So, the problem must be somewhere else. I am aware that switches break during saving and loading, but in a fresh new game the main gate of the Old Camp can be closed and opened while the castle gate remains stuck.

gate wheel

@szapp
Copy link
Collaborator

szapp commented Feb 27, 2021

Here the properties of the main gate of the Old camp and the corresponding switch (for comparison).

maingate maingateswitch

@szapp
Copy link
Collaborator

szapp commented Feb 27, 2021

I will continue about the gate in a separate issue.

szapp added a commit that referenced this issue Feb 28, 2021
v1.0.0 automation moved this from In Progress to Done Mar 3, 2021
AmProsius added a commit that referenced this issue Mar 3, 2021
#124: Exchange castle gate guard ID
@szapp szapp added this to NPC properties in Fix templates Mar 15, 2021
@szapp szapp added impl: modify/analyze script func This issue requires analyzing and/or modifying the bytecode of script functions. impl: change obj var This issue requires changing properties of objects. labels Mar 16, 2021
szapp added a commit that referenced this issue Apr 20, 2021
szapp added a commit that referenced this issue Apr 20, 2021
@szapp szapp removed the validation: required This issue needs validation from one of the validators. label May 14, 2021
@szapp szapp moved this from NPC property (volatile) to NPC properties (persistent) in Fix templates Feb 5, 2022
@szapp
Copy link
Collaborator

szapp commented Feb 5, 2022

This fix can be implemented much easier and as a session fix. The property C_Npc.id is not loaded from the gamesave as previously assumed. Half the implemented fix suffices (and can be simplified).

@szapp szapp reopened this Feb 5, 2022
@szapp szapp self-assigned this Feb 5, 2022
@szapp szapp added this to To Do in v1.3.0 via automation Feb 5, 2022
@szapp szapp moved this from To Do to In Progress in v1.3.0 Feb 5, 2022
@szapp szapp moved this from NPC property (non-volatile) to NPC instance variable (int) in Fix templates Feb 5, 2022
szapp added a commit that referenced this issue Feb 6, 2022
No revertible action required
szapp added a commit that referenced this issue Feb 6, 2022
@szapp
Copy link
Collaborator

szapp commented Feb 6, 2022

@AmProsius can you pull branch bug124 run the test and confirm? Then we can merge it and delete it again.

@szapp szapp added type: session fix The fix for this issues is persistent across a session. and removed type: revert on save The fix for this issue impacts the game and should be reverted when saving. impl: change obj var This issue requires changing properties of objects. labels Feb 6, 2022
@AmProsius
Copy link
Owner

Confirmed. I will close this issue then.

v1.3.0 automation moved this from In Progress to Done Feb 6, 2022
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.
Projects
Fix templates
Change NPC instance variable (int)
v1.3.0
  
Done
v1.0.0
  
Done
Development

Successfully merging a pull request may close this issue.

3 participants