Skip to content

Global Class "RoomConfig"⚓︎

Info

You can get this class by using the RoomConfig global table.

Note that to call these functions, you must use a . (period) instead of a : (colon)!

Example Code
1
local roomConfigStage = RoomConfig.GetStage(StbType.BASEMENT)

Functions⚓︎

AddRooms ()⚓︎

RoomConfigRoom[] AddRooms ( StbType Stage, int Mode, table[] Rooms )⚓︎

Adds the provided Lua Rooms to the specified RoomConfigSet. For details on how to generate Lua Rooms, refer to the Custom StageAPI Github page.

The function returns a table containing the placed RoomConfigRoom objects, in the same order as the input Rooms table. If a room at a given index could not be converted into a valid RoomConfigRoom, the corresponding entry in the returned table will be nil instead.


GetRandomRoom ()⚓︎

RoomConfigRoom GetRandomRoom ( int Seed, boolean ReduceWeight, StbType Stage, RoomType Type, RoomShape Shape = RoomShape.NUM_ROOMSHAPES, int MinVariant = 0, int MaxVariant = -1, int MinDifficulty = 0, int MaxDifficulty = 10, int RequiredDoors = 0, int Subtype = -1, int Mode = -1 )⚓︎

Returns a RoomConfigRoom corresponding to the given params.


GetRoomByStageTypeAndVariant ()⚓︎

RoomConfigRoom GetRoomByStageTypeAndVariant ( StbType Stage, RoomType Type, int Variant, int Mode = -1 )⚓︎

Returns a RoomConfigRoom corresponding to the given params.


GetStage ()⚓︎

RoomConfigStage GetStage ( StbType Stage )⚓︎


LoadStb ()⚓︎

RoomConfigRoom[] LoadStb ( StbType Stage, int Mode, string StbFileName )⚓︎

Adds the rooms from the provided .stb file to the specified RoomConfigSet. Files can only be loaded starting from the .../content(-repentogon)/rooms/ folder of all mods (so you should not include content/rooms/ in your path).

If files from multiple mods match the filename, they will all be loaded.