Class "Level"

Functions

AddAngelRoomChance () {: aria-label='Functions' }

{: .abp .tooltip .badge }

void AddAngelRoomChance ( float Chance ) {: .copyable aria-label='Functions' }

AddCurse () {: aria-label='Functions' }

{: .abp .tooltip .badge }

void AddCurse ( LevelCurse Curse, boolean ShowName ) {: .copyable aria-label='Functions' }

ApplyBlueMapEffect () {: aria-label='Functions' }

{: .abp .tooltip .badge }

void ApplyBlueMapEffect ( ) {: .copyable aria-label='Functions' }

ApplyCompassEffect () {: aria-label='Functions' }

{: .abp .tooltip .badge }

void ApplyCompassEffect ( boolean Persistent ) {: .copyable aria-label='Functions' }

ApplyMapEffect () {: aria-label='Functions' }

{: .abp .tooltip .badge }

void ApplyMapEffect ( ) {: .copyable aria-label='Functions' }

CanOpenChallengeRoom () {: aria-label='Functions' }

{: .abp .tooltip .badge }

boolean CanOpenChallengeRoom ( int RoomIndex ) {: .copyable aria-label='Functions' }

CanSpawnDevilRoom () {: aria-label='Functions' }

{: .abp .tooltip .badge }

boolean CanSpawnDevilRoom ( ) {: .copyable aria-label='Functions' }

CanStageHaveCurseOfLabyrinth () {: aria-label='Functions' }

{: .abp .tooltip .badge }

boolean CanStageHaveCurseOfLabyrinth ( LevelStage Stage ) {: .copyable aria-label='Functions' }

ChangeRoom () {: aria-label='Functions' }

{: .abp .tooltip .badge }

void ChangeRoom ( int RoomIndex ) {: .copyable aria-label='Functions' }

DisableDevilRoom () {: aria-label='Functions' }

{: .abp .tooltip .badge }

void DisableDevilRoom ( ) {: .copyable aria-label='Functions' }

ForceHorsemanBoss () {: aria-label='Functions' }

{: .abp .tooltip .badge }

boolean ForceHorsemanBoss ( int Seed ) {: .copyable aria-label='Functions' }

return true on success

GetAbsoluteStage () {: aria-label='Functions' }

{: .abp .tooltip .badge }

LevelStage GetAbsoluteStage ( ) {: .copyable aria-label='Functions' }

Returns the absolute stage, if its greed mode its converted to equivalent one.

GetAngelRoomChance () {: aria-label='Functions' }

{: .abp .tooltip .badge }

float GetAngelRoomChance ( ) {: .copyable aria-label='Functions' }

GetCanSeeEverything () {: aria-label='Functions' }

{: .abp .tooltip .badge }

boolean GetCanSeeEverything ( ) {: .copyable aria-label='Functions' }

GetCurrentRoom () {: aria-label='Functions' }

{: .abp .tooltip .badge }

Room GetCurrentRoom ( ) {: .copyable aria-label='Functions' }

GetCurrentRoomDesc () {: aria-label='Functions' }

{: .abp .tooltip .badge }

RoomDescriptor GetCurrentRoomDesc ( ) {: .copyable aria-label='Functions' }

GetCurrentRoomIndex () {: aria-label='Functions' }

{: .abp .tooltip .badge }

int GetCurrentRoomIndex ( ) {: .copyable aria-label='Functions' }

???- note "Notes" This will always return the roomindex on the levelgrid, on which you entered the current room from. (see black entries in graphic below)

GetCurseName () {: aria-label='Functions' }

{: .abp .tooltip .badge }

string GetCurseName ( ) {: .copyable aria-label='Functions' }

GetCurses () {: aria-label='Functions' }

{: .abp .tooltip .badge }

int GetCurses ( ) {: .copyable aria-label='Functions' }

GetDevilAngelRoomRNG () {: aria-label='Functions' }

{: .abp .tooltip .badge }

RNG GetDevilAngelRoomRNG ( ) {: .copyable aria-label='Functions' }

GetDungeonPlacementSeed () {: aria-label='Functions' }

{: .abp .tooltip .badge }

int GetDungeonPlacementSeed ( ) {: .copyable aria-label='Functions' }

GetEnterPosition () {: aria-label='Functions' }

{: .abp .tooltip .badge }

Vector GetEnterPosition ( ) {: .copyable aria-label='Functions' }

GetHeartPicked () {: aria-label='Functions' }

{: .abp .tooltip .badge }

boolean GetHeartPicked ( ) {: .copyable aria-label='Functions' }

GetLastBossRoomListIndex () {: aria-label='Functions' }

{: .abp .tooltip .badge }

int GetLastBossRoomListIndex ( ) {: .copyable aria-label='Functions' }

GetLastRoomDesc () {: aria-label='Functions' }

{: .abp .tooltip .badge }

RoomDescriptor GetLastRoomDesc ( ) {: .copyable aria-label='Functions' }

GetName () {: aria-label='Functions' }

{: .abp .tooltip .badge }

string GetName ( LevelStage Stage, StageType Type, int Curses, int InfiniteLevel, boolean Dyslexia ) {: .copyable aria-label='Functions' }

GetNonCompleteRoomIndex () {: aria-label='Functions' }

{: .abp .tooltip .badge }

int GetNonCompleteRoomIndex ( ) {: .copyable aria-label='Functions' }

GetPreviousRoomIndex () {: aria-label='Functions' }

{: .abp .tooltip .badge }

int GetPreviousRoomIndex ( ) {: .copyable aria-label='Functions' }

GetRandomRoomIndex () {: aria-label='Functions' }

{: .abp .tooltip .badge }

int GetRandomRoomIndex ( boolean IAmErrorRoom, int Seed ) {: .copyable aria-label='Functions' }

GetRoomByIdx () {: aria-label='Functions' }

{: .abp .tooltip .badge }

RoomDescriptor GetRoomByIdx ( int RoomIdx ) {: .copyable aria-label='Functions' }

GetRoomCount () {: aria-label='Functions' }

{: .abp .tooltip .badge }

int GetRoomCount ( ) {: .copyable aria-label='Functions' }

GetRooms () {: aria-label='Functions' }

{: .abp .tooltip .badge }

LuaArrayProxy GetRooms ( ) {: .copyable aria-label='Functions' }

GetStage () {: aria-label='Functions' }

{: .abp .tooltip .badge }

LevelStage GetStage ( ) {: .copyable aria-label='Functions' }

GetStageType () {: aria-label='Functions' }

{: .abp .tooltip .badge }

StageType GetStageType ( ) {: .copyable aria-label='Functions' }

GetStartingRoomIndex () {: aria-label='Functions' }

{: .abp .tooltip .badge }

int GetStartingRoomIndex ( ) {: .copyable aria-label='Functions' }

GetStateFlag () {: aria-label='Functions' }

{: .abp .tooltip .badge }

boolean GetStateFlag ( StateFlag StateFlag ) {: .copyable aria-label='Functions' }

HasBossChallenge () {: aria-label='Functions' }

{: .abp .tooltip .badge }

boolean HasBossChallenge ( ) {: .copyable aria-label='Functions' }

InitializeDevilAngelRoom () {: aria-label='Functions' }

{: .abp .tooltip .badge }

void InitializeDevilAngelRoom ( boolean ForceAngel, boolean ForceDevil ) {: .copyable aria-label='Functions' }

IsAltStage () {: aria-label='Functions' }

{: .abp .tooltip .badge }

boolean IsAltStage ( ) {: .copyable aria-label='Functions' }

IsDevilRoomDisabled () {: aria-label='Functions' }

{: .abp .tooltip .badge }

boolean IsDevilRoomDisabled ( ) {: .copyable aria-label='Functions' }

IsNextStageAvailable () {: aria-label='Functions' }

{: .abp .tooltip .badge }

boolean IsNextStageAvailable ( ) {: .copyable aria-label='Functions' }

QueryRoomTypeIndex () {: aria-label='Functions' }

{: .abp .tooltip .badge }

int QueryRoomTypeIndex ( RoomType RoomType, boolean Visited, RNG rng ) {: .copyable aria-label='Functions' }

RemoveCompassEffect () {: aria-label='Functions' }

{: .abp .tooltip .badge }

void RemoveCompassEffect ( ) {: .copyable aria-label='Functions' }

RemoveCurse () {: aria-label='Functions' }

{: .abp .tooltip .badge }

void RemoveCurse ( LevelCurse Curse ) {: .copyable aria-label='Functions' }

RemoveCurses () {: aria-label='Functions' }

{: .abp .tooltip .badge }

void RemoveCurses ( ) {: .copyable aria-label='Functions' }

SetCanSeeEverything () {: aria-label='Functions' }

{: .abp .tooltip .badge }

void SetCanSeeEverything ( boolean Value ) {: .copyable aria-label='Functions' }

SetHeartPicked () {: aria-label='Functions' }

{: .abp .tooltip .badge }

void SetHeartPicked ( ) {: .copyable aria-label='Functions' }

SetNextStage () {: aria-label='Functions' }

{: .abp .tooltip .badge }

void SetNextStage ( ) {: .copyable aria-label='Functions' }

This function teleports you directly to the next stage without playing the leveltransition or updating the floors backdrop. Use other functions to fix those issues.

SetRedHeartDamage () {: aria-label='Functions' }

{: .abp .tooltip .badge }

void SetRedHeartDamage ( ) {: .copyable aria-label='Functions' }

SetStage () {: aria-label='Functions' }

{: .abp .tooltip .badge }

void SetStage ( LevelStage Stage, StageType StageType {: .copyable aria-label='Functions' }

for SetStage/SetNextStage to have effect, call Init afterward

SetStateFlag () {: aria-label='Functions' }

{: .abp .tooltip .badge }

void SetStateFlag ( StateFlag StateFlag, boolean Val ) {: .copyable aria-label='Functions' }

ShowMap () {: aria-label='Functions' }

{: .abp .tooltip .badge }

void ShowMap ( ) {: .copyable aria-label='Functions' }

Show's all map (world/sun card effect) except the top secret room.

ShowName () {: aria-label='Functions' }

{: .abp .tooltip .badge }

void ShowName ( boolean Sticky ) {: .copyable aria-label='Functions' }

UncoverHiddenDoor () {: aria-label='Functions' }

{: .abp .tooltip .badge }

void UncoverHiddenDoor ( int CurrentRoomIdx, DoorSlot Slot ) {: .copyable aria-label='Functions' }

Uncovers the door on both sides by modifying the saved grid entities for neighboring room.

Update () {: aria-label='Functions' }

{: .abp .tooltip .badge }

void Update ( ) {: .copyable aria-label='Functions' }

UpdateVisibility () {: aria-label='Functions' }

{: .abp .tooltip .badge }

void UpdateVisibility ( ) {: .copyable aria-label='Functions' }

???- note "Notes" Whenever you update the visibility of a room on the minimap, it won't update the map automatically, since it is cached. You have to explicitly call UpdateVisibility() afterwards to apply any changes.

???- example "Example Code" This code

    -- Local variables
    local game = Game()
    local level = game:GetLevel()

    -- Give the player the Compass effect, which will display all of the floor's special rooms on the mini-map
    level:ApplyCompassEffect()

    -- Remove the icon for the Treasure Room specifically
    local treasureIndex = level:QueryRoomTypeIndex(RoomType.ROOM_TREASURE, false, RNG())
    local treasureRoom = level:GetRoomByIdx(treasureIndex)
    treasureRoom.DisplayFlags = 0

    -- Since the mini-map is cached, changing display flags won't update it unless we explicitly call this function
    level:UpdateVisibility()

DungeonReturnPosition () {: aria-label='Functions' }

{: .abp .tooltip .badge }

Vector DungeonReturnPosition {: .copyable aria-label='Functions' }

Variables

DungeonReturnRoomIndex {: aria-label='Variables' }

{: .abp .tooltip .badge }

int DungeonReturnRoomIndex {: .copyable aria-label='Variables' }

EnterDoor {: aria-label='Variables' }

{: .abp .tooltip .badge }

int EnterDoor {: .copyable aria-label='Variables' }

This value defines on which doorslot you entered the room.

???+ bug "Bugs" Changing this value has no impact on anything. the EnterDoor value is always determined by the LeaveDoor Value and the game itself.

GreedModeWave {: aria-label='Variables' }

{: .abp .tooltip .badge }

int GreedModeWave {: .copyable aria-label='Variables' }

LeaveDoor {: aria-label='Variables' }

{: .abp .tooltip .badge }

int LeaveDoor {: .copyable aria-label='Variables' }

This value defines on which doorslot you are positioned after the transition. You will always end up at the oposite side of the door specified. Example: LeaveDoor=1 (Up0) will position you at Doorslot Down0 (Logic: Doorslot+2)

???- note "Notes" if level.LeaveDoor is set to anything other than -1, the function will transition based on the room you are currently in.

Last updated