ContentLibrary
ContentLibrary handles ID assignment, creation and replication of ContentProviders and ContentEvents for developers.
Date uploaded | 7 months ago |
Version | 0.11.1 |
Download link | Notest-ContentLibrary-0.11.1.zip |
Downloads | 80205 |
Dependency string | Notest-ContentLibrary-0.11.1 |
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.
CHANGELOG
v0.11.1
As expected, I forgot about a crucial detail and had to make breaking changes to whoever uses the automatic replication polling
- Adds: ManualPoll method in which it adds directly to the
ContentPolling.contentEvents
, given that the amount of the same type of event there matters, as it'll directly affect the event's score. - Changes: PollAndReplicateProvider has one more variable
timesToPoll
so you can specify how many times you want to poll when it callsManualPoll
v0.10.0
Initial release