> For the complete documentation index, see [llms.txt](https://roogame.gitbook.io/roogame/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://roogame.gitbook.io/roogame/ultimate-stats-framework/creating-your-attribute-system/api-reference/stat-api.md).

# Stat API

A Stat is a calculated value such as Attack, Defense, HealthMax, MoveSpeed, Experience, or Level.

Use these functions through the `Ultimate Stats Framework Component`.

| Function                  | Description                                               |
| ------------------------- | --------------------------------------------------------- |
| `Has Stat By Tag`         | Returns whether a Stat exists.                            |
| `Get Stat Value By Tag`   | Returns the current calculated value of a Stat.           |
| `Get Stat Base By Tag`    | Returns the base value of a Stat.                         |
| `Set Stat Base By Tag`    | Sets the base value of a Stat.                            |
| `Change Stat Base By Tag` | Adds a positive or negative value to a Stat's base value. |

Each function also has a `By Name` version.

> **Recommendation**\
> Use `By Tag` functions for gameplay code, especially when a project contains multiple namespaces.\
> `By Name` functions are safe only when you provide the full Gameplay Tag, or when the short name is guaranteed to be unique within the component.

<figure><img src="https://2218703886-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4YPyrdOyfjDGtlxlvjSd%2Fuploads%2FT4QTVVxXqQRMwQtWUmTk%2Fimage.png?alt=media&amp;token=5115933b-3477-4c43-abf0-b195b808625a" alt=""><figcaption></figcaption></figure>

> **RGFC** is short for `Ultimate Stats Framework Component`.\
> In Blueprints, the Stat and Attribute module is displayed as **Roo Stat Component**. It is a module provided by the `Ultimate Stats Framework Component`, not a separate framework component that requires additional setup.
