[0.12.24] [Rseding91] Mod with spaces cannot be set as dependency

This subforum contains all the issues which we already resolved.
Supercheese
Filter Inserter
Filter Inserter
Posts: 841
Joined: Mon Sep 14, 2015 7:40 am
Contact:

[0.12.24] [Rseding91] Mod with spaces cannot be set as dependency

Post by Supercheese »

It seems I have never tried to make one of my mods dependent on another until now, and I've run into a problem: In info.json, setting a dependency for a mod that has spaces in its name fails.

The following works just fine with no problems:

Code: Select all

{
  "name": "Uplink Station",
  "version": "0.1.2",
  "title": "Satellite Uplink Station",
  "author": "Supercheese",
  "homepage": "https://forums.factorio.com/forum/viewtopic.php?f=97&t=19883",
  "dependencies": ["base >= 0.12.17", "? bobelectronics >= 0.12.0", "? bobtech >= 0.12.0", "? filtered-deconstruction-planner >= 0.1.0", "? upgrade-planner >= 1.1.0", "? YARM >= 0.7.0"],
  "description": "Remotely view, explore, attack, or deconstruct by using your spy satellites in orbit."
}
But when I try to add a dependency for Orbital Ion Cannon...

Code: Select all

{
  "name": "Uplink Station",
  "version": "0.1.2",
  "title": "Satellite Uplink Station",
  "author": "Supercheese",
  "homepage": "https://forums.factorio.com/forum/viewtopic.php?f=97&t=19883",
  "dependencies": ["base >= 0.12.17", "? Orbital Ion Cannon", "? bobelectronics >= 0.12.0", "? bobtech >= 0.12.0", "? filtered-deconstruction-planner >= 0.1.0", "? upgrade-planner >= 1.1.0", "? YARM >= 0.7.0"],
  "description": "Remotely view, explore, attack, or deconstruct by using your spy satellites in orbit."
}
The game complains:
Mod dependency ? Orbital Ion Cannon not matching pattern "[?] ModName [ModVersion specifier]".
It seems the check is hardcoded to presume that all mods do not have spaces, which needs to be rectified.
User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5410
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [0.12.24] Mod with spaces cannot be set as dependency

Post by Klonan »

You havent specified a version to go along with the name, like

Code: Select all

{
  "name": "Uplink Station",
  "version": "0.1.2",
  "title": "Satellite Uplink Station",
  "author": "Supercheese",
  "homepage": "https://forums.factorio.com/forum/viewtopic.php?f=97&t=19883",
  "dependencies": ["base >= 0.12.17", "? Orbital Ion Cannon >= 0.0.0", "? bobelectronics >= 0.12.0", "? bobtech >= 0.12.0", "? filtered-deconstruction-planner >= 0.1.0", "? upgrade-planner >= 1.1.0", "? YARM >= 0.7.0"],
  "description": "Remotely view, explore, attack, or deconstruct by using your spy satellites in orbit."
}
That might work
Supercheese
Filter Inserter
Filter Inserter
Posts: 841
Joined: Mon Sep 14, 2015 7:40 am
Contact:

Re: [0.12.24] Mod with spaces cannot be set as dependency

Post by Supercheese »

With or without the version, the error is the same; I forgot to mention this. [In any event, the version section is technically optional, as indicated by the brackets.]
kovarex
Factorio Staff
Factorio Staff
Posts: 8298
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.12.24] [Rseding91] Mod with spaces cannot be set as dependency

Post by kovarex »

Fixed for the next version (thanks to rseding91)
daniel34
Global Moderator
Global Moderator
Posts: 2761
Joined: Thu Dec 25, 2014 7:30 am
Contact:

Re: [0.12.24] [Rseding91] Mod with spaces cannot be set as dependency

Post by daniel34 »

Two things:
(1) This resolved bug isn't mentioned in the changelog for 0.12.25
(2) Mod names set as dependency with specific characters (such as '+' in Belts+) now give an error:
viewtopic.php?f=91&t=18593&start=20#p130863
Image
quick links: log file | graphical issues | wiki
Post Reply

Return to “Resolved Problems and Bugs”