Giter Site home page Giter Site 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.

Install

  • Unzip/Clone it to your worldmods folder

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

Depends

  • default
  • 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

xp_redo's People

Contributors

coil0 avatar lukc avatar naturefreshmilk avatar thomasrudin avatar thomasrudinzid1 avatar

Watchers

 avatar  avatar

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.