You are viewing a potentially older version of this package. View all versions.
kss-BonkersLib-1.0.4 icon

BonkersLib

This is a library for Megabonk to provide a stable API and reusable services.

Date uploaded 2 weeks ago
Version 1.0.4
Download link kss-BonkersLib-1.0.4.zip
Downloads 3114
Dependency string kss-BonkersLib-1.0.4

This mod requires the following mods to function

BepInEx-BepInExPack_IL2CPP-6.0.738 icon
BepInEx-BepInExPack_IL2CPP

BepInEx pack for IL2CPP x64 Unity games. Preconfigured and ready to use.

Preferred version: 6.0.738

README

BonkersLib

BonkersLib is a core shared library for BepInEx mod development targeting the game "Megabonk".

Its primary purpose is to provide a stable API and reusable services to interact with the game's code. It is used as a dependency by other mods, such as MegaBonkPlusMod.

🛠️ Core Services

This library abstracts away game-specific code into several easy-to-use services, including:

  • PlayerService: For accessing and manipulating player data.
  • WorldService: For interacting with the game world and objects.
  • GameStateService: For retrieving and tracking the overall game state.
  • (And other helpers for managing inventory, items, etc.)

🚀 Installation (For End-Users)

If you are a user of a mod that requires BonkersLib:

Ensure BepInExPack_IL2CPP (Version 6) is installed for your game.

  1. Compile this project or download the latest release.
  2. Place the BonkersLib.dll into your BepInEx/plugins folder, alongside the mod that needs it.
  3. Start the game once to allow the mod to generate its configuration files.

🧑‍💻 Usage (For Developers)

If you are developing a mod that builds on this library:

  1. Add BonkersLib.dll as a reference in your C# project.
  2. Ensure your mod declares BonkersLib.dll as a dependency (e.g., via BepInEx attributes).
  3. Access the provided services (e.g., BonkersAPI.PlayerService).

🤝 Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

📄 License

MIT LICENSE

CHANGELOG

v1.0.4

  • Updated mod to work for the latest version of MegaBonk SpookyUpdate
  • Added Time Scaling

v1.0.3

  • Hotfixed some broken logic in new world cache

v1.0.2

  • Attempted to make every call to the main Unity Thread Safe by implementing the MainThreadDispatcher

v1.0.1

  • Changed the way the "IsInGame" State would be triggered from timer based to scene checks for certain interactables

v1.0.0

  • Initial release.