Add Framework for Managing different Kind of experience, e.g. farming experience for getting faster crops as more farming you have done.

ademant 3090d2e9ee mod.conf vor 5 Jahren
locale d752d27df0 prepared for translations vor 5 Jahren
textures 1839396c82 some textures; errors vor 6 Jahren
README.md 1e04f0e4c2 explained mod name vor 5 Jahren
api.lua 861d2810be error in substraction function vor 5 Jahren
chat_commands.lua 916fecb451 code cleaning vor 6 Jahren
cmi.lua 238e017d70 change readme vor 5 Jahren
config.lua c456bf1d29 add new element playtime vor 5 Jahren
depends.txt ee61d22102 compat for mt 0.4.17 vor 5 Jahren
init.lua d752d27df0 prepared for translations vor 5 Jahren
intllib.lua d752d27df0 prepared for translations vor 5 Jahren
license.txt a5fb2c1a19 update readme vor 5 Jahren
mod.conf 3090d2e9ee mod.conf vor 5 Jahren
register.lua 91bf0b847e Documentation vor 5 Jahren
settingtypes.txt 1ab7334099 adjust light mean level vor 5 Jahren

README.md

Minetest Game mod: XPFW (eXPerience FrameWork)

See license.txt for license information.

Main repository:

https://notabug.org/ademant/minetest_xpfw.git

Mirrors:

https://gitlab.com/ademant/minetest_xpfw.git

https://github.com/ademant/minetest_xpfw.git

Works only with Minetest >= 5.0

Minetest <= 0.4.17 does not support the mechanism for handling player related meta data.

Short description

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:

  • Walked distances calculated out of velocity (important: teleporting does not influence this value)
  • accumulated distance out of comparing with last known position (important: teleporting is included in this value)
  • whole playtime on the server
  • amount of dug nodes
  • amount of build nodes
  • amount of crafted items
  • amount of occured deahts
  • amount of text messages
  • amount of logins

For several amounts also a kind of speed is calculated, like walking speed or crafting speed.

Chat Commands

Following chat commands are available:

/xpfw

prints stored values of XPFW in the chat window

/xphud

toggle the visible statistics in players hud on/off

/xpreset

set all values to default

/xpset

need xpfwset privilege
Set variable of user to new value

Usage

Usage (roughly), for Details see api.lua:

  • xpfw.register_attribute(name,data) to register new attribute
  • xpfw.player_get_attribute(player,name) Get stored value of attribute for ObjectRef player
  • xpfw.player_set_attribute(player,name, value) Set attribute for ObjectRef player to
  • 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 to attribute of for ObjectRef player

    Authors of source code

    ademant (MIT)

    Authors of media (textures)

    Created by ademant (CC BY 3.0):