Gaining XP

## Combat

The main method of gaining XP is through combat. Most heroes will start in the Valmorgen Sewers hunting rats. In combat, heroes gain XP for damaging monsters (either physical or magical).

Every monster has a base XP value. This is a constant value. For example, a Giant Rat is worth 300 base XP points.

The actual amount of XP gained by a hero from a monster, is related to his (or her) level, total damage dealt at combat, HP, and base XP of that monster. The process is describes as:

1. First the base XP of the monster is divided to it's HP in order to find XP per HP for the monster. The result is rounded down.
2. At every combat round the dealt damage is multiplied with XP/HP. All those rounds' XPs are summed up when the battle between the hero and the monster is over (either the hero or the monster died or fled).
3. If the sum is greater than the base XP of the monster, gained XP is equal to the base XP; otherwise the sum is equal to the gained XP
4. Finally the gained XP is divided by the square of hero's level. the result is rounded down

For example

*Barry the Brave is a level 2 warrior who ventures into the sewers to earn experience. After some exploring he sneaks upon a giant rat. Barry kills the rat by dealing two times 4 damage, one time 6 damage and one time 7 damage to it(21 damage for total).*
1. Giant rat has 150 base XP and 19 HP. So XP per HP is 150 divided by 19, which is equal to 7 when rounded down.
2. The XPs collected at combat rounds are 21 times 7, which is equal to 147
3. Since 147 is smaller than 150 (Base XP) we will use 147
4. 147 is divided by 4 (square of 2). The result(36,75) is rounded down to 36.

Barry gains 36 XP at the end of the combat!

Some additional remarks:

* Fights with multiple monsters are similar to fights versus one monster. Every monster's XP is calculated one by one.
* The rules apply equally to followers with the exception that followers are always counted as lvl 1.
* Even when a Hero is killed or flees from combat, (s)he gets experience for the damage (s)he dealt.
* Casting spells or abilities such as critical hit no longer grant bonus XP.
* For more Base XP values look here

## Crafting

Using schematics, heroes may craft useful items as well as gaining some additional XP!

* upon succesfully combining components, heroes receive 10 XP times the difficulty level of the schematic.
* upon succesfully embedding socketables into items, heroes receive 2 XP times the difficulty level of the schematic.

While these numbers may seem small, at very high levels, (when the gained XP from monsters are significantly reduced) it may be a good strategy for gaining XP

## Stealing

Heroes with the Stealing ability can attempt to steal from shops. Each attempt - successful or not - will earn the hero 400 XP. This XP gain is divided by the square of the hero's level in the same way as combat XP. For example, a 10th level hero will get 4 XP for an attempt.

## Planting

Healers and Cultists can gain extra XP by Planting Herbs. This is an automatic effect that triggers after combat in certain (outdoor) locations. XP gain is independent of the level of the Hero until level 50 is reached.

## Building

Gnomes and Dwarves can gain XP (and gold) by doing Construction work. Building for three turn earns 21 XP for Level 1 Gnome and 7 Xp for Level 1 Dwarf. XP gained is 7\*Sets of turns/Level squared for dwarves and thrice the value for gnomes. A hero can apply for building work in the Valmorgen palace.