Sourcehold
Sourcehold copied to clipboard
Sav / Map file format
See the Wiki for details
Starting goods: Pitch Wheat Flour
And I don't know about how sort them.
There is a image file in the. map files? Or this programm can read the map files. http://stronghold.heavengames.com/downloads/showfile.php?fileid=67
@PodeCaradox I've tried contacting the author of the file, but the email address doesn't work anymore.
@metalvoidzz Slight correction: the .cfg filesize seems to be only 819 bytes, I just found the code that generates it (at least in v1.25). https://github.com/metalvoidzz/Sourcehold/wiki/Stronghold-asset-formats
As a heads up, I am trying to reverse engineer Stronghold map PNGer.exe I would like to publish my progress to Git. I use x64dbg
Can this become a github organisation? Because a separate branch in this repository for details about maps seems silly to me.
Hi, moving the repo to an organisation wouldn't be a problem.
Do you want to create a repository for the reverse-engineered files or just for sharing the details about how the Map PNGer works?
It would consist of the reverse-engineered files (comments & labels at the machine language level) and a (more intuitive) Python re-implementation.
And of course a small guide on how I think it works and how others can help. Machine language is pretty tedious.
@gynt I've tried to contact Dirus, the creator of the Map PNGer tool, but the email address that is in the 'about' section doesn't work anymore :/
@gynt I sent you an invite to the organization, you should be able to create the repo then
I have no time now to write the small guide of how I think it works, but the repository is there now. I will work on it later again. Thanks for the organisation!
Hi, I found a nice thread that describes more details about the map file format. I am not sure if you guys have already seen it. http://stronghold.heavengames.com/cgi-bin/forum/display.cgi?action=ct&f=4,3925,60,10000
So far, I could not verify that the information is correct, as some of the bytes described are different from those in the wiki (https://github.com/sourcehold/Sourcehold/wiki/Map-file).
Here is a little update regarding the map/sav file format.
The code at https://github.com/sourcehold/sourcehold-maps allows to unpack .map and .sav files to directories for further inspection. It successfully unpacks all maps from SH and SHC (except mission0.map from SH, for some weird reason it's structure is a tiny bit different). You can also substitute the map preview image (for an example, see the code found under examples/
).
Aside from a map preview image, a description, and some unknown data (that gets bigger in .sav's), a .map/.sav file consists of sections that contain map data. Some of these sections map directly to tiles on the game map. Exciting! Every section has a number from 1001 to 1127, and I sincerely hope they are somewhat the same in SH, and SHC...
Great work so far! I'll check out your unpacker to see if I can find out more about the section data. I also added some info to this projects wiki, maybe you'll find some of it useful.