Atrinik Server  4.0
Treasures

The treasures file in arch directory contains various treasures, with generation rules.

Treasures file syntax

magic_fix:

If we want to give an item in a treasure list always a fixed bonus magic_fix should be used. This also includes negative value (item will then be set to cursed automatically).

magic:

If magic_fix is 0 and magic_chance gives a magic item, magic value is used to generate a magic item.

Formula is:

(RANDOM() % abs(magic)) + 1

A magic value of 1 will always generate +1 items, a magic value of 2 items with +1 or +2 and so on. Negative values are possible too.

magic_chance:

This value can be between 0 to 100. If there is no magic_chance value, chance for magic item is server internal default drop value.

100 means a 100% chance to generate a magic item.

difficulty:

For spliting treasure lists, difficulty sets a difficulty level. A map or a object generating this list must be same or higher level. If not, list is ignored.

wealth:

The wealth arch is transformed to real money based on the difficulty/level of its enviroment. The default setting is in value of the wealth arch but can be altered by using the magic keyword.

t_style:

See: Treasure style

artifact_chance:

Chance to generate artifact from this.

Possible values of artifact chance:

chance:

Percent chance for this item

chance_fix:

Will overrule chance: if set (not -1) it will create 1 / chance_single

nrof:

Random 1 to nrof items are generated