-
Notifications
You must be signed in to change notification settings - Fork 1
Registrations
For the primary example of mod registrations, consider checking out the source code for the mod Troposphere, which registers a number of things — creatures, doodads, items, actions, terrain, etc.
As of Jan 2026, other official mods, and older mods you find may not be updated to the new mod registration system yet, which means you'd be referencing code that's registering things with something called "decorators" instead of function calls. If you don't understand what that means, you definitely should be using the new mod registration system.
Mod registrations come in two types:
// register "CoolThing", which is "some registration type" (ie this could be "creature" or "item")
const coolThing = Mod.register.someRegistrationType("CoolThing", {
someAttribute: 5,
someOtherAttribute: true,
})Sometimes you'll need to delay defining what a registration is until later, because you might need two registrations to reference each other:
// tell the game that "CoolThing" will exist:
const coolThing = Mod.register.someRegistrationType("CoolThing")
// ...later...
// actually tell the game what CoolThing is:
coolThing.define({
someAttribute: 5,
someOtherAttribute: true,
})If you look at the Troposphere example linked above, most of the registrations are the latter type, because a lot of them reference each other, and you can't reference one before its variable has been initialised.
Getting Started
- Introduction
- Prerequisites
+mod create&+mod update- mod.json
- Extracting Assets
- Resources & Examples
- Frequently Asked Questions
Mod Content
Script Documentation
- Using Translations
- Registrations
- Event Handlers
- Injection
- Adding Items
- Adding Doodads
- Adding Creatures
- Adding Magical Properties
- Actions & Multiplayer
- Adding Dialogs
- Context Menu/Action Bar Actions
- Inter-mod Registries
(apologies for all the missing guides, we'll get to them at some point)