Skip to main content

StageAPICallback

Enumeration Members

POST_CHANGE_ROOM_GFX

POST_CHANGE_ROOM_GFX = "POST_CHANGE_ROOM_GFX"

Defined in

mods/StageAPIEnums.ts:4


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

mods/StageAPIEnums.ts:7


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

mods/StageAPIEnums.ts:13


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

mods/StageAPIEnums.ts:19


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

mods/StageAPIEnums.ts:25


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

mods/StageAPIEnums.ts:31


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

mods/StageAPIEnums.ts:37


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

mods/StageAPIEnums.ts:43


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

mods/StageAPIEnums.ts:52


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

mods/StageAPIEnums.ts:58


POST_ROOM_LOAD

POST_ROOM_LOAD = "POST_ROOM_LOAD"

Called when a room is loaded. Takes no return value.

Defined in

mods/StageAPIEnums.ts:61


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

mods/StageAPIEnums.ts:67


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

mods/StageAPIEnums.ts:73


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

mods/StageAPIEnums.ts:79


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

mods/StageAPIEnums.ts:85


PRE_BOSS_SELECT

PRE_BOSS_SELECT = "PRE_BOSS_SELECT"

If a boss is returned, uses it instead.

Defined in

mods/StageAPIEnums.ts:88


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

mods/StageAPIEnums.ts:91


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

mods/StageAPIEnums.ts:99


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

mods/StageAPIEnums.ts:110


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

mods/StageAPIEnums.ts:116


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

mods/StageAPIEnums.ts:119


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

mods/StageAPIEnums.ts:125


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

mods/StageAPIEnums.ts:133


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

mods/StageAPIEnums.ts:141


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

mods/StageAPIEnums.ts:147


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

mods/StageAPIEnums.ts:153


PRE_UPDATE_GRID_GFX

PRE_UPDATE_GRID_GFX = "PRE_UPDATE_GRID_GFX"

Allows returning grid gfx to use in place of the stage's.

Defined in

mods/StageAPIEnums.ts:156