UPD 23.10.2023: Release v1.3: Editor: Adjust Royal Expeditionary Force size, add 4-th, 5-th etc specialist to manufactures. Enc/Decoder: AUTO UPDATE mode.
UPD 06.03.2023: Release v1.2: Assimilate Indian converts or promote them to scouts, pioneers or warriors.
UPD 20.02.2023: Release v1.1: upgrade warehouse level above 2 & clear and plow tiles under AI's colonies.
UPD 18.02.2023: Release v1.0 ready. It features full-fledged decoder/encoder enc_decode_sav and basic editor smcol_sav_editor (by now it just removes fortifications and plants forests). Windows x64 binaries included, but it's recommended to install Python and use utilities directly in .py format.
Hello fellow colonizators!
Some time ago I've returned to playing classic Colonization and once again became upsed by inability to abandon colony with any fortification built. But this time I decided to not put up with it and created a simple ulitily for removing fortifications from any colony. Then I realized that removing stokades wasn't the only feature I wanted to implement. Then I've found this forum where people performed great efforts to decode SAV files (here https://forums.civfanatics.com/threads/decoding-colonization-sav-files-1994-old-classic.674707/ and links in it's posts). I was greatly inspired by these amazing works and decided to try to create my own ulitily to study and edit SAV files, using the mapping, discovered by my predecessors.
So why create a new SAV ulitity, if we already have colsaves, viceroy, Colonization-SAV-files, Hot Seat Multiplayer Savegame Editor and maybe others (sorry if I forgot to mention). Here's why:
1) carthanc mentioned that each of the existing utilities...
2) OK, with colsaves you can decode SAV file according to it's structure outline, save it to txt format and exctract some information from it, but what next? You cannot edit it and receive a modified SAV file to load it and continue playing.
That's why I'm working on Sid Meier's Colonization (1994) SAV files utility pack. By now it includes:
1) smcol_sav_struct.json file. It outlines a SAV file structure in universal user friendly format. Note: I've extracted all (well, not all, about 95%) the structure data from viceroy project. Credits to eb4x, hegemogy and their predecessors!
Here is the example of how a UNIT section is outlined:
Here you can see a section name UNIT, number of it's entries ("count": "unit_count" - value taken from HEAD section) and it's structure description ("struct": {...}). It has members of several types: simple ("orders": {"size": 1} - one byte field in hex format), typed simple ("goto_x": {"size": 1, "type": "int"} - one byte value of type int), fields with lookup-types ("profession": {"size": 1, "type": "profession_type"} - one byte field with "profession" type, it is described in __metadata section of the JSON file), arrays ("cargo_hold": {"size": 1, "cols": 6, "type": "int"} - 6 items array of int values, each of 1 byte size) and bit struct fields ("cargo_items": {...} - 3 item array of pairs of 4 bits values of lookup-type "cargo_type") and others. You can explore the JSON file and understand it, it's quite simple. Note: "size" attribute value means bytes count in "struct" and bits count in "bit_struct" fields.
2) smcol_sav_converter.py - Python module for reading SAV data according to structure outline in smcol_sav_struct.json and converting it to human readable and editable SAV.JSON format. Do not use it directly.
3) enc_decode_sav.py - a utility for decoding SAV files to SAV.JSON and vice versa. That's your main tool.
To use it install Python (and then bitarray module) place these 3 files to COLONIZE folder and run enc_decode_sav.py.
Sample use. Imagine, you want to remove a fortification from a colony "Jamestown" in a SAV file COLONY07.SAV. Here are the steps:
1) Run enc_decode_sav.py and choose COLONY07.SAV file. The new COLONY07.SAV.json file will be created
2) Open COLONY07.SAV.json with any text editor (VS Code, Brackets or so recommended, but not nessesary) and search for "Jamestown" string. You will go to the Jamestown colony's section.
3) Find it's member "buildings" and submember "fortification".
4) Set "fortification" value to "0", save file and close it.
5) Run enc_decode_sav.py again and choose COLONY07.SAV.json file. The new COLONY07.SAV.enc file will be created.
6) Remove '.enc' from the end of this file's name, run Colonization and load it.
7) That's it! No more stockade in Jamestown. You can abandon it. It's God's will!
The utility is quite functional. Decode/encode your SAV files, study and edit them, modify structure outline in smcol_sav_struct.json. It's SAV exploration time!)
The drawbacks:
1) Some errors are not processed correctly
2) MAPS section representation is not so descriptive. Working on a special format for them.
Bug reports are appreciated.
P.S. Sorry for my english. Not native speaker I am.
UPD 06.03.2023: Release v1.2: Assimilate Indian converts or promote them to scouts, pioneers or warriors.
UPD 20.02.2023: Release v1.1: upgrade warehouse level above 2 & clear and plow tiles under AI's colonies.
UPD 18.02.2023: Release v1.0 ready. It features full-fledged decoder/encoder enc_decode_sav and basic editor smcol_sav_editor (by now it just removes fortifications and plants forests). Windows x64 binaries included, but it's recommended to install Python and use utilities directly in .py format.
Hello fellow colonizators!
Some time ago I've returned to playing classic Colonization and once again became upsed by inability to abandon colony with any fortification built. But this time I decided to not put up with it and created a simple ulitily for removing fortifications from any colony. Then I realized that removing stokades wasn't the only feature I wanted to implement. Then I've found this forum where people performed great efforts to decode SAV files (here https://forums.civfanatics.com/threads/decoding-colonization-sav-files-1994-old-classic.674707/ and links in it's posts). I was greatly inspired by these amazing works and decided to try to create my own ulitily to study and edit SAV files, using the mapping, discovered by my predecessors.
So why create a new SAV ulitity, if we already have colsaves, viceroy, Colonization-SAV-files, Hot Seat Multiplayer Savegame Editor and maybe others (sorry if I forgot to mention). Here's why:
1) carthanc mentioned that each of the existing utilities...
And it is really a problem! If you are studying the SAV structure and want to alter it, you must dig into the code of the utility and the programming language it is written with. That's not user friendly.closely couples their data outlines to the code itself (python and C/C++, respectively). They are not using standard config files as inputs to the program's interpretation or in the program's output.
2) OK, with colsaves you can decode SAV file according to it's structure outline, save it to txt format and exctract some information from it, but what next? You cannot edit it and receive a modified SAV file to load it and continue playing.
That's why I'm working on Sid Meier's Colonization (1994) SAV files utility pack. By now it includes:
1) smcol_sav_struct.json file. It outlines a SAV file structure in universal user friendly format. Note: I've extracted all (well, not all, about 95%) the structure data from viceroy project. Credits to eb4x, hegemogy and their predecessors!
Here is the example of how a UNIT section is outlined:
Spoiler UNIT section description :
JSON:
"UNIT":
{
"count": "unit_count",
"struct":
{
"x, y": {"size": 2, "type": "coords"},
"type": {"size": 1, "type": "unit_type"},
"nation_info":
{
"bit_struct":
{
"nation_id": {"size": 4, "type": "nation_4bit_type"},
"unknown14": {"size": 4}
}
},
"unknown15": {"size": 1},
"moves": {"size": 1, "type": "int"},
"unknown16": {"size": 2},
"orders": {"size": 1},
"goto_x": {"size": 1, "type": "int"},
"goto_y": {"size": 1, "type": "int"},
"unknown18": {"size": 1},
"holds_occupied": {"size": 1, "type": "int"},
"cargo_items":
{
"count": 3,
"bit_struct":
{
"cargo_1": {"size": 4, "type": "cargo_type"},
"cargo_2": {"size": 4, "type": "cargo_type"}
}
},
"cargo_hold": {"size": 1, "cols": 6, "type": "int"},
"turns_worked": {"size": 1, "type": "int"},
"profession": {"size": 1, "type": "profession_type"},
"transport_chain":
{
"struct":
{
"next_unit_idx": {"size": 2, "type": "int"},
"prev_unit_idx": {"size": 2, "type": "int"}
}
}
}
}
2) smcol_sav_converter.py - Python module for reading SAV data according to structure outline in smcol_sav_struct.json and converting it to human readable and editable SAV.JSON format. Do not use it directly.
3) enc_decode_sav.py - a utility for decoding SAV files to SAV.JSON and vice versa. That's your main tool.
To use it install Python (and then bitarray module) place these 3 files to COLONIZE folder and run enc_decode_sav.py.
Sample use. Imagine, you want to remove a fortification from a colony "Jamestown" in a SAV file COLONY07.SAV. Here are the steps:
1) Run enc_decode_sav.py and choose COLONY07.SAV file. The new COLONY07.SAV.json file will be created
2) Open COLONY07.SAV.json with any text editor (VS Code, Brackets or so recommended, but not nessesary) and search for "Jamestown" string. You will go to the Jamestown colony's section.
3) Find it's member "buildings" and submember "fortification".
4) Set "fortification" value to "0", save file and close it.
5) Run enc_decode_sav.py again and choose COLONY07.SAV.json file. The new COLONY07.SAV.enc file will be created.
6) Remove '.enc' from the end of this file's name, run Colonization and load it.
7) That's it! No more stockade in Jamestown. You can abandon it. It's God's will!
The utility is quite functional. Decode/encode your SAV files, study and edit them, modify structure outline in smcol_sav_struct.json. It's SAV exploration time!)
The drawbacks:
1) Some errors are not processed correctly
2) MAPS section representation is not so descriptive. Working on a special format for them.
Bug reports are appreciated.
P.S. Sorry for my english. Not native speaker I am.
Last edited: