BoneLib
A BONELAB mod for making life easier for other mod creators.
About this mod Author’s original text
BoneLib
A BONELAB mod for making life easier for other mod creators.
BoneLib is fully open source so feel free to make a PR for new features and bug fixes. Just make sure the code is commented/easily understandable, and doesn't noticeably affect performance.
Features
- A menu system for other mods to use
- Easy access to data related to the player (held items, position, controllers, current avatar, etc)
- Events for common actions, such as guns firing, grabbing items, changing avatars, NPCs dying, etc
- Helper and extension methods for changing the RPM of guns, damaging enemies, getting clean object names
- Extension methods to call functions with nullable parameters that would otherwise crash the game
- Spawn message boxes for the player
- Safely invoke actions with error handling
- Lots of other small features
Many more features will be added as we continue to develop the mod.
User Preferences
You will have to run the game once with the mod installed before the preferences will show up.
Preferences are stored in UserData\MelonPreferences.cfg.
- LoggingMode: NORMAL or DEBUG. For most people normal is fine, debug will just show more info to help with development.
- SkipIntro: true to not play the intro at the start of the game and go straight to the menu.
Development Setup
The VS project uses the system environment variable BONELAB_DIR for referencing assemblies and build output paths. Make sure you have this set on your computer to your BONELAB install location (where the.exe is, no trailing slash) for VS to be able to find the files. If this doesn't work right away, try deleting the.vs folder for this project and restarting VS.
Credits
Gnonme / Lvna / Adi / adamdev: Main developers
Parzival: Added enum with all game layers, improved documentation, made some extension method parameters optional
Extraes: Ported nullable extension methods (originally made by WNP78) from MTINM, lots of testing, added InvokeActionSafe methods, added animal image popup methods
adamdev: Added events for NPC deaths and resurrections, and events for MarrowGame and MarrowScenes, added BoneMenu
Camobiwon: Implemented fixes and QoL improvements into BoneMenu
Lakatrazz: BoneMenu improvements, fixed issues after game updates
Trev: LemonLoader support
SoulWithMae: SpawnCrate helper methods, added a class with commonly used barcodes, added a notification system, added helper methods for loading stuff from embedded resources
WNP78: Ported the mod to ML 0.6 and improved reference DLL handling
Changelogs (BoneLib)
v3.2.1
- Added `OnPlayerDeath`
- Added `OnPlayerDeathImminent`
- Added `OnPlayerDamageReceived`
- Added `OnPlayerResurrected`
v3.2.0:
- Added tooltips, so that modders can explain what each mod setting does
- Added the ability for dialog boxes to have their colors customized
- Added simple audio functions (change sfx, music, muffle)
- Fixed wrong visuals on dialog boxes due to overlapping bundle assets
- Fixed an issue with the dialog box still persisting when the menu was closed
v3.1.5:
- Page bugs have been fixed and refactored (Camobiwon)
- Fixed issues with the UI (adamdev, Camobiwon)
v3.1.4:
- Added dedicated function(s) for removing page children inside of the Page class
- Added a new button to randomly change avatars and randomly spawn mod spawnables
- Fixed animal ads not working
- Fixed a bug with StringElements not disappearing like they should
- Fixed a bug where string elements would collide with things in the world
- Fixed a bug with pages not being removed properly
- Fixed an issue with pages being changed when removed, even when not viewing them
- Removed unneeded debug log when an element was being removed
v3.0.0:
- Complete overhaul of BoneMenu which features dialogs, string elements, and more
- Audio class now wraps around the Marrow audio methods, and mixers are exposed
- Hooks for when the player spawner spawns the player
v2.5.0:
- Added OnWarehouseReady hook
- Ported to work with ML 0.6+
- Improved DLL referen
Install & use Install: follow the bundled instructions
- Unzip the archive from playbuff and read the bundled readme / instructions first.
- Most mods rely on the game's mod loader — the usual route is a community mod manager (such as r2modman): pick this game, install, and it handles the loader and dependencies.
- For a manual install, put the mod files into the matching Mod / plugins folder inside the game directory.
- Launch the game to confirm it loaded; mods with listed dependencies need those installed as well.
Install locations vary a lot between mods — the bundled readme is the most reliable guide.
Install these first, or the mod will not work: