Page 1 of 1

Map exchange string format in Wiki outdated (at least 0.17.79+)

Posted: Sun Jul 05, 2020 4:29 pm
by franck
Hello,

Working on a TAS, I worked on a small command to start a fresh headless server from a map exchange string in a VM. I have this working now, but it took a while because it seems like the wiki entry for Map exchange string format is partially outdated. Is this page maintained in any way by the developers, or should I try to contribute my findings from reverse engineering some parts?

For instance, in Map Gen Settings (which is the only part I reverse engineered so far), there seems to be a new byte before water frequency and water size. Both those values seem to be floats now. Also water size seems to have the inverse behavior than UI, ie. setting to 600% in GUI results in value if .17, while a value of 17% in GUI results in value of 6.0. All autoplace_controls values are also floats. There seems to be 24 bytes of new data before the starting_area, which is also now a float. Things like that.

I would also love a description on how to decode the space optimized integer there. I am not sure how one is supposed to determine if a number is <255 on decode, unless the decoded number turns out to be > to buffer size, but that could be wrong in certain cases.

Thank you

Re: Map exchange string format in Wiki outdated (at least 0.17.79+)

Posted: Mon Jul 06, 2020 7:50 am
by Bilka
The page is not maintained by us.

You may have more luck with using the game to convert the map exchange string: https://wiki.factorio.com/Command_line_ ... nge_string. The page also links to the documentation of the Lua side of the map gen settings which is more updated.

Re: Map exchange string format in Wiki outdated (at least 0.17.79+)

Posted: Tue Jul 07, 2020 6:24 pm
by franck
That's pretty cool, did not see that! (just used --help). Do you think it would be possible to add a sub-command to factorio (like --create) which would do this without launching a new game to access the LUA console? This would be a lot more practical!

edit: Other option, just allowing --create to take a file to a map exchange string, instead of the two map-gen-settings and map-settings.