A region uses separate folders for its room assets and its world definition. For an illustrative region prefix HA, start from this runtime layout inside the mod folder:

world/
  ha-rooms/
    ha_a01.txt
    ha_a01_1.png
    ha_a01_settings.txt
  ha/
    world_ha.txt
    properties.txt
    map_ha.txt
modify/
  world/
    regions.txt

HA is only an example. Pick a prefix that does not overlap another installed region. Keep the same prefix in the room name, the room folder, and the world file name. The file name case may vary on Windows, but use lowercase paths and uppercase room identifiers consistently because installed content follows that convention.

Put each file in the folder its reader expects

global::WorldLoader.FindRoomFile(System.String,System.Boolean,System.String,System.Boolean) derives a room directory from the text before the first underscore. A request for HA_A01 looks first for world/ha-rooms/ha_a01 plus the required suffix. The normal suffixes are .txt for room data, _settings.txt for room settings, and _1.png, _2.png, and later camera images.

Rained writes the room text and one PNG for each camera. Its rendering guide places region output in /world/XX-rooms, relative to StreamingAssets or a mod root. Keep the editable Rained project elsewhere. The project format and rendered files are different formats.

The world definition belongs at world/ha/world_ha.txt. It supplies the room graph and creature sections. properties.txt supplies region values and room setting template declarations. map_ha.txt stores map placement, so a missing map file does not make a room connection valid. Room connections and Creature spawns cover those files.

Register a new region

global::Region.LoadAllRegions(global::SlugcatStats.Timeline,global::RainWorldGame) reads the resolved world/regions.txt list. For a mod that adds a new region, contribute the prefix through a merge file:

[MERGE]
HA
[ENDMERGE]

Save it as modify/world/regions.txt. The merger combines distinct region lines with the existing list. A new region needs a complete world_ha.txt in the normal world/ha/ path. To modify an existing world file, mirror that path under modify, such as modify/world/ha/world_ha.txt.

Check the package before opening the game

Confirm that every room named in world_ha.txt has a matching text file under ha-rooms. Confirm that every camera declared by the rendered room has its numbered PNG. For HA_A01, the first image must be ha_a01_1.png, not ha_a01.png. Keep mergedmods out of the authored tree. global::AssetManager.ResolveFilePath(System.String,System.Boolean,System.Boolean) can select generated merged output before an authored source file, and global::ModManager.GenerateMergedMods(...) rebuilds that output after enabled-mod changes.

After changing a mod’s enabled state, compare the authored files with the resolved files before debugging gameplay. Use Room authoring to render the room and Asset resolution when a file appears to come from the wrong location.

Sources

  • Rained rendering and deployment
  • Rain World v1.11.8, Steam build 22785462: global::Region.LoadAllRegions(global::SlugcatStats.Timeline,global::RainWorldGame) and global::WorldLoader.FindRoomFile(System.String,System.Boolean,System.String,System.Boolean) in the assembly identified by Runtime reference.