DynEco
This plugin is beta. That means it may not work yet! DynEco is another plugin that determines prices for items/blocks on how much supply/demand there is for the item. It works by adding/removing a calculated amount from the default price determined in the config.
Features
- MySQL backend for logging. Each transaction is logged in an easy format. You can easily use this data for websites etc.
- Simple configuration, with 2 settings (plus MySQL settings) that allows you to have almost complete control over your prices.
- Price will increase as demand increases, and decrease as supply increases. See the equation at the bottom.
- Buy, sell and view current values with commands.
- Buy items with signs.
- Per-Block/item permissions system.
Dependancies
- MySQL server
- Vault
- An economy plugin supported by Vault. I recommend Essentials.
Installation
- Download: http://dev.bukkit.org/server-mods/dyneco/files/
- Extract and place the default config files and jar in the right directories.
- DON'T RUN SERVER
- Update config to match your MySQL database.
- Use the database.sql to generate the database schema. (Using PHPMyAdmin or something)
- Done!
Permissions
- dyneco.buy.* - Allow the group/user to buy any item.
- dyneco.buy.itemname - Allow the group/user to buy that item. itemname is the full name in lowercase with no spaces. E.G: diamondsword, or the item's ID.
- dyneco.sell.* - Allow the group/user to sell any item.
- dyneco.sell.itemname - Allow the group/user to sell that item.
Config
- multiplier: Use this value to change the amount of influence supply/demand has on the price. (Should be able to set to 0 for no influence at all)
- tax: A decimal value added to the total each time an item is bought. 0.15 = 15% etc. Set to 0 for no tax.
- span: Over how many days should supply/demand effect price.
How it works
Each transaction is logged in the MySQL database. When a player buys/sells an item it will count how many times it has been bought/sold over the last week. This data is then applied to the equation:
x = pad/100 * log(demand/supply)* k + k
Where demand is the total number of this item bought, and supply is the total number of the item sold. k is the default value of the item. log is a log to the base 10.
Oh and if you wanna do a pull request, go for it! https://github.com/ttocskcaj/DynEco
Coming Soon
- Enchantments - Buy enchantments for the item in your hand.
- MySQL backend for everything :)
Alternative: http://www.spigotmc.org/resources/primeshop.1113/
Does this plugin work with 1.5?
@KnightsOfTables
I'll write a script to convert the yml to sql. When I get around to it lol
@ttocskcaj
Yeah I suppose since all the data is available on mySQL, maybe you could even store the current prices on mySQL somehow? I could write a webpage to generate the list then. Otherwise an ingame list would be nice still.
Sorry about instant price updates, guess I didn't really test it properly.
Thanks for reading my bugs/suggestions, I'll continue testing updates of this, looks promising.
@KnightsOfTables
Bugs:
You can buy air for $0 :p - Yup I know about these 2. Just didn't seem urgent
Suggestions:
@ttocskcaj
I'll download and test it when its approved :p Eh it showed up when I posted this, will test now. Er first issue is there is no database.sql to import :o. Downloaded old version for that, will see if it works in a sec.
All right, got it loaded, will do bugs and suggestions.
Bugs:
Suggestions:
I'll probably come up with more later, will edit this or post a new one depending :p
Good stuff so far though. Keep it up. =)
@KnightsOfTables
Just uploaded 0.2b which supports IDs for you :p
I'll have to figure out how to support the names from items.csv
@ttocskcaj
Fair enough, works well since there is a list.
@epsn
Sorry. Forgot to post that.
Same format as essentials economy signs, without the price at the bottom.
Dirt can be any common abbreviation, or an item ID.
@KnightsOfTables
It uses the official names from the Bukkit API. :p http://jd.bukkit.org/doxygen/d7/dd9/namespaceorg_1_1bukkit.html#ab7fa290bb19b9a830362aa88028ec80a
Simply make it lower case, and remove underscores. I will adapt it to use the item database from Essentials (That the buy/sell uses). That way you can enter any common abbreviation of a name, or an ID.
@ttocskcaj
Yes groups would work fine also, but permission nodes for each item work the same in the end =)
Looking forward to future updates.
Oh and as a minor suggestion, I personally would prefer the permission nodes to be item id instead of item names, since everyone calls things different names.
how do you make the buy/sell signs?
@KnightsOfTables
Yea. The per-item permissions was a proof of concept thing that actually worked really well lol. I was thinking of having items grouped, so you could allow/deny certain groups. And of course the permissions will be available for selling as well
First dynamic economy to have permission nodes for buying a specific item, will definitely follow the updates to this. I'll download and test it tomorrow, about to head off to bed.