Aller au contenu

Photo

I need help editing my character


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

#1
AlisterCat

AlisterCat
  • Members
  • 9 messages
UPDATE: Issue solved.
 
My Dragon Age Origins character is broken. I do zero melee damage. I have researched the problem and the issue seems to be a value being rounded to a negative due to a glitch in how the damage is calculated. It is known as NaN (not a number) where the value is rounded as such that it is not a valid number. The fix should be simple, just resetting the value in the save game using the dragon age toolset. I cannot edit the file, however, as the toolset is memory hungry and my 8GB will not suffice.
 
I am looking for a helper, willing to open my save using the toolset.
 
You need a 64bit OS and at least 16GB of RAM. I cannot open the file with just my 8GB.
 
It always maxes out and causes out of memory error. No guarantees that will be enough but at this point I'm stuck. I will provide instructions so you don't have to know the toolset.
 
It sucks because I got all the way to the expansion and have ended up with a main character that cannot do any damage, making it very difficult to progress. Researching the cause of the glitch has been very interesting though.
 
Resources I have used:
 
Here is the directory, in a rar file:
 
Instructions:
  • Open the toolset.
    Click File > Open File and navigate to Saves > Slot_5 > VigilsKeep.das
  • Click the plus icons as follows:
    SAVEGAME_PLAYERCHAR -> SAVEGAME_PLAYERCHAR_CHAR -> SAVEGAME_CREATURE_STATS -> SAVEGAME_STATLIST
  • Click the plus symbols from 0 to 9 to expand the view.
  • Look in the value column for any negative numbers, or any containing letters. Set them to 0 if so.
    For example:
    SAVEGAME_STATPROPERTY_BASE = 40
    SAVEGAME_STATPROPERTY_MODIFIER = -1.09E-06
    SAVEGAME_STATPROPERTY_INDEX = 10
    a
  • File > Save As then just save as it is and upload for me
 
Here is a screenshot of the values from a sample save. Replace with similar values found in the image if you can, but only for negative values.
2632309-da.jpg


#2
DarthGizka

DarthGizka
  • Members
  • 867 messages

Tried to load your save on my laptop - 32 GB RAM, 64-bit Win 8.1 - but no dice. The problem isn't RAM, since the toolset GFF editor is 32-bit and cannot address more than 4 GB of memory anyway. Unless you find a properly programmed GFF editor on the net somewhere, your best bet for a quick fix is probably to use a script to query and reset the offending stat modifiers.

 

The console command line can be made visible if it isn't, and DisplayFloatyMessage() can be used to print stuff. If you put your script under "Core Game Resources" instead of the default "Single Player" then it will be accessible from all modules. You can switch back and forth between the toolset and the game for editing and testing, so you don't even have to fart around with parameter string processing unless you want to.

 

How did the problem come about anyway? Mods? Crash? Is there some particular reason to believe that the problem is limited to a few stats values and that the rest of the savegame is not affected? Replaying from a clean save may be the safer option.

 

P.S.: Loaded the savegame and found that the damage bonus modifier is exactly -186, which is a rather odd value to come about by chance...

#include "2da_constants_h"
 
void main ()
{
   SetCreatureProperty(GetHero(), PROPERTY_ATTRIBUTE_DAMAGE_BONUS, 0.0f, PROPERTY_VALUE_MODIFIER);
}


#3
AlisterCat

AlisterCat
  • Members
  • 9 messages

Well, I have seen posts with methods that claim to make the editor use more than 4GB of RAM. Having used the edits myself, the resource counter at the bottom of the toolset reads that it is using 7.8GB of RAM so I assumed it worked.

 

I have no idea what caused it. The mods I have used are limited and fairly safe, though it's easily possible some conflict may have messed things up. I have reset my character to level one using a respec mod, and removed all equipment and the value is still NaN, so I don't believe it is due to changes in stats or affected by how gear is adding to stats.

 

In one of the resource links I posted, someone else has encountered the same problem with Armour values so I am pretty confident in something having caused a value to become invalid. Nothing else is wrong with my game, or any of my other characters. Starting over might be a cleaner option but I have taken this character through to the expansion with something like 80 hours of gameplay. I'd like to see it through.

 

I have no idea how I would write a script to reset the values... could you assist?



#4
DarthGizka

DarthGizka
  • Members
  • 867 messages

I've already posted the script as a post script to my earlier post, just refresh your browser.

 

In the toolset, use File - New - Script, set module and owner module to "Core Game Resources". Paste the code, save. Saving automatically compiles, which means the script will be ready to run.

 

P.S.: when I loaded your save into my game there was no NaN anywhere, just the bonus damage modifier of -186 which gets clamped to -100 internally and to 0 for display purposes (character screen). The script I posted sort of fixed it by resetting to 0 but you'll have to figure out the proper value on your own. Like by making a comparable character from scratch, levelling it via something like.runscript addxp, and comparing the stats to those of your character.



#5
AlisterCat

AlisterCat
  • Members
  • 9 messages
The script you supplied didn't solve the issue of no damage unfortunately. I should clarify the one with NaN can be viewed in the quicksave which is the same character but having drunk a respec potion. I believe it identifies the root of the problem and the one I have been testing on mostly.
 
I have modified your code with some additions, mostly just in case. It resets a few values and allows my character to do damage when equipping weapons. While not accurate, and not in line with where my character should be, it sets the values to a lvl 1 warrior human noble and allows me to do damage again as normal. If you can improve upon it, I would appreciate it, however I am satisfied at this point.
 
Thank you so much for your help.
 
#include "2da_constants_h"
 
void main ()
{
   SetCreatureProperty(GetHero(), PROPERTY_ATTRIBUTE_DAMAGE_BONUS, 0.0f, PROPERTY_VALUE_MODIFIER);
   SetCreatureProperty(GetHero(), PROPERTY_ATTRIBUTE_ATTACK_SPEED_MODIFIER, 0.0f);
   SetCreatureProperty(GetHero(), PROPERTY_ATTRIBUTE_ATTACK, 0.0f, PROPERTY_VALUE_MODIFIER);
   SetCreatureProperty(GetHero(), PROPERTY_ATTRIBUTE_ATTACK, 40.0f, PROPERTY_VALUE_BASE);
   SetCreatureProperty(GetHero(), PROPERTY_ATTRIBUTE_DAMAGE_SCALE, 1.0f);
}


#6
DarthGizka

DarthGizka
  • Members
  • 867 messages

Glad you can go forth and slay things again. The quicksave is indeed a nightmare, and it was complaining about oodles of missing mods. I had only looked at VigilsKeep.das as you said, and that was working after the simple fix. Even went down into the basement to bash a few undead.

 

I guess the best way of bringing your character back to full form would be to create a comparable character in some way, so that you have a reference. Like loading an earlier, 'known good' save from your current campaign and boosting the character to the same level via runscript addxp. Some vital stats are not shown in the character screen, but they can be queried via script (either printed as a floaty or dumped to the log file). That should allow you to refine your repair script...



#7
DarthParametric

DarthParametric
  • Members
  • 1 409 messages

For future reference, you can use pyGFF to open save files with no problems. It opens the save in the first post using just 60MB of RAM.


  • AlisterCat et luna1124 aiment ceci

#8
AlisterCat

AlisterCat
  • Members
  • 9 messages

For future reference, you can use pyGFF to open save files with no problems. It opens the save in the first post using just 60MB of RAM.

Wow, that's actually perfect for me. Thank you.


  • luna1124 aime ceci