Skip to content

FactionReputationReward ​

Inherits: Reward < Resource

Grants or removes reputation with a faction

Properties ​

intfaction_id0
intreputation_amount100 # Can be negative for reputation loss

Methods ​

Dictionaryapply_to_player( player: Player )
boolunapply_from_player( player: Player, tracking_data: Dictionary )
boolsupports_unapply()
Stringget_summary()
voidset_faction_reputation_reward( faction_def: int, rep_amount: int )
Array[Dictionary]validate()

Property descriptions ​

int faction_id = 0 ​

The faction whose reputation changes

int reputation_amount = 100 # Can be negative for reputation loss ​

The reputation gained; a negative number takes reputation away

Method descriptions ​

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.

void set_faction_reputation_reward( faction_def: int, rep_amount: int ) ​

Sets the faction and the reputation the reward gives (or takes, when negative).

Array[Dictionary] validate() ​

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