Skip to content

Class "Room"⚓︎

Modified Functions⚓︎

GetBackdropType ()⚓︎

BackdropType GetBackdropType ( )⚓︎


SpawnGridEntity ()⚓︎

boolean SpawnGridEntity ( int GridIndex, GridEntityType Type, int Variant = 0, int Seed = nil, int VarData = 0 )⚓︎

boolean SpawnGridEntity ( int GridIndex, GridEntityDesc Descriptor)⚓︎

No longer crashes if an invalid GridIndex is used. All arguments beyond Type are optional. An overload has been added to allow spawning a new grid entity using an existing GridEntityDesc.


TrySpawnSpecialQuestDoor ()⚓︎

boolean TrySpawnSpecialQuestDoor ( boolean IgnoreStageType = false )⚓︎

An IgnoreStageType parameter has been added to allow spawning the Mirror & Mineshaft door outside of STAGETYPE_REPENTANCE and STAGETYPE_REPENTANCE_B stages. Note that the KNIFE_PUZZLE dimension must be set up properly for these doors not to crash on entry!


Functions⚓︎

CanPickupGridEntity ()⚓︎

boolean CanPickupGridEntity ( int GridIndex )⚓︎

Returns true if the gridentity at the given position can be picked up.


CanSpawnObstacleAtPosition ()⚓︎

boolean CanSpawnObstacleAtPosition ( int GridIndex, boolean Force )⚓︎


DoLightningStrike ()⚓︎

void DoLightningStrike ( int Seed = RandomSeed )⚓︎

Creates a lightning effect as seen in Downpour. Seed determines intensity (1.3 + RandomFloat()*.6) and sound pitch (0.9 + RandomFloat()*0.2).


GetBackdrop ()⚓︎

Backdrop GetBackdrop ( )⚓︎

Returns a Backdrop object.


GetCamera ()⚓︎

Camera GetCamera ( )⚓︎

Returns a Camera object.


GetChampionBossChance ()⚓︎

float GetChampionBossChance ( )⚓︎

Return the probability that boss spawns in this room will be champions.


GetEffects ()⚓︎

TemporaryEffects GetEffects ( )⚓︎


GetFloorColor ()⚓︎

Color GetFloorColor ( )⚓︎


GetFXParams ()⚓︎

FXParams GetFXParams ( )⚓︎


GetGreedWaveTimer ()⚓︎

int GetGreedWaveTimer ( )⚓︎


GetGridIndexByTile ()⚓︎

int GetGridIndexByTile ( int GridRow, int GridColumn )⚓︎


GetLightningIntensity ()⚓︎

float GetLightningIntensity ( )⚓︎

Gets the intensity of the lightning effect used in Downpour. This variable will affect the visibility of Wraiths.

This is set by the game in a random range between 1.3 and 2.1, and decays by value * .75 per render.


GetNumRainSpawners ()⚓︎

int GetNumRainSpawners ( )⚓︎

The number of areas in a room that spawn rain effects in a tight radius.

Info

There's more to this than just the number of them, but I'm having trouble identifying how this works.


GetRail ()⚓︎

StbRailVariant GetRail ( int GridIndex )⚓︎


GetRailManager ()⚓︎

RailManager GetRailManager ( )⚓︎


GetRainIntensity ()⚓︎

float GetRainIntensity ( )⚓︎

Used by the positional rain effect spawners in Downpour. No noticable effect beyond 1.0.


GetRoomClearDelay ()⚓︎

int GetRoomClearDelay ( )⚓︎


GetShopItemPrice ()⚓︎

int GetShopItemPrice ( int EntityVariant, int EntitySubType, int ShopItemID )⚓︎

Returns the price of the item.


GetWaterAmount ()⚓︎

float GetWaterAmount ( )⚓︎

Returns the "amount" of water currently in the room. Generally this will be 0 for no water and 1 for water, but values in between 0 and 1 (and technically above 1 in modded scenarios) are possible.


GetWaterColor ()⚓︎

KColor GetWaterColor ( )⚓︎


GetWaterColorMultiplier ()⚓︎

KColor GetWaterColorMultiplier ( )⚓︎


IsChampionBossSeed ()⚓︎

boolean IsChampionBossSeed ( )⚓︎

Return whether boss spawns in this room will be champions.


IsPersistentRoomEntity ()⚓︎

boolean IsPersistentRoomEntity ( EntityType Type, int Variant = 0 )⚓︎


PickupGridEntity ()⚓︎

EntityEffect PickupGridEntity ( int GridIndex )⚓︎

Tries to pick up the grid entity at the provided index and returns an EntityEffect of the picked up grid entity.


RemoveGridEntityImmediate ()⚓︎

void RemoveGridEntityImmediate ( int GridIndex, int PathTrail, boolean KeepDecoration )⚓︎

Immediately removes the GridEntity at the given index. This means grids can be properly removed and immediately replaced, without the need to call Room:Update.


SetBackdropType ()⚓︎

void SetBackdropType ( BackdropType, int Unknown )⚓︎

This function will not work if the Unknown integer is passed as 0.

The backdrop variant chosen is seeded based on the room, and does not persist when leaving and re-entering. Calling this function again on re-entry will result in the same backdrop variant as before.


SetGreedWaveTimer ()⚓︎

void SetGreedWaveTimer ( int Time )⚓︎


SetLavaIntensity ()⚓︎

void SetLavaIntensity ( float Intensity )⚓︎

This primarily affects UpdateColorModifier (if Process is true, an orange glow is added based on the number of pits and lava intensity).


SetLightningIntensity ()⚓︎

void SetLightningIntensity ( float Intensity )⚓︎

Sets the intensity of the lightning effect used in Downpour. This variable will affect the visibility of Wraiths.

This is set by the game in a random range between 1.3 and 2.1, and decays by value * .75 per render.


SetPauseTimer ()⚓︎

void SetPauseTimer ( int Duration )⚓︎


SetRail ()⚓︎

void SetRail ( int GridIndex, StbRailVariant RailVariant )⚓︎


SetRainIntensity ()⚓︎

void SetRainIntensity ( float Intensity )⚓︎

Used by the positional rain effect spawners in Downpour. No noticable effect beyond 1.0.


SetRoomClearDelay ()⚓︎

void SetRoomClearDelay ( int Delay )⚓︎


SetWaterAmount ()⚓︎

void SetWaterAmount ( float Amount )⚓︎

Sets the amount of water that should be in the current room. Vanilla typically uses 0 for no water and 1 for water. You can technically go higher than this for some interesting results.


SetWaterColor ()⚓︎

void SetWaterColor ( KColor WaterColor )⚓︎


SetWaterColorMultiplier ()⚓︎

void SetWaterColorMultiplier ( KColor WaterColor )⚓︎


SetWaterCurrent ()⚓︎

void SetWaterCurrent ( Vector WaterCurrent )⚓︎

Sets the strength of the water current in the room. Current sounds and particles are automatically handled.

The game typically uses 1 or -1 for its values depending on current strength and direction. You can technically go higher than this for some interesting results. Arbitrary directions are fully supported as well.

Vector(0, 0) will remove the current.


TryGetShopDiscount ()⚓︎

int TryGetShopDiscount ( int ShopItemIdx, int Price )⚓︎


UpdateColorModifier ()⚓︎

void UpdateColorModifier ( boolean Process = true, boolean Lerp = true, float Rate = 0.015 )⚓︎

Updates the room's color correction with the copy of ColorModifier stored in FXParams. Process runs the color correction through some additional modifications for lava and the abandoned mineshaft sequence.