EconXP
Overview
version: 0.5.0
| craftbukkit: #1.3.1
| Source | Developer API
Features
- Let players use their experience points to buy things! Since people can already buy Enchantments with experience points, why not buy be able to buy from shops as well!
- Supported by Vault!
- Works with Minecraft 1.3.1!
- Simple config file!
- No permission system needed (though there are permissions available if you want them)!
Description
EconXP is an economy system that users the player's experience points (the green orbs collected from monsters) as the currency. With the introduction of Enchanting costing experience, it will be interesting to see economies based around the concept of trading experience points, especially since they are already naturally collected and used, thus giving them an inherent value.
EconXP is now supported by Vault, so any shop or currency-related plugin that uses Vault can have EconXP as its currency type! I will also be adding Register support later, allowing EconXP to be used with many existing shop and economy-related plugins.
Minecraft Levels and Experience
Minecraft's levelling system is a bit strange and can be confusing to some people. Here's a quick explanation of how it works.
Players collect experience by slaying monsters, and the experience appears as green orbs on the ground. Upon receiving experience, players gain levels. As of MC 1.3.1, the calculations have changed for levels. I'm too lazy to write out the actual equations, though, so you'll have to check out the Minecraft wiki: MinecraftWiki.net
Developer API
Check out the API description here: Developer API
Configuration File
Configuration file can be found after starting the server, under the EconXP folder (inside the plugins folder).
Quote from the Config file:death-drop-percent: 100 - [0 to 100] By default, all players drop all of their experience (rather than only 60% of the old total). Do NOT use decimals here (or a percent sign). Set this to 0 (zero) if you do not want players to lose their experience points when they die.
Commands
Commands are OP-only by default, with the exception of the balance (self-only) command. Therefore, players should not be able to transfer experience unless given permission to use the command. All commands map 1-to-1 with the respective permission (see the Permission section below).
All commands can use abbreviated forms. For example, you may type /exp bal instead of /exp balance. Player names and amounts can not be abbreviated, however (for obvious reasons). Capitalization of player names does not matter, though.
All <amount> and <factor> values must be positive (greater than or equal to zero). All <amount> values must be whole numbers.
Quote from the Command list:/exp OR /econxp - The base commands (ie. /exp add Agnate 5 ). Either base can be used.
/exp add <player> <amount> - Add experience to the player.
/exp subtract <player> <amount> - Subtract experience from the player.
/exp multiply <player> <factor> - Multiply experience of a player by the factor.
/exp divide <player> <factor> - Divide experience of a player by the factor.
/exp set <player> <amount> - Set the experience of a player.
/exp clear <player> - Clear ALL of the experience of a player.
/exp balance - See your current experience points.
/exp balance <player> - See the current experience of a player.
/exp give <player> <amount> - Give some of your experience to a player.
/exp transfer <giver> <amount> <receiver> - Transfer from Giver to Receiver.
Permissions
Permissions are required to use any of the commands. Players can receive experience without having any permissions.
Quote from the Permission nodes:econxp.* - Allows all commands. econxp.add - Allows player to use the add command.
econxp.subtract - Allows player to use the subtract command.
econxp.multiply - Allows player to use the multiply command.
econxp.divide - Allows player to use the divide command.
econxp.set - Allows player to use the set command.
econxp.clear - Allows player to use the clear command.
econxp.balance - Allows player to use balance to check players' balances.
econxp.give - Allows player to give their own experience to a player.
econxp.transfer - Allows player to use the transfer command.
To Do List
My current to-do list:
- Finish Register support. (on hold until Vault is finished)
- Add some examples to the Develop API.
Changelog
View the Change Log.
Credits
- Flamers for helping with the banner's screenshot!
- Nijijokun for posting his iConomy source (and thus helping me figure out JNBT)!
- garbagemule for inspiration and code help along the way!
@adrianthewriter Oooh, very smart! I hadn't really considered this. Definitely will add a config option for the % dropped on death. For PVP-heavy servers, it's nice to have the exp drop (kind of a bonus for indulging in PVP), but for PVE-heavy servers, it makes sense that little/no exp would drop.
I'll add this when I updated for the newest RB tonight. :D
I'm very interested in this plugin, but I'm curious about how it handles player death. Vanilla MC has then drop all their xp. Is there any sort of configuration that would adjust how this works. If I'm going to use xp as the currency for my server, I'd prefer if players would only lose a fraction of their xp when they die.
Looks good to me, I think I'll be using this.
@sbbday Sorry, file was being approved. Should be there now. :)
@AgnateHeartstone Um...I don't see a download link
Version 0.2.3 out! HUGE FIX FOR PERMISSIONS!
I recommend everyone to make sure they get v0.2.3.
Thanks to Joymo for persisting about a permission bug and getting it through my stubborn skull. ^_^
@sbbday Yeah, I discovered the problem this morning while browsing over my github code. I usually only play with a few of the commands (our server host doesn't let us pick our Minecraft JAR, so I can't officially launch EconXP on my server yet), and those ones work fine (the ADD, SUBTRACT, CLEAR, and BALANCE commands). Basically, the permissions "work", but there's another check that's accidentally overriding the permission check. I'll have it all fixed up tonight, though, so don't worry. :)
Thanks to Joymo for sticking to his guns on this one and trying out different setups to get me the info I needed.
Just to confirm what Joymo said, I use PEX 1.16 and permissions is really messed up. Everyone can use every command, even when I specifically deny privileges
Hope you see my comments in closed ticket, really is something wrong permission wise :/
@evilnucca The experience points ARE the currency.
Basically, you get a Vault-supported shop, get EconXP, and your players can use their Minecraft experience points to buy things in the shops you set up (or whatever).
Think of how players can use experience points to buy Enchantments, but now they can buy other things, too. :)
Can someone tell me if this is dependent on another plugin and if not how to set worth of the exp
@Albuca http://dev.bukkit.org/server-mods/money4exp/
Looks like it hasn't been updated, though. No idea if it still works or not. ^_^
EconXP is meant to BE the money, so buying experience with experience just wouldn't work. ;)
@AgnateHeartstone
Thanks for the info! The reason I asked was because I have yet to find a plugin that allows you to buy exp. Set/Manage experience, yes, but not buy. (Any chance you had that plugin bookmarked? lol)
@Albuca I believe someone already made a plugin where you can buy experience based on a currency. Really, EconXP was just made to foster the ability to use experience points to buy shop-based things. Since people can already buy enchantments with experience/levels, I wanted to extend that to other areas (such as a player selling a rare-enchanted weapon, or selling diamonds for exp). Although I do appreciate the idea, I'm not sure it would fit into EconXPs scope. Could definitely be its own plugin, though!
I don't know if the plugin was going in this direction, but what about buying experience with in game money? That way it can be two-way, sell it for X price, buy it for Y price. Or even working on inflation would be cool too, the more levels you currently have, the more it costs to buy more experience, therefore they either need to be rich, or they can buy some levels to get started, and then have to go hunt for the other levels.
Cheers!
@Kuzi117 Thanks!
Vault now supports EconXP! Woot!
I never would have thought of this, but the idea's excellent! Just thought you should know.
EconXP now works with Minecraft 1.0! You need CB 1537+, though. :)
Vault support is next on the list. Hopefully I can get it working by the end of this weekend, along with the API write-up (if you just include the EconXP.jar, the methods are pretty obvious, but it's always nice to have a write-up). Stay tuned!
Just giving an update that I've looked into the Bukkit code and chatted with both sk89q and Grum, and it looks like the experience problem is a just a mix-up in Bukkit. I imagine it'll be fixed for the first RB for Minecraft 1.0, which is good news!
Thank you! Going to be introducing this to my server extremely soon. Keep it up :)