StageAPICallback
Enumeration Members
POST_CHANGE_ROOM_GFX
• POST_CHANGE_ROOM_GFX = "POST_CHANGE_ROOM_GFX"
Defined in
POST_CHECK_VALID_ROOM
• POST_CHECK_VALID_ROOM = "POST_CHECK_VALID_ROOM"
Return false to invalidate a room layout; return integer to specify new weight.
Defined in
POST_CUSTOM_DOOR_UPDATE
• POST_CUSTOM_DOOR_UPDATE = "POST_CUSTOM_DOOR_UPDATE"
Takes CustomDoorName as first callback parameter, and will only run if parameter not supplied or matches current door.
Defined in
POST_CUSTOM_GRID_PROJECTILE_HELPER_UPDATE
• POST_CUSTOM_GRID_PROJECTILE_HELPER_UPDATE = "POST_CUSTOM_GRID_PROJECTILE_HELPER_UPDATE"
Takes CustomGridTypeName as first callback parameter, and will only run if parameter not supplied or matches current grid.
Defined in
POST_CUSTOM_GRID_PROJECTILE_UPDATE
• POST_CUSTOM_GRID_PROJECTILE_UPDATE = "POST_CUSTOM_GRID_PROJECTILE_UPDATE"
Takes CustomGridTypeName as first callback parameter, and will only run if parameter not supplied or matches current grid.
Defined in
POST_CUSTOM_GRID_REMOVE
• POST_CUSTOM_GRID_REMOVE = "POST_CUSTOM_GRID_REMOVE"
Takes CustomGridTypeName as first callback parameter, and will only run if parameter not supplied or matches current grid.
Defined in
POST_CUSTOM_GRID_UPDATE
• POST_CUSTOM_GRID_UPDATE = "POST_CUSTOM_GRID_UPDATE"
Takes CustomGridTypeName as first callback parameter, and will only run if parameter not supplied or matches current grid.
Defined in
POST_GRID_UPDATE
• POST_GRID_UPDATE = "POST_GRID_UPDATE"
Calls when the number of grids changes or grids are reprocessed. This is when room grid graphics are changed.
Defined in
POST_OVERRIDDEN_GRID_BREAK
• POST_OVERRIDDEN_GRID_BREAK = "POST_OVERRIDDEN_GRID_BREAK"
Called when an overridden grid reaches its break state and is considered broken.
Param
Contains all deleted spawns from the grid.
Breaks on first non-undefined return.
Defined in
POST_ROOM_INIT
• POST_ROOM_INIT = "POST_ROOM_INIT"
Called when a room initializes. Can occur at two times, when a room is initially entered or when a room is loaded from save data. Takes no return values.
Defined in
POST_ROOM_LOAD
• POST_ROOM_LOAD = "POST_ROOM_LOAD"
Called when a room is loaded. Takes no return value.
Defined in
POST_SPAWN_CUSTOM_DOOR
• POST_SPAWN_CUSTOM_DOOR = "POST_SPAWN_CUSTOM_DOOR"
Takes CustomDoorName as first callback parameter, and will only run if parameter not supplied or matches current door.
Defined in
POST_SPAWN_CUSTOM_GRID
• POST_SPAWN_CUSTOM_GRID = "POST_SPAWN_CUSTOM_GRID"
Takes CustomGridTypeName as first callback parameter, and will only run if parameter not supplied or matches current grid.
Defined in
POST_STAGEAPI_NEW_ROOM
• POST_STAGEAPI_NEW_ROOM = "POST_STAGEAPI_NEW_ROOM"
All loading and processing of new room generation and old room loading is done, but the gfx has not changed yet.
Defined in
POST_STAGEAPI_NEW_ROOM_GENERATION
• POST_STAGEAPI_NEW_ROOM_GENERATION = "POST_STAGEAPI_NEW_ROOM_GENERATION"
Allows returning justGenerated and currentRoom. Run after normal room generation but before reloading old rooms.
Defined in
PRE_BOSS_SELECT
• PRE_BOSS_SELECT = "PRE_BOSS_SELECT"
If a boss is returned, uses it instead.
Defined in
PRE_CHANGE_ROOM_GFX
• PRE_CHANGE_ROOM_GFX = "PRE_CHANGE_ROOM_GFX"
Allows returning room gfx to use in place of the stage's.
Defined in
PRE_ROOM_LAYOUT_CHOOSE
• PRE_ROOM_LAYOUT_CHOOSE = "PRE_ROOM_LAYOUT_CHOOSE"
Takes 1 return value. If a table, uses it as the current room layout. Otherwise, chooses from
roomsList
with seeded RNG. Breaks on first return.
Called both on initial room load and when continuing game, before INIT.
Defined in
PRE_SELECT_ENTITY_LIST
• PRE_SELECT_ENTITY_LIST = "PRE_SELECT_ENTITY_LIST"
- Takes 4 return values, AddEntities, EntityList, StillAddRandom, and NoBreak.
- If the first value is false, cancels selecting the list.
- AddEntities and EntityList are lists of EntityData tables, described below.
- Usually StageAPI will pick one entity from the EntityList to add to the AddEntities table at random, but that can be changed with this callback.
- If StillAddRandom is true, StageAPI will still add a random entity from the entityList to addEntities, alongside ones you returned.
Defined in
PRE_SELECT_GRIDENTITY_LIST
• PRE_SELECT_GRIDENTITY_LIST = "PRE_SELECT_GRIDENTITY_LIST"
Takes 1 return value. If false, cancels selecting the list. If GridData, selects it to spawn. With no value, picks at random.
Defined in
PRE_SELECT_NEXT_STAGE
• PRE_SELECT_NEXT_STAGE = "PRE_SELECT_NEXT_STAGE"
Return a stage to go to instead of currentStage.NextStage or none.
Defined in
PRE_SPAWN_ENTITY
• PRE_SPAWN_ENTITY = "PRE_SPAWN_ENTITY"
Takes 1 return value. If false, cancels spawning the entity info. If a table, uses it as the entity info. Any return value breaks out of future callbacks.
Defined in
PRE_SPAWN_ENTITY_LIST
• PRE_SPAWN_ENTITY_LIST = "PRE_SPAWN_ENTITY_LIST"
Takes 1 return value. If false, cancels spawning the entity list. If a table, uses it as the entity list. Any return value breaks out of future callbacks. Every entity in the final entity list is spawned. Note that this entity list contains EntityInfo tables rather than EntityData, which contain persistent room-specific data. Both detailed below.
Defined in
PRE_SPAWN_GRID
• PRE_SPAWN_GRID = "PRE_SPAWN_GRID"
Takes 1 return value. If false
, cancels spawning the grid. If a table, uses it as the grid
data.
Any return value breaks out of future callbacks.
Defined in
PRE_STAGEAPI_NEW_ROOM
• PRE_STAGEAPI_NEW_ROOM = "PRE_STAGEAPI_NEW_ROOM"
Runs before most but not all stageapi room functionality. Guaranteed to run before any room loads.
Defined in
PRE_TRANSITION_RENDER
• PRE_TRANSITION_RENDER = "PRE_TRANSITION_RENDER"
Called before the custom room transition would render, for effects that should render before it.
Defined in
PRE_UPDATE_GRID_GFX
• PRE_UPDATE_GRID_GFX = "PRE_UPDATE_GRID_GFX"
Allows returning grid gfx to use in place of the stage's.