Quality

## Description

**Quality** is a property of everything in Life is Feudal which represents the value of an object. Quality ranges from 0-100 and affects nearly every aspect of gameplay.

## Examples

* A 100 quality Tool will have approximately twice the durability of the same tool at 1 quality.
* Weapons and armor of higher quality are more effective at dealing and mitigating damage.
* The durability of finished structures is derived from the structure's quality value, which is derived from the quality of the components that went into making it.
* Crops grown are limited by the quality of the soil.
* Trees planted have quality from the sprout quality, limited by the Forestry skill value. (Q90 sprout + Q80 Forestry= Q80 tree) (Q80 sprout + Q90 Forestry= Q80 tree)

## Rules

### Materials gathered and farmed

How a gathered item's quality is determined differs greatly from case to case.

In some cases the quality is only influenced by the source object e.g. the tree hewn down, in others both the object will have the quality determined as the minimum of the source object's quality and the associated skill's level.

In contrast to crafting, when gathering the quality of the tool used does not matter.

* Minimum of skill level and interaction target quality:
	+ Any action associated with Gathering skill (materials, herbs, edibles)
* Minimum of skill level, interaction target quality and items consumed by the action
	+ Planting and harvesting crops using the Farming skill
* Interaction target's quality:
	+ Any terraforming action using the Artisan skill, digging or mining actions using the Mining skill, sawing logs/boards/billets using the Carpentry skill, cutting down trees or chopping billets using the Forestry skill, and hewing gems using a Precious Prospecting skill

### Items obtained by crafting

When creating an item, its quality will be calculated based on your (effective) skill, the tool quality used to make it, and all the recipe's components. Each input of a crafted item has an influence that differs from recipe to recipe and can be viewed on each item's page.

By using the clothing associated with the skill used and/or leveling the skill's primary or secondary attribute, the effective skill used in the formula to determine the resulting quality can exceed 100, making it possible to raise the resulting item's quality, e.g. create quality 100 items from ingredients with qualities below 100.

* If you are using a building like a Forge and anvil, the raw quality value of the building will be scaled by its current durability when crafting.

If you are using a building which provides a bonus to crafting quality, like a Blacksmith shop, the scaled quality value of the item being crafted will be increased by 20%.

* If the building's effective quality is over 100, the excess **will raise** the overall quality of the item. In this way you can "make up" for poorer quality ingredients, provided you have an excellent quality building to do the work in. Note that crafted items cannot exceed 100 quality with this method.

### Item quality in stacks

A stacked Item merges qualities using math that averages the items. Two items with the quality 1 and 100 joined together will form two items in a stack with the same quality of the average of the two which is close to 50. But since quality is rounded to the closest integer, stacking different qualities will usually lead to a loss of quality in total. It is recommended to store low quality and high quality items separately in its own stacks.

Players should be aware that splitting a stack of items with quality 50 will not create any other item with a different quality except for 50. Sometimes, the game can appear to store quality values independently in stacks, but this is false.

### Item quality in structures

The quality of structures such as buildings and trees affects their durability by the formula given below.

```
****Quality**** = (*Durability* - 5000) / 150

*Durability* = floor(50 + 1.5 * **Quality**) * 100

```

Note that in order to achieve maximum durability of a building, next to the maximum quality of both, materials and tools, a maximum durability of the tool at the moment of hammering down the final materials is also required.