Placed objects are saved in a room settings file, usually world/ha-rooms/ha_a01_settings.txt. They are not part of Rained’s rendered room text and they are not creature spawns in world_ha.txt. Use the Dev Tools Objects page to create a type you need, save one object, and inspect the resulting PlacedObjects: line before making a related edit by hand.

The installed Dev Tools page switch creates ObjectsPage for page index 1 in global::DevInterface.DevUI.SwitchPage(System.Int32). Enable Dev Tools, open its interface, choose Objects, add one object, position it, then use the page save control. Rooms and regions describes the Dev Tools entry points. This procedure needs a game session. The save path must be checked after the session.

Use a saved record for its own object type

The settings serializer writes all saved objects on one line:

PlacedObjects: <object record>, <object record>,

global::RoomSettings.LoadPlacedObjects(System.String[],global::SlugcatStats.Timeline) separates records on , , then separates each record on ><. It constructs a PlacedObject and asks that object’s data type to read the fields. The first field identifies the placed-object type. Later fields are type-specific data and placement values. A record copied from a different object type can parse into the wrong data class even when its delimiters look valid.

Do not invent a full record from delimiter rules. Save the same object type in the same game version, then keep its field count, field order, and numeric format. Edit only a field whose meaning you have established from the Dev Tools control or from the owning data class. Use a period for decimal values because room settings parsing uses invariant culture.

Work one object at a time

Add a single object, save, and compare the new line with the previous file. Reload the room and confirm the object exists at the intended location. Then make the next object. This identifies a malformed record before several changes obscure it.

Some placed-object data filters object activity by timeline. During load, RoomSettings.LoadPlacedObjects can mark a generic-filter object inactive for the current timeline and can deactivate nearby eligible objects. A Warp Filter can also deactivate objects in its radius. If a saved object does not appear, inspect the whole PlacedObjects collection for filters before moving coordinates.

Copy the intended file into the mod

global::RoomSettings.Save(System.String,System.Boolean) writes the current resolved path. In an enabled mod set, that path may be inside a mod override or generated mergedmods output. Locate the changed file, then copy the intended settings source into the authored ha-rooms directory. Do not package generated merged output.

Expected result: the room settings contains one new PlacedObjects record, a reload shows the object, and the same result holds after generated content is rebuilt. For runtime object ownership, see Abstract and realized objects.

Sources

  • Rain World v1.11.8, Steam build 22785462: global::DevInterface.DevUI.SwitchPage(System.Int32), global::RoomSettings.LoadPlacedObjects(System.String[],global::SlugcatStats.Timeline), and global::RoomSettings.Save(System.String,System.Boolean) in the assembly identified by Runtime reference.