Leisure

**Leisure** is a Need measuring the amount of fun that the Character is having at the moment, and steadily drops over time based on their Recreation Consumption Bonus (`HappyConsumeConstant`). It can be found in the character Selection and Control menu. When a Character is low on Leisure, they will perform Leisure Activities to regain Leisure. The amount of Leisure gained depends on the Activity Efficiency and the Recreation Replenishment Bonus (`HappyRecoveryConstant`).

## Activities

There are a number of different Activities that restore Leisure:

### Bonus drops

If a Leisure building is capable of producing items listed in the Produce column above, the following process occurs every time a Leisure action completes at that Building:

* A roll of Artisanry Skill Level\*0.55%, if it succeeds, a drop is generated. This chance is 11% at 20 Artisanry.
* The Tier of the item produced can be anywhere between 1 and 12, with the Tier depending on the Estimated Artwork Value (`ArtRateValue`) of the Character creating the item.
	+ The Tier is generated as a normal distribution with a mean equal to the Estimated Artwork Value and a standard deviation of 2, with a minimum of 1 and a maximum of 12.
	+ For example, a Character with Estimated Artwork Value of 4 will on average produce items of Tier 4, with 68.2% of items being created between Tier 2 and 6.
* 10% of Go and Sheet Music can receive a random special item name, detailed in their respective articles.

### Fun from job tasks

In addition, characters that either like or love their job will restore their leisure by 0.48 in case of love and 0.192 if they like it whenever they finish a task :

* Cooking, Medicine, Crafting, Construction: crafting something with that skill
* Medicine : treating someone
* Construction : building, repairing a tile
* Farming : plant, harvest a plot
* Mining : Mining a tile

This activity gain is susceptible to weariness, each job having its own weariness.

Moreover, the "Free" job also adds 1 fun when it ends naturally, also susceptible to weariness. The job itself is susceptible to weariness, not the activity taken by the "Free" Npc.

### Activity weariness

When a NPC decides to have fun, they'll choose the activity depending on how "fresh" the activity feels for them, or randomly in case of equality. Then either a flat number or the time spent in that activity is added as activity weariness. The fun gotten from the activity itself is reduced by the weariness, and every second activity lose a little bit (0.001) of their accumulated weariness, down to total freshness.

#### Effect on fun

* For Leisure activities : when an activity is completely fresh, 120% fun, down to -85% fun decreasing in linear fashion.
* For liked and loved jobs : +2% fun to -8.5% linearly.
* for "free" activities : +40% fun down to -170% linearly, making it losing leisure.

#### Activity weariness accumulation

* For Leisure activities : +006\*ActivityTime per activity.
* For liked and loved job : +0.075 per completed task.
* For "Free" activities : +0.012 per completed task

## Food

Leisure can also be increased by eating luxury foods like the following:

* +25 Soil Essence (DLC)
* +25 Amber Fruit
* +10 Li's Dried Amber Fruit
* +5 Pear
* +2 Ginkgo Fruit

## References

1. ↑ Settings\Property\RoleProperty.xml
2. ↑ Settings\Fun\Funs.xml
3. ↑ `XiaWorld.FunDance.TryGetJob() & Settings/Fun/Funs.xml [SexNeed]`
4. ↑ `XiaWorld.ToilGetFun.Produce`
5. ↑ `XiaWorld.JobBase.DoLoveJob()`
6. ↑ XiaWorld.JobFree.OnToilFinish()
7. ↑ `XiaWorld.NpcFun.GetFun()`
8. ↑ `XiaWorld.NpcFun.Step()`