Modding:Mod Configuration: Difference between revisions

Add to json example
m Rm beta disclaimer
 
(6 intermediate revisions by the same user not shown)
Line 67: Line 67:


==Directory Structure==
==Directory Structure==
{{Betamoddingcontent}}
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/>
These can be used to include separate content/scripts for different game versions, or optional addons to other mods.<br/>
If no conditions are specified the directory and its paths will always be loaded.<br/>
If no directories are explicitly defined the mod's root directory will be loaded.
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.||
|-
|-
| '''Option'''
| '''Options'''
| An [[Modding:Options|options]] <code>Requires</code> string that must be true. ||
| 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==
{{Betamoddingcontent}}
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 114: Line 113:
* <code>2.0.208 - 3.0.0</code>: Matches a version greater or equal to <code>2.0.208</code>, and less or equal to <code>3.0.0</code> (i.e. an inclusive closed interval).
* <code>2.0.208 - 3.0.0</code>: Matches a version greater or equal to <code>2.0.208</code>, and less or equal to <code>3.0.0</code> (i.e. an inclusive closed interval).
* <code>2.0.209.52 - *</code>: Matches a version greater or equal to <code>2.0.209.52</code>.
* <code>2.0.209.52 - *</code>: Matches a version greater or equal to <code>2.0.209.52</code>.
* <code><nowiki>>3.5</nowiki></code>: Matches a version greater than <code>3.5.0</code>.
* <code><nowiki>>3.5</nowiki></code>: Matches a version greater or equal to <code>3.6.0</code>.
* <code><nowiki>>=2 <5</nowiki></code>: Matches a version greater or equal to <code>2.0.0</code>, but less than <code>5.0.0</code>.
* <code><nowiki>>=2 <5</nowiki></code>: Matches a version greater or equal to <code>2.0.0</code>, but less than <code>5.0.0</code>.
* <code><nowiki>^0.5.2 || 7.2.1</nowiki></code>: Matches a version greater or equal to <code>0.5.2</code>, but less than <code>0.6.0</code>. <b>Or</b> a version equal to <code>7.2.1</code>.
* <code><nowiki>^0.5.2 || 7.2.1</nowiki></code>: Matches a version greater or equal to <code>0.5.2</code>, but less than <code>0.6.0</code>. <b>Or</b> a version equal to <code>7.2.1</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",
             "Dependency": "Yarif_RiotCooking"
             "Dependency": "Yarif_RiotCooking"
         }
         }