Regnus Language Reference
Welcome to the Regnus language reference. This page is intended to act as a language summary, to be used as a quick-reference guide while scripting. If you are new to Regnus, please first read the tutorial to get you started.
Qualifiers
- ALIAS
-
- Syntax
-
ALIAS OriginalText:AliasText
- Description
-
Defines alternative text to be displayed when using the "@" RTC. AliasText is parsed.
- Tutorial Chapter
- Part 12: Aliases
- BLANK
-
- Syntax
-
BLANK Comment
- Description
-
Defines text to be ignored entirely by the parser, to be used as comments within a script.
- Tutorial Chapter
- Part 15: Comments & Quotes
- BLURB
-
- Syntax
-
BLURB Information
- Description
-
Defines information about the script to be displayed to the user by the parser. Information is parsed.
- Tutorial Chapter
- Part 15: Comments, Titles, & Blurb
- COUNT
-
- Syntax
-
COUNT Group:TextContent
- Description
-
Defines text to be randomly selected by a reference to its containing Group, and specifies the chance of this text being selected as equal to the total weight (number of entries) of another named Group. TextContent is parsed. Group is the name of the Group to be counted.
- Tutorial Chapter
- Part 03: Ratios & Weights
- DEBAR
-
- Syntax
-
DEBAR Word
DEBAR
- Description
-
Defines that its content word should not trigger the indefinite article correction system. Use with no content matches any word, effectively disabling IAC.
- Tutorial Chapter
- Part 05: Article Correction
- ENTRY
-
- Syntax
-
ENTRY TextContent
- Description
-
Defines text to be randomly selected by a reference to its containing Group. TextContent is parsed.
- Tutorial Chapter
- Part 02: References, Titles & Entries
- GROUP
-
- Syntax
-
GROUP GroupName
- Description
-
Defines a title under which entries are grouped. GroupName may only include letters, numbers, and the hyphen, underscore, question-mark and exclamation-mark characters.
- Tutorial Chapter
- Part 02: References, Groups & Entries
- MULTI
-
- Syntax
-
MULTI Singular:Plural
- Description
-
Defines the plural form of a word, to be used by the "~" AGC. Plural is not parsed.
- Tutorial Chapter
- Part 06: Automatic Grammar Characters
- RATIO
-
- Syntax
-
RATIO Chance:TextContent
- Description
-
Defines text to be randomly selected by a reference to its containing Group, and specifies the chance of this text being selected. TextContent is parsed. Chance is a numeric value.
- Tutorial Chapter
- Part 03: Ratios & Weights
- REFER
-
- Syntax
-
REFER Numeric:Name
- Description
-
Defines a name by which a particular numeric value can be referred to.
- Tutorial Chapter
- Part 11: Naming Numerics
- START
-
- Syntax
-
START TextContent
- Description
-
Defines a script entry which is not part of a group, ostensibly as a labelled starting point for parsing.
- Tutorial Chapter
- Part 01: Your First Regnus Script
- TITLE
-
- Syntax
-
TITLE ScriptTitle
- Description
-
Provides the title of the script.
- Tutorial Chapter
- Part 15: Comments, Titles, & Blurb
Reference Types
- Standard
-
- RTC
- #
- Syntax
-
##Expression1;
- Description
-
Resolves Expression1 and returns the result.
- Tutorial Chapter
- Part 02: References, Titles & Entries
- Title
-
- RTC
- +
- Syntax
-
#+Expression1;
- Description
-
Returns an entry selected from a Group with the name returned by Expression1.
- Tutorial Chapter
- Part 14: More Reference Types
- Locally Exclusive
-
- RTC
- *
- Syntax
-
#*Expression1;
- Description
-
Resolves Expression1 until result does not match any other result of a Locally Exclusive Reference in the same entry or expression, and returns the result.
- Tutorial Chapter
- Part 04: Exclusive References
- Globally Exclusive
-
- RTC
- &
- Syntax
-
#&Expression1;
- Description
-
Resolves Expression1 until result does not match any other result of a Globally Exclusive Reference, and returns the result.
- Tutorial Chapter
- Part 04: Exclusive References
- Comparison
-
- RTC
- /
- Syntax
-
#/Expression1:Expression2;
- Description
-
Resolves Expression2 until the result does not match Expression1, and returns the result.
- Tutorial Chapter
- Part 14: More Reference Types
- Storage
-
- RTC
- >
- Syntax
-
#>Expression1:Expression2;
- Description
-
Resolves and returns the result of Expression2, and also stores it in a slot identified by numeric Expression1.
- Tutorial Chapter
- Part 10: Storing Results
- Alias
-
- RTC
- @
- Syntax
-
#@Expression1:Expression2;
- Description
-
Resolves Expression1 and returns the AliasText taken from the Nth "ALIAS" qualifier whose OriginalText matches the result, where N is a numeric value resolved from Expression2.
- Tutorial Chapter
- Part 12: Aliases
- Label
-
- RTC
- _
- Syntax
-
#_Expression1;
- Description
-
Returns text taken from the entry whose label matches the result of Expression1.
- Tutorial Chapter
- Part 14: More Reference Types
- Script
-
- RTC
- $
- Syntax
-
#$Expression1:Expression2;
- Description
-
Returns text generated from the label matching the result of Expression2, in the external script whose path matches Expression1.
- Tutorial Chapter
- Part 14: More Reference Types
Automatic Grammar Characters
- Pluralisation
-
- AGC
- ~
- Description
-
Pluralises the preceding word or phrase.
- Tutorial Chapter
- Part 06: Automatic Grammar Characters
- Capitalisation
-
- AGC
- ^
- Description
-
Capitalises the following letter, word or phrase.
- Syntax
-
ENTRY Hello there, I am ^elvis ^presley!
BLANK Returns: Hello there, I am Elvis Presley!
ENTRY Hello there, I am ^(elvis presley)!
BLANK Returns: Hello there, I am Elvis Presley!
ENTRY Hello there, I am ^^(elvis presley)!
BLANK Returns: Hello there, I am ELVIS PRESLEY!
ENTRY Hello there, I am ^.(Elvis Presley)!
BLANK Returns: Hello there, I am elvis presley!
ENTRY Hello there, I am ^.Elvis Presley!
BLANK Returns: Hello there, I am elvis Presley!
ENTRY Hello there, I am ^^elvis presley!
BLANK Returns: Hello there, I am ELVIS presley!
- Tutorial Chapter
- Part 06: Automatic Grammar Characters
- New Line
-
- AGC
- |
- Description
-
Breaks to a new line in the output.
- Tutorial Chapter
- Part 06: Automatic Grammar Characters
- Conditional Space
-
- AGC
- _
- Description
-
Inserts a space character, assuming it is not directly preceded by another space character.
- Tutorial Chapter
- Part 06: Automatic Grammar Characters
- Overstep
-
- AGC
- *
- Description
-
Escapes the following character.
- Tutorial Chapter
- Part 06: Automatic Grammar Characters