Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Re: The Devanstator (save format)

Page: 1 of 1
 eiz
01-05-2004, 9:14 AM
#1
My attempts to post this reply in your save game editor thread have been met with mysterious timeouts, so I'm forced to resort to this...

What I wouldn't give to see the documentation for these files...

The file format documentation for ERF and GFF is on nwn.bioware.com in the For Developers section. The SAVEGAME.sav file is an ERF that seems to contain blueprints for party member selection (augmented by partytable.res, also a very simple GFF file), an inventory, and an ERF for each open module. The savenfo.res file in the savegame directory is a GFF which contains various information including the current module. The module.ifo resources contain the majority of the relevant module state.

The actual fields of many of these GFF formats are not documented, but their functions are easy to discover by applying a bit of common sense and experimentation.

So, the simplest way to get at the current party members: Read LASTMODULE out of savenfo.res, extract the named resource (ResType 0x0809, IIRC) from SAVEGAME.sav, and then modify the structures in the Mod_PlayerList list in module.ifo (it's pretty self explanatory - ClassList for classes, FeatList for feats, Appearance_Type for player model, etc). No searching required.

I'm not sure if this is old news to you or not, but I didn't see any mention of it.
 Hoa_Binh
01-05-2004, 12:30 PM
#2
I have been poking about in the files for KotOR and recently tried checking the save files. I also found that every save-file is in either GFF or ERF file-format.

The save folders contains five files of the following format:

GLOBALVARS
In the GFF format. Contains the global variables for quests and such things

PARTYTABLE
In the GFF format. Contains more information about the different NPC's that join the group, such as which of them that are available to the players. It does not seem to contain any specific information such as skills.

savenfo.res
In the GFF format. Seems to contain information about the save game such as name and the module the game was saved in.

Screen.tga
In TGA format. It is the screenshot of the current game.

SAVEGAME
In ERF format (encapsulated resource file). It contains the following files:

AVAILNPC0.utc
AVAILNPC1.utc
AVAILNPC2.utc
AVAILNPC5.utc
AVAILNPC6.utc
AVAILNPC7.utc
AVAILNPC8.utc
All of them are in the GFF format and contains the NPC's that join the group and their different values. Contains skills, name, gender and much information.

INVENTORY.res
In the GFF format. Contains the inventory of the party.

REPUTE.fac
In the GFF format. Think that it contains how different groups of NPC's like the character.

XXX.sav
There are many .sav-files, one for each planet. For example ebo_m12aa.sav if for the Ebon Hawk. These files are in ERF format. They are the area-save files, they contain the following files:

XXX.git (each have a name like the file that contains them)
XXX.are (same as above)
Module.ifo
Those files seem to contain information about the area. Much of the information is somewhat cryptic but it is possible that it can be useful.

So far I have not been able to find the information about the PC, but I'm working on it.

It is quite possible to use ERFEdit to unpack everything and then use GFFEdit to change the information and then re-pack it.
 Hoa_Binh
01-05-2004, 12:41 PM
#3
Addition to the above information. When looking at my last save from my last game when I save near the end battle I found an extra file in the SAVEGAME.sav called pc.utc that contained the information about my character. Do not know why it did not show up in the other save files but I'm checking it out.
 eiz
01-05-2004, 12:44 PM
#4
So far I have not been able to find the information about the PC, but I'm working on it.

As I said, the PC data is in the module.ifo of the currently active module, in the Mod_PlayerList list.

The AVAILNPC resources are standard creature blueprints, you can even copy NPCs out of templates.bif and put them in your party.
 Hoa_Binh
01-05-2004, 12:51 PM
#5
Originally posted by eiz
As I said, the PC data is in the module.ifo of the currently active module, in the Mod_PlayerList list.


Sorry. I missed that in you post. That open up many possibilities for changing stuff (as long as you remember which module was your last).
 eiz
01-05-2004, 12:56 PM
#6
The last opened module is in savenfo.res, in the LASTMODULE field. =)

As for PC.utc, it contains a blueprint for the PC (obviously), but I'm not sure when it's created. My endgame saves have it, but I sort of nuked most of my mid-game saves. Might be used on the Leviathan when you don't have the PC in your party?
 Hoa_Binh
01-05-2004, 1:55 PM
#7
I have tried to modify things and should tell people to be sure to make back-ups before starting to change stuff. I have found at least one value that should not be altered because the modified game refuses to load.
 The Devanstator
01-06-2004, 2:53 AM
#8
Wow, you guys have really done your homework. Because I had no previous experience with NWN or Bioware, I just started figuring them out on my own. I would use a cheat to change some value, then save it in an extra slot, then load up the game again, cheat with a different value and save in another slot. Then I would use a hex editor to find the differences and try to sort it out. Thanks a lot for pointing this stuff out, I had no idea the sav was actually an erf. Everything makes so much more sense now.
This could make things a lot easier for me, thanks.
 TMPhoenix
01-08-2004, 8:00 PM
#9
Addition to the above information. When looking at my last save from my last game when I save near the end battle I found an extra file in the SAVEGAME.sav called pc.utc that contained the information about my character. Do not know why it did not show up in the other save files but I'm checking it out.

This probably happens when:

the PC is switched out of the active party during the Leviathan mission.

I noticed this as well, when I was looking into editing the savegames, and it seems to show up around that time.
Page: 1 of 1