Page 1 of 1

incompatibility setting info.json

Posted: Thu May 28, 2020 10:58 am
by ixu
I have set an incompatibility in info.json, but it does not work as expected:
info.json:

Code: Select all

{
    "name": "HHTraining",
    "author": "hahoyer",
    "version": "0.18.0",
    "factorio_version": "0.18",
    "title": "HHTraining",
    "dependencies": [ "base >= 0.18.0", "rusty-locale >= 1.0.9", "! creative-mod >= 1.4.1"]
}
what factorio shows:
IncompatibleMod.PNG
IncompatibleMod.PNG (101.64 KiB) Viewed 1872 times
You can see that the creative mod is marked as incompatible, but it shouldn't. The version I have in modlist is 1.4.0 (see top of sceenshot)

Factorio version is 0.18.27

Re: incompatibility setting info.json

Posted: Thu May 28, 2020 7:45 pm
by asdff45
You use `! creative-mod >= 1.4.1` to mark the incompatible with creative-mod. This means, every creative-mod that has a higher version than 1.4.1 is incompatible. You have creative-mod 1.4.0 installed, so it is compatible.

If you want to be completely incompatible with every creative-mod, just write `! creative-mod` instead.

Re: incompatibility setting info.json

Posted: Thu May 28, 2020 8:00 pm
by ixu
asdff45 wrote: Thu May 28, 2020 7:45 pm You use `! creative-mod >= 1.4.1` to mark the incompatible with creative-mod. This means, every creative-mod that has a higher version than 1.4.1 is incompatible. You have creative-mod 1.4.0 installed, so it is compatible.
Completely agree. That is exactly my point: Why is it marked incompatible?

Re: incompatibility setting info.json

Posted: Thu May 28, 2020 11:51 pm
by Rseding91
Incompatibility does not support versions. If you use incompatible you are incompatible with the entire mod.

I think you can do what you want with an optional dependency on the mod with <= the version you want.

Re: incompatibility setting info.json

Posted: Fri May 29, 2020 12:56 am
by asdff45
ixu wrote: Thu May 28, 2020 8:00 pm
asdff45 wrote: Thu May 28, 2020 7:45 pm You use `! creative-mod >= 1.4.1` to mark the incompatible with creative-mod. This means, every creative-mod that has a higher version than 1.4.1 is incompatible. You have creative-mod 1.4.0 installed, so it is compatible.
Completely agree. That is exactly my point: Why is it marked incompatible?
Sorry, misinterpreted your post :8

Re: incompatibility setting info.json

Posted: Fri May 29, 2020 8:41 am
by ixu
Thanks Rseding91.
Rseding91 wrote: Thu May 28, 2020 11:51 pm Incompatibility does not support versions. If you use incompatible you are incompatible with the entire mod.

I think you can do what you want with an optional dependency on the mod with <= the version you want.
In that case I think someone should change the wiki.
https://wiki.factorio.com/Tutorial:Mod_structure
Dependency
Each dependency is a string that consists of up to three parts: "<prefix> internal-mod-name <equality-operator version>", for example "! some-mod-everyone-hates >= 6.6.6". The possible prefixes are: ! for incompatibility, ? for an optional dependency, (?) for a hidden optional dependency or no prefix for a hard requirement for the other mod. The equality operator (<, <=, =, >= or >) combined with the version allows to define dependencies that require certain mod versions, but it is not required.
May I do this or should I better leave it to Bilka?