Module:SMAPI compatibility overrides/doc: Difference between revisions
imported>Margotbean update link |
imported>Pathoschild + reason field |
||
| Line 54: | Line 54: | ||
SMAPI will compare using [https://semver.org/ semantic versioning] if they're parseable (''e.g.,'' <code>1.0</code> and <code>1.0.0</code> are equivalent), else it'll fallback to case-insensitive string comparison (''e.g.,'' <code>1.01</code> and <code>1.01.0</code> are ''not'' equivalent). If an invalid format is specified or the new version can't be parsed, the mapping will be ignored. | SMAPI will compare using [https://semver.org/ semantic versioning] if they're parseable (''e.g.,'' <code>1.0</code> and <code>1.0.0</code> are equivalent), else it'll fallback to case-insensitive string comparison (''e.g.,'' <code>1.01</code> and <code>1.01.0</code> are ''not'' equivalent). If an invalid format is specified or the new version can't be parsed, the mapping will be ignored. | ||
|- | |||
| <code>reason</code> | |||
| A human-readable reason the values need to be overridden, so it's easier to check whether it still needs to be overridden later. | |||
|} | |} | ||
| Line 64: | Line 67: | ||
|local version = 1.05-beta → 1.0.5-beta | |local version = 1.05-beta → 1.0.5-beta | ||
|remote version = 1.06 → 1.0.6 | |remote version = 1.06 → 1.0.6 | ||
|reason = test values | |||
}} | }} | ||
</pre> | </pre> | ||
| Line 74: | Line 78: | ||
|local version = 1.05-beta → 1.0.5-beta | |local version = 1.05-beta → 1.0.5-beta | ||
|remote version = 1.06 → 1.0.6 | |remote version = 1.06 → 1.0.6 | ||
|reason = test values | |||
}} | }} | ||
{{#invoke:SMAPI compatibility overrides|footer}} | {{#invoke:SMAPI compatibility overrides|footer}} | ||
[[Category:Modding]] | [[Category:Modding]] | ||
Revision as of 00:26, 1 May 2022
This module provides the table structure and data for the Modding:Mod compatibility#Mod data overrides list, which SMAPI uses to override data specified in mods' manifests or mod pages.
Usage
Change descriptor
A change descriptor describes a specific change to make for a field. There are three supported changes:
| operation | format | effect |
|---|---|---|
| remove | -value
|
Delete that distinct value from the field. |
| add | +value
|
Add that distinct value to the field. |
| replace | old value → new value
|
Replace the old value (if found) with the new one. |
Each field can list multiple change descriptors delimited with commas. For example, -Nexus:541, +Nexus:905 would delete Nexus:541 from the update keys and add Nexus:905. These operate on distinct values, so -Nexus: won't match anything (unless there's actually an update key without a number).
Fields
There are two required static fields:
| field | effect |
|---|---|
name
|
The mod's name as it appears in the Modding:Mod compatibility list. If the mod has multiple names, specify the first one. |
id
|
The manifest UniqueID field of the mod to change. This can be comma-delimited. |
And these optional change descriptor fields:
| field | effect |
|---|---|
update keys
|
Override the update keys SMAPI uses to perform update checks. |
local versionremote version
|
Override the version number specified in the mod manifest (local) or mod page (remote). You should generally only use replace in this field, since only the first value will be used.
SMAPI will compare using semantic versioning if they're parseable (e.g., |
reason
|
A human-readable reason the values need to be overridden, so it's easier to check whether it still needs to be overridden later. |
Example
{{#invoke:SMAPI compatibility overrides|entry
|name = Lookup Anything
|id = Pathoschild.LookupAnything
|update keys = -Nexus:541, +Nexus:905
|local version = 1.05-beta → 1.0.5-beta
|remote version = 1.06 → 1.0.6
|reason = test values
}}
| mod name | update keys | manifest version | mod page version | reason | |
|---|---|---|---|---|---|
| Lookup Anything | -Nexus:541, +Nexus:905 | 1.05-beta → 1.0.5-beta | 1.06 → 1.0.6 | test values | # |