Aller au contenu

Photo

[Release] Savegame Import Fixes


  • Veuillez vous connecter pour répondre
77 réponses à ce sujet

#1
Monochrome Wench

Monochrome Wench
  • Members
  • 373 messages
I'm made a mod to fix savegame importing issues. Currently its at a Release state as i've fixed the issues that I originally planned to fix.. I'll update this thread when I have new releases.

The mod augments the the approval value checks in the gen00pt_vault script, so imported DLC savegames wont cause flags to get set incorrectly. I am also fixing other problems as I find them.

Current release is v1.0

Get it from its project page: http://social.biowar...m/project/4364/

Fixes implemented (so far):
* Fixed broken Made Love to Leliana check
* Nathaniel left the wardens check updated work around approval problem
* The player romanced Alistair, Leliana, Morrigan and Zeveran checks updated to work around approval problem
* Made love to Morrigan check fixed so it actually checks to value from the worldvault.
* Alternative player romanced Alistair and Zeveran checks 'fixed'.

There is more detailed fix information on the project page

Modifié par Monochrome Wench, 20 mars 2011 - 05:46 .


#2
Rykoth

Rykoth
  • Members
  • 631 messages
You just need to upload the file(s) now :D

#3
Monochrome Wench

Monochrome Wench
  • Members
  • 373 messages
Ah oops forgot to set visible to everyone

#4
Rykoth

Rykoth
  • Members
  • 631 messages
Question, will this work when it comes to the save game editor?
Since it's not an actual save, and a generated one...

#5
mousestalker

mousestalker
  • Members
  • 16 945 messages
May I beg you to fix Zevran next?

#6
Thought Process

Thought Process
  • Members
  • 191 messages

Monochrome Wench wrote...

The mod modifies the gen00pt_vault script. I am in the process of removing the approval value checks from the script, so imported DLC savegames wont cause flags to get set incorrectly. I am also fixing other problems as I find them.

Just curious about the technical aspect of this: I started working on a script disassembler / assembler to make patching of scripts easier. How are you going about this?

(I still need to fix savegen issues with the romance stuff)

#7
Naitaka

Naitaka
  • Members
  • 1 670 messages
Thanks for all your excellent work on debugging the import Monochrome Wench! Oh and Thought Process too for the awesome tools!

#8
Monochrome Wench

Monochrome Wench
  • Members
  • 373 messages

Thought Process wrote...

Monochrome Wench wrote...

The mod modifies the gen00pt_vault script. I am in the process of removing the approval value checks from the script, so imported DLC savegames wont cause flags to get set incorrectly. I am also fixing other problems as I find them.

Just curious about the technical aspect of this: I started working on a script disassembler / assembler to make patching of scripts easier. How are you going about this?

(I still need to fix savegen issues with the romance stuff)


A script disassembler + assembler Posted Image

I modified an ancient nwscript decompiler so it would produce a reasonable disassembly for DA2 scripts (well gen00pt_vault specifically).  I then wrote a quick and dirty assembler cause I didn't have one. The code is not really in a state that is releaseable to the public as I've only done just enough so i can disassemble and reassemble the gen00pt_vault script.

If curious, this is my current disassembly: http://wenchy.net/ge...vault.pcode.zip

It looks like that script also contains the default origins states use by chargen.

Modifié par Monochrome Wench, 19 mars 2011 - 04:07 .


#9
Dreadstruck

Dreadstruck
  • Members
  • 2 326 messages
I am wondering if it's *somehow* possible with this script fiddling to also fix some flag bugs in the game like Merril's quest getting auto-completed and such?

Modifié par Avalla'ch, 19 mars 2011 - 04:06 .


#10
MKDAWUSS

MKDAWUSS
  • Members
  • 3 416 messages
Cool. I might keep this handy for when (or if) I ever decide to do another run of DA2.

#11
Thought Process

Thought Process
  • Members
  • 191 messages

Monochrome Wench wrote...

A script disassembler + assembler Posted Image

I modified an ancient nwscript decompiler so it would produce a reasonable disassembly for DA2 scripts (well gen00pt_vault specifically).  I then wrote a quick and dirty assembler cause I didn't have one. The code is not really in a state that is releaseable to the public as I've only done just enough so i can disassemble and reassemble the gen00pt_vault script.

If curious, this is my current disassembly: http://wenchy.net/ge...vault.pcode.zip

It looks like that script also contains the default origins states use by chargen.

Neat, that disassembly looks vaguely like mine, though I don't show byte dumps of the instructions (and I don't have it resolving syscalls... yet). :)

http://mod.gib.me/dr...0pt_vault.pcode

I like how you chose to deal with the unknown opcodes (EMIT), unless that's from the ancient disassembler.

Modifié par Thought Process, 19 mars 2011 - 04:29 .


#12
Elysium-Fic

Elysium-Fic
  • Members
  • 264 messages
I noticed four big problems with my import:

The first was that there was talk of letting Amaranthine burn. My Warden actually defended Amaranthine, and upgraded Vigil's Keep completely, so neither was destroyed.

The second was that Nathaniel spoke of the Warden sparing the Architect, when my Warden killed him.

Someone (Alistair?) says the Warden killed the archdemon, when Loghain did that.

Fourth (is this due to an import problem, or just Zevran's nature?) Zevran was acting completely unattached when my Warden actually romanced him.

#13
jenovan

jenovan
  • Members
  • 1 528 messages

Elysium-Fic wrote...

I noticed four big problems with my import:

The first was that there was talk of letting Amaranthine burn. My Warden actually defended Amaranthine, and upgraded Vigil's Keep completely, so neither was destroyed.

The second was that Nathaniel spoke of the Warden sparing the Architect, when my Warden killed him.

Someone (Alistair?) says the Warden killed the archdemon, when Loghain did that.

Fourth (is this due to an import problem, or just Zevran's nature?) Zevran was acting completely unattached when my Warden actually romanced him.

#2 and #3 there are issues I've seen pop up several times, I'm guessing they are, in fact, some sort of import issue.

#4 *could* be an import issue, although manually trying to manipulate Zev's approval in the save file doesn't fix the dialog so far.  However!  Check out the stuff ejoslin and Terra_Ex uncovered in the talktable for Zevran here.  He is definitely meant to recognize (and stay true to) the romance.

#14
mesmerizedish

mesmerizedish
  • Members
  • 7 776 messages
Nice! Thankee muchly!

#15
Elysium-Fic

Elysium-Fic
  • Members
  • 264 messages

jenovan wrote...

Elysium-Fic wrote...

I noticed four big problems with my import:

The first was that there was talk of letting Amaranthine burn. My Warden actually defended Amaranthine, and upgraded Vigil's Keep completely, so neither was destroyed.

The second was that Nathaniel spoke of the Warden sparing the Architect, when my Warden killed him.

Someone (Alistair?) says the Warden killed the archdemon, when Loghain did that.

Fourth (is this due to an import problem, or just Zevran's nature?) Zevran was acting completely unattached when my Warden actually romanced him.

#2 and #3 there are issues I've seen pop up several times, I'm guessing they are, in fact, some sort of import issue.

#4 *could* be an import issue, although manually trying to manipulate Zev's approval in the save file doesn't fix the dialog so far.  However!  Check out the stuff ejoslin and Terra_Ex uncovered in the talktable for Zevran here.  He is definitely meant to recognize (and stay true to) the romance.


Ah, interesting, thank you.

#16
Monochrome Wench

Monochrome Wench
  • Members
  • 373 messages

Thought Process wrote...
]Neat, that disassembly looks vaguely like mine, though I don't show byte dumps of the instructions (and I don't have it resolving syscalls... yet). :)

http://mod.gib.me/dr...0pt_vault.pcode

I like how you chose to deal with the unknown opcodes (EMIT), unless that's from the ancient disassembler.

The disassembler automatically outputs emit instructions for unknowns but i've added in a few specific cases for some instructions that were causing trouble otherwise ( 0x32. 0x37, 0x39)

I was outputting the byte dumps to make it easier writing the assembler. I can just look at the disassembled code to see the opcode format.

Resolving the syscalls is quiet easy. Just need to parse script.ldf from packages/core/data/scripts.erf. For me it was kind of easy as the disassembler was already designed to parse nwscript.nss from neverwinternight (its actually a nwscript compiler with a disassembler inbuilt). Updated the parser to cope with dragon age specifying the index instead of nwn's automatic sequential indexing. Editied the script.ldf and removed any 'features' that the nwscript parser would choke on because I'm only interested in the names.

Wasn't sure if I could find it anymore, I've been modifying a oldish version (i think i've been hacking at the 2.1.0 source) of http://sourceforge.n...files/NWNTools/

I used to use the script compiler from NWNTools to automate building scripts for a nwn module out of the toolset. As I already had the source i just modified it :-)

Modifié par Monochrome Wench, 19 mars 2011 - 04:57 .


#17
Thought Process

Thought Process
  • Members
  • 191 messages
0x32, 0x37, 0x39 are always 8 bytes and made up of int, short arguments. If that helps.

Opcodes 46 - 53 were added in Dragon Age (mostly array related), opcodes 54 - 58 were added in Dragon Age 2 (not sure, array related, possibly).

I'll have to commit my script related stuff to my repository later so maybe we can collaborate on research, if you're interested. :)

Edit: here's my list of the new opcodes from my enum, the non-U## names were taken from the DA Toolset (and may be incorrect, I'm still new to nwscript :)

// added in Dragon Age
U46 = 46,
U47 = 47,

// array access
CPSPTOAL = 48, // foo[1] = bar
CPBPTOAL = 49,
CPALTOPSP = 50, // bar = foo[1]
CPALTOPBP = 51,

U52 = 52, // equivilent to STORE_STATEALL?

U53 = 53, // causes the script engine to blow up / infinite loop?

// added in Dragon Age 2
U54 = 54,
U55 = 55,
U56 = 56,
U57 = 57,
U58 = 58,

Modifié par Thought Process, 19 mars 2011 - 05:04 .


#18
Monochrome Wench

Monochrome Wench
  • Members
  • 373 messages
Ah ok, that explains a lot and would be quite useful

#19
Niniva

Niniva
  • Members
  • 281 messages
Thanks a ton!

#20
ejoslin

ejoslin
  • Members
  • 11 745 messages

jenovan wrote...

Elysium-Fic wrote...

I noticed four big problems with my import:

The first was that there was talk of letting Amaranthine burn. My Warden actually defended Amaranthine, and upgraded Vigil's Keep completely, so neither was destroyed.

The second was that Nathaniel spoke of the Warden sparing the Architect, when my Warden killed him.

Someone (Alistair?) says the Warden killed the archdemon, when Loghain did that.

Fourth (is this due to an import problem, or just Zevran's nature?) Zevran was acting completely unattached when my Warden actually romanced him.

#2 and #3 there are issues I've seen pop up several times, I'm guessing they are, in fact, some sort of import issue.

#4 *could* be an import issue, although manually trying to manipulate Zev's approval in the save file doesn't fix the dialog so far.  However!  Check out the stuff ejoslin and Terra_Ex uncovered in the talktable for Zevran here.  He is definitely meant to recognize (and stay true to) the romance.


This is correct -- Zevran is giving incorrect dialog.  There is different dialog that is supposed to trigger if he's romanced and the warden is alive, and if he's romanced and the warden is dead.  He is faithful to the warden in either case.

When I checked a save game I know is not working with a savegame editor (pyGFF), I saw both the "romance active" flag is importing correctly and his approval is importing at 100 correctly as well.  However, the proper dialog is still not triggering.  Where the break is, I am not sure.  But both his dialogs, if he's romanced, should have him rejecting Hawke and/or rejecting Isabela.  And neither is happening.

Edit: As an aside, Zevran acting unattached in DAO is either caused by one of his numerous bugs, or someone not realizing what it takes to get his confession of feelings (and then being hit by another bug at the denerim city gates).  I had strongly suspected that Zevran was bugged in DA2 before seeing the talktable. 

Modifié par ejoslin, 19 mars 2011 - 07:56 .


#21
Naitaka

Naitaka
  • Members
  • 1 670 messages

ejoslin wrote...

jenovan wrote...

Elysium-Fic wrote...

I noticed four big problems with my import:

The first was that there was talk of letting Amaranthine burn. My Warden actually defended Amaranthine, and upgraded Vigil's Keep completely, so neither was destroyed.

The second was that Nathaniel spoke of the Warden sparing the Architect, when my Warden killed him.

Someone (Alistair?) says the Warden killed the archdemon, when Loghain did that.

Fourth (is this due to an import problem, or just Zevran's nature?) Zevran was acting completely unattached when my Warden actually romanced him.

#2 and #3 there are issues I've seen pop up several times, I'm guessing they are, in fact, some sort of import issue.

#4 *could* be an import issue, although manually trying to manipulate Zev's approval in the save file doesn't fix the dialog so far.  However!  Check out the stuff ejoslin and Terra_Ex uncovered in the talktable for Zevran here.  He is definitely meant to recognize (and stay true to) the romance.


This is correct -- Zevran is giving incorrect dialog.  There is different dialog that is supposed to trigger if he's romanced and the warden is alive, and if he's romanced and the warden is dead.  He is faithful to the warden in either case.

When I checked a save game I know is not working with a savegame editor (pyGFF), I saw both the "romance active" flag is importing correctly and his approval is importing at 100 correctly as well.  However, the proper dialog is still not triggering.  Where the break is, I am not sure.  But both his dialogs, if he's romanced, should have him rejecting Hawke and/or rejecting Isabela.  And neither is happening.



Damn, my Amell Circle Mage Warden was going to be my next import and she romanced Zevran...I guess I'll put her down the list then.

#22
sabreene

sabreene
  • Members
  • 1 966 messages

ejoslin wrote...

jenovan wrote...

Elysium-Fic wrote...

I noticed four big problems with my import:

The first was that there was talk of letting Amaranthine burn. My Warden actually defended Amaranthine, and upgraded Vigil's Keep completely, so neither was destroyed.

The second was that Nathaniel spoke of the Warden sparing the Architect, when my Warden killed him.

Someone (Alistair?) says the Warden killed the archdemon, when Loghain did that.

Fourth (is this due to an import problem, or just Zevran's nature?) Zevran was acting completely unattached when my Warden actually romanced him.

#2 and #3 there are issues I've seen pop up several times, I'm guessing they are, in fact, some sort of import issue.

#4 *could* be an import issue, although manually trying to manipulate Zev's approval in the save file doesn't fix the dialog so far.  However!  Check out the stuff ejoslin and Terra_Ex uncovered in the talktable for Zevran here.  He is definitely meant to recognize (and stay true to) the romance.


This is correct -- Zevran is giving incorrect dialog.  There is different dialog that is supposed to trigger if he's romanced and the warden is alive, and if he's romanced and the warden is dead.  He is faithful to the warden in either case.

When I checked a save game I know is not working with a savegame editor (pyGFF), I saw both the "romance active" flag is importing correctly and his approval is importing at 100 correctly as well.  However, the proper dialog is still not triggering.  Where the break is, I am not sure.  But both his dialogs, if he's romanced, should have him rejecting Hawke and/or rejecting Isabela.  And neither is happening.

Edit: As an aside, Zevran acting unattached in DAO is either caused by one of his numerous bugs, or someone not realizing what it takes to get his confession of feelings (and then being hit by another bug at the denerim city gates).  I had strongly suspected that Zevran was bugged in DA2 before seeing the talktable. 


Question: When you check the state of the world ingame using the console, it seems there are two different acknowledgements of romance. My first one says I romanced Zev, but the second one says I did not. The same for Alistair romances.

I'm wondering if it's this second check that is causing the misfire? I can't find what it's checking for to get it to change. Anyone else get those last ones to change to the correct status?

#23
ejoslin

ejoslin
  • Members
  • 11 745 messages

sabreene wrote...

ejoslin wrote...

This is correct -- Zevran is giving incorrect dialog.  There is different dialog that is supposed to trigger if he's romanced and the warden is alive, and if he's romanced and the warden is dead.  He is faithful to the warden in either case.

When I checked a save game I know is not working with a savegame editor (pyGFF), I saw both the "romance active" flag is importing correctly and his approval is importing at 100 correctly as well.  However, the proper dialog is still not triggering.  Where the break is, I am not sure.  But both his dialogs, if he's romanced, should have him rejecting Hawke and/or rejecting Isabela.  And neither is happening.

Edit: As an aside, Zevran acting unattached in DAO is either caused by one of his numerous bugs, or someone not realizing what it takes to get his confession of feelings (and then being hit by another bug at the denerim city gates).  I had strongly suspected that Zevran was bugged in DA2 before seeing the talktable. 


Question: When you check the state of the world ingame using the console, it seems there are two different acknowledgements of romance. My first one says I romanced Zev, but the second one says I did not. The same for Alistair romances.

I'm wondering if it's this second check that is causing the misfire? I can't find what it's checking for to get it to change. Anyone else get those last ones to change to the correct status?


I'm assuming that this is where the problem is.  The first one is correctly reporting that hte romance is active.  The second may be a defined flag based on approval + romance active.  However, if there's an error in the coding of that flag (which is what I suspect), the second one would report he wasn't romanced (whether it's not reading the approval or the romance active flag) and that is probably the flag being used.  I don't have the skillset to check this without a toolset, however, so I'm only guessing that this may be the cause..

There were several problems like this in Origins.  

Edit:  People after adding the approval in are getting the correct flags in the vault debug script, but stlil getting the incorrect dialog.  Though in my tests, I'm still getting one zevran romance flag returning as true and one returning as false though the approval and romance flag appear to be importing correctly.  Which further leads me to believe there's a problem with the defined flag of approval+romance status.  But it is just a guess on my part.

Modifié par ejoslin, 19 mars 2011 - 10:46 .


#24
jenovan

jenovan
  • Members
  • 1 528 messages

sabreene wrote...

Question: When you check the state of the world ingame using the console, it seems there are two different acknowledgements of romance. My first one says I romanced Zev, but the second one says I did not. The same for Alistair romances.

I'm wondering if it's this second check that is causing the misfire? I can't find what it's checking for to get it to change. Anyone else get those last ones to change to the correct status?

Hmm, sabreene, with the two Zev flags:

1. the first one to appear in the debug script (at least for me) follows an Alistair flag, and has "zevran" in all lower-case.
2.  The second one is the very last flag before the script exits, and is grouped with a lot of other Zevran flags.

I can get the second one to true in an Origins import, or by manipulating the approval in a Witch Hunt import, but nothing seems to affect that first flag.  Is is the first flag the one that you're seeing as romanced?  Or the second one?

#25
Monochrome Wench

Monochrome Wench
  • Members
  • 373 messages
The second zev and alisatir flags are broken. I'll release another version of this later today that'll have most of the stuff fixed.