WorldEditAdditions Beginner's Tutorial

Welcome to the WorldEditAdditions beginners tutorial! There are a number of conventions used in thechat command referencethat may not be immediately obvious - this guide serves to explain in detail.

It is assumed that:

Minetest supports the execution ofChat Commandsto manipulate the Minetest world. While in a Minetest world, simply type/help(the first forward slash/will automatically cause the chat window to appear) and hitenterto display a list of chat commands that are currently registered grouped by mod for example.

WorldEdit commands are, by convention, prefixed with an additional forward slash/. Here are some examples of WorldEdit chat commands:

//1
//2
//set dirt

Explaining core WorldEdit commands is out of scope of this tutorial, but you can find a complete list of them here:https://github.com/Uberi/Minetest-WorldEdit/blob/master/ChatCommands.md.

The purpose ofWorldEditAdditionsis to extendWorldEditby adding additional commands. Example commands that have been implemented that are not present in coreWorldEditinclude (but certainly aren't limited to):

See a full list with complete explanations in thechat command reference.

Regions

WorldEdit allows you to define aregionby specifying 2 points in the world - we number these points 1 and 2. By using the WorldEdit wand (or WorldEditAdditions Far Wand), one can left click to set the position of point 1, and right click to set point 2:

A screenshot showing WorldEdit points 1 and 2 in a desert with a cactus

Point 1 is on the cactus, and point 2 is on the ground in the bottom left.

Most WorldEdit and WorldEditAdditions commands require either 1 or 2 points to be set in order to work.

Command syntax

When explaining the syntax (refa,b) of a command, a number of different conventions are used to concisely explain said syntax. Understanding enables you to quickly understand the output of/help /mazefor example, or the list of commands in thereference.

Let's illustrate this with a practical example. Consider the following:

//example <height> <apple|orange> | <height> <width> <pear|maple> [<extra_value>]

The following different invocations of the above would be valid:

//example 10 apple
//example 45 30 maple
//example 30 12 pear something_else

Now let's apply this to a more practical example:

//erode [<snowballs|river> [<key_1> [<value_1>]] [<key_2> [<value_2>]] ...]

The<snowballs|river>explains that either a value ofsnowballsorriveris acceptable. Then, a key - value list of options can be specified - allowing an arbitrary number of options.

From this, we can infer the following usage:

//erode snowballs speed 1 count 50000

Anything else?

Advanced Concepts

A number of additional concepts that are not required to use WorldEditAdditions are explained here, as they can be helpful for understanding some of the more advanced concepts and commands provided by WorldEditAdditions.

Meta commands

WorldEditAdditions provides a number ofmeta commands. Such commands don't do anything on their own, but call other commands in various different ways. Examples of meta commands include:

Of course, this isn't an exhaustive list - check thereferencefor a full list.

Memory usage

Memory (or RAM - Random Access Memory) is used by all the processes running on a system to hold data that they are currently working with. This is especially important for WorldEdit and WorldEditAdditions, since the larger the region you define the more memory that will be required to run commands on it.

Depending on your system, Minetest and your system can slow to a crawl or even crash if you execute a command on a region that's too big.

To work around this, the//subdividecommand was implemented. It splits the defined region into chunks, and calls the specified command over and over again for each chunk.

It's not suitable for all commands (since it requires that said command takes 2 points) though, but because it splits the defined region into multiple chunks, it can be executed onenormousregions that can't fit into memory all at the same time.

Conclusion

This short tutorial has explained a few key concepts that are useful for understanding WorldEditAdditions, from executing chat commands to the syntax used in thereferenceto concisely describe commands.

If there's a concept that you don't understand after reading this and thereference, pleaseopen an issuewith a detailed explanation of what it is that you're finding difficult to understand.