kk49 / deca

Tool for modding APEX engine games (Generation Zero, theHunter, ...)
MIT License
101 stars 15 forks source link

Add ability to extract save file without processing game files #102

Closed R3ality closed 4 years ago

R3ality commented 4 years ago

As per this guide it is currently required to have Generation Zero game files processed and loaded into decaGUI in order to operate on the save file ("savegame") even though it is loaded via "Add external.." (and not part of the core game files).

This is inconvenient in a scenario where the interest is only for decrypting/uncompressing the save file and not operating on the the game files themselves (processing game files is a very time and disk intensive operation and should be avoided in such simplistic use cases if possible).

Proposing to investigate removing the need to fulfill steps 2 and 3 below for this described workflow (if possible):

  1. Launch decaGUI
  2. Select File > New Project.. and target the game executable (GenerationZero_F.exe). Avoid?
  3. Wait for game files to finish processing. Avoid?
  4. Select File > Add External.. and target the save file
  5. Select the save file in the Directory explorer
  6. Select the Extract tab. Ensure "Export As Text" is selected
kk49 commented 4 years ago

Excellent idea, I added (3f8d1790fac5010f4569e9749dbc76f9ab1130d4) a way to do that. The menu item is "File|Open GenZero File..."

Unreleased version here... https://ci.appveyor.com/api/buildjobs/nwyn6odexja6q5l4/artifacts/deca_gui-b296.zip

R3ality commented 4 years ago

Wasn't expecting such a quick reaction. Stellar job, thank you!

Tested b296 on the same save file as b295 by doing the same operation (Export As Text). Compared the output. Only diffs were various missing comments referencing ID-s to human-readable strings (e.g. 1938816247 # wpn_rifle_assault_762_01_q2 "Automatgevär 4" (before) and 1938816247 (after)) but this is likely to be expected without the processed game files they could be cross-referenced towards.

I further confirmed this with b296 by utilizing the same exact steps as described in the original post (resulting in the processed game files getting re-imported into decaGUI) and arriving at an identical result to the original one (i.e. export including the human-readable comments)

Appending the _tmp to the working directory is also a nice touch for separation of which files were exported with or without processed game files.

Looks very solid to me, closing this issue. Thanks again!

kk49 commented 4 years ago

You are correct, the missing hashid to equipment info and/or string mapping is because the archives were not processed. However, fixing that may not too complicated ... #103