Migration to RMML 6

RMML 6 and RMMM

Rusted Moss Mod Loader 6 is the future. Featuring performance improvements, a new syntax, safety features, and an included Mod Manager, modding has never looked better. With this update, RMML’s core API has essentially locked in; any future updates cannot modify behavior without breaking existing mods or creating dependency hell.

Naturally, “the last” RMML update means breaking some things. This page details what has changed, but here’s the short version for players of mods:

For Players

After (optionally) backing up your mods folder, you can download RMML 6 and install it like normal. If you have existing mods, you can either download them again with Rusted Moss Mod Manager in-game, or put your old mods in the mods/rmml folder. Downloaded mods are located in the Saves folder. Any mod configuration (such as Maya/Ameli palette options) should be placed in the mod.

The old mods/rmml/modlist.txt (in the Steam directory) has been to mods/modlist.txt in the Saves folder. If you have manually installed mods, they must be re-added to the mod list. RMMM can do this for you using the in-game UI, or you can find the new list in the Saves folder. The mod list in the Steam directory is only used if the game crashes.

For Mod Makers

Some of you already have RMML 6 Beta installations, which can be safely updated with RMMM. If you have an existing RMML 5 (or lower) installation, you can follow the for players section and come back.

Here’s the quick changed stuff:

And here’s the new (technical) stuff:

global.rmml.modmap -> global.rmml_map

The structure of RMML’s mod map, used for associating Events, mod names, and Catspeak functions, has changed. In RMML 5, it was a struct containing an array containing a flattened tuple of a mod name and a function.

global.rmml.modmap = {
  "controller_events_create": [
    "my_mod", fun () { ... },
    "your_mod", fun () { ... },
  ],
  "instance_events_other_room_start": [
    "my_mod", fun () { ... },
  ],
}

In RMML 6, this is a simpler struct of structs.

global.rmml_map = {
  "controller_events_create": {
    "my_mod": fun () { ... },
    "your_mod": fun () { ... },
  },
  "instance_events_other_room_start": {
    "my_mod": fun () { ... },
  },
}

You probably weren’t modifying this structure directly (use global.rmml.register), but there is one user-facing change. RMML no longer supports multiple code blocks for the same Game Object and Event. For example, the following fails.

# controller
## create

```
-- this doesn't run
-- (and causes a startup error)
show_message("Hello")
```

```
-- this DOES run
show_message("World!")
```

Having multiple code blocks for the same Event-Game-Object pair was counter-intuitive and could lead to bugs, such as if you forgot an Event header.