Programming

Programming is one of the key elements of Autonauts. All tasks can be automated with the help of programming Bots. It is done through a "learning by following" system. To program a bot, you click its record button in the bot's menu, perform the tasks you want it to repeat, and then press play or stop. (Play to get it to run now, stop to save and run later).

Programming in Autonauts uses block-based visual programming principles. There are basic commands like move, pick up and drop, and also repeat loops and conditional statements to use. When in recording mode, an Extra Instructions tab appears at the bottom right of the script panel.

As you start out, what you can do with one bot will be limited by the size of the bot's memory. As you upgrade your bots, more memory will be available to make more complex programs. There are also upgrades that you can give your bots to enhance their memory, although only one memory expansion can be installed at a time. There are also some Programming Tricks that can help reduce the size of a program to fit in less memory.

Repeat code blocks
Repeat code blocks help save memory and streamline bot programming. A bot program always starts at the top, and as soon as it fulfills a repeat block condition, it will move down to the next command just below the repeat block. Clicking the box to the right of the repeat block's condition indicates to exit the repeat block if an action within the repeat block cannot be performed (such as being told to pick up an item, but no items are available). Otherwise, the bot will pause at a blocked action until the action can be performed.

If code blocks
If statements work similarly to repeat statements, but will not execute more than once even if their condition is still satisfied afterwards. They also have an optional Else block, which will execute when the If condition is not satisfied.

To insert these commands, use the Extra Instructions tab.