Difference between revisions of "User:Dninemfive"
Dninemfive (talk | contribs) m (→Framework Mods) |
Dninemfive (talk | contribs) |
||
Line 16: | Line 16: | ||
=== ModLister.RoyaltyInstalled === | === ModLister.RoyaltyInstalled === | ||
In C#, the canonical check for whether Royalty is installed is <code>ModLister.RoyaltyInstalled</code>. Notably, this check whether the Steam user ''owns'' Royalty, rather than whether it's enabled in the load order. | In C#, the canonical check for whether Royalty is installed is <code>ModLister.RoyaltyInstalled</code>. Notably, this check whether the Steam user ''owns'' Royalty, rather than whether it's enabled in the load order. | ||
− | === Other === | + | === Other Options === |
− | D9 Framework | + | If you set your mod to require [https://github.com/dninemfive/d9framework D9 Framework], you can use <code>PatchOperationFindPackage</code> (with the packageId <code>Ludeon.RimWorld.Royalty</code>) or <code>PatchOperationRoyaltyInstalled</code> to check whether Royalty is installed, with the former checking whether it's enabled and the latter checking if the user owns it. Using the vanilla <code>PatchOperationFindMod</code> would not be sufficient because it would be enabled if any local mod was called Royalty. |
== Framework Mods == | == Framework Mods == |
Revision as of 16:35, 6 July 2020
Hello! I'm a modder who's trying to clean up the modding tutorials pages, which are quite out-of-date. So far, I've rewritten the classic Plague Gun tutorial.
If you've been helped by my contributions on this site please check out my mods on Github and Steam.
Sandbox
Royalty compatibility
After the release of Royalty, mods are governed by rules 13b and c of the Ludeon community rules. Unfortunately, these are inconsistently applied and end up being vaguer than intended, but a good TL;DR to follow would be:
- Don't use any code flagged as Royalty only. They will throw errors when loaded for people without Royalty, so these are easy to tell.
- The page lists explicit exceptions; at the time of writing, only gendered apparel and
Sketch
es are exempt.
- The page lists explicit exceptions; at the time of writing, only gendered apparel and
- Avoid using features added in 1.1 or later. Unfortunately, not all Royalty-specific code is flagged and it's ambiguous whether some features are permitted.
- Avoid making anything included in Royalty, broadly defined. Another unfortunate ambiguity is the nuance in this rule - it's currently unclear whether some Royalty features, like shield projectors, count as "royalty features" for this purpose as old mods which included them have not been banned but no new ones have yet been made.
- If in doubt, set your mod to require Royalty to install on Steam, and you'll be fine.
MayRequire
You can use the MayRequire
annotation on XML nodes to disable Royalty-specific features when Royalty is not installed.
ModLister.RoyaltyInstalled
In C#, the canonical check for whether Royalty is installed is ModLister.RoyaltyInstalled
. Notably, this check whether the Steam user owns Royalty, rather than whether it's enabled in the load order.
Other Options
If you set your mod to require D9 Framework, you can use PatchOperationFindPackage
(with the packageId Ludeon.RimWorld.Royalty
) or PatchOperationRoyaltyInstalled
to check whether Royalty is installed, with the former checking whether it's enabled and the latter checking if the user owns it. Using the vanilla PatchOperationFindMod
would not be sufficient because it would be enabled if any local mod was called Royalty.
Framework Mods
intended to be a comprehensive list of mods which add features for XML users
- BiomesKit
- D9 Framework
- HugsLib (I think)
- JecsTools
- Universal Fermenter
Version Control Intro
An introduction to using Github for version control, with an eye toward Rimworld modding. Will go through my particular setup, and various tips and tricks, like:
- Having a separate dev folder from the Rimworld mods folder
- Build events copying from the dev folder into the build folder
- .gitignore settings
&c
Example Comp Project
This project will teach players how to use ThingComp
s, load textures in C#, and make gizmos.
Introduction to core mods
This project will teach players how to use basic Harmony patches and demonstrate the use of MapComponent
s (or maybe game/world ones, idk)