Expressions

Expressions are a special feature of the CustomOreGen xml parser. Any attribute value that begins with ":=" is evaluated as an expression and the result is then assigned to the attribute.

Expressions can contain literal numbers or other values as well as mathematical symbols and functions, logical comparisons, string concatenation, and many other operations.

Config options, World Properties, and Mystcraft Symbols may be used like variables. The name of the option/property/symbol is replaced by its current value in the expression. The special variable "_default_" is also available, containing the default value of the attribute being set.

Expression values fall into 3 basic types: numerical, string, or boolean. It is the user's responsibility to keep them straight and to make sure that operators and functions are being used with values of the correct type. Use the conversion operators #, $, and ? when necessary to convert between types.

Some examples: