Skip to main content

CustomStageTSConfig

This is the format of a custom stage in the "isaacscript" section of the "tsconfig.json" file.

The contents of this interface are used to create a "tsconfig-isaacscript-section-schema.json" schema with the "ts-json-schema-generator" library.

The contents of this interface are validated at run-time against the schema.

The CustomStageLua interface extends this, adding room metadata.

Properties

name

name: string

Mandatory. The name of the custom stage.

Defined in

packages/isaacscript-common/src/interfaces/CustomStageTSConfig.ts:15


xmlPath

xmlPath: string

Mandatory. The path to the XML file that contains the rooms for the custom stage (created with Basement Renovator).

Defined in

packages/isaacscript-common/src/interfaces/CustomStageTSConfig.ts:21


roomVariantPrefix

roomVariantPrefix: number

Mandatory. An arbitrarily chosen prefix in the range of 101-999 that will be unique to this stage.

Use a value of 100 when testing locally. When publishing to the workshop or otherwise distributing your mod, make sure that you have chosen a prefix that does not conflict with any other mods. You can find a list of registered room variant prefixes on the IsaacScript website: https://isaacscript.github.io/main/custom-stages

Minimum

100

Maximum

999

Defined in

packages/isaacscript-common/src/interfaces/CustomStageTSConfig.ts:35


baseStage

Optional baseStage: number

Optional. An integer between 2 and 13, corresponding to the LevelStage enum. This is the number of the stage that will be warped to and used as a basis for the stage by the level generation algorithm.

For example, if you wanted to have a custom stage with a small amount of rooms per floor, then you should choose 2 as a base. (This would copy the number of rooms that would appear in Basement 2.) And if you wanted to have a custom stage with the maximum amount of rooms, then you should choose 13 as a base. (This would copy the number of rooms that would appear on The Void.)

It is not possible to use Basement 1 as a base stage due to conflicts with the Game.SetStage method.

If not specified, LevelStage.BASEMENT_2 (2) will be used.

Minimum

2

Maximum

13

Defined in

packages/isaacscript-common/src/interfaces/CustomStageTSConfig.ts:56


baseStageType

Optional baseStageType: number

Optional. An integer between 0 and 5, corresponding to the StageType enum. This is the number of the stage type that will be warped to and used as a basis for the stage by the level generation algorithm.

If not specified, StageType.ORIGINAL (0) will be used.

Minimum

0

Maximum

5

Defined in

packages/isaacscript-common/src/interfaces/CustomStageTSConfig.ts:68


music

Optional music: string

Optional. A string that represents the name of the music track from the "content/music.xml" file that corresponds to this custom stage. It will be manually played upon entering the stage.

If not specified, the same music track as the base stage will be used.

Defined in

packages/isaacscript-common/src/interfaces/CustomStageTSConfig.ts:76


backdropPNGPaths

Optional backdropPNGPaths: Object

Optional. An object containing the paths to the backdrop graphics for the stage. (A backdrop is the graphics for the walls and floor.) If not specified, the graphics for Basement will be used.

Type declaration

NameTypeDescription
nFloorsstring[]An array that contains the full paths to the graphic files that are used for the floor in narrow rooms. (The "n" stands for "narrow"). You must have at least one path in this array, but you can specify more than one to randomly add extra variety (like the vanilla stages do). For an example of this, see the vanilla file "resources/gfx/backdrop/01_basement_nfloor.png".
lFloorsstring[]An array that contains the full paths to the graphic files that are used for the floor in L rooms. You must have at least one path in this array, but you can specify more than one to randomly add extra variety (like the vanilla stages do). For an example of this, see the vanilla file "resources/gfx/backdrop/01_lbasementfloor.png".
wallsstring[]An array that contains the full paths to the graphic files that are used for the walls of the floor. You must have at least one path in this array, but you can specify more than one to randomly add extra variety (like the vanilla stages do). For an example of this, see the vanilla file "resources/gfx/backdrop/01_basement.png". (In the vanilla file, they concatenate all four variations together into one PNG file. However, for the custom stages feature, you must separate each wall variation into a separate file.)
cornersstring[]An array that contains the full paths to the graphic files for the stage's corners. You must have at least one path in this array, but you can specify more than one to randomly add extra variety (like the vanilla stages do). For an example of this, see the vanilla file "resources/gfx/backdrop/01_basement.png". (In the vanilla file, they concatenate both variations together into one PNG file and put it in the top right hand corner. The corners are shown in the top right hand corner of the file, with two different variations concatenated together. However, for the custom stages feature, you must separate each corner variation into a separate file (and put it in a different file from the walls).

Defined in

packages/isaacscript-common/src/interfaces/CustomStageTSConfig.ts:83


decorationsPNGPath

Optional decorationsPNGPath: string

Optional. The full path to the spritesheet that contains the graphics of the decorations for the floor.

If not specified, the vanilla Basement decorations spritesheet will be used. For reference, this is located at: resources/gfx/grid/props_01_basement.png

If you want to have custom animations for your decorations, then do not use this field and use decorationsANM2Path instead.

Defined in

packages/isaacscript-common/src/interfaces/CustomStageTSConfig.ts:145


decorationsANM2Path

Optional decorationsANM2Path: string

Optional. The full path to the anm2 file that contains the custom animations for the decorations of the floor.

If not specified, the vanilla Basement decorations spritesheet will be used. For reference, this is located at: resources/gfx/grid/props_01_basement.png

If you do not want to have custom animations for your decorations, then do not use this field and use decorationsPNGPath instead.

Defined in

packages/isaacscript-common/src/interfaces/CustomStageTSConfig.ts:157


rocksPNGPath

Optional rocksPNGPath: string

Optional. The full path to the spritesheet that contains the graphics of the rocks/blocks/urns for the floor.

If specified, it is assumed that you have your own custom rock alt type, and all vanilla rewards/enemies that spawn from urns will be automatically removed. Use the POST_GRID_ENTITY_BROKEN callback to make your own custom rewards. Or, if you want to emulate a vanilla urn/mushroom/skull/polyp/bucket, use the spawnRockAltReward helper function.

If not specified, the vanilla Basement rocks spritesheet will be used. For reference, this is located at: resources-dlc3/gfx/grid/rocks_basement.png

If you want to have custom animations for your rocks, then do not use this field and use rocksANM2Path instead.

Defined in

packages/isaacscript-common/src/interfaces/CustomStageTSConfig.ts:174


rocksANM2Path

Optional rocksANM2Path: string

Optional. The full path to the anm2 file that contains the custom animations for the rocks/blocks/urns of the floor.

If specified, it is assumed that you have your own custom rock alt type, and all vanilla rewards/enemies that spawn from urns will be automatically removed. Use the POST_GRID_ENTITY_BROKEN callback to make your own custom rewards. Or, if you want to emulate a vanilla urn/mushroom/skull/polyp/bucket, use the spawnRockAltReward helper function.

If not specified, the vanilla Basement rocks spritesheet will be used. For reference, this is located at: resources-dlc3/gfx/grid/rocks_basement.png

If you do not want to have custom animations for your rocks, then do not use this field and use rocksPNGPath instead.

Defined in

packages/isaacscript-common/src/interfaces/CustomStageTSConfig.ts:191


pitsPNGPath

Optional pitsPNGPath: string

Optional. The full path to the spritesheet that contains the graphics of the pits for the floor.

If not specified, the vanilla Basement pits spritesheet will be used. For reference, this is located at: resources/gfx/grid/grid_pit.png

If you do not want to have custom animations for your pits, then do not use this field and use pitsANM2Path instead.

Defined in

packages/isaacscript-common/src/interfaces/CustomStageTSConfig.ts:203


pitsANM2Path

Optional pitsANM2Path: string

Optional. The full path to the anm2 file that contains the custom animations for the pits of the floor.

If not specified, the vanilla Basement pits spritesheet will be used. For reference, this is located at: resources/gfx/grid/grid_pit.png

If you do not want to have custom animations for your pits, then do not use this field and use pitsPNGPath instead.

Defined in

packages/isaacscript-common/src/interfaces/CustomStageTSConfig.ts:215


doorPNGPaths

Optional doorPNGPaths: Object

Optional. A collection of paths that contain graphics for the doors of the floor. If not specified, the doors for Basement will be used.

Type declaration

NameTypeDescription
normal?stringOptional. The full path to the spritesheet that contains the graphics of the normal doors for the floor. If not specified, the vanilla Basement door spritesheet will be used. For reference, this is located at: resources/gfx/grid/door_01_normaldoor.png
treasureRoom?stringOptional. The full path to the spritesheet that contains the graphics of the Treasure Room doors for the floor. If not specified, the vanilla Basement door spritesheet will be used. For reference, this is located at: resources/gfx/grid/door_02_treasureroomdoor.png
bossRoom?stringOptional. The full path to the spritesheet that contains the graphics of the Boss Room doors for the floor. If not specified, the vanilla Basement door spritesheet will be used. For reference, this is located at: resources/gfx/grid/door_10_bossroomdoor.png
secretRoom?stringOptional. The full path to the spritesheet that contains the graphics of the Secret Room and Super Secret Room doors for the floor. If not specified, the vanilla Basement door spritesheet will be used. For reference, this is located at: resources/gfx/grid/door_08_holeinwall.png
arcade?stringOptional. The full path to the spritesheet that contains the graphics of the arcade doors for the floor. If not specified, the vanilla Basement door spritesheet will be used. For reference, this is located at: resources/gfx/grid/door_05_arcaderoomdoor.png
curseRoom?stringOptional. The full path to the spritesheet that contains the graphics of the Curse Room doors for the floor. If not specified, the vanilla Basement door spritesheet will be used. For reference, this is located at: resources/gfx/grid/door_04_selfsacrificeroomdoor.png
normalChallengeRoom?stringOptional. The full path to the spritesheet that contains the graphics of the normal Challenge Room doors for the floor. If not specified, the vanilla Basement door spritesheet will be used. For reference, this is located at: resources/gfx/grid/door_03_ambushroomdoor.png
bossChallengeRoom?stringOptional. The full path to the spritesheet that contains the graphics of the Boss Challenge Room doors for the floor. If not specified, the vanilla Basement door spritesheet will be used. For reference, this is located at: resources/gfx/grid/door_09_bossambushroomdoor.png
devilRoom?stringOptional. The full path to the spritesheet that contains the graphics of the Devil Room doors for the floor. If not specified, the vanilla Basement door spritesheet will be used. For reference, this is located at: resources/gfx/grid/door_07_devilroomdoor.png
angelRoom?stringOptional. The full path to the spritesheet that contains the graphics of the Angel Room doors for the floor. If not specified, the vanilla Basement door spritesheet will be used. For reference, this is located at: resources/gfx/grid/door_07_holyroomdoor.png
bossRush?stringOptional. The full path to the spritesheet that contains the graphics of the Boss Rush doors for the floor. If not specified, the vanilla Basement door spritesheet will be used. For reference, this is located at: resources/gfx/grid/door_15_bossrushdoor.png
chestRoom?stringOptional. The full path to the spritesheet that contains the graphics of the Chest Room doors for the floor. If not specified, the vanilla Basement door spritesheet will be used. For reference, this is located at: resources/gfx/grid/door_02b_chestroomdoor.png

Defined in

packages/isaacscript-common/src/interfaces/CustomStageTSConfig.ts:221


shadows

Optional shadows: Object

Optional. An array of shadow objects that describe the graphics for the custom shadows of the floor. (In this context, "shadows" are the outlines from things on the roof. For example, in Basement, a shadow of a sideways V is used, among others.) If not specified, no extra shadows will be drawn.

Type declaration

NameTypeDescription
1x1?CustomStageShadow[]Optional. An array containing the shadows that will be used in rooms of shape RoomShape.SHAPE_1x1 (1), RoomShape.IH (2), and RoomShape.IV (3). If more than one shadow is specified, one will be randomly chosen for each room. If not specified, no extra shadows will be drawn in these room shapes.
1x2?CustomStageShadow[]Optional. An array containing the shadows that will be used in rooms of shape RoomShape.SHAPE_1x2 (4) and RoomShape.IIV (5). If more than one shadow is specified, one will be randomly chosen for each room. If not specified, no extra shadows will be drawn in these room shapes.
2x1?CustomStageShadow[]Optional. An array containing the shadows that will be used in rooms of shape RoomShape.SHAPE_2x1 (6) and RoomShape.IIH (7). If more than one shadow is specified, one will be randomly chosen for each room. If not specified, no extra shadows will be drawn in these room shapes.
2x2?CustomStageShadow[]Optional. An array containing the shadows that will be used in rooms of shape RoomShape.SHAPE_2x2 (8), RoomShape.LTL (9), RoomShape.LTR (10), RoomShape.LBL (11), and RoomShape.LBR (12). If more than one shadow is specified, one will be randomly chosen for each room. If not specified, no extra shadows will be drawn in these room shapes.

Defined in

packages/isaacscript-common/src/interfaces/CustomStageTSConfig.ts:337


bossPool

Optional bossPool: CustomStageBossPoolEntry[]

Optional. An array containing the bosses that should be used for the stage. This can include both vanilla bosses and modded bosses.

Defined in

packages/isaacscript-common/src/interfaces/CustomStageTSConfig.ts:384


versusScreen

Optional versusScreen: Object

Optional. A collection of colors used for in the boss "versus" screen for all of the bosses.

Note that these graphics will only be applied if one or more bosses are specified in the bossPool field.

Type declaration

NameTypeDescription
backgroundColor?{ r: number ; g: number ; b: number ; a: number }Optional. An object representing the color to use for the background of the boss "versus" screen. If not specified, the color for Basement 1 will be used. For a list of the colors that correspond to the vanilla stages, see versusScreenBackgroundColors.ts.
backgroundColor.rnumberMinimum 0 Maximum 1
backgroundColor.gnumberMinimum 0 Maximum 1
backgroundColor.bnumberMinimum 0 Maximum 1
backgroundColor.anumberMinimum 0 Maximum 1
dirtSpotColor?{ r: number ; g: number ; b: number ; a: number }Optional. An object representing the color to use for the dirt spots in the boss "versus" screen. (There are two dirt spots; one for the player and one for the boss.) If not specified, the color for Basement 1 will be used. For a list of the colors that correspond to the vanilla stages, see versusScreenDirtSpotColors.ts.
dirtSpotColor.rnumberMinimum 0 Maximum 1
dirtSpotColor.gnumberMinimum 0 Maximum 1
dirtSpotColor.bnumberMinimum 0 Maximum 1
dirtSpotColor.anumberMinimum 0 Maximum 1

Defined in

packages/isaacscript-common/src/interfaces/CustomStageTSConfig.ts:392