Double spending when bribing.

Support for running, installing or compiling OpenMW

Before you submit a bug report for the first time, please read: Bug reporting guidelines
Locked
User avatar
bwrsandman
Posts: 45
Joined: 25 Sep 2011, 05:30
Location: Montreal
Contact:

Double spending when bribing.

Post by bwrsandman »

Can anyone replicate this bug?
Start up openmw.
player->additem "Gold_001" 11
Talk to someone, go in the persuasion menu and bribe 10 gold.
For me, the persuasion window doesn't close, the gold doesn't update (still says 11 Gold).
Without closing the menu, bribe 10 gold again.
Exit persuasion menu and open it again. Should say you have -9 gold.
EDIT: Screencap
Spoiler: Show
Vanilla Morrowind will hide the persuasion window after you attempt one of the persuasion types.
I wrote a fix for it at https://github.com/zinnschlag/openmw/pull/460.
This basically hides the window before calling the persuade function in the dialogue manager. I will get back to this.
It also adds an assert in the add remove gold function that catches attempts at setting gold to a negative amount.

However, this doesn't fix the underlying issue of: why doesn't the persuasion window hide?
The code is there, it gets called and Zinni says that he can't replicate my bug; that it functions as expected for him.

I noticed that when I choose a persuasion option I get a the following messages:

Code: Select all

Error in framelistener: Object 'sAdmireFail' not found (const)
Error in framelistener: Object 'sAdmireSuccess' not found (const)
Error in framelistener: Object 'sIntimidateFail' not found (const)
Error in framelistener: Object 'sIntimidateSuccess' not found (const)
Error in framelistener: Object 'sTauntFail' not found (const)
Error in framelistener: Object 'sTauntSuccess' not found (const)
Error in framelistener: Object 'sBribeFail' not found (const)
Error in framelistener: Object 'sBribeSuccess' not found (const)
The code that throws this error is at apps/openmw/mwworld/store.hpp:125

I traced the problem down to this call (pps/openmw/mwdialogue/dialoguemanagerimp.cpp:469):

Code: Select all

MyGUI::LanguageManager::getInstance().replaceTags("#{"+text+"}")
Can anyone help me out?

Here is what I am running:
Spoiler: Show
Also, can anyone help me out with breakpoints in CodeBlocks, I have had moderate success with gdb (though I would love if someone told me how to get the Makefile to compile with the -g flag), but CB just ignores my breakpoints.
User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: Double spending when bribing.

Post by scrawl »

There should be GMST records for sAdmireFail etc. in your Morrowind.esm, but apparently you don't have them.

Code: Select all

./esmtool dump <Path to Morrowind.esm> | grep -C 3 sAdmireFail
  Value: 'Admire Success' (std::string)
  Dirty: 0

Record: GMST 'sAdmireFail'
  Value: 'Admire Fail' (std::string)
  Dirty: 0

User avatar
bwrsandman
Posts: 45
Joined: 25 Sep 2011, 05:30
Location: Montreal
Contact:

Re: Double spending when bribing.

Post by bwrsandman »

Hmm... That's exactly it.
There is nothing from "sAdmireFail".
Here's what's related to Admire in my esm.

Code: Select all

$ esmtool dump "openmw/Data Files/Morrowind.esm" | grep -C 3 "'Admire"
  Dirty: 0

Record: GMST 'sAdmire'
  Value: 'Admire' (std::string)
  Dirty: 0

Record: GMST 'sIntimidate'
--
  Unknown2: 0
  Select Rule: NPC Dead     dratha                           == 0

Record: DIAL 'Admire Success'
  Type: Persuasion (3)

Record: INFO ''
--
  Unknown1: 0
  Unknown2: 0

Record: DIAL 'Admire Fail'
  Type: Persuasion (3)
Don't know if this is useful but:

Code: Select all

$ esmtool dump "openmw/Data Files/Morrowind.esm" | grep -B 2 -A 1 "format version"
Author: Bethesda Softworks
Description: The main data file For Morrowind
File format version: 1.2
Special flag: 1
User avatar
pvdk
Posts: 528
Joined: 12 Aug 2011, 16:34

Re: Double spending when bribing.

Post by pvdk »

All I can think of: that GMST got removed accidentally by TesTool or Wrye Bash or something.
User avatar
bwrsandman
Posts: 45
Joined: 25 Sep 2011, 05:30
Location: Montreal
Contact:

Re: Double spending when bribing.

Post by bwrsandman »

I reinstalled Morrowind on my Windows partition with the CD I have and copied the Data Files over.
The .esm differs from the one I had, which I may or may not have installed from a pirated iso...

The sizes differ by 16 kilobytes

Code: Select all

$ ls -s {old,new}/Data\ Files/Morrowind.esm
77952 old/Data Files/Morrowind.esm
77968 new/Data Files/Morrowind.esm  
I did a hex diff, the first two byte diff which might be an indicator is at 0x140

Code: Select all

hexdump -x new/Data\ Files/Morrowind.esm -n 2 -s 0x140
0000140    bca7 
hexdump -x old/Data\ Files/Morrowind.esm -n 2 -s 0x140
0000140    bc63
Then everything differs at 0x13F1.

Code: Select all

md5sum {old,new}/Data\ Files/Morrowind.esm
a452c29a968dd44857d0eb3ad6158358  old/Data Files/Morrowind.esm
8bb62fbd41ce4563fa7961f03a5f43ee  new/Data Files/Morrowind.esm
The new .esm that I got from the CD works fine now.
User avatar
Greendogo
Posts: 1467
Joined: 26 Aug 2011, 02:04

Re: Double spending when bribing.

Post by Greendogo »

Why would a pirate change the the game data? Shouldn't have happened. Pirates should only be injecting malware into the executables! :lol:
Locked