Add a setting before adding the behavior that uses it. This recipe makes one ability optional and shows where gameplay reads the chosen value. Choose the default according to how the ability affects existing saves. It assumes a code mod already has the initialization pattern from First plugin.

Choose a stable setting key and a default. The key identifies persisted data, so use a key such as dashEnabled rather than visible text that may later change. A Boolean is a good first control because its enabled and disabled results are easy to check.

Create one OptionInterface subclass and bind the setting in its constructor. OptionInterface, Configurable<T>, ConfigurableInfo, and MachineConnector are global types. The UI controls are in Menu.Remix.MixedUI.

using Menu.Remix.MixedUI;
using UnityEngine;
 
public sealed class AbilityOptions : OptionInterface
{
    public readonly Configurable<bool> dashEnabled;
 
    public AbilityOptions()
    {
        dashEnabled = config.Bind("dashEnabled", true,
            new ConfigurableInfo("Allow the dash ability."));
    }
 
    public override void Initialize()
    {
        base.Initialize();
        Tabs = new[] { new OpTab(this, "Settings") };
        Tabs[0].AddItems(
            new OpCheckBox(dashEnabled, new Vector2(30f, 460f)),
            new OpLabel(65f, 462f, "Enable dash"));
    }
}

The AbilityOptions class compiled against the recorded game assemblies using C# 7.3. This checks the binding and control signatures, not menu appearance or persistence in a running game.

Register and retain one options instance during the mod initialization hook. The registration ID must match the package’s modinfo.json ID. MachineConnector.SetRegisteredOI returns false when the ID is absent from the registered Remix entries, so log that result while developing. See Remix settings for the repeatable initialization guard and the full registration call.

The first snippet defines only the settings class. In the next snippet, options is the retained AbilityOptions instance, and StartDash(player) is a placeholder for the mod’s existing ability method. Read dashEnabled.Value at the point where the ability would begin. Do this before changing velocity, creating an effect, consuming input, or writing state:

if (!options.dashEnabled.Value)
    return;
 
StartDash(player);

This check controls new activations. Decide separately how an ability already in progress ends when a player saves the setting. For a short one-shot action, allowing the current action to finish is usually easier to explain. For a retained loop or object, make the owner stop or remove it when the value changes. Configurable<T>.Value raises its change event after a changed assignment, but a callback that touches room objects must still confirm that its objects and rooms exist.

Open the Remix page, change the checkbox, press Save, then return to a state where the ability can start. The expected result is that the action starts with the setting on and does not start with it off. Restart Rain World and repeat both checks. This distinguishes a visible control from a saved setting. The game writes configuration through the Remix Save route, not each time a checkbox changes.

If the page is missing, compare the registration ID with modinfo.json. If a saved choice returns to its default, confirm that the setting was bound in the constructor rather than Initialize(). Initialize() can run whenever the menu rebuilds. If the setting changes but behavior does not, search for every activation path and put the same gate at each path, or route them through one method such as StartDash.

Localized text shows how to replace the English label with a translation key. Hook lifecycle covers safe placement for gameplay hooks.

Sources

  • Rain World v1.11.8, Steam build 22785462: global::MachineConnector.SetRegisteredOI(System.String,global::OptionInterface), global::OptionInterface.ConfigHolder.Bind<T>(System.String,T,global::ConfigurableInfo), global::Configurable<T>.Value, global::OptionInterface.Initialize(), Menu.Remix.MixedUI.OpCheckBox..ctor, and Menu.Remix.MixedUI.OpLabel..ctor in the assembly identified by Runtime reference.
  • Remix settings