> For the complete documentation index, see [llms.txt](https://visualonecompany.gitbook.io/storyframeworkdocs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://visualonecompany.gitbook.io/storyframeworkdocs/core-components/markdown/stat-bars.md).

# Stat Bars

SF includes a easy to manage "Stat Bar" system to enable certain statistics to appear on-screen as progress bars (things such as stamina, health, etc).

<div align="left"><figure><img src="https://2310584459-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuiMQl6UzBr8OnuaoaiWO%2Fuploads%2FlsPQDHgH0W29gqYOG5vj%2Fimage.png?alt=media&amp;token=228e4296-8cb5-4b4b-9867-f00b6c1289ab" alt=""><figcaption></figcaption></figure></div>

***

Adding new Stat Bars can be done inside of the Framework Settings data asset > System Defaults > Inventory > Player Stat Values array.

<figure><img src="https://2310584459-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuiMQl6UzBr8OnuaoaiWO%2Fuploads%2FNUwjcSBi6rTdRUKIZeXd%2Fimage.png?alt=media&amp;token=2db1f50e-e585-4fe5-8458-ab07b9111a96" alt=""><figcaption></figcaption></figure>

**Stat Name**\ <sup><mark style="color:$info;">The "ID" of your Stat. Used to target this specific Stat Bar when modifying it.<mark style="color:$info;"></sup>\
**Stat Value**\ <sup><mark style="color:$info;">The default "starting" value of your Stat. For example, something like health would start at 100.0 (assuming the range defined below is 0,0 - 100,0).<mark style="color:$info;"></sup>\
**Stat Min / Max Values**\ <sup><mark style="color:$info;">The value range of your Stat Bar.<mark style="color:$info;"></sup>\
**Stat Color**\ <sup><mark style="color:$info;">The color of your Stat Bar that appears on the players HUD.<mark style="color:$info;"></sup>\
**Stat Type**\ <sup><mark style="color:$info;">The "type" of Stat that this is. "Focal Stat" displays as a larger, thicker progress bar than "Side Stat", giving you a way to visually separate more "important" values or Stats.<mark style="color:$info;"></sup>

***

Modifying and managing a Stat Bars value is as simple as calling the dedicated Stat functions from SF's inventory manager.

<div align="left"><figure><img src="https://2310584459-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuiMQl6UzBr8OnuaoaiWO%2Fuploads%2FwPSZYc8HOQ6eecKe2VAO%2FStats.png?alt=media&amp;token=054dda4e-b267-4665-88d7-a17eecb64bea" alt=""><figcaption></figcaption></figure></div>

These functions can be thrown into things like Quick Actions, Trigger Volumes, Listen for Event Objects, etc to further modularize things.

***

SF's inventory manager also includes a `OnStatModified` event dispatcher that can be binded to events to handle custom logic that executes when a Stat reaches 0,0 for instance.

<div align="left"><figure><img src="https://2310584459-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuiMQl6UzBr8OnuaoaiWO%2Fuploads%2F5JCa41VvLHHAencYqq9r%2Fimage.png?alt=media&amp;token=7329ce31-16b0-421f-bce7-95fa2eda99fc" alt=""><figcaption></figcaption></figure></div>

***
