The Automator

The Automator is unlocked upon reaching a total of 100 Automator Points. Automator Points are given when unlocking various Perks or Reality Upgrades, by unlocking the Black Hole, or by simply completing more Realities.

The Automator uses a scripting language that allows you to automate nearly the entire game. The interface has two panes, a script pane on the left where you enter the commands to automate the game and a pane on the right which has multiple panels which do many different things as explained on the Automator Introduction page.

If you want a larger workspace, you can press the button in the top right corner of the documentation pane of the Automator to expand it to fullscreen. You can also drag the boundary between the panes horizontally to resize the panes if you want more room to write your script or read documentation.

By pressing the top-right button on the script pane, you can switch between the Automator's block and text editor modes; the block mode may be more approachable if you are unfamiliar with programming. To enter commands in block mode, select the command block pane on the right and drag the box for the relevant command into the script pane and drop it where you want the command to go. Commands can be freely rearranged by dragging the blocks around if needed. Switching between block and text mode will attempt to automatically translate your script as well, although you may lose part of your converted script if it contains errors.

Just like your entire savefile, individual Automator scripts can be imported and exported from the game. Properly-formatted script strings will begin with **AntimatterDimensionsAutomatorScriptFormat** and end with **EndOfAutomatorScript**. If this is not the case then part of your script was lost in the process of copy-pasting. The import function will load the script into a new slot; your current script won't be lost or overwritten.

Scripts are automatically saved as you edit them, but are not saved to your game save until the global autosave timer (ie. "Time since last save") triggers a full game save. If you make changes to scripts right before closing the game, you should wait until the game saves afterwards in order to not lose your changes. Any edits made to your scripts while above the length limits will not be saved until you shorten your scripts to be below them again.

The Automator's "execution timer" is based on real time, and is therefore unaffected by things such as the Black Hole, Time Glyph effects, and EC12's negative effect. However this execution timer runs entirely independently from the main game's production loop, meaning that at faster speeds the Automator can run multiple commands per production tick.

Some commands are more intensive on the game's internal code and may take longer than a single Automator tick in order to process on slower computers. In that case, the Automator will execute those commands and then attempt to "catch up" by executing the following commands as quickly as possible until it has run as many commands as it should have at a constant execution speed.

Longer production ticks during Offline Progress simulation means that all of your resources are effectively given in large chunks instead of more continuously. This may have potentially adverse effects on your script's behavior while offline, depending on how exactly your script depends on the game state to work properly. Additionally, the PAUSE command may behave oddly due to it also being based on real time.

The automator is running 2 commands per real-time second without Realities. Each Reality makes it run 0.6% faster (multiplicative), up to a maximum of 1,000 per second. (at 1033 Realities)

There are a few limitations to scripts in order to reduce lag and prevent save file size from getting too large. These limits are as follows:

* Individual scripts are limited to a maximum of 10,000 characters each and all scripts combined together cannot exceed 60,000 characters total.
* Script names cannot exceed 15 characters.
* Defined constants cannot have names longer than 20 characters, or values longer than 250 characters. (value can be a number or Time Studies)
* You cannot have more than a total of 20 scripts or 30 defined constants.

It can automatically:

* Respec Time Studies. (**`studies respec`**)
* Load Time Study. (`**studies** [nowait] **load id** selector` or `**studies** [nowait] **load name** name`)
* Buy Time Study. (`**studies** [nowait] **purchase** study\_list`)
* Prestige. (Infinity: `**infinity** [nowait]`, Eternity: `**eternity** [nowait] [respec]`, Reality: `**reality** [nowait] [respec]`, Eternity [respec] is to respec Time Studies while Reality [respec] is to unequip glyphs)
* Unlock and Start Eternity Challenges and Time Dilation. (Unlock: `**unlock** [nowait] feature`, Start: **`start`** `feature`, feature is ecX or dilation)
* Turns prestige Autobuyers on or off and allows you to change their settings, require the auto prestige unlocked. (Infinity: `**auto infinity** [setting]`, Eternity: `**auto eternity** [setting]`, Reality: `**auto reality** [setting]`, `[setting]`: *on* | *off* is Turns specified Autobuyer on or off, *number option* will automatically turn on the autobuyer, and:
	+ option = currency: Available for Auto-Infinity (IP), Eternity (EP) and Reality (RM). Automatically set the current reset mode to amount and the value to *number*.
	+ option = time unit: time unit can be ms (0.001), s (1), sec (1), seconds (1), m (60), min (60), minutes (60), h (3600) or hours (3600). Available for Auto-Infinity and Eternity. Automatically set the current reset mode to time and the value to *number* times the unit factor, the empty space between *number* and unit can be ignored. (therefore 5s will be same as 5 s)
	+ option = x highest: Available for Auto-Infinity and Eternity. Automatically set the current reset mode to X times highest resource and the value to *number*, the empty space between *number* and 'x highest' can be ignored. (therefore 10x highest will be same as 10 x highest)
* Turn on/off Black Hole, require Black Hole unlocked. (`**black hole** state`, `state` can be on (start black hole, does not bypass the gradual acceleration from off to max speed which occurs before they are permanent) or off (pause black hole))
* Store/Use Game Time, require The Nameless Ones Celestial unlocked. (`**store game time** action`, where `action` can be:
	+ on: start storing/charging game time
	+ off: stop storing/charging game time
	+ use: Uses all stored game time. Does not alter the on/off state of time storage.
* Notify (`notify "text"`)
* Comments (`**#** text` or `**//** text`), they are completely skipped during execution and do not count as a command for the purposes of running.

It can also...

* Forces Automator to wait for some condition or event. (`**wait** condition`, it can wait until the comparison statement is true (comparison), the specified prestige (Infinity, Eternity, or Reality) has been triggered by its respective Autobuyer (prestige), or the Black Hole(s) are in the specified state (black hole (state), state can be off (no active Black Hole(s)), bh1 (at least the first Black Hole active) or bh2 (both Black Holes active)), as long as this command is reached, other your script may get stuck.
* Tells the automator to stop moving forward and executing commands for a certain amount of time. Note that if the pause duration is shorter than the automator's execution speed, the automator will wait until the next execution tick before moving on. (`**pause** interval`, interval time unit can be ms (0.001), s (1), sec (1), seconds (1), m (60), min (60), minutes (60), h (3600) or hours (3600). The empty space between number and unit can be ignored. (therefore 5s will be same as 5 s), you can also use a defined constant with the time unit being seconds). This command may behave undesirably when it runs during offline progress due to limited tick count, and you can manually force the Automator to continue execution past a PAUSE command without waiting the entire specified time by stepping forward one line (to put it on the next one) and then resuming execution.
* Defines an inner block of block of the automator script which will only be executed if the specified comparison is true when this line is reached. If the comparison is false, the automator will instead skip to the first line after the block and continue execution from there. (`**if** condition {*commands*}`)
* Defines an inner block of the script where commands are repeated; the comparison is checked at the start and every time the loop repeats. If the condition is true when the UNTIL statement is first reached, the inner block of commands will be skipped entirely. (`**until** comparison {*commands*}`), if an prestige event (ie. Infinity, Eternity, or Reality) is specified instead of a condition, then the block will always be entered and the commands within the block will repeat until the event occurs for the first time *after* entering the block. Note that the Automator will finish the rest of the loop and then exit after the prestige event occurs - it will not immediately exit the loop in the middle. (`**until** prestige\_event {*commands*}`)
* Defines an inner block of the script where commands are repeated; the comparison is checked at the start and every time the loop repeats. If the condition is false when the WHILE statement is first reached, the inner block of commands will be skipped entirely. (`**while** comparison {*commands*}`)
* When the Automator runs this line, it will stop execution as if you clicked the stop button on the control panel in the top-left of the Automator. This does not need to be placed at the end of every script in order to stop them, as turning off the restart option on the left panel will do this automatically. This command may be useful when used inside of an IF command, in order to stop execution only under certain conditions. (`**stop**`)

This is a list of "currencies" or numbers that you can use within the Automator. Note that when used, most currencies will need to be in scientific notation.

* **am** - Current Antimatter amount
* **ip** - Current Infinity Point amount
* **ep** - Current Eternity Point amount
* **rm** - Current Reality Machine amount
* **infinities** - Current Infinity amount
* **banked infinities** - Current Banked Infinity amount
* **eternities** - Current Eternity amount
* **realities** - Current Reality amount
* **pending ip** - IP gained on Infinity (0 if not available)
* **pending ep** - EP gained on Eternity (0 if not available)
* **pending tp** - TP gained on exiting Dilation
* **pending rm** - RM gained on Reality (0 if not available)
* **pending glyph level** - Glyph Level gained on Reality (0 if not available)
* **dt** - Current Dilated Time amount
* **tp** - Current Tachyon Particle amount
* **rg** - Current Replicanti Galaxy amount (does not use scientific)
* **rep** - Current Replicanti amount
* **tt** - Current Time Theorem amount
* **total tt** - TOTAL Time Theorems, includes all forms of generated TT and any spent on Studies
* **total completions** - Total completions of all Eternity Challenges
* **pending completions** - Total completions of current EC at Eternity
* **ecX completions** - Amount of EC completions for a certain EC (eg. "ec6 completions")
* **filter score** - Glyph filter score of the Glyph which your filter will select this Reality
* **space theorems** - Current unspent Space Theorem amount
* **total space theorems** - TOTAL Space Theorems, including ones spent on current Studies

Formatting Comparisons: (resource1 condition resource2)

* Comparisons are used within certain commands, which allow you to control the behavior of the automator based on the game's current state. They have a standard format with two value inputs and a comparison operator, but the value inputs can be anything as long as it is formatted correctly overall.
* *resource1* and *resource2* can be any Automator Currency, a defined constant, or a number which must be formatted in scientific notation (eg. 1000, 1e100, 1.8e308). Unlike more general programming languages, this must be a single value (ie. math expressions such as "ip + pending ip" are not allowed).
* *condition* must be an inequality operator (<, <=, >, >=), which takes on its typical mathematical meaning. Equality operators (==, !=) are not allowed, as the nature of the game means that numbers will often never be exactly equal and thus checking based on direct equality may lead to unexpected script behavior.

Commands with inner blocks: (**header\_command** {*inner\_commands*})

* Some commands are associated with an "inner block" of commands. This inner block can contain still contain any other valid command, but may or may not actually get executed based on what the state of the game is when **header\_command** is executed. This allows you to repeat some commands over and over (eg. Time Study purchasing), or to skip them entirely (eg. not entering an EC if it already has full completions). These blocks can be nested if desired, with inner blocks being placed within one another.
* In the text editor mode: Specify the inner block with curly braces, with the opening brace { on the same line as the comparison and the closing brace } on its own line after the last line you want inside the block. Inner commands do not need to be indented, although it may be visually helpful to do so.
* In the block editor mode: These commands come with an empty dotted rectangle which indicates which commands are within the inner block. Subsequent blocks can then be dragged inside the dotted rectangle.

Note: In the SYNTAX note on each command, underlined inputs are *required* inputs which you must fill and inputs in [square brackets] are optional (if used, they should be input *without* the brackets). Any other parts should be typed in as they appear. Unless otherwise stated, all of the inputs are case-insensitive. Some commands may have more than one valid format, which will appear on separate lines.