Freitag, 29. Dezember 2017

Manually Modifying PoE Saves...



After playing this game a few days now, I feel the urgent need to lower the ratio between activities and resting times from something above 1:200 to a more realistic 1:50 or so. Hence, I started to evaluate my savegames a little bit closer to get access to their vital data.

This is what I found out until now

Unlike Baldur's Gate - the antetype PoE tries to reach, but never will catch - PoE does not store its savegames in a SAVE folder within the game's main folder. For what reasons ever, the script kiddies who clicked together PoE decided to hide your saves in an obscure folder inside Windoze's 'user account' folders. For me, it is

[Bootdrive]:\USERS\ADMINISTRATOR\SAVED GAMES\PILLARS OF ETERNITY\

but it might be [My Account Name] instead of [ADMINISTRATOR] on your machine, depending on your installation and Windoze version.

This folder holds all savegames - those you never asked for and those deliberately saved by you. All of them have the extension '*.savegame', but are simple zip archives for real. Hence, you can open them with any unzip program (I prefer 7-ZIP, but you might have another favourite unzipper).

For 7-Zip: First select your favourite hex editor - I prefer HxD, but you can choose your favourite hex editor, of course - as default 'open' application (select [Options] from the [Extras] menu, then click the 'editor' tab in the dialogbox and select your editor via 'file open').

Having done that, open the saved game of your choice via right click and select 'Open' from the pop-up menu. You will see a bunch of files, now. First, there are up to six PNG images [0.png...5.png] (one for each of your current party members), followed by pairs of area files - one 'AR_*.fog', defining how far the corresponding bitmap is explored (which parts remain black), one 'AR_*.LVL', containing data of interactive stuff (containers, state of quest NPCs, et cetera). None of these files is important nor should you try to edit them - it is not worth to create self-made trouble to fine tune whatever you think you have to fine tune...

Scroll down until you stumble upon the file named 'MobileObjects.save'. This is the only file you should open and edit. Do yourself a favour and leave your hands off of the other files! Click on the file name and select 'edit' from the pop-up menu to open the file with the editor you've chosen (as described above).

For the moment - I own the game just for a week, now - I suggest the following way to edit your game:

0. Make a backup copy of your saved game. In case your patch does not work properly, you are on the safe side...

1. Write down the current experience of your PC and NPCs.

2. Optional (depending on the hex editor!): Convert the decimal numbers into hexadecimal numbers (you can use Windoze's calculator in programmer mode or another tool of your choice).

3. Open the search dialog in your hex editor and search for the experience of the character of your choice. For HxD: Open the search dialog. There is an entryfield and several drop down listboxes. Enter the decimal number. Select 'Integer' in the first and '32 bit Double Word' in the second listbox, but leave the third (Little Endian...) alone. Click 'Okay' to start the search.

4. If you found the proper entry, you should find the plain text variable name 'Experience' followed by six hexadecimals 06 01 11 01 0B 01 preceding the highlighted hexadecimal number (it should end with one zero and the third byte should be 00 or 01). If 'Experience' is missing, press F3 to search for the next occurrence of your number!

5. Edit the found double word (a sequence of 4 byte in reverse (Little Endian!) order). Keep in mind that Experience in PoE 1 is limited to 66,000 (0x000101D0 => enter D0 01 01 00 in your hex editor).

6. If you want to edit the stats of that character: use your [Page Up] key and scroll about 0x1800 (6,144) byte back. There are six variable names of interest:

01 09 'BaseMight' 06 01 11 01 15 01 xx 00 00 00 06 01 11 01 01
01 10 'BaseConstitution' 06 01 11 01 15 01 xx 00 00 00 06 01 11 01 01
01 0D 'BaseDexterity' 06 01 11 01 15 01 xx 00 00 00 06 01 11 01 01
01 0E 'BasePerception' 06 01 11 01 15 01 xx 00 00 00 06 01 11 01 01
01 0D 'BaseIntellect' 06 01 11 01 15 01 xx 00 00 00 06 01 11 01 01
01 0B 'BaseResolve' 06 01 11 01 15 01 xx 00 00 00 06 01 11 01 01

The bytes marked with xx hold the currently assigned value for the corresponding property for that character (the name can be found somewhere above BaseMight').

7. Whenever you have modified what you wanted (I suggest not to modify anything not mentioned here!) close your hex editor and then the unzip program. At least one of them should ask if you want to save the changed content.

8. Start Pillars of Eternity and check if your patch works.

9. Enjoy your upgraded (N)PC(s)!

Caveats

Patching experience works for all characters. Patching statistics does not work for any pre-fabricated NPC - only the statistics for your PC and all player-created NPCs work permanently. To modify statistics of any pre-fabricated NPC, you have to modify the file template in the 'assets' folder. I will describe how to do that in a later posting.

Future Work

I am still collecting data for the first real Pillars of Eternity editor (PoEE). When I find some time, I will upload my BGT Editor (BG-Tools) to my Google Drive account. My programs are written in pure assembler, so they are 1/1000th of the size occupied by the proprietary Unity3D editor. Which did not help to modify BGT savegames, anyway...