PlayerClassDefinition ​
Inherits: DatabaseResource < Resource
PlayerClassDefinition defines the template and progression for player character classes This is a class archetype (like "Warrior", "Mage") not tied to specific entity models
Properties ​
Color | color | Color.WHITE |
Dictionary | starter_equipment | {} |
Array[LevelReward] | level_rewards | [] |
Array[int] | locked_equipment_slots | [] |
Array[int] | skill_trees | [] |
Array[ActionBarLayoutEntry] | action_bar_layout | [] |
StatsData | stats_data | |
int | basic_attack_data | |
Array[int] | active_abilities_data | |
Array[int] | passive_abilities_data | |
int | behavior_script | |
int | combat_script | |
bool | template | false |
int | template_id | 0 |
TemplateBaseline | template_baseline | |
Array[int] | template_fixed_stats | [] |
Methods ​
String | get_class_name() |
bool | is_template() |
String | get_display_name() |
bool | set_level_reward( level: int, reward: LevelReward ) |
LevelReward | get_level_reward( level: int ) |
bool | has_level_reward( level: int ) |
bool | remove_level_reward( level: int ) |
StatsData | get_base_stats() |
ActiveAbilityDefinition | get_base_basic_attack() |
Array[ActiveAbilityDefinition] | get_base_active_abilities() |
Array[PassiveAbilityDefinition] | get_base_passive_abilities() |
void | set_starter_equipment( equipment: Dictionary ) |
Dictionary | get_starter_equipment() |
void | add_locked_equipment_slot( slot_id: int ) |
bool | remove_locked_equipment_slot( slot_id: int ) |
bool | is_equipment_slot_locked( slot_id: int ) |
Array[int] | get_locked_equipment_slot_ids() |
Array[EquipmentSlotDefinition] | get_locked_equipment_slots() |
void | clear_locked_equipment_slots() |
void | add_skill_tree( tree_id: int ) |
bool | remove_skill_tree( tree_id: int ) |
Array[SkillTree] | get_skill_trees() |
ModularBehaviorScript | get_behavior_script() |
ModularCombatScript | get_combat_script() |
bool | is_valid() |
Property descriptions ​
Color color = Color.WHITE ​
Theme color for this class used in UI
Starting Equipment
Dictionary starter_equipment = ​
Starting equipment mapped by slot_key (e.g., "MainHand:0") -> item_id
Progression
Array[LevelReward] level_rewards = [] ​
Level rewards array (index = level - 1, so level_rewards[0] = level 1 rewards)
Array[int] locked_equipment_slots = [] ​
Equipment slots that start locked for this class
Array[int] skill_trees = [] ​
Skill trees available to this class
Action Bar
Array[ActionBarLayoutEntry] action_bar_layout = [] ​
The planned action bar of the class: the ability that belongs on each slot and whether the player may change it. An ability that is not known yet waits on its slot and goes there when it is learned. Slots that are not listed are free for the player
Combat Stats
StatsData stats_data ​
Stats configuration including health, resources, and combat stats
Ability Definitions
int basic_attack_data ​
Primary attack ability definition used for auto-attacks
Array[int] active_abilities_data ​
Collection of active ability definitions this class starts with
Array[int] passive_abilities_data ​
Collection of passive ability definitions this class starts with
AI Scripts
int behavior_script ​
Behavior Script - optional
int combat_script ​
Combat Script - optional
bool template = false ​
True when this class is a template: other classes follow it and it is not offered to the player.
Template
int template_id = 0 ​
The template this class follows (an id of the player_class_template database type), 0 = none. A class that follows a template has the changes of the template (stats, pools, immunities, growth and abilities) added when they are made, see EntityTemplates
TemplateBaseline template_baseline ​
What the template was when this class last looked at it (the difference to the template now is what is added)
Array[int] template_fixed_stats = [] ​
Stats whose base value does not follow the template
Method descriptions ​
String get_class_name() ​
Get class name
bool is_template() ​
Check if this PlayerClassDefinition is a template
String get_display_name() ​
Get display name appropriate for templates vs classes
bool set_level_reward( level: int, reward: LevelReward ) ​
Set level reward for specific level
LevelReward get_level_reward( level: int ) ​
Get level reward for specific level
bool has_level_reward( level: int ) ​
Check if has level reward
bool remove_level_reward( level: int ) ​
Remove level reward
StatsData get_base_stats() ​
Get base stats
ActiveAbilityDefinition get_base_basic_attack() ​
Get basic attack resource
Array[ActiveAbilityDefinition] get_base_active_abilities() ​
Get active abilities as resources
Array[PassiveAbilityDefinition] get_base_passive_abilities() ​
Get passive abilities as resources
void set_starter_equipment( equipment: Dictionary ) ​
Set starter equipment
Dictionary get_starter_equipment() ​
Get starter equipment
void add_locked_equipment_slot( slot_id: int ) ​
Add locked equipment slot by ID
bool remove_locked_equipment_slot( slot_id: int ) ​
Remove locked equipment slot by ID
bool is_equipment_slot_locked( slot_id: int ) ​
Check if equipment slot is locked (by ID)
Array[int] get_locked_equipment_slot_ids() ​
Get locked equipment slot IDs
Array[EquipmentSlotDefinition] get_locked_equipment_slots() ​
Get locked equipment slots as resources
void clear_locked_equipment_slots() ​
Clear locked equipment slots
void add_skill_tree( tree_id: int ) ​
Add skill tree by ID
bool remove_skill_tree( tree_id: int ) ​
Remove skill tree by ID
Array[SkillTree] get_skill_trees() ​
Get all skill tree resources
ModularBehaviorScript get_behavior_script() ​
Get behavior script resource
ModularCombatScript get_combat_script() ​
Get combat script resource
bool is_valid() ​
Validates that all required class configuration is present