[Klonan] Resource generation ignores frequence values less than 0.17 but works at higher values
Posted: Sun Mar 07, 2021 3:35 pm
When attempting to generate a surface with very low ores, you can set the richness parameter in map_gen_settings.autoplace_controls to arbitrary low numbers (such as 0.001) and the game handles them correctly (making lower and lower richness patches until they evaporate), however attempting to alter frequency to a value less than 0.17 (but higher than "none") and the game ignores the value and seems to use a floor of 0.17.
Steps to reproduce - first generate a map (recommend no biters for this test) and expand out to some size to get a view, grab screenshot manually of the map. Use minimum frequency settings for resources
then we generate a new surface with what should be 5% values
Grab another screenshot and compare, you get the same results.
Map exchange string used in my test
Steps to reproduce - first generate a map (recommend no biters for this test) and expand out to some size to get a view, grab screenshot manually of the map. Use minimum frequency settings for resources
Code: Select all
/c game.speed = 10
/c game.forces.player.chart(game.player.surface, {{x = -2000, y = -2000}, {x = 2000, y = 2000}})
Code: Select all
/c local map_gen_settings = game.surfaces["nauvis"].map_gen_settings
map_gen_settings.autoplace_controls["coal"] = {frequency=.05,size=1,richness=.05}
map_gen_settings.autoplace_controls["copper-ore"] = {frequency=.05,size=1,richness=.05}
map_gen_settings.autoplace_controls["iron-ore"] = {frequency=.05,size=1,richness=.05}
map_gen_settings.autoplace_controls["stone"] = {frequency=.05,size=1,richness=.05}
map_gen_settings.autoplace_controls["uranium-ore"] = {frequency=.05,size=1,richness=.05}
game.create_surface( "RePainter", map_gen_settings )
game.player.teleport({0, 0},"RePainter")
Map exchange string used in my test
Starting map with sliders at 17%, as low as they go for resources New surface with settings changed to 5% - note the frequency does not change but richness does To show this is inconsistent, the logic does work if you go higher than 17% - here's a 300% using exactly the same code which does work>>>eNpjZGBkkGIAgtWrVtkxMByw52BJzk/MWb1KC8hjcACK2nMl5xcU
pBbp5helIgtzJheVpqTq5mdCFTdAFKfmpeZW6iYlFqcChewZwKDBniO
zKD8P3QTW4pL8PLgIyHLWkqLU1GKIRgjmLi1KzMsszYXpBTkT7FTG9Y
e69Bta5BhA+H89g8L//yAMZD0AmgbCDIwNYFMYgWIwwJqck5mWxsCg4
AjETmBFDIzVIuvcH1ZNsWeEqNFzgDI+QEUOJMFEPGEMPwecUiowhgmS
OcZg8BmJAbG0BGgFVBWHA4IBkWwBSTIy9r7duuD7sQN2jH9Wfrzkm5R
gz2joKvLug9E6O6A0O8gLTHBi1kwQ2AnzCgPMzAf2UKmb9oxnz4DAG3
tGVpAOERDhYAEkDngzMzAK8AFZC3qAhIIMA8xpdjBjRBwY08DgG8wnj
2GMy/bo/gAGhA3IcDkQcQJEgC2Eu4wRwnTod2B0kIfJSiKUAPUbMSC7
IQXhw5Mwaw8j2Y/mEMyIQPYHmoiKA5Zo4AJZmAInXjDDXQMMzwvsMJ7
DfAdGZhADpOoLUAzCgyRqiFEQWsABHNzMDAjwwZ5B+qaYCAAEq637<<
<