ContentLibrary
ContentLibrary handles ID assignment, creation and replication of ContentProviders and ContentEvents for developers.
Last updated | 7 months ago |
Total downloads | 82247 |
Total rating | 1 |
Categories | Mods Libraries |
Dependency string | Notest-ContentLibrary-0.11.1 |
Dependants | 35 other packages depend on this package |
This mod requires the following mods to function
BepInEx-BepInExPack
BepInEx pack for Mono Unity games. Preconfigured and ready to use.
Preferred version: 5.4.2100RugbugRedfern-MyceliumNetworking
An easy to use networking library for sending custom RPCs through Steam.
Preferred version: 1.0.11README
ContentLibrary
Dependencies
This depends on Mycelium
How do I use this
Download the latest dll from the releases tab or clone and build the repo, then add it as a reference to the project. After adding it as a reference you can add it as a dependency:
[BepInDependency(ContentLibrary.MyPluginInfo.PLUGIN_GUID)] // Make sure to specify if it's a soft or a hard dependency! BepInEx sets dependencies to hard by default.
public class YourMod : BaseUnityPlugin { // ...
And for in-depth documentation, check out the library documentation or one of the demos! Demos available are the manual replication branch and the quick replication branch
Content class documentation
If you're curious how the Content classes work, check out my wiki for them!
Credits
Steven4547466 helped to documentate the content class! If it wasn't for them I probably wouldn't have delved deeper into the code at the time that I did, they also did a lot of research themselves.
Does this add something?
By itself, no — this is a library for mod developers to avoid conflicts when making content events and optionally utilize helper methods the library provides.
Though this does patch ContentEventIDMapper, so it might conflict with other Content Event mods that don't utilize the library (there is a 1 in 63535 chance one mod without a library would conflict with other content event mods per event added!)
It doesn't work
If the mod is throwing an error use the github issues page and copy-paste the error in there, with a description of what is happening and what you expected to happen if applicable. Or just ping me at the Content Warning Modding Discord server! There's a support thread about the library currently open.