Atrinik Server 4.0
The treasures file in arch directory contains various treasures, with generation rules.
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).
If magic_fix is 0 and magic_chance gives a magic item, magic value is used to generate a magic item.
(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.
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.
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.
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.
See: Treasure style
Chance to generate artifact from this.
Possible values of artifact chance:
Percent chance for this item
Will overrule chance: if set (not -1) it will create 1 / chance_single
Random 1 to nrof items are generated