> For the complete documentation index, see [llms.txt](https://giantgrey.gitbook.io/databrain/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://giantgrey.gitbook.io/databrain/add-ons/stats/values.md).

# Values

```csharp
using Databrain.Stats;

public class StatsValue : DataObject{}
```

StatsValue are values which can be modified with a modifier (StatsModifier).

<div align="left"><figure><img src="https://2348672745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIoqF5QAgQsqxrjmTIKpE%2Fuploads%2FGbsDwQPZKRM58vD3EKQl%2FstatsValue.png?alt=media&amp;token=ae811ea4-76d2-482e-9db5-c9d57e8ae35e" alt=""><figcaption></figcaption></figure></div>

| Has max value     | if enabled you can set a max value                                    |
| ----------------- | --------------------------------------------------------------------- |
| Max Value         | The max value                                                         |
| Base Value        | the base value which is being used for modifiers                      |
| On Value Modified | Set a StatsEvents which gets called when this value has been modified |

## API

### ModifiedValue

Returns the modified value

### UnmodifiedValue

Returns the un-modified value

### AddModifier

Add a modifier to this stats value

```csharp
// Value
public StatsValue modifiableValue;    
// Modifier
public StatsModifier modifier;

// Add modifier
modifiableValue.AddModifier(modifier);
```

### RemoveModifier

Remove a modifier from the value of this stat

### RemoveAllModifiers

Remove all modifiers from the value of this stat
