TrainerDefinition ​
Inherits: DatabaseResource < Resource
A trainer: a named list of lessons that NPCs and objects (a TrainerInteraction) teach. Like a vendor, one definition can be used by many.
Description ​
What a trainer teaches is up to the game: its lessons can teach abilities, ranks, proficiency levels, professions, tiers, specializations and recipes in any mix. Prices can follow the standing of the player with a faction, and a trainer can refuse to teach those it dislikes. See docs/systems/skill-trainers.md.
Properties ​
Array[TrainerLesson] | lessons | [] |
String | greeting | "": |
int | faction_id | 0 |
Array[ReputationPrice] | reputation_prices | [] |
bool | refuses_below | false |
int | refuse_below_reputation | -1 |
Methods ​
int | get_reputation( system_hub: GameHost.SystemHub ) |
float | get_price_multiplier( system_hub: GameHost.SystemHub ) |
bool | refuses( system_hub: GameHost.SystemHub ) |
Array[Dictionary] | validate() |
Property descriptions ​
Array[TrainerLesson] lessons = [] ​
The lessons, in the order they are shown
String greeting = "": ​
What the trainer says when the shop opens (empty = nothing)
Reputation
int faction_id = 0 ​
The faction whose standing with the player sets the prices (0 = prices do not change)
Array[ReputationPrice] reputation_prices = [] ​
Price multipliers by reputation with that faction
bool refuses_below = false ​
The trainer refuses to teach a player whose reputation is below a limit
int refuse_below_reputation = -1 ​
The reputation under which the trainer refuses (when it refuses)
Method descriptions ​
int get_reputation( system_hub: GameHost.SystemHub ) ​
The reputation of the player with the faction of the trainer (0 when there is no faction or no faction manager)
float get_price_multiplier( system_hub: GameHost.SystemHub ) ​
What prices are multiplied by for this player, from their standing
bool refuses( system_hub: GameHost.SystemHub ) ​
Does the trainer refuse to teach this player?
Array[Dictionary] validate() ​
Checks the settings. Gives the problems found (empty when it is fine).