Functional method reference¶
These methods are centered around logic, mathematics and random numbers.
Incompatibility warning
Some of these methods differ slightly from the original implementation. They are marked with yellow markers.
{note:TEXT}  Allows you to leave a note in a tag that gets removed at runtime.
JagTag: {note:Cool beans} This is a tag
Command: ++tag example
Result: This is a tag
{choose:OPTION1OPTION2OPTION3(...)}  Chooses a random item from a list. The options can theoretically continue ad infinitum.
JagTag: {choose:applesbananaspears}
Command: ++tag example
Result: apples (Will change on each run)
{range:STARTEND}  Chooses a number from the provided range.
JagTag: {range:010}
Command: ++tag example
Result: 7 (Will change on each run)
{if:SOMETHINGCOMPARATORSOMETHINGTHENELSE}^{1}  Executes a comparison between two things. Standard JavaScript comparison operators can be used for the COMPARATOR property. Supplying ? as a comparator will compare the two parts by regex.
JagTag: {str===strstr is equal to strstr is not equal to str}
Command: ++tag example
Result: str is equal to str
{math:EXPRESSION}^{2}  Executes and returns the result of a mathematical expression.
JagTag: {math:(2 + 2) * 3 / 4}
Command: ++tag example
Result: 3
{abs:NUMBER}  Returns the absolute value of a number.
JagTag: {abs:4}
Command: ++tag example
Result: 4
{floor:NUMBER}  Rounds a number down.
JagTag: {floor:5.8}
Command: ++tag example
Result: 6
{ceil:NUMBER}  Rounds a number up.
JagTag: {floor:3.2}
Command: ++tag example
Result: 4
{sin:NUMBER}  Extracts the sine of a radian value.
JagTag: {sin:1.1}
Command: ++tag example
Result: 0.89120736006
{cos:NUMBER}  Extracts the cosine of a radian value.
JagTag: {cos:1.1}
Command: ++tag example
Result: 0.45359612142
{tan:NUMBER}  Extracts the tangent of a radian value.
JagTag: {tan:1.1}
Command: ++tag example
Result: 1.96475965725
{base:NUMBEROLD_BASENEW_BASE}  Converts a number to one base to another (Radix).
JagTag: {base:4102}
Command: ++tag example
Result: 100

There is no need to supply the additional keywords in the arguments, and they will not be parsed either.
 Java: {if:SOMETHINGCOMPARATORSOMETHINGthen:THENelse:ELSE}
 JS: {if:SOMETHINGCOMPARATORSOMETHINGTHENELSE}

A singular expression will suffice, rather than multiple chained ones.
 Java: {math:NUMBEREXPRESSIONNUMBEREXPRESSIONNUMBER(...)}
 JS: {math:EXPRESSION}