xavieran / BaKGL

Remake of Betrayal at Krondor using OpenGL
https://xavieran.github.io/blog/
GNU General Public License v3.0
44 stars 3 forks source link

Figure out bugged dialog actions #180

Closed xavieran closed 9 months ago

xavieran commented 9 months ago

e.g.

 SPAM [DialogStore] Offset { 31 @ 0x26a01 } @ [ ds: 6 act: 0 ds2: 10 ds3: 0 ]
++ LoseItem { what: 61 amount: 1 rest[00 00 00 00]}
++ LoseItem { what: 68 amount: 1 rest[00 00 00 00]}
++ LoseItem { what: 67 amount: 1 rest[00 00 00 00]}
++ LoseItem { what: 69 amount: 1 rest[00 00 00 42]}
++ UnknownAction {  type: Unknown[0] rest[3e 00 00 00 00 00 00 0c]}
++ UnknownAction {  type: Unknown[0] rest[35 00 64 00 00 00 00 00]}
++ PlaySound { index: 0 flag: 1 0}
++ PlaySound { index: 0 flag: 1 0}
Text [  @3 stepped forward and touched the strange stone.
        Though there was not an actual explosion they all heard a loud bang as his fingers touched the rocky surface.
        The sound startled them all, but it had the greatest effect on @3 who was momentarily convinced it was the sound of the death goddess knocking on his door.
        It took them several minutes to realize the humor of the situation, but soon all were laughing as they picked up their packs and prepared to leave.
        The stone had apparently been harmless, still, it worried @5 and made him wonder if they had lost anything else besides their wits. ]
Next [ None ]

This actually seems to be a bug introduced in v1.02 of the game, 0x3e is virtue key, and ox35 is money. As noted in BAK help web in v1.02 yo do not lost the gold or virtue keys.

xavieran commented 9 months ago

In the unpatched (v1.0) version, the dialog looks like:

 SPAM [DialogStore] Offset { 31 @ 0x26a01 } @ [ ds: 6 act: 0 ds2: 10 ds3: 0 ]
++ LoseItem { what: 61 amount: 1 rest[00 00 00 00]}
++ LoseItem { what: 68 amount: 1 rest[00 00 00 00]}
++ LoseItem { what: 67 amount: 1 rest[00 00 00 00]}
++ LoseItem { what: 69 amount: 1 rest[00 00 00 00]}
++ LoseItem { what: 62 amount: 1 rest[00 00 00 00]}
++ LoseItem { what: 53 amount: 100 rest[00 00 00 00]}
++ PlaySound { index: 66 flag: 1 0}
++ PlaySound { index: 12 flag: 1 0}
Text [  @3 stepped forward and touched the strange stone.
        Though there was not an actual explosion they all heard a loud bang as his fingers touched the rocky surface.
        The sound startled them all, but it had the greatest effect on @3 who was momentarily convinced it was the sound of the death goddess knocking on his door.
        It took them several minutes to realize the humor of the situation, but soon all were laughing as they picked up their packs and prepared to leave.
        The stone had apparently been harmless, still, it worried @5 and made him wonder if they had lost anything else besides their wits. ]
Next [ None ]

It seems like the patching did not work correctly when the patch is run. I can probably manually fix these as there aren't too many of them.

xavieran commented 9 months ago

Here's another:

 SPAM [DialogStore] Offset { 31 @ 0x24332 } @ [ ds: 6 act: 0 ds2: 10 ds3: 0 ]
++ UnknownAction {  type: Unknown[0] rest[36 1f 00 00 00 00 01 28]}
++ UnknownAction {  type: Unknown[0] rest[07 00 10 00 00 ec 00 ec]}
++ PlaySound { index: 0 flag: 1 0}
++ PlaySound { index: 0 flag: 1 0}
Text [  Approaching the tent Owyn had heard

Original


 SPAM [DialogStore] Offset { 31 @ 0x24332 } @ [ ds: 6 act: 0 ds2: 10 ds3: 0 ]
++ SetFlag {1f36 mask: 0 data: 0 z: 0 val: 1}
++ GainSkill{ who: 7 TotalHealth [-5120, -5120]}
++ PlaySound { index: 66 flag: 1 0}
++ PlaySound { index: 40 flag: 1 0}
Text [  Approaching the t
xavieran commented 9 months ago
$ grep Unknown dialog| grep -v "rest.00 00 00 00 00 00 00 00"
++ UnknownAction {  type: Unknown[0] rest[00 00 00 00 00 00 00 28]}
++ UnknownAction {  type: Unknown[0] rest[00 00 00 00 00 00 00 35]}
++ UnknownAction {  type: Unknown[0] rest[00 00 02 00 00 00 00 00]}
++ UnknownAction {  type: Unknown[0] rest[00 00 0d 00 00 00 00 28]}
++ UnknownAction {  type: Unknown[0] rest[02 00 10 00 00 ec 00 f6]}
++ UnknownAction {  type: Unknown[0] rest[35 00 19 00 00 00 00 3f]}
++ UnknownAction {  type: Unknown[0] rest[00 00 00 00 00 00 00 48]}
++ UnknownAction {  type: Unknown[0] rest[00 00 00 00 00 00 00 27]}
++ UnknownAction {  type: Unknown[0] rest[00 00 00 00 00 00 00 43]}
++ UnknownAction {  type: Unknown[0] rest[03 1f 00 00 00 00 01 00]}
++ UnknownAction {  type: Unknown[0] rest[00 00 00 00 00 00 00 43]}
++ UnknownAction {  type: Unknown[0] rest[00 00 01 00 00 00 00 48]}
++ UnknownAction {  type: Unknown[0] rest[00 00 01 00 00 00 00 14]}
++ UnknownAction {  type: Unknown[0] rest[00 00 01 00 00 00 00 00]}
++ UnknownAction {  type: Unknown[0] rest[00 00 01 00 00 00 00 48]}
++ UnknownAction {  type: Unknown[0] rest[00 00 01 00 00 00 00 00]}
++ UnknownAction {  type: Unknown[0] rest[00 00 01 00 00 00 00 00]}
++ UnknownAction {  type: Unknown[0] rest[ff ff 00 00 00 00 00 00]}
++ UnknownAction {  type: Unknown[0] rest[73 00 01 00 00 00 00 00]}
++ UnknownAction {  type: Unknown[0] rest[36 1f 00 00 00 00 01 28]}
++ UnknownAction {  type: Unknown[0] rest[07 00 10 00 00 ec 00 ec]}
++ UnknownAction {  type: Unknown[0] rest[3e 00 00 00 00 00 00 0c]}
++ UnknownAction {  type: Unknown[0] rest[35 00 64 00 00 00 00 00]}