The Basics
The engine is invoked with a command.
- usually, a command consists of an instruction for the engine to carry out.
- A command can consist of any number of characters.
- If you do not call for a specific result, the last calculated value is given back to you as result.
Mathematics
The engine can evaluate mathematical expressions. It follows all usual customs.
You can use brackets as you like. For available Operations, see here: Operators
Examples
Input | Evaluates to | Result |
---|---|---|
2 | 2 | 2 |
2+2 | 4 | 4 |
4*2+2 | 8 + 2 | 10 |
4*(2+2) | 4 * 4 | 4 |
2(2+2) | 2 * 4 | 8 |
2d6+2 | roll 2d6 and add 2 | a random value between 3 and 8 |
Operators
The engine can process the following operators:
Precedence | Operator | Function |
---|---|---|
1 | d | dice definition |
2 | -, + | number sign |
& | dicepools with multiple dice | |
3 | ! | faculty |
^ | power | |
4 | * | multipliction |
/ | division | |
\ | integer division | |
% | modulo | |
5 | + | addition |
- | subtraction | |
6 | = | assignment |
x | repetition |