# StatusEffectData

<figure><picture><source srcset="https://content.gitbook.com/content/sszhq0oU5VbBUcBr6f13/blobs/373VZVEsWtLT0gv0ut79/d_StatusEffectData%20Icon.png" media="(prefers-color-scheme: dark)"><img src="https://content.gitbook.com/content/sszhq0oU5VbBUcBr6f13/blobs/xIkdLnR2IWvRrcDCUiMw/StatusEffectData%20Icon.png" alt="" width="188"></picture><figcaption></figcaption></figure>

### Description

[StatusEffectDatas](https://maraudical.gitbook.io/status-effect-framework/type-specifics/scriptable-objects/statuseffectdata) contain all of the necessary data to describe a [StatusEffect](https://maraudical.gitbook.io/status-effect-framework/type-specifics/classes/statuseffect).

### Properties

<table data-full-width="true"><thead><tr><th width="250">Name</th><th width="250">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>Id</code></td><td><a href="https://docs.unity3d.com/ScriptReference/Hash128.html">Hash128</a></td><td>A unique <a href="https://docs.unity3d.com/ScriptReference/Hash128.html">Hash128</a> ID for quick comparisons and easy serialization with other supported packages.</td></tr><tr><td><code>AutomaticallyAddToDatabase</code></td><td>bool</td><td>If enabled the <a href="statuseffectdata">StatusEffectData</a> will be automatically added to the <a href="statuseffectdatabase">StatusEffectDatabase</a>.</td></tr><tr><td><code>Group</code></td><td><a href="../structs/statuseffectgroup">StatusEffectGroup</a></td><td>The groups which define this effect. Multiple groups can be selected.</td></tr><tr><td><code>ComparableName</code></td><td><a href="comparablename">ComparableName</a></td><td>The <a href="comparablename">ComparableName</a> that groups similar effects together.</td></tr><tr><td><code>BaseValue</code></td><td>float</td><td>The base value is used mainly when calculating how effects should be stacked. An <a href="../classes/effect">Effect</a> can use this value over its own.</td></tr><tr><td><code>Icon</code></td><td><a href="https://docs.unity3d.com/6000.0/Documentation/ScriptReference/Sprite.html">Sprite</a></td><td>An optional sprite.</td></tr><tr><td><code>Color</code></td><td><a href="https://docs.unity3d.com/6000.0/Documentation/ScriptReference/Color.html">Color</a></td><td>An optional Color</td></tr><tr><td><code>StatusEffectName</code></td><td>string</td><td>An optional name.</td></tr><tr><td><code>Acronym</code></td><td>string</td><td>An optional acronym</td></tr><tr><td><code>Description</code></td><td>string</td><td>An optional description.</td></tr><tr><td><code>AllowEffectStacking</code></td><td>bool</td><td>True if multiple <a href="../classes/statuseffect">StatusEffects</a> of the same StatusEffectData can exist on the same <a href="https://docs.unity3d.com/ScriptReference/MonoBehaviour.html">MonoBehaviour</a>.</td></tr><tr><td><code>NonStackingBehaviour</code></td><td><a href="#non-stacking-behaviour">NonStackingBehaviour</a></td><td>When stacking is not allowed, the behaviour determines how to resolve a situation when the same <a href="../classes/statuseffect">StatusEffect</a> is added. See below for more information.</td></tr><tr><td><code>MaxStacks</code></td><td>int</td><td>The maximum stacks that can be added to a <a href="https://docs.unity3d.com/ScriptReference/MonoBehaviour.html">MonoBehaviour</a>.</td></tr><tr><td><code>Effects</code></td><td><a href="https://learn.microsoft.com/en-us/dotnet/api/system.collections.objectmodel.readonlycollection-1">ReadOnlyCollection</a>&#x3C;<a href="../classes/effect">Effects</a>></td><td>The list of <a href="../classes/effect">Effects</a>.</td></tr><tr><td><code>Conditions</code></td><td><a href="https://learn.microsoft.com/en-us/dotnet/api/system.collections.objectmodel.readonlycollection-1">ReadOnlyCollection</a>&#x3C;<a href="../classes/effect">Effects</a>></td><td>The list of <a href="../classes/condition">Conditionals</a>.</td></tr><tr><td><code>Modules</code></td><td><a href="https://learn.microsoft.com/en-us/dotnet/api/system.collections.objectmodel.readonlycollection-1">ReadOnlyCollection</a>&#x3C;ModuleContainer></td><td>The list of <a href="module">Modules</a> and <a href="moduleinstance">ModuleInstances</a>.</td></tr></tbody></table>

### Non-Stacking Behaviour

The non-stacking behavior determines how a duplicate status effect should resolve.

<table data-full-width="true"><thead><tr><th width="250">Name</th><th>Description</th></tr></thead><tbody><tr><td><code>MatchHighestValue</code></td><td>Match Highest Value will take the value of the effect and recalculate the duration to the equivalent final value over the time. This is the <strong>recommended</strong> option for non-stacking behaviour.</td></tr><tr><td><code>TakeHighestValue</code></td><td>Regardless of the durations, use the effect with the highest value.</td></tr><tr><td><code>TakeHighestDuration</code></td><td>Regardless of the value, use the effect with the highest duration.</td></tr><tr><td><code>TakeNewest</code></td><td>Use the newest effect.</td></tr><tr><td><code>TakeOldest</code></td><td>Use the oldest effect.</td></tr></tbody></table>
