[0.15.x] Modding: game.map_settings issues

This subforum contains all the issues which we already resolved.
jonatkins
Fast Inserter
Fast Inserter
Posts: 155
Joined: Wed Sep 30, 2015 7:29 pm
Contact:

[0.15.x] Modding: game.map_settings issues

Post 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.
Rseding91
Factorio Staff
Factorio Staff
Posts: 16028
Joined: Wed Jun 11, 2014 5:23 am
Contact:

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

Post 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.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Resolved Problems and Bugs”