CoreStatDefaults ​
Inherits: RefCounted
The core stats (movement speed, attack speed, global cooldown, weapon speed, cast speed, carry weight, sight range, weapon damage and its variance) as ordinary stat definitions. The engine reads them by id (StatsComponent.CoreStats), everything else about them is data: a core stat takes formulas, growth, conditions and effects like any stat, and shows in the stat editor.
Description ​
Database creates a definition for every core stat that does not exist yet in res://src/data/stats/ the first time it is used (in the editor or when the game starts), so a project never has to author them and an older project gets them by itself. Once a file exists it is the project's: edit it freely (the id is what the engine looks for, keep it). See docs/systems/entity-stats.md, section 25.
Methods ​
bool | is_core_stat( stat_id: int ) static |
float | get_default( stat_id: int ) static |
StatDefinition | build( entry: Dictionary ) static |
Constants ​
Array[Dictionary]DEFINITIONS =[- One entry per core stat: id (StatsComponent.CoreStats), name, description, default, display and limitsintMAX_CORE_ID =10- The highest core stat id: every id up to it is reserved for the engine (project stats get 7-digit ids)
Method descriptions ​
bool is_core_stat( stat_id: int ) ​
Is this stat id one of the core stats?
float get_default( stat_id: int ) ​
The default value of a core stat.
StatDefinition build( entry: Dictionary ) ​
A fresh definition of one core stat, with the engine's defaults