-
Notifications
You must be signed in to change notification settings - Fork 145
Description
Mods loaded from a save that will function correctly if it's launched from the client show as "not compatible" in the mod list.
Did some digging and i'll use power armor MK3 as an example. Original info.json
{
"name":"Power Armor MK3",
"author":"jimmy_1283",
"version":"0.1.6",
"title":"Power Armor MK3",
"description":"Bigger, better power armors; with a bigger grid (14x14)/(20x20) and larger inventory bonus (+50)/(+60), also adds various equipment.",
"homepage":"https://forums.factorio.com/viewtopic.php?f=93&t=47506",
"factorio_version":"0.16",
"dependencies": ["base >= 0.15.0"]
}
The above will trigger the "not compatible" flag against the mod. Had a peek through the code and it could either be the factorioversion or dependencies values causing this (as per checkModCompatibility func calls)
Checking other mods that don't flag "not compatible" and those that do, i noticed a correlation with the "dependcies" values.
If a mod has a dependency, as above ["base >= 0.15.0"]
it will flag as not compatible. If i change the info.json to
{
"name":"Power Armor MK3",
"author":"jimmy_1283",
"version":"0.1.6",
"title":"Power Armor MK3",
"description":"Bigger, better power armors; with a bigger grid (14x14)/(20x20) and larger inventory bonus (+50)/(+60), also adds various equipment.",
"homepage":"https://forums.factorio.com/viewtopic.php?f=93&t=47506",
"factorio_version":"0.16",
"dependencies": ["base >= 0.16"]
}
The mod will show as compatible. It doesn't seem to correlate with the client being able to load and run these mods without issue.
Unfortunately I don't know enough to put up a PR but i wonder if this is the point at which a cchange might be prudent: mod_modInfo.go - Line 87 - baseDependency = strings.Split(dependency, "=")[1]
If the base dependency is split on '=' it won't have the > when run through semver thus a valid "dependencies": ["base >= 0.15.0"]
would be evaled on "= 0.15.0" and thus throw the "not compatible".
or i could be way off :)