# 📦 KairoEngine.Stats v0.1.1 The Stats system adds tools for creating lists of linked smart values. Stats can be used for many ends like an RPG rule system, weapon statistics or scoreboards. Stats store a number or resolve to an equation that can access values from other stats. A stat holds data for current, initial, minimum and maximum values. It also holds a list of modifiers that can change any of the stored value. Stats are stored in controllers that also hold. Stat Controllers store and manage lists for stats, traits and status effects. A Stat Controller can be addd as variable to any class in Unity and will display all stored stats correctly in the editor and handle them in any context. Traits are bundles of stat modifiers for different stats. They can be added on the editor or at run time and usualy aren't removed. Status Effects also add stat modifiers to different stats and handles other functions like timeout, stacking and effects. ### 🛑Required packages - `KairoEngine.Core` - `UniRX` - ``Sirenix.OdinInspector`` ### 📄Namespaces - `KairoEngine.Stats` - ``KairoEngine.Stats.EditorTests`` ### 🔷Components - ``StatComponent`` – A generic component that holds stats data. ### ✔Getting Started ``` name: hitpoints value: 75 max: max_hitpoints ``` ``` name: max_hitpoints value: (strength + endurance) * 10 = 100 max: 10000 ``` ``` name: strength value: 4 ``` ``` name: endurance value: 6 ``` ### 🧰Functions ### 🎈Back Log - [x] Create ``StatTemplate`` class - [x] Create ``StatGroup`` class - [x] Create ``StatsController`` class - [x] Create ``Stat`` class - [x] Stats Controller tests - [x] Create ``StatModifier`` and ``StatModifiersController`` - [x] Extend Stat Modifier system to work for *min* and *max* values - [x] Functions for adding and removing stat modifiers - [x] Tests for stat modifiers - [x] Create `StatusEffect` and `StatusEffectsController` - [ ] Create `Trait` and `TraitsController` - [ ] Stat Controller events - [ ] Draw `StatTemplate` Icon - [ ] Draw `StatsConponent` Icon - [ ] Draw `StatGroup` Icon - [ ] Draw `StatusEffect` Icon - [ ] Function to duplicate ``StatController`` data - [ ] Random value equation function - [ ] Show and hide stats