Difference between revisions of "Modding Tutorials/About.xml"
m |
|||
(4 intermediate revisions by 2 users not shown) | |||
Line 2: | Line 2: | ||
{{BackToTutorials}} | {{BackToTutorials}} | ||
− | + | <code>About.xml</code> is a required file that identifies your mod to RimWorld. This file defines the internal and viewer-facing names of your mod, contains a short description of your mod that is shown in the in-game mod manager, and defines compatibility issue such as other mods that your mod might be dependent on and load helpers that mod list auto-sorters can use to determine when to load your mod. | |
− | |||
− | <code>About.xml</code> is a required file that identifies your mod to RimWorld. | ||
== Setup == | == Setup == | ||
Line 105: | Line 103: | ||
'''WARNING:''' This tag was introduced in RimWorld 1.4 and will generate errors in previous versions unless <code>IgnoreIfNoMatchingField</code> is used. If you intend to support older versions of RimWorld with your mod and you want to use this field, you must add this attribute. | '''WARNING:''' This tag was introduced in RimWorld 1.4 and will generate errors in previous versions unless <code>IgnoreIfNoMatchingField</code> is used. If you intend to support older versions of RimWorld with your mod and you want to use this field, you must add this attribute. | ||
+ | |- | ||
+ | | <source lang="xml"> | ||
+ | <modIconPath>Path/To/Icon</modIconPath> | ||
+ | </source> | ||
+ | <div class="text-align: center; text-style: italic;">or</div> | ||
+ | <source lang="xml"> | ||
+ | <modIconPath IgnoreIfNoMatchingField="True">Path/To/Icon</modIconPath> | ||
+ | </source> | ||
+ | | class="TutorialCodeTable-description" | | ||
+ | Adds an icon for your mod that is shown on loading screens. '''Note that the current unstable version of RimWorld 1.5 also automatically loads About/ModIcon.png, so this field is not necessary to show a mod icon. You only need it if you want to store your mod icon in your Textures folder for some reason.''' Mod icons should be 32x32 PNG files with limited colors; Unity's image compression will make icons very crunchy if you try to add too much detail. | ||
+ | |||
+ | '''WARNING:''' This tag was introduced in RimWorld 1.5 and will generate errors in previous versions unless <code>IgnoreIfNoMatchingField</code> is used. If you intend to support older versions of RimWorld with your mod and you want to use this field, you must add this attribute. | ||
|- | |- | ||
| <source lang="xml"> | | <source lang="xml"> | ||
Line 206: | Line 216: | ||
</source> | </source> | ||
| class="TutorialCodeTable-description" | | | class="TutorialCodeTable-description" | | ||
− | Same as <code>loadAfter</code>, but instead of just a warning, RimWorld will not allow your mod to be loaded | + | Same as <code>loadAfter</code>, but instead of just a warning, RimWorld will not allow your mod to be loaded before the specified mods. Note that external mod managers such as RimPy may not respect this field. |
|- | |- | ||
| <source lang="xml"> | | <source lang="xml"> |
Latest revision as of 21:31, 4 April 2024
About.xml
is a required file that identifies your mod to RimWorld. This file defines the internal and viewer-facing names of your mod, contains a short description of your mod that is shown in the in-game mod manager, and defines compatibility issue such as other mods that your mod might be dependent on and load helpers that mod list auto-sorters can use to determine when to load your mod.
Setup[edit]
Your About.xml
file should be placed directly inside your About
folder. Note that both the folder and file name are case-sensitive and must be spelled exactly this way; please see the mod folder structure guide for more information.
Mods └ MyModFolder └ About └ About.xml
The contents of About.xml
is a standard XML file with ModMetaData
as the root tag:
<?xml version="1.0" encoding="utf-8"?> <ModMetaData> <!-- content goes here --> </ModMetaData>
Required Tags[edit]
The following tags are all required for a functioning mod. Please read the tag descriptions carefully:
XML | Description |
---|---|
<packageId>AuthorName.ModName</packageId> |
The internal identifier for your mod, used to identify your mod as a dependency, load order helper, or with MayRequire attributes.
Note: |
<name>My Mod Name</name> |
The title of your mod. While the name of your mod does not need to be globally unique and most references to mods are now using |
<author>Author Name, Another Author Name, A Third Author Name</author> or
<authors> <li>Author Name</li> <li>Another Author Name</li> <li>A Third Author Name</li> </authors> |
The author of this mod, usually yourself. More than one author can be specified by separating names with commas or by using list nodes. |
<description>This is the description of this mod.</description> |
The plain-text description of your mod. This is used as both the content description of your mod in mod managers (including the vanilla mod manager) as well as the initial description of your mod if uploaded to Steam Workshop. In the latter case, you can change your Workshop item description independent of the mod itself, thus it is generally recommended that you keep the description of your mod in About.xml relatively short. |
<supportedVersions> <li>1.4</li> </supportedVersions> |
The RimWorld versions that your mod supports. A warning will be given to the player if attempting to load the mod under a version you have not explicitly specified support for, but this does not prevent players from loading the mod if they so choose. It is strongly recommended that you only specify support for versions that you have explicitly tested compatibility for; RimWorld has changed dramatically between versions in the past and even XML-only mods may not be guaranteed to work without version-specific changes. |
Optional Tags[edit]
The following tags are optional and should only be used if you need them:
XML | Description |
---|---|
<modVersion>1.0</modVersion> or
<modVersion IgnoreIfNoMatchingField="True">1.0</modVersion> |
A version string for your own personal version tracking. WARNING: This tag was introduced in RimWorld 1.4 and will generate errors in previous versions unless |
<modIconPath>Path/To/Icon</modIconPath> or
<modIconPath IgnoreIfNoMatchingField="True">Path/To/Icon</modIconPath> |
Adds an icon for your mod that is shown on loading screens. Note that the current unstable version of RimWorld 1.5 also automatically loads About/ModIcon.png, so this field is not necessary to show a mod icon. You only need it if you want to store your mod icon in your Textures folder for some reason. Mod icons should be 32x32 PNG files with limited colors; Unity's image compression will make icons very crunchy if you try to add too much detail. WARNING: This tag was introduced in RimWorld 1.5 and will generate errors in previous versions unless |
<url>https://steamcommunity.com/workshop/filedetails/?id=2009463077</url> |
A web link that can be displayed with your mod info. This can be any link, though most mods will link to their primary download source, such as a Steam Workshop page, GitHub repository, or Ludeon Forum link. The example URL is the Steam Workshop page for the latest version of Harmony. |
<descriptionsByVersion> <v1.4>A different description.</v1.4> </descriptionsByVersion> |
Used to specify a different mod description for specific versions of RimWorld. This is not used by Steam Workshop. |
<modDependencies> <li> <packageId>brrainz.harmony</packageId> <displayName>Harmony</displayName> <steamWorkshopUrl>steam://url/CommunityFilePage/2009463077</steamWorkshopUrl> </li> </modDependencies> |
Used to specify dependencies for your mod. Players will be warned if a dependency for your mod is not loaded in their mod list, though players may choose to ignore it. Note that this is not automatically used by Steam Workshop; if you want players to be notified that they should download a dependency, you must add that via Steam Workshop's "Required Items" feature. |
<modDependenciesByVersion> <v1.4> <li> <packageId>brrainz.harmony</packageId> <displayName>Harmony</displayName> <steamWorkshopUrl>steam://url/CommunityFilePage/2009463077</steamWorkshopUrl> </li> </v1.4> </modDependenciesByVersion> |
Used to specify dependencies for your mod that only apply for a specific version. See above for more details. |
<loadBefore> <li>CETeam.CombatExtended</li> </loadBefore> |
Used to specify mods that your mod should load before. RimWorld will warn the player if your mod is not in the correct place in their mod list. Mods specified this way must be referenced by their |
<loadBeforeByVersion> <v1.4> <li>CETeam.CombatExtended</li> </v1.4> </loadBeforeByVersion> |
Same as |
<forceLoadBefore> <li>CETeam.CombatExtended</li> </forceLoadBefore> |
Same as |
<loadAfter> <li>erdelf.HumanoidAlienRaces</li> </loadAfter> |
Used to specify mods that your mod should load after. RimWorld will warn the player if your mod is not in the correct place in their mod list. Mods specified this way must be referenced by their |
<loadAfterByVersion> <v1.4> <li>erdelf.HumanoidAlienRaces</li> </v1.4> </loadAfterByVersion> |
Same as |
<forceLoadAfter> <li>erdelf.HumanoidAlienRaces</li> </forceLoadAfter> |
Same as |
<incompatibleWith> <li>CETeam.CombatExtended</li> </incompatibleWith> |
Used to specify mods that your mod is incompatible with. Players will be warned if the specified mods are loaded at the same time that your mod is. This should generally only be used to specify mods that are fundamentally incompatible with your mod rather than mods that simply have bugs related to your mod. |
<incompatibleWithByVersion> <v1.4> <li>CETeam.CombatExtended</li> </v1.4> </incompatibleWithByVersion> |
Same as |
Examples[edit]
As About.xml
is required for all mods, you can use existing mods as a reference if you need some examples of working About.xml
files. The default installation folder for Steam Workshop mods is under C:\Program Files (x86)\Steam\steamapps\workshop\content\294100