Changing anything
Mods that need other mods
A mod can build on others: use their weapons and pieces, their patches' things, their graph functions. It lists them under "requires".
"requires": [ "lotr_core", { "id": "lotr_arms", "version": "1.2", "workshop": 3833231514 } ]Each entry is a mod's id, or an object with the least version it takes and the workshop item to get it from. A mod with "requires" is format 4.
What it does
- What a mod needs loads before it. Mods with no order between them load by id, the same on every machine.
- The names a mod uses find its own things first, then those of the mods it needs, then ours. That covers a siege's weapon and clothes, a command's worn pieces, an outfit's pieces,
thing/,item/andquest/in patches, and the bench's pickers. - A mod's graphs can use the functions of the mods it needs, directly or through another mod that needs them (Functions and library mods).
- Versions are compared part by part: 1.10 is newer than 1.9, and 1.2 is 1.2.0.
When a mod isn't loaded
A mod isn't loaded when what it needs is:
- missing ("isn't here (get it on the Workshop)")
- switched off
- older than asked ("needs X 1.10 or newer, and 1.9 is here")
- unable to load itself
- or when the needs go round in a loop ("a > b > c > a")
The Mods page says why, with Get for a missing one that has a Workshop item, and Switch on what it needs for one switched off.
Switching
- Switching a mod on switches on what it needs.
- Switching off a mod others need switches those off too, and says so.
Publishing
Publishing on the Workshop sets the mods it needs as the item's required items, so Steam offers them with it (The Workshop). On the bench they are under Needs in the mod's sheet (the pencil beside its name): each with its least version and a ×, and Add a mod it needs to pick from those installed.
Examples
Examples/library is a mod made only of functions; Examples/uses-library requires it and calls them.
"requires": [ { "id": "roads_library", "version": "1.0" } ]
Modding