Page 1 of 1

[0.15.x] Modding: game.map_settings issues

Posted: Sun Jul 02, 2017 2:53 am
by jonatkins
The modding documentation for game.map_settings points (via MapSettings) to the file data/base/prototypes/map-settings.lua

This file contains min_base_spacing in the enemy_expansion section - but attempting to access this, from a mod or via console commands, fails.

Some other values within this section, e.g. max_expansion_distance, work as expected.

I've tried writing debug code to dump the contents of the table (for k,v in pairs(game.map_settings) ...) but this only returns a key of __self with a value of type userdata. A custom factorio table-like type rather than a real table, I guess?

I've not had a chance to run through every value in the file to see if there are other errors.

Re: [0.15.x] Modding: game.map_settings issues

Posted: Sun Jul 02, 2017 11:09 am
by Rseding91
Thanks for the report. That field was removed from the game a while ago and just forgotten about in the Lua. I've removed it from the lua file for the next version of 0.15.