Map Editor Hex Distance Fix (also works on save games!)

Have a question about how to mod something? Or have an issue with one of our mod tools? Post here.

Moderators: Balthagor, Moderators

Post Reply
ImperiorIL
Sergeant
Posts: 18
Joined: Apr 25 2015
Human: Yes

Map Editor Hex Distance Fix (also works on save games!)

Post by ImperiorIL »

Recently I've been tinkering with a new map for testing combat, imagine 4 belgium sized nations by themselves on a map and running 80 years in a few hours during peace.

So, one of my nags with the game is the 16km hex size. I changed it to 8km in the editor, but since an update a while back it hasn't been applying like used to, the sav cached is still 16km.

No problem, using a hex editor I found where the bits for the hex size were stored and fixed it on the exported file. Any hex editor will do, including Notepad++ with the publing.
So the fix is to just search for the first occurence of "10" (16 in hexadecimal) and replace it with your prefered hexadecimal value in km for the hex distance. ( it is usually in the 000008xx row )

Just posting it here because I thought it was a really cool feature and others may have faced this issue trying to use the broken hex distance feature from the map editor.
evildari
Brigadier Gen.
Posts: 593
Joined: Aug 10 2017
Human: Yes

Re: Map Editor Hex Distance Fix (also works on save games!)

Post by evildari »

nice find ImperiorIL,

edited 3905 into it to see if that works:

-displayed the right amount of KM in the ESC many
-units were moving slower but not as slow as expected for the hexsize
-ran the game at highest speed for an in-game week then i saw treasury going out of integer range - checked atlas - also happened to all countries
(maybe i should stick to one byte for hexsize)
there goes the mapping of a dyson sphere...

i would suggest moving this into modding subforum - missed this post since i usually hide the GW tabs.
my mods
http://www.bgforums.com/forums/viewtopi ... 79&t=25932 (even techs and units for everyone - AI will own you too)
http://www.bgforums.com/forums/viewtopi ... 79&t=29326 (MARSX2)
ImperiorIL
Sergeant
Posts: 18
Joined: Apr 25 2015
Human: Yes

Re: Map Editor Hex Distance Fix (also works on save games!)

Post by ImperiorIL »

Some of the social expenses, especially environment, are based on the size of your country.
3905 is 14597 in Hex. And area is squared. So by multiplying the hex size by 912.3125x you multiplied the country area by ~832,314x. Might be the reason why some values went nuts. lol
The unit movement probably has a lot of rounding when using wacky values, specially at max game speed.
Post Reply

Return to “Modding Issues & Support”