Skip to content

SpecializationReward ​

Inherits: Reward < Resource

Chooses a specialization of a proficiency or a profession for the player: mastering one aspect of it.

Description ​

The rewards of the specialization are given once. If the specialization shares an exclusive group with one the player has, and that one can be changed, it is swapped for the new one (a re-spec). See docs/systems/skill-trainers.md, section 3.6.

Properties ​

KindkindKind.PROFICIENCY
inttarget_id0
intspecialization_id0

Methods ​

Array[SkillSpecialization]get_specializations()
Dictionaryapply_to_player( player: Player )
boolunapply_from_player( player: Player, tracking_data: Dictionary )
boolsupports_unapply()
Stringget_summary()
Array[Dictionary]validate()

Enumerations ​

enum Kind ​

The options of kind: proficiency, profession.

  • PROFICIENCY = 0 - A proficiency (swords, lockpicking)
  • PROFESSION = 1 - A profession (a craft school: blacksmithing)

Property descriptions ​

Kind kind = Kind.PROFICIENCY ​

What the specialization belongs to

int target_id = 0 ​

The id of the proficiency, or of the craft school

int specialization_id = 0 ​

The id of the specialization

Method descriptions ​

Array[SkillSpecialization] get_specializations() ​

The specializations of the target

Dictionary apply_to_player( player: Player ) ​

Gives the reward to the player. Gives back how it went and what it needs to take the reward back.

bool unapply_from_player( player: Player, tracking_data: Dictionary ) ​

Takes the reward back from the player (only for a reward that supports it).

bool supports_unapply() ​

Can the reward be taken back?

String get_summary() ​

A short text about the reward and its settings.

Array[Dictionary] validate() ​

Checks the settings of the reward. Gives the problems found (empty when it is fine).