Giter Club home page Giter Club logo

xp_redo's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.