[UPDATED] Programming Guide: Videos and Illustrations

[UPDATED] Programming Guide: Videos and Illustrations

Video Links

Episodes[ (Older/with overlay)

Episode 1: Basic Concepts

Episode 2: Moves and Haulers

Episode 3: Winders

Episode 4: Forestry

Episode 5: Tools and Mining

Episode 6: Final Touches!

Playlist of all the videos: Playlist Here

Tips and Tricks Series

[NEW!] Tips and Tricks: Map Generation, Keybinds, Dense Tree Farms and More!

UPDATE!!!I made a much shorter more concise video covering all the programs with NO MASSIVE OVERLAY in the way! Find it here: NEW VIDEO HERE

Programming Concepts [WIP]


[UPDATED] Programming Guide: Videos and Illustrations image 13
[UPDATED] Programming Guide: Videos and Illustrations image 14

The two most common interfaces that you will interact with are the group and the Bot interfaces.

GroupsYou can drag bots from your bot listing into teams so that you can give instructions to several of them at once. Also, you will be able to see their color and more quickly differentiate the purpose of bots visually. From this screen you can stop the whole team, start them, pause them, make them all drop what they're carrying and make them all come to you (Bots must be stopped to do these last 2).

I try to name groups with a sing letter in brackets that is a clear abbreviation for their role.

Mo[V]er

[M]aker

[H]arvester

[F]orestry

[]uilder

[O]verflow

[C]rafter

[R]echarger (Winder)

BotsBots are much more complicated. I recommend you watch my video on this topic, but I will give a summary of what each item is in the bot interface here.

1. The Free Memory Display; Each instruction takes 1 KB regardless of how complicated it is. You cannot have more instructions than this number. You can improve the capacity here by adding upgrades or starting with better Bot Heads. If you copy code using a floppy disk, only the lines of code that are within this limit will be accessible, but it seems that the whole program is still stored so you can add memory to later make room for the larger program.

2. Bot Name. I usually prefix the bot name with the group it will belong to. This makes adding bots to groups much easier. The names I use are related to the job they perform or the tools they use.

3. This is the code area. The code area gets filled with instructions as you act while recording. Right click on an instruction or loop to delete it. Dragging a loop will move all its contents. You cannot add a loop unless there is a conditional operation/exit condition setup for it. Ctrl-left clicking will allow you to select multiple lines of code and you can drag them around then.

4. These check boxes determine if your code will move past a command that cannot currently be executed inside that loop or not. If the check box is unchecked, your code will remain blocked until it can continue. If it is checked, the loop that has that instruction will be exited and code will pick up as if that loop was completed. This can allow you to do a form of branching if you get creative with it.

5. Conditions; These can be selected to give an exit condition for the loop, or a check to see if the loop gets entered. This will be checked each time the program flow gets to the start of the loop. If you are familiar with computer programming, this is like a DO..WHILE loop. Conditions are as follows and are currently limited to these exact conditions.

Hands Full (Your bot carries an item in ALL HAND slots)

Hands Empty (Your bot carries NO items in its HAND slots)

? Full (Until a chosen structure is full)

? Not Full (Until a chosen structure is NOT full. This means there ARE items in it, but NOT the MAXIMUM)

? Empty (NO items in the structure)

Held Object Full (Like a bucket is full of sand)

Held Object Empty (Like a bucket is empty)

# of Times (Choose a specific #. Good for workbenches, etc)

Forever! (The default, will run until stopped or an error happens with the check box checked)

Backpack Full (Until ALL backpack slots are filled)

Backpack Empty (Until NO items are in the backpack slots. Partially full does not count)

Until a shout (An advanced scenario, but until you or a bot shouts a command)6. Loop; This repeats based on the condition listed above and continues until the condition is met. Loops when moved or deleted will move or delete the instructions inside them.

7. Instruction; A single task for the bot to complete. Move, take, add, use, find, etc.

8. Current Command; When your bot is running, this will show you which command is actively being executed, or is being attempted to be executed. This is helpful for troublleshooting.

9. Zone/Structure Selector; This allows you to set an area to perform a command in. You can manually select an area, or point it to a structure or a sign that will itself have an area. This is helpful to allow you to change a working area for many bots at once!

10. Expand Code Interface; This makes the coding interface wider or narrow again. Sometimes useful for long instructions or complicated code.

11. Record; Starts recording a program. Flashing means it's active.

12. Pause; Pause the program execution at the CURRENT instruction.

13. Stop. Fully stops program execution. When started, code will start from the beginning. Upgrading bots usually requires a fully stopped state.

14. Drop Items; This command will make your bots quickly drop all they carry. This can only be done in a stop state.

15. To Me; If your bot is in a stopped state it will move to the exact spot you are standing in when this instruction is given. If you move, the bot will still go to that same spot.

16. Add/Remove Loop; It takes a bit to get used to how this works, but it will wrap all instructions in a loop. You will usually have to move things around to meet your needs. If you are on the outermost loop, it will remove the loop instead.

17. Undo; Roll back the last thing you did by one step. Helpful when you delete code you didn't mean to.

18. Delete Code/Trash; Clears ALL code from this robot. Does not change name or anything else.

19. Bot Inventory; Allows you to upgrade your bot

Rechargers


[UPDATED] Programming Guide: Videos and Illustrations image 58
[UPDATED] Programming Guide: Videos and Illustrations image 59

Rechargers I use the following group:

[R] for [R]echargers (winders)I typically name the bots with the bot version so I can easily see the faster/more versatile bots...

For example: [R] for a basic bot. [R1] for a Mk1 bot. [R2] for a Mk2 bot

Notes:

The advance on fail lets the program flow move ahead if one loop is blocked. Moving to an area that is covered by an overlapping zone means that other rechargers should always find and recharge this bot. These are the zones of coverage.

Forestry


[UPDATED] Programming Guide: Videos and Illustrations image 66
[UPDATED] Programming Guide: Videos and Illustrations image 67
[UPDATED] Programming Guide: Videos and Illustrations image 68

I use the follopwing groups here:

[F] for [F]orestry (diggers, planters)

[H] for [H]arvesting (Choppers, miners)DiggingSo, one thing that I learned is that if you use the dig command on bare dirt, the game will only dig on even coordinate pairs... so (182,156) thus making the density of your farms 25% of what they can be. The solution for this is to manually dig out holes in your farming area, and plant seeds. Once you chop down your first tree, program your shovellers not to dig the earth, but to find trumps and dig those! This way, your bots will keep the density you need. This helps reduce movement times, downtime between actions, and means that you can use up 1/4 the farming space for trees that you would normally! I use a 7/7 grid, with pathways in between like this. This is all the code you need. Note that you keep working the loop until the bot's hands are empty. This will happen when the tool breaks. At that point, the bot will go and retrieve a new tool and begin again. Because this layout is so compact your bots can produce resources more efficiently - better than if they had 4x the distance to cover!

ChoppingChopping is simple. Find trees to chop down until your hands are empty. When hands are empty, go get a new axe!

You can use this same technique to do mining and other similar tasks.

Collecting/Transporting/Overflow


[UPDATED] Programming Guide: Videos and Illustrations image 75
[UPDATED] Programming Guide: Videos and Illustrations image 76

Any bot that moves things from one place to another, either from storage or from what is found on the ground, and moves it to another storage location (or the ground somewhere else) will follow these same patterns. I treat overflow of storage differently but even their code is the same. I use the following group designations:

[V] for Mo[V]ing

[O] for [O]verflowIn this case you define an area to pick up items from, and then a destination to drop them off. Here, I am using 2 towers of crates as my Acorns fill up quickly. If the first stack is full, it will put them in the second. This can be extended as long as you have bot memory. Also, you can use bots to create a Queue (a set of items where the first ones added get moved to the other end where they are the first removed and everything flows and fills in a line).

EfficiencyThe last thing to bear in mind for basic programming is efficiency. Instead of getting one item, running it to storage, over and over... You can collect items until your hands are full and THEN drop them off until your hands are empty. This will save a lot of time and energy.

Update History

Initial Guide Creation

09-Nov-2019: Added program pictures and phase one of text guide

10-Nov-2019: Added a new Tips and Tricks video link

Source: https://steamcommunity.com/sharedfiles/filedetails/?id=1899638804					

More Autonauts guilds