CustomStageTSConfig
Interfaces
Section titled “Interfaces”CustomStageTSConfig
Section titled “CustomStageTSConfig”Defined in: packages/isaacscript-common/src/interfaces/CustomStageTSConfig.ts:13
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
Section titled “Properties”
readonlyname:string
Defined in: packages/isaacscript-common/src/interfaces/CustomStageTSConfig.ts:15
Mandatory. The name of the custom stage.
xmlPath
Section titled “xmlPath”
readonlyxmlPath:string
Defined in: packages/isaacscript-common/src/interfaces/CustomStageTSConfig.ts:21
Mandatory. The path to the XML file that contains the rooms for the custom stage (created with Basement Renovator).
roomVariantPrefix
Section titled “roomVariantPrefix”
readonlyroomVariantPrefix:number
Defined in: packages/isaacscript-common/src/interfaces/CustomStageTSConfig.ts:35
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
Section titled “Minimum”100
Maximum
Section titled “Maximum”999
baseStage?
Section titled “baseStage?”
readonlyoptionalbaseStage?:number
Defined in: packages/isaacscript-common/src/interfaces/CustomStageTSConfig.ts:56
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
Section titled “Minimum”2
Maximum
Section titled “Maximum”13
baseStageType?
Section titled “baseStageType?”
readonlyoptionalbaseStageType?:number
Defined in: packages/isaacscript-common/src/interfaces/CustomStageTSConfig.ts:68
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
Section titled “Minimum”0
Maximum
Section titled “Maximum”5
music?
Section titled “music?”
readonlyoptionalmusic?:string
Defined in: packages/isaacscript-common/src/interfaces/CustomStageTSConfig.ts:76
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.
backdropPNGPaths?
Section titled “backdropPNGPaths?”
readonlyoptionalbackdropPNGPaths?:object
Defined in: packages/isaacscript-common/src/interfaces/CustomStageTSConfig.ts:83
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.
nFloors
Section titled “nFloors”
readonlynFloors: readonlystring[]
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”.
lFloors
Section titled “lFloors”
readonlylFloors: readonlystring[]
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”.
readonlywalls: readonlystring[]
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.)
corners
Section titled “corners”
readonlycorners: readonlystring[]
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).
decorationsPNGPath?
Section titled “decorationsPNGPath?”
readonlyoptionaldecorationsPNGPath?:string
Defined in: packages/isaacscript-common/src/interfaces/CustomStageTSConfig.ts:145
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.
decorationsANM2Path?
Section titled “decorationsANM2Path?”
readonlyoptionaldecorationsANM2Path?:string
Defined in: packages/isaacscript-common/src/interfaces/CustomStageTSConfig.ts:157
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.
rocksPNGPath?
Section titled “rocksPNGPath?”
readonlyoptionalrocksPNGPath?:string
Defined in: packages/isaacscript-common/src/interfaces/CustomStageTSConfig.ts:174
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.
rocksANM2Path?
Section titled “rocksANM2Path?”
readonlyoptionalrocksANM2Path?:string
Defined in: packages/isaacscript-common/src/interfaces/CustomStageTSConfig.ts:191
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.
pitsPNGPath?
Section titled “pitsPNGPath?”
readonlyoptionalpitsPNGPath?:string
Defined in: packages/isaacscript-common/src/interfaces/CustomStageTSConfig.ts:203
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.
pitsANM2Path?
Section titled “pitsANM2Path?”
readonlyoptionalpitsANM2Path?:string
Defined in: packages/isaacscript-common/src/interfaces/CustomStageTSConfig.ts:215
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.
doorPNGPaths?
Section titled “doorPNGPaths?”
readonlyoptionaldoorPNGPaths?:object
Defined in: packages/isaacscript-common/src/interfaces/CustomStageTSConfig.ts:221
Optional. A collection of paths that contain graphics for the doors of the floor. If not specified, the doors for Basement will be used.
normal?
Section titled “normal?”
readonlyoptionalnormal?:string
Optional. 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?
Section titled “treasureRoom?”
readonlyoptionaltreasureRoom?:string
Optional. 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?
Section titled “bossRoom?”
readonlyoptionalbossRoom?:string
Optional. 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?
Section titled “secretRoom?”
readonlyoptionalsecretRoom?:string
Optional. 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?
Section titled “arcade?”
readonlyoptionalarcade?:string
Optional. 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?
Section titled “curseRoom?”
readonlyoptionalcurseRoom?:string
Optional. 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?
Section titled “normalChallengeRoom?”
readonlyoptionalnormalChallengeRoom?:string
Optional. 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?
Section titled “bossChallengeRoom?”
readonlyoptionalbossChallengeRoom?:string
Optional. 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?
Section titled “devilRoom?”
readonlyoptionaldevilRoom?:string
Optional. 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?
Section titled “angelRoom?”
readonlyoptionalangelRoom?:string
Optional. 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?
Section titled “bossRush?”
readonlyoptionalbossRush?:string
Optional. 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?
Section titled “chestRoom?”
readonlyoptionalchestRoom?:string
Optional. 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
shadows?
Section titled “shadows?”
readonlyoptionalshadows?:object
Defined in: packages/isaacscript-common/src/interfaces/CustomStageTSConfig.ts:337
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.
readonlyoptional1x1?: readonlyCustomStageShadow[]
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.
readonlyoptional1x2?: readonlyCustomStageShadow[]
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.
readonlyoptional2x1?: readonlyCustomStageShadow[]
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.
readonlyoptional2x2?: readonlyCustomStageShadow[]
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.
bossPool?
Section titled “bossPool?”
readonlyoptionalbossPool?: readonlyCustomStageBossPoolEntry[]
Defined in: packages/isaacscript-common/src/interfaces/CustomStageTSConfig.ts:384
Optional. An array containing the bosses that should be used for the stage. This can include both vanilla bosses and modded bosses.
versusScreen?
Section titled “versusScreen?”
readonlyoptionalversusScreen?:object
Defined in: packages/isaacscript-common/src/interfaces/CustomStageTSConfig.ts:392
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.
backgroundColor?
Section titled “backgroundColor?”
readonlyoptionalbackgroundColor?:object
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.r
Section titled “backgroundColor.r”
readonlyr:number
Minimum
Section titled “Minimum”0
Maximum
Section titled “Maximum”1
backgroundColor.g
Section titled “backgroundColor.g”
readonlyg:number
Minimum
Section titled “Minimum”0
Maximum
Section titled “Maximum”1
backgroundColor.b
Section titled “backgroundColor.b”
readonlyb:number
Minimum
Section titled “Minimum”0
Maximum
Section titled “Maximum”1
backgroundColor.a
Section titled “backgroundColor.a”
readonlya:number
Minimum
Section titled “Minimum”0
Maximum
Section titled “Maximum”1
dirtSpotColor?
Section titled “dirtSpotColor?”
readonlyoptionaldirtSpotColor?:object
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.r
Section titled “dirtSpotColor.r”
readonlyr:number
Minimum
Section titled “Minimum”0
Maximum
Section titled “Maximum”1
dirtSpotColor.g
Section titled “dirtSpotColor.g”
readonlyg:number
Minimum
Section titled “Minimum”0
Maximum
Section titled “Maximum”1
dirtSpotColor.b
Section titled “dirtSpotColor.b”
readonlyb:number
Minimum
Section titled “Minimum”0
Maximum
Section titled “Maximum”1
dirtSpotColor.a
Section titled “dirtSpotColor.a”
readonlya:number
Minimum
Section titled “Minimum”0
Maximum
Section titled “Maximum”1
CustomStageShadow
Section titled “CustomStageShadow”Defined in: packages/isaacscript-common/src/interfaces/CustomStageTSConfig.ts:466
A description of a custom stage shadow. (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.)
Properties
Section titled “Properties”pngPath
Section titled “pngPath”
readonlypngPath:string
Defined in: packages/isaacscript-common/src/interfaces/CustomStageTSConfig.ts:473
The full path to the shadow overlay PNG file.
For an example of a vanilla shadow overlay, see:
resources/gfx/overlays/basement/1x1_overlay_1.png
color?
Section titled “color?”
readonlyoptionalcolor?:object
Defined in: packages/isaacscript-common/src/interfaces/CustomStageTSConfig.ts:481
Optional. An object representing the color used for the shadow.
If not specified, an object of { r: 0, g: 0, b: 0, a: 0.25 } will be used (which corresponds
to 75% faded black).
readonlyr:number
Minimum
Section titled “Minimum”0
Maximum
Section titled “Maximum”1
g:
number
Minimum
Section titled “Minimum”0
Maximum
Section titled “Maximum”1
b:
number
Minimum
Section titled “Minimum”0
Maximum
Section titled “Maximum”1
a:
number
Minimum
Section titled “Minimum”0
Maximum
Section titled “Maximum”1
CustomStageBossPoolEntry
Section titled “CustomStageBossPoolEntry”Defined in: packages/isaacscript-common/src/interfaces/CustomStageTSConfig.ts:512
An object that represents a possible boss for a custom stage. This can be for a vanilla boss or a custom boss.
Properties
Section titled “Properties”
readonlyname:string
Defined in: packages/isaacscript-common/src/interfaces/CustomStageTSConfig.ts:517
The name of the boss. This should correspond to the entry for the boss in the “entities2.xml” file.
subType
Section titled “subType”
readonlysubType:number
Defined in: packages/isaacscript-common/src/interfaces/CustomStageTSConfig.ts:535
The arbitrary sub-type chosen for this boss, ranging between 1 and 999. You must set the boss rooms for this boss to this sub-type in Basement Renovator by right-clicking on the room on the right-hand-side.
It does not matter if the arbitrary sub-type overlaps with any of the vanilla BossID values
(e.g. vanilla Boss Room sub-types in “00.special_rooms.stb”). It also does not matter if this
value overlaps with the values from other mods.
If you are creating an entry for a vanilla boss, it is recommended that you match the sub-type
with the corresponding vanilla BossID value. This will make things a bit easier to understand
for people working on your mod, but is not a hard requirement.
Minimum
Section titled “Minimum”1
Maximum
Section titled “Maximum”999
weight
Section titled “weight”
readonlyweight:number
Defined in: packages/isaacscript-common/src/interfaces/CustomStageTSConfig.ts:542
The weight of the boss. This is used when randomly selecting which boss to use for the floor. For example, use a value of 1 if you want this boss to be equally likely as any other boss, 0.5 if you want it to be half as likely, 2 if you want it to be twice as likely, and so on.
versusScreen?
Section titled “versusScreen?”
readonlyoptionalversusScreen?:object
Defined in: packages/isaacscript-common/src/interfaces/CustomStageTSConfig.ts:545
Optional. A collection of sprites used for the boss on the “versus” screen.
namePNGPath
Section titled “namePNGPath”
readonlynamePNGPath:string
Mandatory. The full path to the spritesheet that contains the graphics of the name of the boss that will be displayed on the top of the boss “versus” screen.
If not specified, a sprite showing “???” will be used.
portraitPNGPath
Section titled “portraitPNGPath”
readonlyportraitPNGPath:string
Mandatory. The full path to the spritesheet that contains the portrait of the boss that will be displayed on the right side of the boss “versus” screen.
If not specified, a sprite showing “???” will be used.
CustomStageRoomMetadata
Section titled “CustomStageRoomMetadata”Defined in: packages/isaacscript-common/src/interfaces/CustomStageTSConfig.ts:587
Metadata about a custom stage room. Each custom stage object contains an array with metadata for each room.
Properties
Section titled “Properties”
readonlytype:number
Defined in: packages/isaacscript-common/src/interfaces/CustomStageTSConfig.ts:588
variant
Section titled “variant”
readonlyvariant:number
Defined in: packages/isaacscript-common/src/interfaces/CustomStageTSConfig.ts:589
subType
Section titled “subType”
readonlysubType:number
Defined in: packages/isaacscript-common/src/interfaces/CustomStageTSConfig.ts:590
readonlyshape:number
Defined in: packages/isaacscript-common/src/interfaces/CustomStageTSConfig.ts:591
doorSlotFlags
Section titled “doorSlotFlags”
readonlydoorSlotFlags:number
Defined in: packages/isaacscript-common/src/interfaces/CustomStageTSConfig.ts:592
weight
Section titled “weight”
readonlyweight:number
Defined in: packages/isaacscript-common/src/interfaces/CustomStageTSConfig.ts:593
Type Aliases
Section titled “Type Aliases”CustomStageLua
Section titled “CustomStageLua”CustomStageLua =
Immutable<CustomStageLuaUnsafe>
Defined in: packages/isaacscript-common/src/interfaces/CustomStageTSConfig.ts:581
An object that represents a custom stage. The “customStageMetadata.lua” file contains an array of these objects. Besides the room metadata, the data is the same as what is specified inside the “tsconfig.json” file.
The CustomStage interface extends this, adding more data.
