API documentation for MapGenSettings [API Docs]

This subforum contains all the issues which we already resolved.
Post Reply
SirRichie
Fast Inserter
Fast Inserter
Posts: 244
Joined: Wed Feb 25, 2015 4:50 pm
Contact:

API documentation for MapGenSettings [API Docs]

Post 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?

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5150
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: API documentation for MapGenSettings

Post by Klonan »

Thanks for the report

Oxyd
Former Staff
Former Staff
Posts: 1428
Joined: Thu May 07, 2015 8:42 am
Contact:

Re: API documentation for MapGenSettings [API Docs]

Post by Oxyd »

Thanks, fixed in 0.13.10.

SirRichie
Fast Inserter
Fast Inserter
Posts: 244
Joined: Wed Feb 25, 2015 4:50 pm
Contact:

Re: API documentation for MapGenSettings [API Docs]

Post by SirRichie »

What's the fix? Is the API adjusted or the scripting?

Oxyd
Former Staff
Former Staff
Posts: 1428
Joined: Thu May 07, 2015 8:42 am
Contact:

Re: API documentation for MapGenSettings [API Docs]

Post by Oxyd »

The documentation was fixed. "very-low", "very-small" and "very-poor" are all synonyms, so the documentation now just lists them all.

SirRichie
Fast Inserter
Fast Inserter
Posts: 244
Joined: Wed Feb 25, 2015 4:50 pm
Contact:

Re: API documentation for MapGenSettings [API Docs]

Post 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?

Post Reply

Return to “Resolved Problems and Bugs”