Page 1 of 1

Base game version mod compatibility.

Posted: Mon Jun 26, 2017 3:03 pm
by robertpaulson
Hi.

I found a very small mod that changes color for resources on the map. The mod was created for .12 but there is only 2 lines in it:

Code: Select all

data.raw["resource"]["iron-ore"].map_color = {r = 288, g = 221, b = 246} 
data.raw["resource"]["stone"].map_color = {r = 228, g = 226, b = 210}
'

in file "data-final-fixes.lua"

The other file is the info file, and the only mention of game version is in dependencies, i tried changing that part to .15, but the game still recognizes that this mod is for .12 (code below)

Code: Select all

{
 "name": "OreMapView",
 "version": "0.1.1",
 "title": "Better Ore Map View",
 "author": "Cookie",
 "contact": "",
 "homepage": "",
 "Licence": "MIT",
 "description": "Changes the Color of Ores on the Map",
 "dependencies": ["base >= 0.15.0"]
}
How does the game know this is for .12? I have file visibility set to show all hidden files, so I just don't understand how the game can know that this is for .12 since after my edit there is no information about .12 anywhere in the mod itself.

Re: Base game version mod compatibility.

Posted: Mon Jun 26, 2017 9:19 pm
by Rseding91
Since 0.13.0 the game is looking for a key in the info.json "factorio_version" which tells it which game version it's expected to work on. If it's not provided it defaults to 0.12.