[0.13, 0.14] Info.json factorio_version incorrectly checked.

Things that has been reported already before.
credomane
Filter Inserter
Filter Inserter
Posts: 321
Joined: Tue Apr 12, 2016 6:21 pm
Contact:

[0.13, 0.14] Info.json factorio_version incorrectly checked.

Post by credomane »

I noticed this with the change from 0.12 to 0.13 but just figured it was an odditiy with the addition of the factorio_version field to info.json
Now that the field exists in both 0.13 and 0.14 the oddity is still there and looks to be very much not intended.
Pretend the other required entries are in the info.json snippets below. This is only the relevant pieces to the matter at hand.


This info.json will load in factorio 0.12, 0.13 and 0.14 but from my understanding it should not load in 0.13 and 0.14 but it does anyways.
It should load in 0.12 because the factorio_version field is ignore because it is unknown to 0.12.

Code: Select all

{
    "factorio_version": "You can put literally anything here mwhahahaha",
    "dependencies": []
}
This one however will load in to 0.13 but not in 0.12 and 0.14; as expected.

Code: Select all

{
    "factorio_version": "0.13",
    "dependencies": ["base >= 0.13.0"]
}

This one will load into 0.14 but not 0.12 or 0.13; as expected.

Code: Select all

{
    "factorio_version": "0.14",
    "dependencies": ["base >= 0.13.0"]
}
This one will also load into 0.14 but not 0.12 or 0.13; as expected.

Code: Select all

{
    "factorio_version": "0.14",
    "dependencies": ["base"]
}

By a mod author not including the dependency on factorio base "mod" they can render the new required "factorio_version" useless as it, apparently, won't get checked at all.

[edit]
I have a few mods that were getting loaded in 0.14 even though I have just launched it for the first time. They work in game and even on the mod list window they are highlighted white and the factorio version is listed as 0.13 while other mods are in red and not loaded only because they have the dependency on the base mod.
Last edited by credomane on Fri Aug 26, 2016 10:01 pm, edited 1 time in total.
credomane
Filter Inserter
Filter Inserter
Posts: 321
Joined: Tue Apr 12, 2016 6:21 pm
Contact:

Re: [0.13, 0.14] Info.json factorio_version incorrectly checked.

Post by credomane »

This isn't an issue with the updater though. This is an issue with how the factorio client itself handles the factorio_version field.

Download blueprint-string mod 3.1.2. check that factorio_version == 0.13 in the info.json file. Now launch factorio 0.14 with the blueprint-string meant for 0.13. Surprise, It got loaded and works too when it shouldn't have!

[edit]
This is the info.json from blueprint-string 3.1.2

Code: Select all

{
  "name": "blueprint-string",
  "version": "3.1.2",
  "title": "Blueprint String",
  "author": "DaveMcW",
  "description": "Converts text strings into blueprints",
  "factorio_version": "0.13",
  "dependencies": []
}
as you can see the factorio_version string says 0.13 so according to how factorio_version is suppose to work is should not have loaded in 0.14. Yet it did. blueprint string 3.1.2 works in BOTH factorio 0.13 and 0.14 with no changes at all. No update to info.json needed.

If you change the info.json to this THEN blueprint-string will NOT load in 0.14 as expected and only 0.13 (or 0.12 since it doesn't understand factorio_version field)

Code: Select all

{
  "name": "blueprint-string",
  "version": "3.1.2",
  "title": "Blueprint String",
  "author": "DaveMcW",
  "description": "Converts text strings into blueprints",
  "factorio_version": "0.13",
  "dependencies": ["base"]
}


NOTE I'm not singlying out the mod intentionally doing anything wrong. It is just the mod I noticed this exact issue with factorio_version in both 0.13 and immediately with 0.14 as well. Since it is a popular mod that everyone uses I figured it would make a great real-life example of what I'm talking about.
credomane
Filter Inserter
Filter Inserter
Posts: 321
Joined: Tue Apr 12, 2016 6:21 pm
Contact:

Re: [0.13, 0.14] Info.json factorio_version incorrectly checked.

Post by credomane »

And crap. This is a duplicate. Dammit. I just saw mooncat's topic. This "you must want longer to use search" error really annoying in trying to make sure you aren't making a dup ticket/topic.

viewtopic.php?f=7&t=31607
Post Reply

Return to “Duplicates”