Jimmyking-CUCoreLib icon

CUCoreLib

Core modding library for Casualties: Unknown. Adds content registration, hooks and shared utilities that other mods build on!

Last updated 7 hours ago
Total downloads 24
Total rating 0 
Categories Tools Libraries
Dependency string Jimmyking-CUCoreLib-1.1.0
Dependants 5 other packages depend on this package

This mod requires the following mods to function

BepInEx-BepInExPack-5.4.2305 icon
BepInEx-BepInExPack

BepInEx pack for Mono Unity games. Preconfigured and ready to use.

Preferred version: 5.4.2305

README

CUCoreLib

A definitive open-source modding library for Casualties: Unknown.

CUCoreLib

Latest Release Total Github Downloads Nexus Downloads Game Version Documentation (Click me!)


"awwww dang it @jimmy_king im not trusting you with my code again ;;!!!"

- Orsoniks, creator of Casualties: Unknown

This clearly means you should trust my library with your mod ;)


alt text

What Is CUCoreLib?

CUCoreLib is an exhaustive shared modding library and documentation project for Casualties: Unknown, built for both beginners and veteran mod authors.

Instead of every mod reinventing the same systems over and over, CUCoreLib provides a common foundation alongside documentation.

We have:

  • A human-written shared framework for building mods faster
  • A safer compatibility layer for future modding work and multi-mod compatibility
  • A very well documented API surface with examples and videos (cucorelib.jimmyking.dev)
  • A very active open-source project intended to grow with community feedback and contributions
  • A ton of emphasis on backwards compatibility (A mod made for v0.1 of CUCoreLib still works now!)

What Does It Provide?

Core library features

  • Helper functions and shared utility systems
  • Publicized access to useful private game data
  • Mod-compatible patch hooks, meant for use across multiples of mods
  • Documentation through an external webapp with examples, references, and videos
  • Streamling of modding with hot reloading and helper functions in lieu of harmony patches.
  • Automatic support and update compatibility for multiplayer, QoL, and other popular mods

In-game modular API support

  • Custom items, liquids, containers, weapons, crafting materials, equipment, guns, and more
  • Custom world entities, tiles, traps, liquids, enemies, drop tables, and interactables
  • Asset loading, spritesheet support, audio loading, and general parsing.
  • Moodles and custom body and limb status effects
  • Crafting and recipes
  • Automatic locale and translation support
  • Settings menu, console, world setting support
  • Compatible saving and persistent mod data
  • Multiplayer API and many, many helpers
  • Custom minigame and animation support via assetbundle loading
  • XML documentation alongside normal documentation
  • General utility systems for mod authors (CUCoreUtils)

Automatic mod compatibility

  • Multiplayer item, liquid, lootpool, tile, recipe, entity sync without needing code.
  • Basic multiplayer sync, even without clients needing your mod! (If they have CUCoreLib)
  • Integration with other mods, such as QoL, FullSave, What Mod Is This From, Wiki Search, CPU Optimization, Custom Structures, etc..
  • CUCoreLib wrappers that will automatically update with other mod updates, to allow mods to work with one another.

Why Use It?

A lot of mods need the same basic foundation:

  • Loading custom assets, sounds, etc..
  • Registering items, liquids, recipes, and world content..
  • Saving mod data safely..
  • Patching game systems without exploding on updates..
  • Staying compatible with other mods
  • Handling multiplayer-related integration

Without a shared library, every mod author ends up building their own version of the same systems. That makes mods harder to maintain, harder to update, more likely to conflict, and more annoying to extend later.

CUCoreLib aims to become a common framework the modding scene can build on together.


Documentation

Documentation webapp

The documentation site is designed to help both new and experienced modders get productive quickly.

Documentation examples

(and maybe help contribute to the documentation yourself ;))

Useful links


Installation / Quick Setup

Players: install CUCoreLib with thunderstore's mod manager, and it'll be pulled in automatically by any mod that depends on it.

Alternatively, you can install it here, and move to your BepInEx /plugins folder.

Mod developers:

  1. Download the latest release from GitHub Releases (or nightly, if you're feeling adventurous), or grab it from here.
  2. Place CUCoreLib.dll into your BepInEx plugins folder.
C:\Program Files (x86)\Steam\steamapps\common\Casualties Unknown\BepInEx\plugins
  1. Add the DLL as a reference in your Visual Studio project.
  2. Also add the game's own Assembly-CSharp.dll as a reference.
  3. Start building your own mod.
<Reference Include="CUCoreLib">
  <HintPath>..\PATH\TO\YOUR\CUCoreLib.dll</HintPath>
</Reference>

Want the full guide? See the documentation setup page here: https://cucorelib.jimmyking.dev/docs/setup/


Contributing

This library is fully open source and open to pull requests!

Contributing

Contributions are very welcome, provided you do not fully use AI (and properly test!)

  • Bug fixes are welcome
  • API improvements are also welcome!
  • Compatibility improvements are very welcome
  • Documentation improvements are very very welcome

For contribution guidelines and source, see: https://github.com/jimmyking9999999/CUCoreLib


Discord / Support

Discord

Have a question? Suggestion? Bug report but you're too shy to make an issue on GitHub? Ask us in the Discord channel!

Happy modding!


To create a plugin, we must first create the universe...