Modding:Mod Configuration: Difference between revisions
m Fix incorrect range from undefined wildcards |
m Rm beta disclaimer |
||
(3 intermediate revisions by the same user not shown) | |||
Line 67: | Line 67: | ||
==Directory Structure== | ==Directory Structure== | ||
Each entry in the <code>Directories</code> array will be evaluated and loaded if optional conditions such as version and dependency match.<br/> | Each entry in the <code>Directories</code> array will be evaluated and loaded if optional conditions such as version and dependency match.<br/> | ||
If no conditions are specified the directory and its paths will always be loaded.<br/> | |||
If | Directories can be used to include separate content/scripts for different game versions, or optional addons to other mods.<br/> | ||
If none are explicitly defined the mod's root directory will be loaded. | |||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 102: | Line 102: | ||
| Shorthand to declare a single mod dependency of any version, mutually exclusive with <code>Dependencies</code> field.|| | | Shorthand to declare a single mod dependency of any version, mutually exclusive with <code>Dependencies</code> field.|| | ||
|- | |- | ||
| ''' | | '''Options''' | ||
| | | A single or array of [[Modding:Options|options]] <code>Requires</code> strings that must be true.<br/>Note that the XML file containing the referenced options is required to have <code>Option</code> somewhere in its file name.<br/>This is a quirk caused by populating the option defaults prior to directory initialization. || | ||
|} | |} | ||
==Version Ranges== | ==Version Ranges== | ||
To match a game or mod's version you'll define a range of acceptable values using a simple and familiar syntax.<br/> | To match a game or mod's version you'll define a range of acceptable values using a simple and familiar syntax.<br/> | ||
Any number left undefined will behave as if substituted with <code>*</code>. | Any number left undefined will behave as if substituted with <code>*</code>. | ||
Line 138: | Line 137: | ||
}, | }, | ||
"Directories": [ | "Directories": [ | ||
{ | |||
"Paths": [ "/Common/", "/Assets/Textures/" ] | |||
}, | |||
{ | { | ||
"Path": "/Old/", | "Path": "/Old/", | ||
Line 149: | Line 151: | ||
"Path": "/GooeyAddon/", | "Path": "/GooeyAddon/", | ||
"Version": ">=1.0.0", | "Version": ">=1.0.0", | ||
"Options": [ "OptionSnapjawMage_AddGooeyIck == Yes", "OptionSound != No" ], | |||
"Dependencies": { | "Dependencies": { | ||
"Momo_CyberneticGenders": "^2.*", | "Momo_CyberneticGenders": "^2.*", | ||
Line 156: | Line 159: | ||
{ | { | ||
"Path": "/SaltAddon/", | "Path": "/SaltAddon/", | ||
"Option": "OptionSnapjawMage_AddRiotSalt==Yes", | "Option": "OptionSnapjawMage_AddRiotSalt == Yes", | ||
"Dependency": "Yarif_RiotCooking" | "Dependency": "Yarif_RiotCooking" | ||
} | } |