No Description

Thomas Rudin 6c05cb9048 Merge pull request #34 from Panquesito7/use_mod_conf 2 weeks ago
models 3de27fd47a trophy wip 1 year ago
screenshots 601a167ed7 name tag doc 1 year ago
sounds c3078c9ec4 proper hud / rank congrats 1 year ago
textures 782ebc909d bronze protector 6 months ago
.luacheckrc 03288e3baa luacheck 3 weeks ago
LICENSE.txt 7bb0e03755 textures / skeleton 1 year ago
README.md dad4d37e33 Oops 2 weeks ago
builtin.lua 03288e3baa luacheck 3 weeks ago
chatcmd.lua 03288e3baa luacheck 3 weeks ago
entities.lua 313ae51c43 Update entities.lua 2 weeks ago
functions.lua 03288e3baa luacheck 3 weeks ago
globalstep.lua 263dba64af decrease hud update 3 weeks ago
highscore.lua 03288e3baa luacheck 3 weeks ago
hud.lua 6a6840d7b8 remove [MOD] from nametag 3 weeks ago
init.lua 2881d2ad1c cleanup 3 weeks ago
json.lua 03288e3baa luacheck 3 weeks ago
license.txt 5f3d8aebbc license 1 year ago
mobs.lua 03288e3baa luacheck 3 weeks ago
mod.conf 4169bd02f4 Create mod.conf 2 weeks ago
privs.lua 54effa42d2 bugfix 3 months ago
protector.lua 03288e3baa luacheck 3 weeks ago
ranks.lua 6e2c1f02bb remove action log of ranks 3 weeks ago
stats.lua 03288e3baa luacheck 3 weeks ago
xpgate.lua 03288e3baa luacheck 3 weeks ago

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

Screenshots

Hud in action

Note: Android screenshot, ignore wrong spacing

XP Gate block (configuring)

XP Gate block (blocking)

Note: It will teleport you through if you have enough xp and try to open it.

Player nametags (with rank-colors)

Ranks

Some initial ranks are hardcoded in ranks.lua. (Swiss military ranks, but translated to english.... sorry :)

  • Recruit (xp: 0)
  • Soldier (xp: 10)
  • Appointee (xp: 100)
  • Private (xp: 1000)
  • Corporal (xp: 10000)
  • Seargant (xp: 100000)

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