Binding of Isaac - Afterbirth+ Lua Reference/Guide
|
Public Attributes | |
integer | GridIndex |
index in the level grid (always top left) More... | |
integer | SafeGridIndex |
index in the level grid (not always top left, but is guaranteed to point to the room. this is important for LTL shapes!) More... | |
integer | ListIndex |
index in the room list More... | |
RoomDescriptorData & | Data |
RoomDescriptorData & | OverrideData |
DoorSet | AllowedDoors |
Contains just on load swapped data (in cases like minibosses, or other such events) More... | |
integer | DisplayFlags |
what is visible on minimap More... | |
integer | VisitedCount |
how often the room has been visited More... | |
boolean | Clear |
integer | ClearCount |
boolean | PressurePlatesTriggered |
boolean | SacrificeDone |
boolean | ChallengeDone |
boolean | SurpriseMiniboss |
boolean | HasWater |
boolean | NoReward |
integer | PoopCount |
bool HasWater; More... | |
integer | PitsCount |
integer | DecorationSeed |
integer | SpawnSeed |
used to spawn entities at room load and initialize enemy drop seeds More... | |
integer | AwardSeed |
used to spawn clear awards (normal, miniboss, boss rooms) and initialize shop items (shop, devil rooms) More... | |
integer | ShopItemIdx |
integer | ShopItemDiscountIdx |
integer | DeliriumDistance |
Helper for The Void stage, holds the distance to the Delirium boss in room nr. More... | |
DoorSet RoomDescriptor::AllowedDoors |
Contains just on load swapped data (in cases like minibosses, or other such events)
integer RoomDescriptor::AwardSeed |
used to spawn clear awards (normal, miniboss, boss rooms) and initialize shop items (shop, devil rooms)
boolean RoomDescriptor::ChallengeDone |
boolean RoomDescriptor::Clear |
integer RoomDescriptor::ClearCount |
room is clear, don't spawn enemies when visiting bool Clear;
RoomDescriptorData& RoomDescriptor::Data |
integer RoomDescriptor::DecorationSeed |
bool AltBossMusic; used for cosmetic stuff like backdrops, room decorations, shopkeeper skins
integer RoomDescriptor::DeliriumDistance |
Helper for The Void stage, holds the distance to the Delirium boss in room nr.
integer RoomDescriptor::DisplayFlags |
Indicates what is visible on the minimap.
Display Flags (bitwise):
1 << -1 -- Invisible
1 << 0 -- Visible
1 << 1 -- Room Shadow
1 << 2 -- Show Icon
The flags are hard to interpret, but here are some examples:
000 = invisible, this is how most rooms start
101 = standard room visibility, this includes rooms that are adjacent and you haven't actively visited. This will usually show icons.
011 = secret room, locked rooms, sac rooms pre-entry*
111 = 011 rooms after entry, but also the rooms directly adjacent to them* (applied after entry)
* If you have spelunker's hat, bit 1 is completely unused. All special rooms will have the normal behavior of either 000 or 101. iirc this is unique to spelunker's hat, mapping items follow the normal rules.
From this my best guess is that bits 1 and 2 are special rendering (display hehe) flags that may have more meaning down below. The important bit for using them is minding that they're used differently mostly for special rooms. As far as I've seen, 001 is completely unused. 010, 100, and 110 may be used for compass or blue map, I don't remember. I think they use 100
integer RoomDescriptor::GridIndex |
index in the level grid (always top left)
This will always return the top left coordinate of the room on the levelgrid. Therefore, it will return an index not part of the actual room, when checking this value for J-shaped rooms. (See graphic below)
boolean RoomDescriptor::HasWater |
integer RoomDescriptor::ListIndex |
index in the room list
boolean RoomDescriptor::NoReward |
RoomDescriptorData& RoomDescriptor::OverrideData |
Tim's reminder to himself: The room variant is in Data. Because Room::Init uses a mix of datas, one from level layout and one from replacement data like minibosses, we need to hold the new room data somewhere.
integer RoomDescriptor::PitsCount |
integer RoomDescriptor::PoopCount |
bool HasWater;
boolean RoomDescriptor::PressurePlatesTriggered |
boolean RoomDescriptor::SacrificeDone |
integer RoomDescriptor::SafeGridIndex |
index in the level grid (not always top left, but is guaranteed to point to the room. this is important for LTL shapes!)
This will always return the top left coordinate of the room on the levelgrid, except for J-shaped rooms, where it returns the top right index. (see graphic below)
integer RoomDescriptor::ShopItemDiscountIdx |
integer RoomDescriptor::ShopItemIdx |
integer RoomDescriptor::SpawnSeed |
used to spawn entities at room load and initialize enemy drop seeds
boolean RoomDescriptor::SurpriseMiniboss |
integer RoomDescriptor::VisitedCount |
how often the room has been visited