Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Author Topic: Be able to define required prerequisite mods in mod_info.json  (Read 1419 times)

stormbringer951

  • Commander
  • ***
  • Posts: 130
    • View Profile
Be able to define required prerequisite mods in mod_info.json
« on: January 24, 2017, 03:03:47 AM »

E.g. to take SCY's mod_info.json as an example:

Code
{
"id": "SCY",
"name": "Scy Nation",
"author": "Created by Tartiflette. Music by Fastland. With the help of Debido, Mesotronik, Dark Revenant, Silentstormpt, Histidine, SniZupGun, Deathfly, 19_30 and many others.",
"version": "1.1"
"description": "Blood-thirsty pirates for some, ruthless slavers for others, treacherous spies for the rest... The Sector is a tough place to live in, and like many others the Scyan people have been forced to compromise their principles in order to survive.",
"gameVersion": "0.7.2a",
"jars": ["jars/SCY_code.jar"],
"modPlugin": "data.scripts.SCY_modPlugin",
"prereqs": [{
"id": "lazylib",
"version": "2.1.1"
}, {
"id": "twiglib",
"versionUB": "0.6.11"
}]
}

Being able to pin a mod to a closed or open-ended range of versions would be a neat extension and prevent issues like having to change your mod_info.json when a lib updates, but would probably require enforcing semantic versioning or something similar to work:

Code
{
"id": "SCY",
"name": "Scy Nation",
"author": "Created by Tartiflette. Music by Fastland. With the help of Debido, Mesotronik, Dark Revenant, Silentstormpt, Histidine, SniZupGun, Deathfly, 19_30 and many others.",
"version": {
"major": 1,
"minor": 1,
"patch": 0
},
"description": "Blood-thirsty pirates for some, ruthless slavers for others, treacherous spies for the rest... The Sector is a tough place to live in, and like many others the Scyan people have been forced to compromise their principles in order to survive.",
"gameVersion": "0.7.2a",
"jars": ["jars/SCY_code.jar"],
"modPlugin": "data.scripts.SCY_modPlugin",
"prereqs": [{
"id": "lazylib",
"versionUB": null,
"versionLB": {
"major": 2,
"minor": 1,
"patch": 1
}
}, {
"id": "twiglib",
"versionUB": {
"major": 0,
"minor": 6,
"patch": 11
},
"versionLB": {
"major": 0,
"minor": 6,
"patch": 11
}
}]
}
« Last Edit: January 24, 2017, 03:05:37 AM by stormbringer951 »
Logged
Weapons Group Controls mod - deselect all weapon groups, hold-down hold-fire mode, toggle alternating/linked fire
Captain's Log - throw away your notepad: custom notes, ruins and salvageable reminders
Old Hyperion - for your dose of nostalgia
Adjustable Skill Thresholds - set fleet DP and fighter bay thresholds