Skip to content

InventorySizeReward ​

Inherits: Reward < Resource

Makes the bag of the player bigger for good: more slots, more carry capacity (a bigger backpack as the reward of a quest). It is saved with the bag.

Description ​

What the Bag Slots and Carry Capacity stats give is changed with effects and equipment; this is on top of it. With a shared party bag it does nothing (the shared bag has a fixed size).

Properties ​

intslots4
floatcapacity0.0

Methods ​

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

Property descriptions ​

int slots = 4 ​

Slots to add. In a grid, one slot is one row

float capacity = 0.0 ​

Carry capacity to add (it matters when the inventory style counts weight)

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.

Array[Dictionary] validate() ​

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