-
Notifications
You must be signed in to change notification settings - Fork 0
Manifest Reference
Each directly discovered mod folder needs a manifest.json file and a Lua entry file. JSON field names are case-sensitive.
{
"id": "crew-notices",
"name": "Crew Notices",
"version": "1.0.0",
"author": "Your Name",
"entry": "main.lua",
"hostOnly": true,
"dependencies": []
}| Field | Default | Meaning |
|---|---|---|
id |
Required | Unique ID; 1-64 lowercase ASCII letters, digits, _ or -; first character must be a letter or digit. |
name |
Required | Nonempty display name, also used as the chat prefix. Keep it short. |
version |
0.1.0 |
Displayed Lua mod version; no compatibility or version-range checks. |
author |
Unknown |
Author metadata. |
entry |
main.lua |
Relative path to an existing .lua file inside the mod folder. |
hostOnly |
true |
Gates event callbacks, timers, and action buttons while not hosting. Startup code still executes at load time. |
dependencies |
[] |
Array of exact installed mod IDs that must load successfully first. |
Manifest files are limited to 16 KiB. Entry files are limited to 256 KiB. Absolute paths, paths outside the mod directory, and linked entry paths are rejected. There is no require or filesystem API for loading additional Lua files in this beta.
{
"id": "crew-notices-addon",
"name": "Crew Notices Addon",
"dependencies": ["crew-notices"]
}The example requires a separately installed mod whose ID is crew-notices. Dependencies control load order and failure propagation; they do not share Lua globals or export functions. Missing dependencies, failed dependencies, and cycles prevent the dependent mod from loading. No automatic download occurs.
If a running dependency fails, its loaded dependents are also disabled. Fix the problem and reload all Lua mods.
The ID determines the data filename: BepInEx/config/HowToLua.<id>.cfg. Renaming a folder keeps data available as long as the ID stays the same. Changing the ID selects a different data file. Only the first discovered folder for a duplicate ID is retained; check BepInEx output for the rejected duplicate.
Top-level code and optional on_load() execute during loading, including at the main menu and on clients. Register handlers at the top level. Put gameplay work inside callbacks and check htf.is_host() when needed.
This flag is not a permission negotiation system. Chat and money APIs enforce hosting regardless of the flag, and registered slash commands can only be invoked from the host's own chat input.