The community API for PEAK.
Features:
- Core Module
- Network Prefab API
- Content Registry API
- Easily find out which content belongs to who!
- Bundle Loader API
- Host Mod List Listener API
- Items Module
- Items API
- Item Acceptor API (consumable items can be fed objects)
- UI Module
- UI API (see ModConfig for reference usage)
- Stats Module
- Status Effects API
You can use PEAKLib.Tests as reference for how certain APIs can be used.
Feel free to chat in #peak-lib in the PEAK Modding Discord Server about what you would like to contribute to this project. This is a community project and we're all together in this!
- Fork this repository
- Create a copy of the
Config.Build.user.props.templatefile and name itConfig.Build.user.props- This will automate copying your plugin assembly to
BepInEx/plugins/ - Configure the paths to point to your game path and your
BepInEx/plugins/ - Game assembly references should work if the path to the game is valid
- This will automate copying your plugin assembly to
- Create a new feature branch
- Implement your changes
- If you're adding a new module, make sure to add tests for it in the test project! It can be found at ./tests/
- Format your code with CSharpier (optionally can be formatted by whoever is reviewing your code)
- Open a PR
- Never break the public API
- Public members must never be renamed (add the
[Obsolete]attribute and create a new e.g. method with the new name instead) - A new optional parameter can not be added to an existing method (create a new overload instead)
- Public members must never be renamed (add the
- Your changes should not bring any warnings to the project. Warnings should be properly resolved, unless if it's a very special case where the warning can be ignored.
Ultimately these will be resolved in code review, so no need to worry about this too much.
This template comes with Thunderstore packaging built-in, using TCLI.
You can build Thunderstore packages by running:
dotnet build -c Release -v dNote
You can learn about different build options with dotnet build --help.
-c is short for --configuration and -v d is --verbosity detailed.
The built package will be found at artifacts/thunderstore/.