Commands - EverestAPI/CelesteTAS-EverestInterop GitHub Wiki
Commands are written in TAS files between inputs and allow for various special logic.
Using commands does not mean "cheating", as most simply transform inputs in a way that makes it more convenient to write, while still being possible without.
All commands are documented here, with examples on when they are useful. However it's also recommended to look at existing TASes and how they are using commands.
The easiest way to discover what commands and what arguments are available, is by using the auto-complete feature of Studio.
Format: console (command)
Examples:
-
console p_dreamdash
: Enable dream dashing -
console p_twodashes
: Enables two dashes -
console core (mode)
: Set core mode to None (0
), Hot (1
), Cold (2
) -
console givekey
: Gives a key to the player -
console giveberry
: Gives a red berry to the player -
console hearts (amount, defaults to 24) (level set, defaults to current)
: Set the amount of obtained hearts in the current level set, used by heartgates -
console summitgem (gem)
: Marks the specified summit gem as collected (0
-5
orall
) -
console unlock_doors
: Remove all locked key doors in the current room -
console flag (name) (setTo, defaults to true)
: Sets the specified flag to the value-
console flag oshiro_clutter_cleared_0/1/2
: Clears towels (0
), books(1
), chests(2
) in Huge Mess
-
Executes the command as if it was entered into the Debug Console.
Useful for testing and and setting up specific scenarios.
Format: console load
(A-Side), console hard
(B-Side), console rmx2
(C-Side)
Example: console rmx2 6
, console hard Celeste/1-ForsakenCity
The commands for loading into levels provide additional features when used inside TASes, compared to the Debug Console.
Only load
will be used in the documentation, but the same applies to hard
and rmx2
.
The following formats are available:
console load (ID or SID)
console load (ID or SID) room
console load (ID or SID) room spawnpointIndex
console load (ID or SID) positionX positionY
console load (ID or SID) positionX positionY speedX speedY
Tip
The easiest way to create a load command is using the auto-complete feature inside Studio.
Using the 'Insert Exact/Simple "console load" command' options inside Studio are also available.
If using Studio is not possible, the SID can be found top-left when opening the Debug Console.
Format: Set, Target-Query, Value
Examples:
Set, VariantMode, false
Set, CheatMode, true
-
Set, DashMode, Infinite
orSet, DashMode, 2
Set, Player.Position, 123.123, -1028
Set, Player.Position.X, 123.123
Set, Player.Speed, 325, -52.5
Set, Player.Ducking, true
Set, Everest.ShowModOptionsInGame, false
Set, CelesteTAS.CenterCamera, true
Set, AnarchyCollab2022.LeftButton, Q, W
Set, ExtendedVariantMode.DashCount, 3
Allows setting arbitrary values in the game using target-queries, convenient for easily testing strategies or configuring settings.
Custom buttons which are used with P
or Press can be bound using Set
commands.
Format: Invoke, Target-Query, Parameter1, Parameter2, ...
Examples:
Invoke, Player.MoveH, 2.3
Invoke, Level.Pause
Invoke, Player.Die
Allows invoking arbitrary methods in the game using target-queries, convenient for easily testing strategies or configuring settings.
Format: EvalLua, Code
Examples:
EvalLua, player.Position = player.Position + Vector2(1, 0)
EvalLua, player:Die(Vector2.Zero)
EvalLua, setValue(player, 'movementCounter', Vector2(0.1, 0))
Evaluate Lua code, check out how to access and use C# objects Due to the limitations of NLua, non-public members and generics are not supported, so some helper methods and predefined variables are provided. check the env.lua file for details.
Important
Moving from NLua to NeoLua is currently being considered, providing better interop with C# and improved performance.
This would be a breaking change, requiring more involved Lua scripts to be adjusted.
Format:
Repeat, Count
(inputs)
EndRepeat
Example:
Repeat, 12
12,J,G
12,K,G
EndRepeat
Repeats everything between Repeat
and EndRepeat
for the specified amount of times.
While nested Repeat
commands are suppoted, it's generally not recommended to keep the TAS more readable.
Format: Read, File Name, Starting Label, (Optional Ending Label)
Example: Read, 1A, lvl_6
Will read inputs from the specified file, starting at the label. The path is relative to the current TAS file, without the .tas
file extension.
Shortened file names can be used if they aren't ambigous, so 1A
could read 1A_ForsakenCity
.
Format: Play, Starting Label, (Optional Frames to Wait)
Example: Play, Remembered, 37
Jumps TAS execution to the specified label. Can be used for splitting larger files into smaller chunks
Note
Due to global cycles such as spinner cycles becoming more common, it's generally recommended to avoid using Play
.
A good alternative is using savestate breakpoints together with collapse comments.
***S
## Remembered
9,U,C
40
Format: Press, Key1, Key2, ...
Example:
# Press Q and W and Right 10 frames.
Press, Q, W
10,R
Presses the specified keys along with the next input. The P<key>
input can be used instead of this command.
Format: Mouse, X, Y, [ScrollWheel], [L/R/M/X1/X2], [L/R/M/X1/X2]...
Example:
# Press mouse left button at (50, 100) and jump 10 frames.
Mouse, 50, 100, L
10,J
Simulates a mouse interaction in the game. The X and Y coordinates are integers from 0..319 and 0..179
Note
There are currently issues with this command with a game window in non 16:9 aspect ratio. To better represent how the game actually handles mouse inputs, the position might be changed to 0..1920 and 0..1080 with decimal support.
Format:
StunPause, (optional mode, Simulate or Input)
(inputs)
EndStunPause
This command is a convenient alias for AutoInput
, specifically tailed for stunning hazards.
While routing a stun, Simulate
mode can be used to avoid actually performing the pause inputs and removing the need for SkipInput
.
StunPauseMode Simulate
can be used to easily change the mode of all StunPause
commands.
The equivalent AutoInput
would be
AutoInput, 2
1,S,N
10,O
StartAutoInput
(inputs)
EndAutoInput
Once finalizing a route, SkipInput
commands need to be inserted to account for freeze frames. See the AutoInput
for more details.
Format:
AutoInput, (cycle length)
(auto inputs)
StartAutoInput
(inputs)
SkipInput
(skipped input)
(inputs)
EndAutoInput
Example:
AutoInput, 2
1,S,N
10,O
StartInput
SkipInput, 3, 1
7,R,X
4,R,J
EndAutoInput
would produce
1,S,N
10,O
5,R,X
1,S,N
10,O
2,R,X
1,S,N
10,O
2,R,J
1,S,N
10,O
2,R,J
Periodically inserts the inputs between AutoInput
and StartAutoInput
every cycle length frames.
The SkipInput, (skip frames), (optional waiting frames)
command can be used to pause the cycle frame advancing for a certain amount of frames. This is usually required during freeze frames, since while the game is frozen, the TAS continues to advance the cycle.
Dashes specifically need to use SkipInput, 3, 1
, since the first only the player is stopped by setting the speed to zero, only then is the entire game frozen for 3 frames.
Format: SaveAndQuitReenter
Example:
1,S
1,U
1,F,0
# Press 'Save & Quit'
1,U,O
SaveAndQuitReenter
# Respawn animation
36
Format: SelectCampaign, (Campaign Name), (Save File Name, defaults to "TAS")
Example: SelectCampaign, Celeste, #transrights
Prepares a new save file, with the specified campaign selected and save file name entered. The command ends on the 'Begin" button.
When using EnforceLegal
, the command need to be executed on the title screen.
Format: Unsafe
, Safe
By default, TASes aren't allowed to execute in "unsafe" environments, such as outside of levels or inside option menus.
This is to prevent accidentally deleting save files or other destructive actions.
The Unsafe
command lifts this restriction and the Safe
command puts it back in place.
Format: EnforceLegal
Can be used at the start of fullgame TASes, to prevent accidentally using "cheats" in a run.
It prevents the usage of console
, Set
, Invoke
, EvalLua
and StunPause Simulate
.
Format: Assert, Condition, Expected, Actual
Examples:
-
# Ensure that you are currently in the save file selection screen and the new save file is selected Assert Equal False [[local ui = scene.Current; return ui.Slots[ui.SlotIndex].Exists]]
-
# Ensure that you are currently in the chapter 2 Assert EndWith 2-OldSite {Session.Area.SID}
Ensures that the specified condition holds true while executing, otherwise the TAS will be aborted.
This is useful for tools to detect desyncs in the TAS.
Possible conditions are Equal
, NotEqual
, Contain
, NotContain
, StartWith
, NotStartWith
, EndWith
, NotEndWith
.
The Actual
value uses the same syntax as in the Custom Info Template.
Format:
StartRecording
(inputs)
StopRecording
Example:
StartRecording
1,R,J
14,R
1,R,J
14,R
StopRecording
Records a video file of the inputs between the two commands, using TAS Recorder which is required for these commands to work.
When trying to record the entire TAS, consider using the File -> Record TAS
option inside Studio.
For more information, please take a look at the TAS Recorder GameBanana page or the README.
Format: RecordCount: 1
Tracks the amount of rerecords have been made. The name "record" comes from other TASing methods, where inputs are literally recorded.
For Celeste, it simply tracks how often a TAS was changed and then ran.
Format: FileTime: 0:50.915(2995)
, MidwayFileTime: 0:03.536(208)
Tracks the elapsed time of the 'File' speedrun timer, during the TAS. Should be used when ChapterTime
is not applicable, like in fullgame TASes or TASes with a 'Return to Map'.
The regular command is filled in, when the TAS ends. The Midway
variant is filled in, when the TAS reaches the command.
Format: ChapterTime: 0:49.079(2887)
, MidwayChapterTime: 0:02.040(120)
Tracks the current 'Chapter' speedrun timer.
The regular command is filled in, when the chapter is completed. The Midway
variant is filled in, when the TAS reaches the command.
It is standard practice to place this command on the frame the chapter timer stops. That means the frame on which the timer stops and turns green should be the last frame of the TAS and the ChapterTime
command should be placed after that last frame.
Format: RealTime: 0:54.150(3249)
, MidwayRealTime: 0:03.683(221)
Tracks the real elapsed time of the TAS. This includes freeze frames, menuing, etc. with the only exception being real loading times. Additionally, 1f
is exactly 1/60s
instead of 0.017s
.
The regular command is filled in, when the chapter is completed. The Midway
variant is filled in, when the TAS reaches the command.
Format: AnalogMode, (Mode)
Changes how analog angles are mapped onto 2D joystick coordinates.
-
Ignore
: Simply maps the angle onto a circle and applies the magnitude. Input is most likely not possible on real hardware -
Circle
: Maps the angle onto a circle and applies the magnitude, but applies a deadzone of 0.24. Input is possible on real hardware -
Square
: Maps the angle onto a square, magnitude is ignored. Input is possible on real hardware if X and Y axis are mapped onto separate sticks. -
Precise
: Finds closest possible position to the desired angle. The magnitude specified an upper limit for each individual axis.
Format:
ExportGameInfo, (File Path, defaults to dump.txt), (Optional Entities Names)
(inputs)
EndExportGameInfo
Example: ExportGameInfo additional.txt TheoCrystal Glider CustomSpinner@FrostTempleHelper
Collects game data between the two commands and dumps it into the specified file.
Keeps track of all entities, which match the specified target-query types.
Format:
ExportRoomInfo (File Path, defaults to dump_room_info.txt)
(inputs)
EndExportRoomInfo
Dumps the elapsed time of each room to a file. which can be used to compare improvements.
Format: CompleteInfo, (Side), (SID or ID)
The comments immediately following this command will be displayed on the specified area complete screen. If both Side
and SID or ID
are omitted, it'll be displayed on all complete screens.
To make it possible to run Celeste TASes without Everest / the CelesteTAS mod, it's possible to convert TAS files into libTAS movies.
This was required for TAS Videos in the past, but isn't much of a concern today. You can probably just ignore these commands when encountering them.
Format:
ExportLibTAS, (File Path, defaults to Celeste.ltm)
(inputs)
EndExportLibTAS
Converts the inputs between the two commands into a libTAS movie file.
Odds are, you don't need to worry about this.
Format: Add (Input)
Example: Add 5,J
CelesteTAS pauses TAS execution during loading times, but libTAS has a different opinion on what is considered loading times.
This commands inserts inputs which are only present in the libTAS movie and will not be executed by CelesteTAS.
Format:
Skip
(input)
Example:
Skip
7,J
Skips the next input in the libTAS movie and it will only be executed by CelesteTAS.
Format: Marker, (Text)
Example: Marker, "Hello"
Adds a named marker to the libTAS movie, for it to auto-pause.