Page 1 of 1

API documentation for MapGenSettings [API Docs]

Posted: Sat Jul 16, 2016 1:32 pm
by SirRichie
Hi,

the API documentation seems to be inconsistent with the in-game values:

MapGenSize:
API says values are: "none", "very-small", "small", "medium", "big", "very-big"
in-game values are (obtained via: "/c game.player.print(tostring(game.surfaces["nauvis"].map_gen_settings.autoplace_controls["iron-ore"].size))"): "none", "very-low", "low", "normal", "high", "very-high"

MapGenRichness:
API says values are: "very-poor", "poor", "regular", "good", "very-good"
in-game values are: "very-low", "low", "normal", "high", "very-high"

MapGenSettings:
starting_area is not a listed property, but exists in-game

This was different in 0.12. It seems that all properties, including starting_area, now use MapGenFrequency as a "type"

Was this change mentioned anywhere or is this unintentional?

Re: API documentation for MapGenSettings

Posted: Mon Jul 18, 2016 9:46 am
by Klonan
Thanks for the report

Re: API documentation for MapGenSettings [API Docs]

Posted: Tue Jul 19, 2016 3:46 pm
by Oxyd
Thanks, fixed in 0.13.10.

Re: API documentation for MapGenSettings [API Docs]

Posted: Tue Jul 19, 2016 3:55 pm
by SirRichie
What's the fix? Is the API adjusted or the scripting?

Re: API documentation for MapGenSettings [API Docs]

Posted: Tue Jul 19, 2016 3:56 pm
by Oxyd
The documentation was fixed. "very-low", "very-small" and "very-poor" are all synonyms, so the documentation now just lists them all.

Re: API documentation for MapGenSettings [API Docs]

Posted: Sun Jul 31, 2016 8:45 am
by SirRichie
Thanks for the fix.

I do, however, think that this may be confusing.
Ultimately, said command outputs only one of the strings and I think for modding knowing what the string is, is highly useful. For example, if a mod wants to do something depending on the setting of resource richness. Then it does make a difference if you compare the string returned against "low" or "small".

Any chance for disambiguation?