List of internal commands
This page is a list of internal commands usable in Internal scripting. For a list of simplified commands, see List of simplified commands.
This page contains detailed explanations for each command. For a quick reference, see the internal commands list on tolp.nl.
activateteleporter
activeteleporter
.activateteleporter
Make the first spawned teleporter in the room do its actively-teleporting animation, and change it to be the flashy teleporting color. This will happen even if the teleporter is already white (activeteleporter
).
It matters which one of activateteleporter
or activeteleporter
is run first, even if they happen on the same frame.
Touching the first spawned teleporter after this command is run will not overwrite your tsave.vvv
in 2.2 and below (in 2.3 and later your telesave cannot be overwritten anyway), and a teleporter activity zone will not spawn.
[2.2 and below: Calling this command in a room with no teleporters will trigger undefined behavior.]
activeteleporter
activateteleporter
.activeteleporter
Make the first spawned teleporter in the room light up, although it will not do the pulsating animation that an activated teleporter usually does. If the first spawned teleporter is already doing the pulsating animation and is doing the flashy teleport color (activateteleporter
), then this command will make it white, but it won't stop its animation.
It matters which one of activeteleporter
or activateteleporter
is run first, even if they happen on the same frame.
Touching the first spawned teleporter after this command is run will still overwrite your tsave.vvv
in 2.2 and below (in 2.3 and later your telesave cannot be overwritten anyway), and a teleporter activity zone will still spawn. However, if this is run after activateteleporter
, then it won't overwrite your tsave.vvv
, and a teleporter activity zone will not spawn.
[2.2 and below: Calling this command in a room with no teleporters will trigger undefined behavior.]
alarmoff
alarmoff
Turn the alarm off (see alarmon
).
alarmon
alarmon
Turn the alarm on. More specifically, it periodically plays sound effect 19 (crashing.wav
), every 20 frames, until it is turned off.
It is temporarily paused when either the ESC/ENTER/teleporter screen or "Game paused" screen is up.
The alarm is turned off when the player exits to the main menu, or when alarmoff
is called.
altstates
altstates
is plural, i.e. spelled with an S at the end.altstates (<state>)
Set the alt state to <state>
. By default, the alt state is 0
. Custom levels do not support alt states at all.
<state>
: The alt state to be set to. Different alt states will make different versions of rooms appear when you go to them in the main game map.1
- the version of the trinkets room in the ship with the giant trinkets warp
- the version of the Secret Lab spawn room with both obstructing pillars
2
- the version of the Secret Lab spawn room with one obstructing pillar destroyed
Note that the alternate version of Prize for the Reckless that removes the spikes to the trinket along with changing the roomname to "I Can't Believe You Got This Far" in No Death Mode or "Imagine Spikes There, if You Like" in Time Trials is not handled by alt states. Instead, the room is simply loaded differently if the game is in No Death Mode or in a Time Trial.
audiopause
audiopause (<state>)
Force-enable or disable the audio pause, regardless of the audio pause state in game options. By default, this is off, i.e. allow audio to keep playing during unfocus pause.
<state>
: The state to set the audio pause to. Eitheron
oroff
. Anything else has no effect.
This command is unused in the main game.
backgroundtext
backgroundtext
For the text box in memory, do not initiate an ACTION prompt when speak
or speak_active
is called.
befadein
befadein
Instantly undo a faded- or fading- in screen caused by fadeout
, without the animation of fadein
.
blackon
blackon
Turn off blackout mode (see blackout
).
blackout
blackout
Turn on blackout mode.
In this mode, the screen will keep rendering on each frame whatever was rendered last on the screen. However things can still render on the screen and overwrite what's supposed to be frozen.
Most notably, text boxes will still appear [2.2 and below: and the "Game paused" screen will still render when the game is unfocused]; but the text boxes always render on top no matter what. These text boxes include the activity zone prompts, the teleporter activity zone prompt and the teleporter "Game saved". As well, room text will always render onscreen.
The ESC screen brought up by pressing ESC, and pause screen and teleporter screen brought up by pressing ENTER will still render, but it seems that during their animations of being brought up or down, the background is a copy of the last ESC/ENTER/teleporter screen that was brought down. If an ESC/ENTER/teleporter screen hasn't been brought down, then it simply defaults to a solid black screen.
Additionally, the player's on-ground and on-roof flipping eligibility is unchanged while in this state. This means that if they are eligible to flip off the floor but not eligible to flip off of the ceiling at the time this command is run, they can always flip off of the floor, but never be able to flip off of the ceiling; and vice versa. Similarly, if they are neither eligible to flip off the floor or ceiling when this command is run, they will never be able to flip at all.
When used while the screen is shaking from shake
and screen effects are enabled, the screen will turn completely black (as the name suggests), since the screen buffer is cleared while the screen is shaking. This is how the command is used in the main game, for the intro cutscene and the Secret Lab discovery cutscene.
This mode is turned off when the player exits to the main menu, or when blackon
is called.
bluecontrol
bluecontrol
Run Victoria's activity zone script, which also creates Victoria's activity zone when finished.
changeai
changeai (<crewmate>, <behavior>, [position])
Set the behavior of a crewmate.
<crewmate>
: The identifier of thecreatecrewman
entity. See the section oncreatecrewman
identifiers.<behavior>
: Can be any of the behaviors from the following list:followplayer
followred
followyellow
followgreen
followcyan
followblue
followpurple
(this will actually follow the pink-colored entity)faceleft
faceright
followposition
(requires field 3, "position", to specify position)
- The behaviors prefixed with "follow" (other than
followposition
) will make the crewmate try to get close to the x-position of the target crewmate or player, and the crewmate will not try anything in regards to reaching the y-position of the target crewmate or player.
faceleft
andfaceright
will do what their names say.
followposition
requires using the third field to specify the given position that the crewmate should follow.
[position]
: Required when the behavior isfollowposition
, to specify the x-position the crewmate should try to move to. Otherwise unused.
- Note that since the code for this behavior is reused from the behavior to follow another crewmate or the player, the crewmate will stop short of the targeted x-position, and the distance they are short by will vary, depending on pixel alignment, between 12 and 17 pixels inclusive if the target position is to the right of the crewmate, or between 32 and 37 pixels inclusive if the target position is to the left of the crewmate. Additionally, if the crewmate is already within 33 pixels inclusive of the target position to the right of them, or 35 pixels inclusive of the target position to the left of them, they will not move. However, even if they don't move, they will turn to face the target position if it is at least 6 pixels away in either direction from their x-coordinate.
changecolour
changecolour
is spelled with U, as in British English, and not without one as in American English.changecolour (<crewmate>, <color>)
Change the color (and identifier) of a createcrewman
entity to another one. However, you cannot change the identifier of the player.
<crewmate>
: The identifier of thecreatecrewman
entity. See the section oncreatecrewman
identifiers.
<color>
: The color (and identifier) to change the crewmate to, but you cannot change the identifier of the player.
changecustommood
changemood
.changecustommood (<custom crewmate>, <mood>)
Change the mood of the first-placed rescuable crewmate edentity in the room.
<custom crewmate>
: The identifier of the rescuable crewmate. Can be any of the following:red
yellow
green
cyan
blue
purple
(this will actually target the pink-colored rescuable crewmate)pink
player
- If it's not any one of these, it will default to the player.
<mood>
: The mood to make the rescuable crewmate.0
is happy, anything that is nonzero is sad. Usually people use1
to make the rescuable crewmate sad.
changedir
changedir (<crewmate>, <direction>)
Change the direction variable of the given crewmate. If the direction is 0
, the crewmate is facing left; otherwise, when the value is nonzero, they will be facing right, usually with a value of 1
.
<crewmate>
: The identifier of thecreatecrewman
entity. See the section oncreatecrewman
identifiers.
<direction>
: The direction to make the crewmate face.0
is left, anything that is nonzero is facing right. Usually people use1
to face right.
changegravity
flipgravity
.changegravity (<crewmate>)
Add 12 to the current sprite offset of the given crewmate. This is not functionally equivalent to changetile(<crewmate>,12)
, it's more like changetile(<crewmate>,<current sprite offset>+12)
.
<crewmate>
: The identifier of thecreatecrewman
entity. See the section oncreatecrewman
identifiers.
This command is unused in the main game.
changemood
changecustommood
.changemood (<crewmate>, <mood>)
Change the mood of the given crewmate. More specifically, it changes the sprite offset depending on what you give for <mood>
. This means this is functionally equivalent to changetile(<crewmate>,0)
if you give 0
to <mood>
and changetile(<crewmate>,144)
if you give anything nonzero (usually 1
) to it.
<crewmate>
: The identifier of thecreatecrewman
entity. See the section oncreatecrewman
identifiers.
<mood>
: The mood to make the crewmate.0
is happy, anything that is nonzero is sad. Usually people use1
to make the crewmate sad.
changeplayercolour
changeplayercolour
is spelled with U, as in British English, and not without one as in American English.changeplayercolour (<color>)
Set the color of the player.
<color>
: Can be any of the colors from the following list:red
yellow
green
cyan
(same effect asrestoreplayercolour
)blue
purple
(this is actually pink)teleporter
(rapidly cycles through random colors for flashy effect, actually unused in the main game, intended to be used before player teleports)- [2.4 and later: Any number from the list of entity colors]
changerespawncolour
changerespawncolour
is spelled with U, as in British English, and not without one as in American English.changerespawncolour (<color>)
Set the respawn color of the player. By default, this will be cyan
. The respawn color persists through save files.
<color>
: Can be any of the colors from the following list:red
yellow
green
cyan
blue
purple
(this is actually pink)teleporter
(rapidly cycles through random colors for flashy effect)- Any number from the list of entity colors
This command is unused in the main game.
changetile
changetile (<crewmate>, <sprite offset>)
Set the sprite offset of the given crewmate. Then, the final sprite rendered, the sprite number, will be the crewmate's animation offset plus the sprite offset given. However, the sprite offset is ignored if the player is currently dying.
The sprite number is fetched from each 32x32 box in sprites.png
, or flipsprites.png
if the game is in flip mode. The sprite to be fetched from sprites.png
or flipsprites.png
is obtained by dividing the sprite number by 12 while keeping an integer remainder - the non-remainder will then be the row, and the remainder will be the column.
Note that the final sprite (the animation offset plus the sprite offset) must be in the range of 0..191 inclusive; otherwise the game will try to fetch a nonexistent sprite, and then segfault. Except in 2.3 and later, where this segfault is fixed and doesn't happen, and instead the crewmate or player simply doesn't render at all.
<crewmate>
: The identifier of thecreatecrewman
entity. See the section oncreatecrewman
identifiers.
<sprite offset>
: The sprite offset to set the crewmate to. The final sprite will be the sprite offset plus the animation offset.
- Here are the animation offsets for the various sprites:
Offset Flipped Direction Animation 0
On the floor Facing right Standing still 1
On the floor Facing right Walking 1 2
On the floor Facing right Walking 2 3
On the floor Facing left Standing still 4
On the floor Facing left Walking 1 5
On the floor Facing left Walking 2 6
On the ceiling Facing right Standing still 7
On the ceiling Facing right Walking 1 8
On the ceiling Facing right Walking 2 9
On the ceiling Facing left Standing still 10
On the ceiling Facing left Walking 1 11
On the ceiling Facing left Walking 2
- These are the death sprites, which will ignore the sprite offsets:
Offset Flipped Direction Animation 12
On the floor Facing right Dying 13
On the floor Facing left Dying 14
On the ceiling Facing right Dying 15
On the ceiling Facing left Dying
clearteleportscript
clearteleportscript
Clear the teleport script. This restores the action that happens upon pressing ENTER at a teleporter to simply bringing up the teleporter screen, which would have been set by teleportscript
.
This command is unused in the main game.
companion
companion (<crewmate number>)
![]() | To do: Document 10 and 11 more. |
Set the companion to accompany the player.
This means that if you load a room within the hardcoded spawn range of a crewmate, the game will spawn a createcrewman
entity at the player's x-position with behavior followplayer
, at a hardcoded y-position specific to each companion. This entity can be manipulated like normal with any command that targets createcrewman
crewmates.
The ranges of rooms a companion will properly spawn in depend on the location of their intended teleporter room in the main game. This range is the row of rooms their intended teleporter room rests on, and if the crewmate spawns unflipped, all the rooms below; if the crewmate spawns flipped, all the rooms above. This does not apply to the intermission crewmates.
When a room is loaded in the same column of the intended teleporter room, the crewmate will spawn at a hardcoded x-position instead of spawning at the player's position.
Note that the reported hardcoded x- and y- positions here do not account for createcrewman
entity pixel offset.
<crewmate number>
: The number of the companion. All other values have no effect. The numbering starts at 6 most likely to be extra safe with avoiding conflicts with the IDs used forcrewstats
.
6
: Verdigris. He will spawn unflipped. His hardcoded y-position is 120, which is standing on the floor of tiles at tile position y=18.
- His intended teleporter room is (16,1), which is "Murdering Twinmaker" in the main game.
7
: Vitellary. He will spawn flipped. His hardcoded y-position is 88, which is standing on the ceiling of tiles at tile position y=10.
- His intended teleporter room is (11,6), which is "Energize" in the main game. His intended teleporter room movement is to spawn somewhere offscreen to the right, and follow the player until he hits x-position 144, which corresponds with there being some sort of invisible barrier to him at tile position x=17.
8
: Victoria. She will spawn unflipped. Her hardcoded y-position is 176, which is standing on the floor of tiles at tile position y=25.
- Her intended teleporter room is (3,5), which is "Philadelphia Experiment" in the main game. Her intended teleporter room x-position is 316.
9
: Vermilion. He will spawn unflipped. His hardcoded y-position is 184, which is standing on the floor of tiles at tile position y=26.
- His intended teleporter room is (12,5), which is "Building Apport" in the main game.
10
: The Intermission 2 crewmate.
11
: The Intermission 1 crewmate.
createactivityzone
createactivityzone (<crewmate color>)
Create an activity zone.
The activity zone is hardcoded to be 96 pixels by 240 pixels, or 96 pixels by 60 pixels if the color is green
. The activity zone will spawn at the position of the crewmate with the corresponding color, 32 pixels to the left horizontally. If the color is green
, it will spawn 20 pixels above the crewmate; otherwise it will spawn at 0. The text and color of the activity zone prompt will be hardcoded accordingly.
If the crewmate color is invalid, then it will default to the player, along with using whatever value of i
persisted from previous commands.
[2.4 and later: However, the hardcoded position and prompt can be overridden by using setactivitycolour
, setactivitytext
, and setactivityposition
, if i
is set to 35.]
<crewmate color>
: The color of the crewmate. Eitherred
,yellow
,green
,blue
, orpurple
(actually pink). All other values are invalid.
createcrewman
createcrewman (<x>, <y>, <color>, <mood>, <behavior>, [position])
![]() | To do: Document. |
createentity
createentity (<x>, <y>, <type>, <meta1>, <meta2>, [p1], [p2], [p3], [p4])
![]() | To do: Document. |
createlastrescued
createlastrescued
![]() | To do: Document. |
createrescuedcrew
createrescuedcrew
![]() | To do: Document. |
customifflag
ifflag
.ifflag
.customifflag (<flag>, <script>)
If the specified flag is on, then jump to the custom script.
<flag>
: The flag to check. Must be between 0 and 99 inclusive. [2.2 and below: A flag outside those bounds will trigger undefined behavior.]<script>
: The custom script to jump to.
customiftrinkets
iftrinkets
.iftrinkets
.customiftrinkets (<trinkets>, <script>)
If the number of collected trinkets is equal to or greater than the specified number, then jump to the custom script.
Most often used in custom levels as customiftrinkets(0,<script>)
to unconditionally jump to a custom script, because it is always true that the player will have collected 0 or more trinkets.
<trinkets>
: The number of trinkets to check.<script>
: The custom script to jump to.
customiftrinketsless
iftrinketsless
.iftrinketsless
.customiftrinketsless (<trinkets>, <script>)
If the number of collected trinkets is strictly less than the specified number (and not equal to), then jump to the custom script.
<trinkets>
: The number of trinkets to check.<script>
: The custom script to jump to.
custommap
map
.custommap (<state>)
Enables or disables the pause screen minimap in custom levels.
If the minimap is disabled, "NO SIGNAL" will be displayed.
<state>
: The state of the map. Eitheron
oroff
. Anything else will have no effect.
customposition
position
.![]() | To do: Document. |
cutscene
cutscene
Make the black bars indicating a cutscene is in progress appear.
This command does not do a delay on its own. To do a delay, use untilbars
.
delay
delay
.delay (<frames>)
Delay the script for the given number of frames. The player cannot move during this delay. [2.2 and below: They cannot bring up the ENTER screen either.]
One frame is 34 milliseconds, so 30 frames is almost one second.
<frames>
: The number of frames to delay for.
destroy
destroy
.destroy (<object type>)
Destroy all objects of the given type in the current room.
<object type>
: The object type to destroy.gravitylines
: Gravity lines.warptokens
: Warp tokens.platforms
: All moving platforms. However, this is bugged and will simply stop the platforms in place while turning them invisible.- [2.4 and later:
moving
: All moving platforms. This will work properly, unlikeplatforms
.] - [2.4 and later:
disappear
: All disappearing platforms.]
do
do (<number>)
Set the loop counter to the given number, and set the loop position to the current line number of the running script.
This command is intended to be used in conjunction with loop
to produce a block of commands that will be repeated a certain amount of times, e.g.:
do(5) text(gray,-1,-500,1) This text box repeats 5 times! speak endtext loop
But there is no requirement that there be a loop
command, or that the loop
command even be in the same script. In fact, it is possible to cleverly use do
and loop
in such a way to jump into the middle of other scripts. This is a technique known as do-pointers.
This command is unused in the main game.
endcutscene
endcutscene
Make the black bars prompted by cutscene
disappear.
This command does not do a delay on its own. To do a delay, use untilbars
.
endtext
endtext
![]() | To do: Document. |
endtextfast
endtextfast
![]() | To do: Document. |
entersecretlab
entersecretlab
Turns on Secret Lab mode. In this mode, you cannot save the game.
Additionally, this command also explores all rooms, and unlocks the Secret Lab play mode in the main menu [2.2 and below: even in custom levels].
leavesecretlab
turns off Secret Lab mode.
everybodysad
everybodysad
![]() | To do: Document. |
face
face (<crewmate>, <direction>)
![]() | To do: Document. |
fadein
fadein
![]() | To do: Document. |
fadeout
fadeout
![]() | To do: Document. |
finalmode
finalmode (<x (finalmode coordinates)>, <y (finalmode coordinates)>)
Turns on finalmode, then loads the room at the specified coordinates.
This is used to move around finalmode instead of the regular gotoroom
, because that command adds an offset of 100 to the position in finalmode coordinates in order to load rooms in the main dimension.
<x>
: The x-coordinate of the room to load.<y>
: The y-coordinate of the room to load.
flag
flag
.flag (<number>, <state>)
Turn on or off a flag.
<number>
: The number of the flag. Only 0 to 99 inclusive are valid, other numbers are ignored.<state>
: The state of the flag. Eitheron
oroff
. Anything else will have no effect.
flash
flash (<frames>)
![]() | To do: Document. |
flip
flipme
.flip
Presses the ACTION button, causing the player to flip if eligible. This command also does 1 frame of delay.
If there is an ACTION prompt onscreen and the prompt is gamestate-based, this ACTION press will dismiss it. Script-based ACTION prompts cannot be dismissed because this command can't run at the same time as the prompt.
It is a common pitfall for this command to not work when placed right after an ACTION prompt. This is because the ACTION-down input frame from the player to dismiss the prompt is immediately followed by an ACTION-down input frame from this command with no intervening ACTION-up input frame, so this ACTION-down input frame gets treated like an ACTION hold instead of an ACTION press. The usual workaround is to put a delay(1)
before this command.
flipgravity
changegravity
.flipgravity (<crewmate>)
![]() | To do: Document. |
flipme
flip
.flipme
Marks that the text box should be vertically repositioned if the player is in Flip Mode.
[2.2 and below: The repositioning does not account for the height of the text box, so the Flip Mode position is wrong.]
foundlab
foundlab
![]() | To do: Document. |
foundlab2
foundlab2
![]() | To do: Document. |
foundtrinket
foundtrinket (<trinket>)
![]() | To do: Document. |
gamemode
gamemode (<mode>)
![]() | To do: Document. |
gamestate
gamestate (<state>)
![]() | To do: Document. |
gotoposition
gotoposition (<x>, <y>, <gravity>)
![]() | To do: Document. |
gotoroom
gotoroom (<x (0-indexed)>, <y (0-indexed)>)
Load the room with the given coordinates.
If the player is already in said room, the room is still reloaded.
If the coordinates given are outside the map, they are wrapped around to the other edge of the map. E.g. in a 10x10 map, gotoroom(50,50)
is equivalent to gotoroom(0,0)
and gotoroom(-10,-10)
is equivalent to gotoroom(9,9)
.
<x>
: The x-coordinate of the room to load.<y>
: The y-coordinate of the room to load.
greencontrol
greencontrol
Run Verdigris's activity zone script, which also creates Verdigris's activity zone when finished.
hascontrol
hascontrol
![]() | To do: Document. |
hidecoordinates
hidecoordinates (<x (0-indexed)>, <y (0-indexed)>)
On the map, hides the room at the given coordinates. Note that loading this room afterwards (e.g. by a screen transition) will still show the room again on the map. showcoordinates
is the opposite of this command.
[2.2 and below: If the room number you end up indexing (which is roomx + roomy*20
) is not in the range 0..399, undefined behavior will be triggered.]
<x>
: The x-coordinate of the room to hide.<y>
: The y-coordinate of the room to hide.
hideplayer
hideplayer
Makes the player invisible.
This is the opposite of showplayer
.
hidesecretlab
hidesecretlab
On the map, hides the rooms corresponding to the Secret Lab in the main game. showsecretlab
is the opposite of this command.
These rooms are (0-indexed):
- (16, 5)
- (17, 5)
- (18, 5)
- (17, 6)
- (18, 6)
- (19, 6)
- (19, 7)
- (19, 8)
hideship
hideship
On the map, hides the rooms corresponding to the Ship in the main game. showship
is the opposite of this command.
These rooms are (0-indexed):
- (2, 10)
- (3, 10)
- (4, 10)
- (2, 11)
- (3, 11)
- (4, 11)
hidetargets
hidetargets
![]() | To do: Document. |
hideteleporters
hideteleporters
![]() | To do: Document. |
hidetrinkets
hidetrinkets
![]() | To do: Document. |
ifcrewlost
This command jumps to a main game script, not a custom script. To jump to a custom script, you must prefix the script name with custom_
(but then the load script method won't work for that script; you can however jump to a custom script that jumps to another custom script).
ifcrewlost (<script>)
![]() | To do: Document. |
ifexplored
This command jumps to a main game script, not a custom script. To jump to a custom script, you must prefix the script name with custom_
(but then the load script method won't work for that script; you can however jump to a custom script that jumps to another custom script).
ifexplored (<x>, <y>, <script>)
![]() | To do: Document. |
ifflag
This command jumps to a main game script, not a custom script. To jump to a custom script, you must either use customifflag
instead, or prefix the script name with custom_
(but then the load script method won't work for that script).
customifflag
.![]() | To do: Document. |
iflang
iflang
.iflang (<language>, <script>)
Check if the current language of the game is a certain language, and if so, jump to the given custom script.
<language>
: The language to check. This is the folder name of the language, which is usually a two-letter code, such asen
for English.<script>
: The custom script to jump to, if the check succeeds.
iflast
This command jumps to a main game script, not a custom script. To jump to a custom script, you must prefix the script name with custom_
(but then the load script method won't work for that script; you can however jump to a custom script that jumps to another custom script).
iflast (<crewmate>, <script>)
![]() | To do: Document. |
ifskip
This command jumps to a main game script, not a custom script. To jump to a custom script, you must prefix the script name with custom_
(but then the load script method won't work for that script; you can however jump to a custom script that jumps to another custom script).
ifskip (<script>)
![]() | To do: Document. |
iftrinkets
This command jumps to a main game script, not a custom script. To jump to a custom script, you must either use customiftrinkets
instead, or prefix the script name with custom_
(but then the load script method won't work for that script).
customiftrinkets
.![]() | To do: Document. |
iftrinketsless
This command jumps to a main game script, not a custom script. To jump to a custom script, you must either use customiftrinketsless
instead, or prefix the script name with custom_
(but then the load script method won't work for that script).
customiftrinketsless
.![]() | To do: Document. |
ifwarp
gotoroom
command, but you would have to use the coordinates (1,1) for this command.ifwarp
.ifwarp (<x (1-indexed)>, <y (1-indexed)>, <warp background>, <script>)
Check if the warp background of the given room is a certain warp background, and if so, jump to the given custom script.
This command can be used in internal scripting without having to prefix either the command with custom
or the script with custom_
. You cannot jump to a main game script with this command, but you could jump to a custom script that jumps to a main game script.
[2.2 and below: If the room number you end up indexing (which is just, without accounting for 1-indexing, roomx + roomy*20
) is not in the range 0..399, undefined behavior will be triggered.]
<x>
: The x-coordinate of the room whose warp background you want to check, 1-indexed.<y>
: The y-coordinate of the room whose warp background you want to check, 1-indexed.<warp background>
: The warp background to check. There are four intended values:0
: No warping1
: Horizontal2
: Vertical3
: All sides
- Additionally, you can set the warp dir of the room to any arbitrary integer with
warpdir
, and then check that arbitrary value with this command.
<script>
: The custom script to jump to, if the check succeeds.
jukebox
jukebox (<number>)
![]() | To do: Document. |
leavesecretlab
leavesecretlab
Turns off Secret Lab mode (see entersecretlab
).
This command is unused in the main game.
loadscript
This command jumps to a main game script, not a custom script.
Consider using customiftrinkets(0,<script>)
instead (however, loadscript(stop)
is fine to use just to keep with convention).
loadscript (<script>)
![]() | To do: Document. |
loadtext
loadtext
.loadtext (<language>)
In custom levels, load the given language.
<language>
: The language to load. If left blank, this will load the language the game's language is currently set to.
loop
loop
Decrement the loop counter. If the counter is greater than 0 after this, then jump to the line number stored in the loop position.
This command is intended to be used in conjunction with do
. See the documentation for do
for more information.
This command is unused in the main game.
missing
missing (<crewmate>)
![]() | To do: Document. |
moveplayer
moveplayer (<x offset>, <y offset>)
![]() | To do: Document. |
musicfadein
musicfadein
![]() | To do: Document. |
musicfadeout
musicfadeout
![]() | To do: Document. |
nocontrol
nocontrol
![]() | To do: Document. |
play
play (<number>)
![]() | To do: Document. |
playef
playef (<number>)
![]() | To do: Document. |
position
customposition
.position (<object>, [vertical])
![]() | To do: Document. |
purplecontrol
purplecontrol
Run Violet's activity zone script, which also creates Violet's activity zone when finished.
redcontrol
redcontrol
Run Vermilion's activity zone script, which also creates Vermilion's activity zone when finished.
rescued
rescued (<crewmate>)
![]() | To do: Document. |
resetgame
resetgame
![]() | To do: Document. |
restoreplayercolour
restoreplayercolour
is spelled with U, as in British English, and not without one as in American English.restoreplayercolour
Set the player's color back to cyan.
This is functionally equivalent to changeplayercolour(cyan)
.
resumemusic
resumemusic
![]() | To do: Document. |
rollcredits
rollcredits
Immediately play the credits of the main game [2.2 and below: even if this is done in in-editor playtesting (which loses any unsaved changes to your level)].
This also overwrites the main game telesave and deletes the main game quicksave when the credits is finished [2.2 and below: even in custom levels].
setactivitycolour
setactivitycolour
is spelled with U, as in British English, and not without one as in American English.setactivitycolour (<color>)
![]() | To do: Document. |
setactivitytext
setactivitytext <text>
![]() | To do: Document. |
setactivityposition
setactivityposition (<y offset>)
![]() | To do: Document. |
setcheckpoint
setcheckpoint
![]() | To do: Document. |
setfont
setfont
.setfont (<font>)
In custom levels, set the font to the given font.
If there is a text box fading out, this command will delay until it is faded.
<font>
: The font to set the font to. If left blank, this will set the font to the default font of the custom level.
setroomname
setroomname <room name>
Set the room name to the given text.
This name is not persistent and will go back to the default room name when the room is reloaded (e.g. by leaving and coming back).
This name overrides any special changing room name, if the room has one.
<room name>
: The text to set the room name to.
shake
shake (<frames>)
![]() | To do: Document. |
showcoordinates
showcoordinates (<x (0-indexed)>, <y (0-indexed)>)
On the map, reveals the room at the given coordinates. hidecoordinates
is the opposite of this command.
[2.2 and below: If the room number you end up indexing (which is roomx + roomy*20
) is not in the range 0..399, undefined behavior will be triggered.]
<x>
: The x-coordinate of the room to show.<y>
: The y-coordinate of the room to show.
showplayer
showplayer
Makes the player visible.
This is the opposite of hideplayer
.
showsecretlab
showsecretlab
On the map, reveals the rooms corresponding to the Secret Lab in the main game. hidesecretlab
is the opposite of this command.
These rooms are (0-indexed):
- (16, 5)
- (17, 5)
- (18, 5)
- (17, 6)
- (18, 6)
- (19, 6)
- (19, 7)
- (19, 8)
showship
showship
On the map, reveals the rooms corresponding to the Ship in the main game. hideship
is the opposite of this command.
These rooms are (0-indexed):
- (2, 10)
- (3, 10)
- (4, 10)
- (2, 11)
- (3, 11)
- (4, 11)
showtargets
showtargets
![]() | To do: Document. |
showtrinkets
showtrinkets
![]() | To do: Document. |
speak
speak
![]() | To do: Document. |
speak_active
speak_active
![]() | To do: Document. |
specialline
specialline (<case>)
Replaces text box lines with hardcoded strings. Used for two particular main game lines that want the name of a random unrescued crewmate.
<case>
: Can be 1 or 2; the command does nothing otherwise.1
: Sets the text box to beI'm worried about <random unrescued crewmate>, Doctor!
.2
: If there are less than 5 rescued crewmates, two lines will be appended:to helping you find the rest of the crew!
Else,to helping you find <random unrescued crewmate>!
is appended.
squeak
squeak (<sound>)
Plays a sound corresponding to particular characters speaking/emoting.
<sound>
: Which sound to play.player
orcyan
: Viridian squeaking. Equivalent toplayef(11)
.red
: Vermilion squeaking. Equivalent toplayef(16)
.green
: Verdigris squeaking. Equivalent toplayef(12)
.yellow
: Vitellary squeaking. Equivalent toplayef(14)
.blue
: Victoria squeaking. Equivalent toplayef(13)
.purple
: Violet squeaking. Equivalent toplayef(15)
.cry
: Sad characters squeaking. Equivalent toplayef(2)
.terminal
: Terminals squeaking. Equivalent toplayef(20)
.
startintermission2
startintermission2
An unused command left over from development that attempts to start Intermission 2.
It turns on finalmode, then sets the checkpoint to 228,129, unflipped and facing left, in (53,49) (Intermission 2 start room), but then gotoroom
s to (46,54) (Intermission 1 start room).
stopmusic
stopmusic
Stops any currently playing music.
[2.3 and later: The music can be restarted in the same place with resumemusic
or musicfadein
.]
teleportscript
teleportscript (<script>)
![]() | To do: Document. |
telesave
telesave
Saves the game in the main game telesave slot [2.2 and below: even in custom levels].
text
text (<color>, <x>, <y>, <lines>) <lines...>
![]() | To do: Document. |
textcase
textcase
.textcase (<case>)
Set the text case of the following text box to the given case number. The default text case is 1.
This is intended to be used in localization to disambiguate between different text boxes with the exact same text contents.
<case>
: The case number, between 1 and 255.
textboxactive
textboxactive
![]() | To do: Document. |
textboxtimer
textboxtimer (<frames>)
For the text box in memory, fade out the text box after the given number of frames.
<frames>
: The number of frames that will pass before the text box fades out.
textbuttons
textbuttons
For the text box in memory, parse any button text in brackets.
textimage
textimage (<image>)
For the text box in memory, draw the given image.
There can only be one text image per text box.
<image>
: The image to draw.levelcomplete
: Draw the "Level Complete!" image.gamecomplete
: Draw the "Game Complete!" image.- Any other value unsets the text image.
textsprite
textsprite (<x>, <y>, <sprite>, <color>)
For the text box in memory, draw the given sprite.
There can be multiple sprites per text box.
<x>
: The x-coordinate of the sprite. This is relative to the text box.<y>
: The y-coordinate of the sprite. This is relative to the text box.<sprite>
: The sprite number of the sprite, fromsprites.png
only.<color>
: The color ID of the sprite. See the list of entity colors.
tofloor
tofloor
Acts identically to flip
if the player is currently flipped.
trinketbluecontrol
trinketbluecontrol
Run special logic after Victoria gives you a trinket after talking to her in the main game.
If 20 trinkets are collected and flag 67 is on, then this starts the Secret Lab entrance cutscene. Otherwise, it will run a regular cutscene, and also create Victoria's activity zone when finished.
trinketscriptmusic
trinketscriptmusic
Plays Passion for Exploring. Does nothing else.
This command is unused in the main game.
trinketyellowcontrol
trinketyellowcontrol
Run the cutscene after Vitellary gives you a trinket after talking to him in the main game, which is different depending on whether you've collected 19 trinkets or not. This will also create Vitellary's activity zone when finished.
undovvvvvvman
undovvvvvvman
Undo the effects of vvvvvvman
, returning the player character to their normal state.
untilbars
untilbars
![]() | To do: Document. |
untilfade
untilfade
![]() | To do: Document. |
vvvvvvman
vvvvvvman
Change the player character into the large character shown in the Secret Lab's introduction cutscene. Collision is very glitchy.
walk
walk (<direction>, <frames>)
![]() | To do: Document. |
warpdir
gotoroom
command, but you would have to use the coordinates (1,1) for this command.warpdir
.warpdir (<x (1-indexed)>, <y (1-indexed)>, <warp background>)
Set the warp background of the given room, permanently for the given session. The changed warp background will not be preserved if you quicksave, quit, and load the level from the save again, but leaving the room and coming back will not reset its warp background to what it was originally. This means you can set the warp background of a certain room without having to be in it.
[2.2 and below: There is a bug with this command where if you are in a room with the Lab or Warp Zone tileset, and you set the warp background to none (e.g. make the room no longer warp anymore), instead of setting it to the Lab or stars-up background, it will set it to the stars-left background, always. But if the room is reloaded (e.g. by leaving and coming back), the room's background will be set to what it's supposed to be.]
[2.2 and below: If the room number you end up indexing (which is just, without accounting for 1-indexing, roomx + roomy*20
) is not in the range 0..399, undefined behavior will be triggered.]
<x>
: The x-coordinate of the room to target, 1-indexed.<y>
: The y-coordinate of the room to target, 1-indexed.<warp background>
: The warp background to set the room to. There are four intended values:0
: No warping1
: Horizontal2
: Vertical3
: All sides
- All other values will still succeed in setting the warp dir to that value, and will make the room no longer warp, but the background will still be there.
yellowcontrol
yellowcontrol
Run Vitellary's activity zone script, which also creates Vitellary's activity zone when finished.