Download (124 KB)
For Luanti 5.0 and above

How do I install this?

visual-bots

A minetest programmable bot

(c) 2019 Nigel Garnett

Vbots are single block "turtle" style bots, programmable in an entirely visual way. They came into existence to amuse my 5 year old daughters, and teach them the basics of computer programming, without too much writing.

Basics

Punch an idle vbot with an empty hand to make it run it's program (or click the run icon in the menu [see below]).

Punch a running vbot with an empty hand to stop the program.

Right click (double tap on android) to open the menu (see below).

Dig the bot by hitting it with anything except an empty hand, but bear in mind the bot can only be dug out if it's inventory is empty.

The Main menu

Main Menu 1

The icons commands and inventory are used to switch between the 2 panels shown here.

The panel above contains the commands for the bot, which can be added to the current sub-program (the red area on the right) simply by clicking on them.

The panel below shows the inventory panel, with the bot's inventory above, and the players inventory below. This panel is used to add things to the bot's inventory (so it can build with them) or to remove things from the bot's inventory after it has been digging.

Main Menu 2

The trash Trash icon, when pressed, deletes the last instruction on the current sub-program page. Next to this icon is another 1x1 inventory slot which works as a trash can, anything dropped into it is destroyed.

The run run icon, works like punching the bot with an open hand, It starts the program runnng.

The save save icon saves the current program & sub-programs under the name of the bot.

the load load icon allows you to choose and load a program into the bot. Also on this menu are icons which allow the deleting & renaming of programs.

The reset reset icon clears the main program, and all subprograms, but NOT the bot's inventory.

The sub-program panel (the red one on the right) has 7 pages. The Lion icon is the page for the 'Main' program, execution starts here when the bot is activated. The other 6 pages are sub-programs which can be called via the 6 'run sub program' icons at the bottom of the command panel. dinosaur goat horse parrot bear rhino

Movement

forward backward up down Move the bot forward, backward, up or down. Movement will fail if the new position is not empty.

home Move the bot back to the position where the bot was placed. Note: the facing of the bot is NOT restored to it's initial facing direction.

clockwise anticlockwise random These commands turn the bot clockwise, anticlockwise or in a random direction.

Actions

dig up dig down dig These commands make the bot dig the node in that direction, and then move into the place it dug from. Note: digging will fail if the node being dug has protection which the owner of the bot could not dig.

build up build down build These commands make the bot place a block in the noted position (if protection allows and the position is empty). The node placed by the bot is the first thing found in the bot's inventory, starting from the first slot.

Special

speed This pseudo command chooses the speed that the bot runs the program. when followed by a number multiplier it will make the bot run that many times faster. When NOT followed by a number, it resets the bot to normal speed.

Multipliers

x2 x3 x4 x5 x6 x7 x8 x9 The Multipliers work the same for all commands except speed (explained above). For all other commands (including call sub-program commands) they make that command run multiple times.

Example1

forward x4 clockwise x2 forward x4 clockwise x2

This program makes the bot move 4 spaces forward (if possible) then turn 180 degrees, move 4 spaces forward (ie back to the start position) and then turn 180 degrees again to face the initial direction.

Example2

(just example1 using a sub-program)

In the dinosaur dinosaur sub program put the following: forward x4 clockwise x2

Then, in the main lion program ( the lion), just call it twice like this: dinosaur x2

Have fun. Nigel

Reviews

Review

Do you recommend this mod?

  • English

    Really useful!

    A very useful mod for quickly digging complex tunnels. However, I found a bug: when I give him certain objects like a pickaxe, it causes an error:

    AsyncErr: Lua: Runtime error from mod 'vbots' in callback node_on_timer(): "Unknown node: default:pick_wood"

    0 comments
  • Interesting learning tool!

    I love the idea of setting loose an auto-mining robot with something like this. Few questions/suggestions: Is there any way to have the bot dump it's inventory into a container or hopper? And is there any way to have the bot run on a loop or have it's code loop mathematically? Or maybe a just "label" and "goto label" feature? Or For that matter a counter/variable system could be useful too.

    0 comments

Used By