modding script hooks
⚪ Last updated 2021This mod may not work until the author updates it. Check for an update, or see the rollback guide.
Preview

🔍 Analysis
- 👍 1.6% endorsement rate — high engagement, a strong quality signal
- 🏆 #1 of 51 Utilities mods in this game by downloads
📋 About This Mod
To mod authors: Please use the new ::mods_queue function to allow your mods to participate in dynamic ordering. Also, if you compile your own .cnut files, you must exercise care with the command-line arguments. See the documentation for ::mods_hookClass.
This mod implements a few hooks that can be used to implement many types of mods without overwriting script files. It may not be complete, but can be expanded with additional capabilities if and when they're needed. The mod currently exposes the following functionality, as functions that you can call:
INSTALLATION
Just drop the .zip file into your game's data directory. No need to unzip it. NOTE: If you just want to use mods that depend on mod_hooks, you can stop reading here. The rest of this page is only for people who want to develop new mods.
EXAMPLES
For example mods implemented using these hooks, see any of my mods for Battle Brothers.
FUNCTIONS:
::mods_addHook(name, func = null)
Registers a hook that will be called by ::mods_callHook(name). Multiple functions can be registered for the same hook, in which case they'll be called in order. Arguments:
name - The name of the hook, which is arbitrary.
func - The function that will be called when the hook is invoked, or null to simply create the hook without registering a function. The function may take any number of parameters. If the hook function returns a non-null value, that value will be returned from ::mods_callHook and further hook processing will be halted.
::mods_callHook(name, ...)
Invokes hook functions by name. If no hooks have been registered, nothing will happen. If a hook function returns a non-null value, that value will be returned and further hook processing will be halted. If all hook functions return null, the function returns null. Arguments:
name - The name of the hook, which should match that provided to ::mods_addHook.
All additional arguments will be passed to the hook function.
::mods_removeHook(name, func)
Removes a hook that was previously registered. Arguments:
name - The name of the hook, which should match that provided to ::mods_addHook.
func - The function to remove. This must be the exact same function object that was registered.
::mods_hookNewObject(name, func, once = false)
A convenience method for hooking into the instantiation of a new object. Arguments:
name - The name of the object. If the object is implemented in scripts/x/y/z.cnut, the name should be "x/y/z"
func - A function that takes one argument, which is the newly instantiated object. Normally the function should return null, but if it returns a different value that value will be substituted for t
A utility mod that allows mods to be implemented without overwriting whole files, improving compatibility. It also enables declaring dependencies and relationships between mods. Essential for modders and players using multiple mods.
✨ Key Features
📊 Pros & Cons
✅ Pros
- Huge community trust with 7,766 endorsements and nearly half a million downloads.
- Solves real mod conflicts by avoiding file overwrites.
- Lets mod authors declare dependencies, making load order clearer.
⚠️ Cons
- Last updated in May 2021 — may be outdated for current game versions.
- No detailed documentation or install instructions provided by the author.
- Requires mod authors to adopt the framework for full benefit; not all mods support it.
For modders and players who run multiple mods and want to reduce conflicts. Essential for anyone tired of mods overwriting each other's files. Skip if you only use a few simple mods and don't care about dependency management.
💡 Beginner Tips
- Check if your other mods explicitly support this framework; otherwise, it may not affect them.
- If you're a mod author, use the dependency declarations to prevent load order issues.
- Since it's a utility, install it first and let other mods reference it.
📊 Mod Details
- Game
- Battlebrothers Mods
- Author
- Adam
- Version
- 20.1
- Downloads
- 496,936
- Endorsements
- 7,766
- Category
- Utilities
- Created
- 1/29/2019
- Updated
- 5/22/2021
🔗 Required By 2 Mods
These mods list this mod as a dependency.
🧩 Commonly Used Together
Users add these mods to the same collections — a real compatibility signal, not an AI guess.
🔧 How to Install Battle Brothers Mods
Download from Nexus Mods.
📖 Full step-by-step install guide for Battle Brothers →
Visit the official mod page for specific installation instructions for this mod.
🎮 Need cheat codes or console commands? Check ur gaming wiki for Battle Brothers commands, item IDs, and more.
Keep browsing — more Battle Brothers mods await