Overview

There are two ways to create missions in the Forge: via the Step Editor and Miniscript. The Step Editor is an easier, visual way; it's recommended to start your Forge journey with this tool and create a couple of missions. However, it has restrictions: you can't create non-linear missions or include hints if you use it.

The Miniscript approach uses the in-built scripting system. That gives you a boost of flexibility; however, it requires basic coding skills. But don't worry, everything you need to know is the concepts of "if" and "while". All complicated computations are hidden in the in-built CommandWaiting and Sequence objects.

To use the Miniscript approach instead of steps, go to the "General Info" tab in the Forge, scroll down, and make sure the "is Miniscript-driven mission" toggle is turned on.

Untitled

The "Edit Script" button opens the in-built text editor. Here you can write a small script; however, it's better to use an external text editor and use the in-game editor only for copy/pasting the script. The developer's recommendation is Notepad++ with Lua syntax highlighting (Language > L > Lua).

Missions are built based on a while loop and asynchronous wait method. This means we have a loop that constantly checks if some action (or actions) is performed by a player. Inside the loop body, a wait method exists to prevent the game from freezing. It's recommended to use a 0.1 delay value.


//sequnce setup

while sequence.isPerformed() == 0 // The loop ends when a player performs an early setup step.
	wait(0.1) //It's checking 10 times per second (100 ms delay).
end while	

//next actions or end of the mission

You can always explore examples. Let's start with a very simple mission that requires only a couple of actions from a player and has only one goal.

Functions