GrowthPreview ​
Inherits: RefCounted
What the stats and pools of an entity are at a level, and where the growth of each comes from (the preview of the stats editors). It reads the same layers as StatsComponent.growth_of: the override of the entity itself, then the growth profiles (its own, the parents, the project's default for an NPC), and nothing else: growth belongs to the entity only.
Methods ​
Array[Dictionary] | rows( stats_data: StatsData, level: int, is_npc: bool ) static |
Dictionary | growth_of( stats_data: StatsData, definition: Resource, level: int, chain: Array[GrowthProfile] ) static |
Method descriptions ​
Array[Dictionary] rows( stats_data: StatsData, level: int, is_npc: bool ) ​
The rows of the preview: one for each stat and pool of the StatsData, as {"name", "kind": "stat" | "health_pool" | "resource_pool", "id", "base", "growth", "total", "source"}. source says where the growth comes from. is_npc: the project's default growth profile closes the chain (a player class has none)
Dictionary growth_of( stats_data: StatsData, definition: Resource, level: int, chain: Array[GrowthProfile] ) ​
The growth of a stat or pool at a level and where it comes from: {"growth": float, "source": String}