> For the complete documentation index, see [llms.txt](https://infinitypbr.gitbook.io/magic-pig-games/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://infinitypbr.gitbook.io/magic-pig-games/game-modules-4/module-documentation/conditions.md).

# Conditions

## Overview

The **Conditions** modules brings Condition objects to your project. These are Stat-affecting objects which will automatically set Stats to recompute when added, and will remove themselves from the objects which contain them automatically as well, unless you choose to manually decide when they are removed.

{% embed url="<https://www.youtube.com/watch?v=VRx-yCO3SEY>" %}

{% hint style="success" %}
Observant viewers may notice that the video above and below each show *different* ways to cause damage to health using **Conditions**.

**Game Modules** is very very flexible, and there are many ways to use them to achieve desired game mechanics.

The "Conditions Setup" showcases how to set specific damage values at runtime to an "Instant" Condition, while the "Causing Damage..." video shows how an Instant Condition can pull the damage value directly from the "Damage" stat of the player.

Both work, but you may wish to choose one method over the other (or something else entirely) based on your project.
{% endhint %}

{% embed url="<https://www.youtube.com/watch?v=ccKwTEDDZ-M>" %}

{% hint style="info" %}
[**Timeboard**](/magic-pig-games/game-modules-4/module-documentation/gametime-and-timeboard/timeboard.md) is required for **Conditions** to operate properly and automatically. Make sure you bring the Timeboard prefab into the scene.
{% endhint %}

***

{% hint style="warning" %}
Tutorials below should be accurate, though they are from the previous version of Game Modules. There are slight UX changes, and perhaps new features in Game Modules 4. These will be re-done at some point in the future.
{% endhint %}

{% embed url="<https://www.youtube.com/watch?v=zabU2QBXWSU>" %}
This video demonstrates the creation of a new `Condition`.
{% endembed %}

{% embed url="<https://www.youtube.com/watch?v=kmOCMGTlYkk>" %}
In this video, I show how I'm adding a `Condition` to a magic spell (which uses the **Items** module), to apply when the spell is cast on a player.
{% endembed %}
