Page 1 of 1

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

Posted: Jul 12 2021
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.

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

Posted: Jul 14 2021
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.

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

Posted: Jul 14 2021
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.