Go to file
NatureFreshMilk ca5a8bfabd travis tests 2019-11-07 11:01:02 +01:00
models trophy wip 2018-09-14 15:31:37 +02:00
sounds proper hud / rank congrats 2018-05-08 14:37:05 +02:00
textures mese crystal for hudbars 2019-10-08 15:47:01 +02:00
.luacheckrc epic stuff 2019-10-21 21:50:24 +02:00
.travis.yml travis tests 2019-11-07 11:01:02 +01:00
LICENSE.txt textures / skeleton 2018-05-08 09:18:34 +02:00
README.md cleanup 2019-10-08 15:48:58 +02:00
builtin.lua luacheck 2019-10-07 14:54:55 +02:00
chatcmd.lua luacheck 2019-10-07 14:54:55 +02:00
entities.lua configurable entity props 2019-10-21 10:17:49 +02:00
functions.lua luacheck 2019-10-07 14:54:55 +02:00
globalstep.lua luacheck 2019-10-07 14:54:55 +02:00
highscore.lua luacheck 2019-10-07 14:54:55 +02:00
hud.lua hud fix 2019-10-29 18:16:25 +01:00
init.lua travis tests 2019-11-07 11:01:02 +01:00
integration_test.lua travis tests 2019-11-07 11:01:02 +01:00
json.lua luacheck 2019-08-28 15:06:45 +02:00
license.txt license 2018-05-17 08:57:19 +02:00
mobs.lua luacheck 2019-08-28 15:06:45 +02:00
mod.conf epic stuff 2019-10-21 21:50:24 +02:00
privs.lua bugfix 2019-06-12 20:02:59 +02:00
protector.lua luacheck 2019-10-07 14:54:55 +02:00
ranks.lua cube rank 2019-10-07 11:53:24 +02:00
stats.lua luacheck 2019-10-07 14:54:55 +02:00
test.sh travis tests 2019-11-07 11:01:02 +01:00
xpgate.lua xp gate mode 2019-10-29 12:54:35 +01:00

README.md

Minetest XP mod (xp_redo)

Minetest mod for player experience management (xp) It adds an xp counter per player and ranks according to your xp level. The xp level, your rank and a progress bar to the next rank will show up in your hud. On every rank level up you get a award-like notification. There is also a xpgate block which, when placed under a wooden door will only allow players with a certain xp level to go through.

Installation

  • Unzip the archive, rename the folder to xp_redo and place it in ..minetest/mods/

  • GNU/Linux: If you use a system-wide installation place it in ~/.minetest/mods/.

  • If you only want this to be used in a single world, place the folder in ..worldmods/ in your world directory.

For further information or help, see:
https://wiki.minetest.net/Installing_Mods

Privileges

  • givexp: Manage XP of your users.

Commands

Add or remove (amount with negative sign) XP from a user:

/givexp (username) (amount)

Example:

Give player somedude 200 XP points:

/givexp somedude 200

Remove 100 XP points from player somedude:

/givexp somedude -100

Dependencies

  • default

Optional dependencies

  • doors
  • mobs_redo
  • mobs_animal
  • mobs_monster

Builtin XP events

Digging

Every node dig gives you 1 xp point

Punching

Every mob punch gives you the amount of damage on the mob in xp

Ranks

See:

Lua api

Ranks

xp_redo.register_rank(rankDef)

rankDef = {
	name = "Rank name",
	icon = "myicon.png" -- Should fit withing the background icon (16x32px)
	color = {r=255, g=255, b=255}, -- Player name tag color
	xp = 100 -- xp threshold
}

ranks are held in xp_redo.ranks as a table.

xp_redo.get_rank(xpAmount)

Returns the rankDef for given xp amount

XP

xp_redo.get_xp(playername)

Returns the xp level for given playername (always a number).

xp_redo.add_xp(playername, xp)

Adds the amount of xp to given playername (can be negative for xp removal).

License

See LICENSE.txt

Pull requests / bugs

I'm happy for any bug reports or pull requests (code and textures).

TODO / Ideas

  • Scoreboard (block)
  • More doors
  • Door-teleport alternative
  • XP Regions
  • XP entities/items