> 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/game-module-lists/get-methods/gamestatlist-get-methods.md).

# GameStatList Get() Methods

### `IEnumberable<GameStat>` results

These will return an `IEnumberable<GameStat>` which you can cast `.ToList()` or `.ToArray()`, or continue to query against the results.

```csharp
public IEnumerable<GameStat> GetAllCounters() // can not be trained or modified
public IEnumerable<GameStat> GetAllTrainable()
public IEnumerable<GameStat> GetAllModifiable()
public IEnumerable<GameStat> GetAllTrainableAndModifiable()
public IEnumerable<GameStat> GetAllIsModified() // FinalStat is higher or lower due to other modifications
public IEnumerable<GameStat> GetAllWhereFinalStatGreaterThanPointsAndValue() // FinalStat > Points + FinalValue
public IEnumerable<GameStat> GetAllWhereFinalStatLessThanPointsAndValue() // FinalStat < Points + FinalValue
public IEnumerable<GameStat> GetAllFinalStatGreaterThan(float value)
public IEnumerable<GameStat> GetAllFinalStatLessThan(float value)
public IEnumerable<GameStat> GetAllFinalStatIs(float value)
public IEnumerable<GameStat> GetAllPointsGreaterThan(float value)
public IEnumerable<GameStat> GetAllPointsLessThan(float value)
public IEnumerable<GameStat> GetAllPointsIs(float value)
public IEnumerable<GameStat> GetAllProficiencyGreaterThan(float value)
public IEnumerable<GameStat> GetAllProficiencyLessThan(float value)
public IEnumerable<GameStat> GetAllProficiencyIs(float value)

// These have an optional bool includePoints. When false, FinalValue will be considered, 
// otehrwise, FinalValue + Points will be considered.
public IEnumerable<GameStat> GetAllValueGreaterThan(float value, bool includePoints = true)
public IEnumerable<GameStat> GetAllValueLessThan(float value, bool includePoints = true)
public IEnumerable<GameStat> GetAllValueIs(float value, bool includePoints = true)

// Examples
Debug.Log($"IHaveStats Actor is not proficient in {GetAllProficiencyLessThan(1f).Count} stats");

foreach(var gameStat in GetAllTrainableAndModifiable().Where(x => x.Points > 10))
{
    gameStat.AddPoints(-1); // Remove one Point from each!
}
```

## Dictionaries of GameStats

These methods each will return a Dictionary with a group of GameStat objects from the list. Most have addtional options in method signature. See the examples below the methods list.

```csharp
public Dictionary<string, float> GetAllFinalStats(bool keyIsObjectName = true, bool recompute = false, bool recomputeTree = false)
public Dictionary<string, float> GetAllPoints(bool keyIsObjectName = true, bool countersOnly = true, bool includeBaseValue = false)
public Dictionary<string, GameStat> GetAllCounterStats(bool keyIsObjectName = true)
public Dictionary<string, GameStat> GetAllTrainableStats(bool keyIsObjectName = true)
public Dictionary<string, GameStat> GetAllModifiableStats(bool keyIsObjectName = true)
public Dictionary<string, GameStat> GetAllTrainableAndModifiableStats(bool keyIsObjectName = true)
public Dictionary<string, GameStat> GetAllModifiedStats(bool keyIsObjectName = true, bool includeAll = true, bool greaterThan = true)
```

### Get all final stat values

Returns `Dictionary<string, float>` with all `GameStats` in the list.

<pre class="language-csharp"><code class="lang-csharp">/* Optional parameters
bool keyIsObjectName = true // if false, key will be Uid()
bool recompute = false // if true, stats will be recomputed
bool recomputeTree = false // if true, all stats in tree are recomputed
*/

<strong>var allFinalStats = gameStatList.GetAllFinalStats();
</strong></code></pre>

### Get points of "Counter" stats or all stats

Returns `Dictionary<string, float>` with the Point value for all "Counter" stats, or all `GameStats` in the list. Counter stats are those which can't be trained or modified.

<pre class="language-csharp"><code class="lang-csharp">/* Optional parameters
bool keyIsObjectName = true // if false, key will be Uid()
bool countersOnly = true // if false, all stats will be included
*/

<strong>var allCounters = gameStatList.GetAllPoints();
</strong></code></pre>

### Get GameStats for Counters, Trainable, Modifiable

Returns `Dictionary<string, GameStat>` with the those that are Counters, Trainable, Modifiable, or those that are both Trainable and Modifiable.

```csharp
/* Optional parameters
bool keyIsObjectName = true // if false, key will be Uid()
*/

var allCounterGameStats = gameStatList.GetAllCounterStats();
var allTrainableGameStats = gameStatList.GetAllTrainableStats();
var allModifiableGameStats = gameStatList.GetAllModifiableStats();
var allSkillGameStats = gameStatList.GetAllTrainableAndModifiableStats();
```

### Get Modified Stats

Returns `Dictionary<string, GameStat>` with the those that are currently modified, which means the Final Stat value is greater than or less than the sum of `Points + BaseValue`.

```csharp
/* Optional parameters
bool keyIsObjectName = true // if false, key will be Uid()
bool includeAll = true // if false, will only include those greater than or less than
bool greaterThan = true // if false, we will only include those less than
*/

var allModifiedGameStats = gameStatList.GetAllModifiedStats();
var allStatsModifiedGreater = gameStatList.GetAllModifiedStats(true, false);
var allStatsModifiedLess = gameStatList.GetAllModifiedStats(true, false, false);
```
