Afterbirth+ Documentation
  • README
  • beta
    • docs
      • Class "RoomConfig::Entry"
      • Class "ItemConfig::Card"
      • Class "PlayerTypes::PosVel"
      • enums
        • Enum "DoorVariant"
        • CollectibleType
        • Enum "ActionTriggers"
        • Enum "Card"
        • Enum "NpcState"
        • Enum "EffectVariant"
        • Enum "EntityGridCollisionClass"
        • Enum "EntityFlag"
        • Enum "LocustSubtypes"
        • Enum "LevelCurse"
        • Enum "GridRooms"
        • Enum "TrinketType"
        • Enum "SortingLayer"
        • Enum "ItemType"
        • Enum "GridCollisionClass"
        • Enum "ModCallbacks"
        • Enum "DoorSlot"
        • Enum "CacheFlag"
        • Enum "PillEffect"
        • Enum "EntityCollisionClass"
        • Enum "ItemPoolType"
        • Enum "PickupPrice"
        • Enum "InputHook"
        • Enum "ButtonAction"
        • Enum "PlayerSpriteLayer"
        • Enum "Keyboard"
        • Enum "GameStateFlag"
        • Enum "PillColor"
        • Enum "CoinSubType"
        • Enum "PlayerForm"
        • Enum "PickupVariant"
        • Enum "GridEntityType"
        • Enum "EntityPartition"
        • Enum "SeedEffect"
        • Enum "RoomShape"
        • Enum "Mouse"
        • Enum "TearFlags"
        • Enum "Music"
        • Enum "BabySubType"
        • Enum "BombVariant"
        • Enum "DoorState"
        • Enum "Challenge"
        • Enum "TearVariant"
        • Enum "EntityType"
        • Enum "SoundEffect"
        • Enum "FamiliarVariant"
        • Enum "PlayerType"
        • Enum "Difficulty"
        • Enum "DamageFlag"
        • Enum "Direction"
        • Enum "KeySubType"
        • Enum "LaserOffset"
        • Enum "ProjectileFlags"
        • Enum "LevelStage"
        • Enum "PlayerItemState"
        • Enum "LevelStateFlag"
        • Enum "ChestSubType"
        • Enum "ProjectileVariant"
        • Enum "WeaponType"
        • Enum "RoomType"
        • Enum "NullItemID"
        • Enum "StageType"
        • Enum "HeartSubType"
        • Enum "BombSubType"
      • Class "Isaac"
      • Class "ProjectileParams"
      • Class "Font"
      • Class "ItemPool"
      • Class "GridEntityRock"
      • tutorials
        • Class "[Tutorial]Rendertext"
        • Tutorial: Example Project
        • Class "XMLFiledocumentation"
        • Class "Writingscreenshaders"
        • Class "DebugConsole"
        • [Tutorial] Adding Costumes to items without LUA
        • Class "Usingadditional.luaFiles"
        • [Tutorial] Debugging with ZeroBrane Studio
      • Class "CppContainer::Vector::ItemConfigList"
      • Class "EntityProjectile"
      • Class "CppContainer::ArrayProxy"
      • Class "CppContainer::Vector::CardConfigList"
      • Class "PathFinder"
      • Class "ItemConfig::PillEffect"
      • Class "CppContainer::Vector::EffectList"
      • Class "RoomDescriptor"
      • Class "GridEntity"
      • Class "GridEntityPoop"
      • PLACEHOLDER
      • Class "TearParams"
      • Class "GridEntityPit"
      • Class "EntityFamiliar"
      • Class "MusicManager"
      • Class "SFXManager"
      • Lua API Documentation for The Binding of Isaac - Afterbirth+
      • Class "GridEntityTNT"
      • Class "EntityRef"
      • Class "Sprite"
      • Class "EntityBomb"
      • Class "EntityTear"
      • Class "QueueItemData"
      • Class "EntityPlayer"
      • Class "Vector"
      • Class "Entity"
      • Class "ItemConfig::Config"
      • Class "CppContainer::ArrayProxy::RoomList"
      • Class "RNG"
      • Class "EntityPtr"
      • Class "Input"
      • Class "EntityPickup"
      • Class "EntityLaser"
      • Class "GridEntityPressurePlate"
      • Class "CppContainer::Vector::VectorList"
      • Class "Room"
      • Class "CppContainer::Vector::CostumeConfigList"
      • Class "GridEntityDesc"
      • Class "Level"
      • Class "RoomConfig::Spawn"
      • Class "Color"
      • Class "KColor"
      • Class "TemporaryEffect"
      • Class "EntityKnife"
      • Class "Seeds"
      • Class "CppContainer::EntityList"
      • Class "GridEntityDoor"
      • Class "ShockwaveParams"
      • Class "ItemConfig::Costume"
      • Class "GridEntitySpikes"
      • Class "EntityEffect"
      • Class "CppContainer::Vector::PillConfigList"
      • Class "EntityNPC"
      • Class "RoomDescriptorData"
      • Class "ItemConfig::Item"
      • Class "RoomConfig::Room"
      • Class "Game"
      • Class "TemporaryEffects"
      • Class "PlayerTypes::ActiveItemDesc"
      • Class "Global Functions"
Powered by GitBook
On this page
  • Functions
  • AddAngelRoomChance () {: aria-label='Functions' }
  • AddCurse () {: aria-label='Functions' }
  • ApplyBlueMapEffect () {: aria-label='Functions' }
  • ApplyCompassEffect () {: aria-label='Functions' }
  • ApplyMapEffect () {: aria-label='Functions' }
  • CanOpenChallengeRoom () {: aria-label='Functions' }
  • CanSpawnDevilRoom () {: aria-label='Functions' }
  • CanStageHaveCurseOfLabyrinth () {: aria-label='Functions' }
  • ChangeRoom () {: aria-label='Functions' }
  • DisableDevilRoom () {: aria-label='Functions' }
  • ForceHorsemanBoss () {: aria-label='Functions' }
  • GetAbsoluteStage () {: aria-label='Functions' }
  • GetAngelRoomChance () {: aria-label='Functions' }
  • GetCanSeeEverything () {: aria-label='Functions' }
  • GetCurrentRoom () {: aria-label='Functions' }
  • GetCurrentRoomDesc () {: aria-label='Functions' }
  • GetCurrentRoomIndex () {: aria-label='Functions' }
  • GetCurseName () {: aria-label='Functions' }
  • GetCurses () {: aria-label='Functions' }
  • GetDevilAngelRoomRNG () {: aria-label='Functions' }
  • GetDungeonPlacementSeed () {: aria-label='Functions' }
  • GetEnterPosition () {: aria-label='Functions' }
  • GetHeartPicked () {: aria-label='Functions' }
  • GetLastBossRoomListIndex () {: aria-label='Functions' }
  • GetLastRoomDesc () {: aria-label='Functions' }
  • GetName () {: aria-label='Functions' }
  • GetNonCompleteRoomIndex () {: aria-label='Functions' }
  • GetPreviousRoomIndex () {: aria-label='Functions' }
  • GetRandomRoomIndex () {: aria-label='Functions' }
  • GetRoomByIdx () {: aria-label='Functions' }
  • GetRoomCount () {: aria-label='Functions' }
  • GetRooms () {: aria-label='Functions' }
  • GetStage () {: aria-label='Functions' }
  • GetStageType () {: aria-label='Functions' }
  • GetStartingRoomIndex () {: aria-label='Functions' }
  • GetStateFlag () {: aria-label='Functions' }
  • HasBossChallenge () {: aria-label='Functions' }
  • InitializeDevilAngelRoom () {: aria-label='Functions' }
  • IsAltStage () {: aria-label='Functions' }
  • IsDevilRoomDisabled () {: aria-label='Functions' }
  • IsNextStageAvailable () {: aria-label='Functions' }
  • QueryRoomTypeIndex () {: aria-label='Functions' }
  • RemoveCompassEffect () {: aria-label='Functions' }
  • RemoveCurse () {: aria-label='Functions' }
  • RemoveCurses () {: aria-label='Functions' }
  • SetCanSeeEverything () {: aria-label='Functions' }
  • SetHeartPicked () {: aria-label='Functions' }
  • SetNextStage () {: aria-label='Functions' }
  • SetRedHeartDamage () {: aria-label='Functions' }
  • SetStage () {: aria-label='Functions' }
  • SetStateFlag () {: aria-label='Functions' }
  • ShowMap () {: aria-label='Functions' }
  • ShowName () {: aria-label='Functions' }
  • UncoverHiddenDoor () {: aria-label='Functions' }
  • Update () {: aria-label='Functions' }
  • UpdateVisibility () {: aria-label='Functions' }
  • DungeonReturnPosition () {: aria-label='Functions' }
  • Variables
  • DungeonReturnRoomIndex {: aria-label='Variables' }
  • EnterDoor {: aria-label='Variables' }
  • GreedModeWave {: aria-label='Variables' }
  • LeaveDoor {: aria-label='Variables' }

Was this helpful?

  1. beta
  2. docs

Class "Level"

PreviousClass "GridEntityDesc"NextClass "RoomConfig::Spawn"

Last updated 4 years ago

Was this helpful?

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 ( 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' }

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

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

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

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

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

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

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

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

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

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

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

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

return true on success

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

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

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

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

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

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

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

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

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

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' }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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' }

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

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

for SetStage/SetNextStage to have effect, call Init afterward

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

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

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

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

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

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

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

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

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

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

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

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

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' }

Variables

DungeonReturnRoomIndex {: aria-label='Variables' }

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

EnterDoor {: aria-label='Variables' }

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' }

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

LeaveDoor {: aria-label='Variables' }

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.

{: .abp .tooltip .badge }

{: .abp .tooltip .badge }

{: .abp .tooltip .badge }

{: .abp .tooltip .badge }

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

{: .abp .tooltip .badge }

{: .abp .tooltip .badge }

{: .abp .tooltip .badge }

{: .abp .tooltip .badge }

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

{: .abp .tooltip .badge }

{: .abp .tooltip .badge }

{: .abp .tooltip .badge }

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

{: .abp .tooltip .badge }

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

{: .abp .tooltip .badge }

{: .abp .tooltip .badge }

{: .abp .tooltip .badge }

{: .abp .tooltip .badge }

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

{: .abp .tooltip .badge }

{: .abp .tooltip .badge }

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

{: .abp .tooltip .badge }

{: .abp .tooltip .badge }

{: .abp .tooltip .badge }

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

{: .abp .tooltip .badge }

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

{: .abp .tooltip .badge }

{: .abp .tooltip .badge }

{: .abp .tooltip .badge }

{: .abp .tooltip .badge }

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

{: .abp .tooltip .badge }

{: .abp .tooltip .badge }

{: .abp .tooltip .badge }

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

{: .abp .tooltip .badge }

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

{: .abp .tooltip .badge }

{: .abp .tooltip .badge }

{: .abp .tooltip .badge }

{: .abp .tooltip .badge }

{: .abp .tooltip .badge }

{: .abp .tooltip .badge }

{: .abp .tooltip .badge }

{: .abp .tooltip .badge }

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

{: .abp .tooltip .badge }

{: .abp .tooltip .badge }

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

{: .abp .tooltip .badge }

{: .abp .tooltip .badge }

{: .abp .tooltip .badge }

{: .abp .tooltip .badge }

{: .abp .tooltip .badge }

{: .abp .tooltip .badge }

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

{: .abp .tooltip .badge }

{: .abp .tooltip .badge }

{: .abp .tooltip .badge }

{: .abp .tooltip .badge }

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

{: .abp .tooltip .badge }

{: .abp .tooltip .badge }

{: .abp .tooltip .badge }

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

{: .abp .tooltip .badge }

{: .abp .tooltip .badge }

{: .abp .tooltip .badge }

{: .abp .tooltip .badge }

LevelCurse
LevelStage
LevelStage
Room
RoomDescriptor
RNG
Vector
RoomDescriptor
LevelStage
StageType
RoomDescriptor
LevelStage
StageType
RoomType
RNG
LevelCurse
LevelStage
StageType
StageType
DoorSlot
Vector