Regnus 5.2

The Random Text Scripting Language

The Regnus Scripting Tutorial

Part 1: Your First Regnus Script

Welcome to the tutorial for the Regnus scripting language. Regnus is a powerful recursive language for the generation of random text. It can be used for a wide number of practical (and not-so-practical!) applications, both for work and for leisure, and before you start this tutorial, it is recommended that you try playing with some of the many scripts already available to give yourself some idea of some of the many capabilities of the language.

So, to begin with, let's get started by creating your very first Regnus script!

First, open a text editor of your choice. For instance, the Windows Notepad will do at a pinch (although we'd recommend Edit Pad Lite for any serious text-editing).

Create a new plain text file in your editor, and give it the file extension ".rsf" - this stands for "Regnus Script File", and is the standard file extension for Regnus scripts.

Into this file, paste the following:

GROUP ExampleGroup
ENTRY <First Label>Hello brave new world!
ENTRY <Second Label>Goodbye cruel world!

Now, open this script with your Regnus parser. You should be given a selection of two options from the parser's contents menu: "First Label" and "Second Label". Go ahead and select one, and generate some text!

You will see that the text presented to you by the parser is the entire selected line of text from the file, apart from the part enclosed in triangular brackets, and the first word.

These line identifiers (the parts in triangular brackets) are called "labels", and they tell the parser that it can start parsing from that line, as well as letting it know what that option should be called!

Labels do not have to appear at the beginning of the line; they are just as welcome at the end, or at any point in between! So, for instance, the following will work just as well:

GROUP ExampleGroup
ENTRY Hello brave new world!<First Label>
ENTRY Goodbye cruel <Second Label>world!

...Though, it probably goes without saying that it is considered bad practice to insert labels haphazardly in the middle of sentences like that!

Of course, a line with no label will not appear as an option in your parser's contents list... In the following script, the parser will never display the unlabelled line:

GROUP ExampleGroup
ENTRY <First Label>Hello brave new world!
ENTRY <Second Label>Goodbye cruel world!
ENTRY This line does not have a label, and so will never be displayed!

Those five-letter words at the beginning of each line of the file are called "qualifiers", and they are also important: every line in a Regnus script file must start with a qualifier, which lets the parser know what kind of information is contained in that line...

More on that shortly though!