minetest_xpfw/README.md

66 lines
2.4 KiB
Markdown
Raw Permalink Normal View History

2019-02-11 22:31:08 -08:00
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
2019-02-21 05:49:08 -08:00
# Minetest Game mod: XPFW (eXPerience FrameWork)
2019-02-11 23:35:39 -08:00
2019-01-03 06:51:53 -08:00
See license.txt for license information.
2019-02-12 20:05:14 -08:00
Main repository:
https://notabug.org/ademant/minetest_xpfw.git
Mirrors:
https://gitlab.com/ademant/minetest_xpfw.git
https://github.com/ademant/minetest_xpfw.git
2019-02-17 21:16:01 -08:00
Works only with Minetest >= 5.0
Minetest <= 0.4.17 does not support the mechanism for handling player related meta data.
2019-02-11 23:28:11 -08:00
## Short description
2019-02-11 22:48:22 -08:00
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:
2019-01-03 06:51:53 -08:00
- 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.
2019-02-11 23:28:11 -08:00
## Chat Commands
2019-02-11 22:48:22 -08:00
Following chat commands are available:
2019-02-11 23:05:46 -08:00
2019-02-11 22:48:22 -08:00
/xpfw
prints stored values of XPFW in the chat window
2019-02-11 23:05:46 -08:00
2019-02-11 22:48:22 -08:00
/xphud
toggle the visible statistics in players hud on/off
2019-02-11 23:05:46 -08:00
2019-02-11 22:48:22 -08:00
/xpreset
set all values to default
2019-02-11 23:05:46 -08:00
2019-02-11 22:48:22 -08:00
/xpset <variable> <value>
need xpfwset privilege
Set variable of user to new value
2019-02-11 23:28:11 -08:00
## Usage
2019-02-11 23:35:39 -08:00
Usage (roughly), for Details see api.lua:
2019-02-11 23:05:46 -08:00
- xpfw.register_attribute(name,data) to register new attribute <name>
- xpfw.player_get_attribute(player,name) Get stored value of attribute <name> for ObjectRef player
2019-02-12 05:17:07 -08:00
- 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
2019-02-11 22:48:22 -08:00
2019-02-12 20:21:01 -08:00
## Authors of source code
2019-01-03 06:51:53 -08:00
ademant (MIT)
2019-02-12 20:21:01 -08:00
## Authors of media (textures)
2019-01-03 06:51:53 -08:00
Created by ademant (CC BY 3.0):