XPFW provide an API for storing values relevant for experience mechanism into player metadata (Identified with prefix "XPFW_"). It also stores several statistic values during playtime:
- xpfw.player_set_attribute(player,name, value) Set attribute <name> for ObjectRef player to <value>
- xpfw.player_ping_attribute(player,name) "Ping" attribute: Get max value which is defined for attribute and add to attribute. For an attribute, which is defined as moving average attribute this pinging increase the value. High frequency of pinging lead to faster increase, e.g. by pinging a digging attribute you get kind of digging speed, which can be used for an exhaustion mechanism.
- xpfw.player_add/sub_attribute(player,name,diff) Adds or substract <diff> to attribute <name> of for ObjectRef player