Editing Modding Tutorials/MayRequire
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:MayRequire}} | {{DISPLAYTITLE:MayRequire}} | ||
− | {{ | + | {{:Modding_Tutorials/Under_Review}} |
<code>MayRequire</code> is an [[Modding_Tutorials/Introduction_to_XML|XML attribute]] introduced alongside the [[Royalty DLC]] that allows for easy conditional loading of XML content. <code>MayRequire</code> makes it easier to load content that is optionally dependent on DLCs or other mods. | <code>MayRequire</code> is an [[Modding_Tutorials/Introduction_to_XML|XML attribute]] introduced alongside the [[Royalty DLC]] that allows for easy conditional loading of XML content. <code>MayRequire</code> makes it easier to load content that is optionally dependent on DLCs or other mods. | ||
Line 13: | Line 13: | ||
* Ideology: <code>Ludeon.RimWorld.Ideology</code> | * Ideology: <code>Ludeon.RimWorld.Ideology</code> | ||
* Biotech: <code>Ludeon.RimWorld.Biotech</code> | * Biotech: <code>Ludeon.RimWorld.Biotech</code> | ||
− | |||
The <code>packageId</code> for mods can be found in their [[About.xml]] file. | The <code>packageId</code> for mods can be found in their [[About.xml]] file. | ||
Line 20: | Line 19: | ||
By default, <code>MayRequire</code> will only allow the use of that node if ''all'' of the DLCs or mods it designates are loaded. If you instead want to load the specified node if ''any'' of the specified DLCs or mods are loaded, you can use <code>MayRequireAnyOf</code> instead. | By default, <code>MayRequire</code> will only allow the use of that node if ''all'' of the DLCs or mods it designates are loaded. If you instead want to load the specified node if ''any'' of the specified DLCs or mods are loaded, you can use <code>MayRequireAnyOf</code> instead. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== List Entries == | == List Entries == | ||
Line 433: | Line 424: | ||
* <code>MayRequire</code> does '''NOT''' work on top-level XML nodes that are not <code>Def</code>s. This means that <code>Operation</code> tags cannot use <code>MayRequire</code>, though as previous indicated, <code>PatchOperationSequence</code> lists can. Again, this is not recommended because <code>PatchOperationSequence</code> can obfuscate errors. | * <code>MayRequire</code> does '''NOT''' work on top-level XML nodes that are not <code>Def</code>s. This means that <code>Operation</code> tags cannot use <code>MayRequire</code>, though as previous indicated, <code>PatchOperationSequence</code> lists can. Again, this is not recommended because <code>PatchOperationSequence</code> can obfuscate errors. | ||
− | * As of the time of this writing (2023-07-17), there is a bug in RimWorld where MayRequire does not ignore the | + | * As of the time of this writing (2023-07-17), there is a bug in RimWorld where MayRequire does not ignore the `_steam` suffix appended to Steam copies of a mod when you have both a local mod and a Steam mod with the exact same packageId. This means that if you have a local copy, then only the local copy will be recognized by MayRequire. |
[[Category:Modding]] | [[Category:Modding]] | ||
[[Category:Modding tutorials]] | [[Category:Modding tutorials]] |