Mystcraft Symbols

CustomOreGen includes some special features for interoperability with XCompWiz's Mystcraft. A complete description of how Mystcraft works are beyond the scope of this page - see the Mystcraft forums and wiki. In a nutshell, though, it allows the player to create new worlds ("ages") and travel between them. Each age is described by a list of "Age Symbols" which affect everything from the biomes and terrain style to the color of the sky and the weather.

To check if Mystcraft is installed use <IfModInstalled name="Mystcraft"> or the expression function isModInstalled("Mystcraft"). To check if the current dimension is a Mystcraft age use the *age* dimension property.

## Custom Symbols

COG can define custom symbols for the writing mechanic using the <MystcraftSymbol> element. As described below, these can then be used in expressions to control how ore generates in Mystcraft ages.

<MystcraftSymbol>
 weight | 1.0
 instability | 0
Unlike the other symbol attributes, this value may vary from dimension to dimension and can depend on dimension-specific properties. In particular, the instability may depend on the value of this symbol itself. For example:

```
instability=':= if( age.*thisSymbol* > 1, 500, 0 )'

```

This adds 500 instability to the age if the symbol appears more than once.
The instability is added to the age exactly once regardless of how many times the symbol is present, or even if it isn't present at all.

### Important Caveats for Custom Symbols

* Like all configuration data, custom symbols are handled by COG on the server. In order to see custom symbols in the Mystcraft GUIs, though, the **client must have CustomOreGen installed** as well.

* The set of Mystcraft symbols defined in the config file must be **consistent across all dimensions** in a given world. That means that symbols must be defined in the world or global config file. It also means that dimension-specific values (e.g. the terrain generator or the value of other symbols) cannot be used to decide if a symbol generates. If a symbol definition is wrapped in a condition of some kind then the condition must depend only on global options and world properties. Most symbol attributes - *name*, *display name*, and *weight* - also have to be consistent across all dimensions. They cannot depend on dimension-specific properties either. The *instability* attribute is an exception - its value can and should differ between dimensions. See the table below for details.

## Symbols in Expressions

The value of a COG-added symbol (the number of times it is present in an age) is available in expressions using the syntax

```
age.*symbolName*

```

The value of the symbol is specific to each age, meaning that it changes from dimension to dimension. In fact, symbol values are very similar to the standard dimension properties. Just as with world/dimension properties and options, symbol values can be used to control which distributions generate and their properties.

The value of a symbol will be 0 under any of these conditions:

* The symbol is not present in the current age
* The current dimension is not a Mystcraft age
* The symbol name is not recognized
* Mystcraft is not installed

Only symbols added by COG can be referenced in expressions. The symbols defined by Mystcraft (e.g. "Dense Ores") are not available.