The new format is a much more extensive and all-encompassing system, so I guess that the performance and legibility problems were the tradeoffs we had to make.
Anyway, here we go. Not much more to say. the process is not EXTREMELY user-friendly, but it works in Windows, Mac OS X, and Linux.
https://gitlab.com/dragontamer8740/fs-c ... -converter
I made binaries for all three of those platforms on the bintray URL I linked to on gitlab.
It's not particularly easy C to wade through, but it works. Just be sure you keep the text files saved in this format. Use notepad++ or similar to edit them; don't use Windows Notepad because it doesn't handle newlines the same way as my program does.
There are also pre-built binaries of the program available on the page.
Here are a couple helper unix/linux shell scripts that show you how to use them. These will work on OS X and Linux, but not in windows. It should be relatively trivial for an inclined person to write a .bat script to do this.
decode.sh (create editable files for each save file):
- Code: Select all
#! /bin/bash
mkdir -p editing
for file in FS*Save; do
csv2ascii "$file" > "editing/""$file"
done
encode.sh (convert edited files back into the format the game understands):
- Code: Select all
#! /bin/bash
cd editing
for file in FS*Save; do
ascii2csv "$file" > "../""$file"
done
These programs I wrote work because the format inside the non-decoded files is as follows:
items are separated by spaces.
a string of text is declared as starting with the capital letter 'S'. What follows is a comma separated list of numbers which represent individual ASCII characters. 65 is lowercase a, and so on.
These strings must end in a '0', or null. That happens to be the standard way to terminate a string in C as well. Then, following the 0 is a semicolon character that indicates the end of that item. A space then follows if there is more data in the entry. Another string can then start, or a plain number can be present which indicates a raw numerical value.
That's about it, really. My tools just convert this into human-readable data and back.
There are windows programs above, but if you want those convenient scripts I wrote you'll have to write .BAT equivalents. That shouldn't be hard, but I don't have a windows computer handy to test on.
I don't have a fancy-schmantzy GUI for you, because I never used one before and I'm not about to start using one now. I didn't even know FlexEdit existed until about 20 seconds ago, but that appears to be windows-only anyway.
Demo:
Here's an example FSPossessionSave file (Note: "posession" is misspelled in the game code. SIC), before and after conversion:
before:
- Code: Select all
* //4DA761E4-4441-4313-BEDE-B3A78D3DABAA// FSPossessionSave
! Table of GamePossessions (22)
S65,112,111,99,97,108,121,112,115,101,32,72,111,111,100,105,101,0; 1 0 0 0
S65,112,111,99,97,108,121,112,115,101,32,83,99,97,114,102,0; 1 0 0 0
S65,112,111,99,97,108,121,112,115,101,32,83,104,111,114,116,115,0; 1 0 0 0
S65,112,111,99,97,108,121,112,115,101,32,83,107,105,114,116,0; 1 0 0 0
S98,108,97,99,107,32,116,45,115,104,105,114,116,0; 1 0 1 0
S98,114,111,119,110,32,108,111,97,102,101,114,115,0; 1 0 1 0
S99,97,116,32,107,101,121,0; 1 0 0 0
S100,105,115,116,105,108,108,101,100,32,109,105,108,107,0; 2 0 0 0
S69,83,80,80,32,98,117,110,107,101,114,32,107,101,121,99,97,114,100,0; 1 0 0 0
S101,115,116,111,115,116,101,114,111,103,101,110,32,112,105,108,108,0; 10 0 0 0
S103,114,121,112,104,111,110,32,109,105,108,107,0; 5 0 0 0
S72,105,107,105,110,103,32,66,97,99,107,112,97,99,107,0; 1 0 1 0
S106,111,117,114,110,97,108,0; 1 0 0 0
S108,105,98,105,100,111,32,112,105,108,108,0; 1 0 0 0
S109,101,100,107,105,116,0; 5 0 0 0
S115,109,105,108,111,100,111,110,32,99,117,109,0; 1 0 0 0
S115,116,117,114,100,121,32,106,101,97,110,115,0; 1 0 1 0
S116,97,105,110,116,101,100,32,119,111,111,108,0; 2 0 0 0
S116,97,110,117,107,105,32,99,111,105,110,0; 1 0 0 0
S119,104,105,116,101,32,98,114,105,101,102,115,0; 1 0 1 0
S119,121,118,101,114,110,32,103,111,111,112,0; 1 0 0 0
S98,105,114,116,104,32,99,111,110,116,114,111,108,32,112,105,108,108,0; 8 0 0 0
after running "csv2ascii FSPossessionSave > FSPossessionSave-decoded.txt"
- Code: Select all
* //4DA761E4-4441-4313-BEDE-B3A78D3DABAA// FSPossessionSave
! Table of GamePossessions (22)
"Apocalypse Hoodie"; 1 0 0 0
"Apocalypse Scarf"; 1 0 0 0
"Apocalypse Shorts"; 1 0 0 0
"Apocalypse Skirt"; 1 0 0 0
"black t-shirt"; 1 0 1 0
"brown loafers"; 1 0 1 0
"cat key"; 1 0 0 0
"distilled milk"; 2 0 0 0
"ESPP bunker keycard"; 1 0 0 0
"estosterogen pill"; 10 0 0 0
"gryphon milk"; 5 0 0 0
"Hiking Backpack"; 1 0 1 0
"journal"; 1 0 0 0
"libido pill"; 1 0 0 0
"medkit"; 5 0 0 0
"smilodon cum"; 1 0 0 0
"sturdy jeans"; 1 0 1 0
"tainted wool"; 2 0 0 0
"tanuki coin"; 1 0 0 0
"white briefs"; 1 0 1 0
"wyvern goop"; 1 0 0 0
"birth control pill"; 8 0 0 0
If you wanted to add an item that wasn't already in that list, say, 'Awesomest Fruit,' you could use the 'str2csv' tool to generate a correct name on the fly:
- Code: Select all
str2csv "Awesomest Fruit"
S65,119,101,115,111,109,101,115,116,32,70,114,117,105,116,0;
Then, you would add that item anywhere to the list above, followed by the four data elements. I happen to know the first number is the quantity you have. If you wanted to have ten of them, you'd make that whole line read:
- Code: Select all
S65,119,101,115,111,109,101,115,116,32,70,114,117,105,116,0; 10 0 0 0
ALTERNATIVELY, you could just put a new line at the end of the decoded file which reads:
- Code: Select all
"Awesomest Fruit"; 10 0 0 0
and then run the encoder (ascii2csv) to make it back into a format the game can recognize.
It might be a good idea to rename 'ascii2csv' to 'encode' and 'csv2ascii' to 'decode'. Just thought of that, though, so the names will stay for now.