As a French person I feel like it's my duty to explain strikes to you. - AdrienIer

Create an account  

 
Generating a 'blank' start of game save file

I was pondering the idea of scenario generation, where you could have a lot more variance in possible start of game setups (you or the computer might get special initial benefits, such as additional cities, additional buildings, starting units, starting heroes, starting spells, etc), but ran into a problem that the information on how things like the map tiles work is poorly documented in anything I know. I could probably get around this by running the standard launcher to generate a savegam.9, then intercepting wizards.exe with my own program, which may be the best way around it, but is there another solution?
Reply

(March 3rd, 2016, 17:33)Anthony Wrote: I was pondering the idea of scenario generation, where you could have a lot more variance in possible start of game setups (you or the computer might get special initial benefits, such as additional cities, additional buildings, starting units, starting heroes, starting spells, etc), but ran into a problem that the information on how things like the map tiles work is poorly documented in anything I know. I could probably get around this by running the standard launcher to generate a savegam.9, then intercepting wizards.exe with my own program, which may be the best way around it, but is there another solution?

https://dl.dropboxusercontent.com/u/1430...index.html

Plenty of information on save game formats here.
However, you also need to set diplomacy related data which is pretty much undocumented everywhere.
Most of it is a no-brainer (0 works) but starting relation and visible relation has to be set to whichever value you want it to start at, normally calculated from the books.
Reply

(March 4th, 2016, 11:29)Seravy Wrote: Plenty of information on save game formats here.
The problem I was having was with maps -- there are a quite large number of different map codes for different tile types, probably corresponding in some way to joining terrains, and I was unable to find a straightforward rule for which code you use for which tile type in which position.
Reply

(March 4th, 2016, 13:01)Anthony Wrote:
(March 4th, 2016, 11:29)Seravy Wrote: Plenty of information on save game formats here.
The problem I was having was with maps -- there are a quite large number of different map codes for different tile types, probably corresponding in some way to joining terrains, and I was unable to find a straightforward rule for which code you use for which tile type in which position.

Yes, changing the map is difficult and not recommended. Especially because then you would need to also set the continent IDs, not sure if that even has a known location in the save files.
Reply

I thought that SaveGam2.html documented the terrain pretty well.
It also contains the continent ID's (named land mass ID's).
The joining configurations are not really important - they are only intended to make the map look prettier.
And actually, there is a bitmap somewhere that lists all of them.
Or you can use the tweaker to dump TERRAIN.LBX as pictures.
If you want, I can provide a code snippet from the Tweaker in which I've mapped each code to a terrain category.
I ripped that directly from the code.

So to get the land properly in order, we need to:
  1. Fill in the 60x40 Arcanus map and Myrror map with the codes representing the terrain types you want.
    As an optimization, we can ensure proper joining configurations.
  2. Set the land mass ID's, so the AI doesn't get confused.
  3. Fill in the maps with the bonus deposits.
  4. Fill in the maps with the terrain flags (such as roads).
    Tidbit of information: a road on Myrror should be both a road and an enchanted road.
  5. Fill in the movement maps for the different transport modes.
    This should match the terrain types and terrain flags.

Edit: Oh, and we'd need to fill in the data for the nodes, lairs, towers, fortresses, neutral cities, and neutral units as well.
--I like ILSe
Reply

(March 6th, 2016, 05:37)I like Serena Wrote: Edit: Oh, and we'd need to fill in the data for the nodes, lairs, towers, fortresses, neutral cities, and neutral units as well.
Regarding that I would also mention the number of lairs can be anything (up to the available space of course), but towers and nodes MUST be the predefined amount (6 tower pairs and 30 nodes) as they are hardcoded. I guess in theory you could make them have a position outside the valid map to remove them, I have never tried but I see no reason why that would not work.
In case of nodes you also need to set their aura positions and have to be careful not to overlap them.
Reply

(March 6th, 2016, 05:37)I like Serena Wrote: I thought that SaveGam2.html documented the terrain pretty well.
It does, there's just a giant list of terrains associated with each type.
Reply



Forum Jump: