SQLite-Based Economy (In Progress)

Discussion in 'WIP and Development Status' started by msleeper, Jan 3, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    msleeper

    Re-posting this from the hMod forums, since it was never released there but I am planning on releasing it for Bukkit exclusively once it's out.

    Similar to Iconomy, it is going to be plugin-driven, meaning that I will be releasing the "core" plugin as well as several basic addon plugins for additional functionality (auctions, shops, etc.). The only major addon I have planned beyond that is my physical stores/shops plugin, and that should be coming out shortly after the economy plugin is finished, and as soon as inventory hooks are added to Bukkit.

    Here is a list of the core and addon functions I have planned thus far:

    Core Functionality
    Give - Give money to another player.
    Trade - Player-to-player trading (item -> coins, coins -> item, or item -> item trades)
    Item Cost - Get the general worth of a specific item, or an amount of a specific item

    Planned Addons
    Chest Stores/Shops (High priority)
    Auctions
    Casino/Gambling (Low priority)

    Currently, all of the core functionality is done and operational! I'm waiting to see how Bukkit will handle plugin-to-plugin communication before I start handling major addon stuff. Shops will also have adjustable prices on a per-shop basis, maybe not at initial release, but shortly after.

    So, posting this to see if there are any requests from users and/or developers so I can try and get things right the first go around. Thanks. :)
     
  2. Offline

    Tythus

    awesome you planning on some form of NPC like bit for shop keeps and such?
     
  3. Offline

    msleeper

    That will probably be separate from actual shops, but it's on the slate. NPC shops will have auto-regenerating stock and auto-degenerating banks, so admins don't have to baby sit them. You would just set up a shop as normal, then add the NPC flag to it and call it a day from there. That's not one of my primary goals to get completed, but eventually I'd like to add it.
     
  4. Offline

    Tythus

    Indeed, what I would want with the npc part is that when a player hits them with the item they have the npc auto offers them a price based on how much is in that stack based how much they are worth each as the price would depreciate the more stock the npc had (supply and demand) it would take out the 'confusing' commands from newbies imo
     
  5. Offline

    msleeper

    Actually I am not planning on creating /shop command type shops, or sign shops at all. The shops I am adding are chest-based. You can read my (somewhat outdated, but still relevant) write-up here.
     
  6. Offline

    Masau

    Are the prices going to be the same for all shops, or will players be able to adjust them for their own shops?

    And how will someone go about checking the price of an item before buying it?
     
  7. Offline

    msleeper

    Initially prices will probably be fixed, but I will add adjustable pricing at some point early on.

    I'm open to suggestions on how to have players check item prices, and kind of depends on how the Bukkit inventory stuff works. My original idea is simply to click on one of the blank areas underneath an item you want to buy and it will tell you the cost in chat.
     
  8. Offline

    Masau

    The current event types include inventory_click, so you'll probably be able to do that with ease.
     
  9. Offline

    msleeper

    Yeah good point, that would work out really great then. :D
     
  10. Offline

    Johnathon

    I haven't done any modding myself so I don't know what hooks are out there, or even available, so I'm not sure if it's possible, but Beta also added floating text over the items that display the name of the item - Is there a hook that can be used to modify that to include the price of the item in the floating text?
     
  11. Offline

    msleeper

    I'm pretty sure that is all handled client-side, but if there is a way to change it then that would definitely be a great option as well.
     
  12. Offline

    Tikii

    I hope you live up to what you say if so i highly support this project :D Hopefully this Economy plugin can be a little less complicated then some others.... :)
     
  13. Offline

    Mattdk

    Users have been bugging me for an economy sort of plugin for a while now. The only thing thats stopped me is I cant seem to find one that allows the use of a designated physical currency - instead they get a currency number variable that they can see in chat.

    I'm not a huge fan of that.

    Would it be at all possible to support physical currencies? Such as say, gold bars for currency, or something?

    I like your simplified ideas, I don't want to have to teach all my users 148 different commands for an economy plugin. I like the direction this is going. So, is a physical currency possible?

    Personally if its possible, I would prefer that they have to have the physical currency on them in their inventory in order to spend it. Perhaps with an additional bank plugin of some kind, they could deposit into their bank and use a designated item as an ATM card. I could live with this comfortably, so long as there is a link to a physical currency.
     
  14. Offline

    Tythus

    Its possible sure but the only problem is it practical?
     
  15. Offline

    Mattdk

    Sure, a physical currency is entirely practical. Gives a use to gold bars for one. The map has been mined dry? No biggie, we migrate maps every few months and take major structures with us, not to mention there are plugins out there that you can use to modify mob drop parameters (to say, give a chance of skeletons dropping a gold bar or somethnig). On top of that, you got staff run events, where rewards could be gold bars.

    So yeah, in my opinion its entirely practical. I would love to see this.
     
  16. Offline

    Johnathon

    It's hard to say if there would be a practical way to implement a physical currency system. I actually rather like the idea of a physical system since it gives a real feel to the economy (Something physical about holding on to the money) and if done properly could also prevent the economy from spinning out of control as it does for most economy implementations in MC so far. Having a physical currency would allow for an automated way to have a limited amount of currency in the economy at any given moment while still allowing it to grow (as people continue to mine and find more of, as the example was, gold ore and smelt it into bars) This would prevent someone from finding a single item that is worth more than it should be and buying/selling back and forth forever since the economy would be limited to what was actually in existence at the time.

    Yes, this balance could be reached with variables in a virtual money environment but it would require the economy to grow at x amount per x days or whatever or would require manual intervention.

    The only issue with the physical currency is more about the space consumption in the player's inventory since stacks can only go to 64, but this again goes back to exactly how your pricing system is and how expensive some of the higher cost items like, for example, the diamond pickaxe, are. The banking system would again help out there since players would be able to bank extras, though I would actually lean more towards a protected chest system to force the player to go back to their house or whatever to pick up money and this would prevent any commands from having to be used in chat in order to use the system.
     
  17. Offline

    Mattdk

    I like your line of thinking John, the less commands we have to teach our players, the better.

    If anything, the limit of stack sizes would serve to further limit the economy in a positive way, in my personal opinion at least. No banking, just protected chests full of gold. Thats a better idea than any sort of atm card item requiring commands. This way, users could only afford the time/currency to buy soo much, and would not be overloaded with chests full of diamond armor.

    Keep in mind too, we need not be limited by mining for the gold. We can do it in various other inventive ways -- make some monsters drop gold, run server events with rewards in gold, that kind of thing.

    Perhaps we could put the admin item generation commands to use here as well. An admin could run a banking system, and hand out loans and stuff.

    Furthermore, creating more uses for the physical currency would be another vital thing to do. Players could buy and sell their properties based on property value. An awesome house in the middle of an awesome town? Sell it for a large amount. A remote hut in the middle of nowhere? Sell it for a small amount.

    Would also work well in tandem with my bounty hunter idea (we have jails, but really need a good plugin to make this work with things like bounty hunters).
     
  18. Offline

    ParkerReno

    I am not really adding to the discussion, but shouldn't this be in Plugin Development (you may get more attention there, too)
     
  19. Offline

    msleeper

    Oops, good idea! Thanks for the mods for moving this for me.

    I did a test last night and the core of the plugin is more or less working flawlessly.

    re: Using a physical currency instead of "coins". I can definitely try adding something like that in (and it wouldn't be too hard, since chest shops already accept item trading as well as "coins"), but my concern is that you won't actually like what it means. Yeah, you can buy a diamond gem with 3 gold bars or whatever the cost will be, but what if i just want to buy like 5 coal? The conversion would mean I have to buy in large bulk. Even moreso if I was trying to buy cobble, and I had to buy in bulks of like 500.

    Just food for thought for those of you who want some sort of "hard" currency. On the flip side, I am open to ideas on how to curb a "coin" economy from spiraling out of control.
     
  20. Offline

    Mattdk

    I think it would be manageable. I see your point though, but really just requires proper setting of prices and stuff.

    Hard currency as an option to coin currency would be totally awesome.
     
  21. Offline

    msleeper

    No amount of setting prices will change the fact that I will be forced to buy basic materials like Cobblestone in massive bulks if the base of a physical currency is something like Gold. Gold is on the order of something like 170,000% more rare than Stone, based on the world makeup stats of a sample of 5 or 6 worlds. Even Coal is like 1,900% more rare than Stone.

    Like I said, I will see about testing a physical currency as a low priority, but I promise you that you'll realize it's not as cool as it sounds on paper once you see it in action.

    If you are looking for a non-coin based system, again, you will be able to trade any item to get any other item in a chest store. So I can trade Coal or Wood or Obsidian or, yes, even Gold bars in exchange for anything in anyone's shop. Buying Cobblestone with a single Gold bar will net you ~1,792 Cobblestone - almost more than the player can physically carry - if that's what a potential shopper wants. There is also player-to-player item trades to bypass the stores altogether.

    I guess, in short, I'm already planning on having a non-coin based economy ready. But instead of having some sort of base currency like Gold, any item can be traded for any other item, based on how rare the item actually is in the world.
     
  22. Offline

    Triple Omega

    Since someone asked about physical currency in the iConomy thread, I've been thinking about it. My thoughts so far:

    1) To overcome the issue of high-value currency, you'd need multiple currencies. In the real world we have on average maybe 7 coins and 7 kinds of paper money. For minecraft maybe 4-5 total would be needed.

    The problem here is that everything has it's use in the minecraft world. In the real world you don't usually construct anything from money. This means that your economy might start driving your players habits. They may, for instance, start using less torches because coal is one of the currencies. Also, carrying around multiple currencies will eat up your inventory.

    2) Not only players need inventory, but shops as well. Basically, you'd need the minecraft equivalent of a cash register. Not a big problem per se, but if the register is full because the owner hasn't emptied it in a while, you wouldn't be able to buy anymore. This will mostly be a problem if people pay with small currencies, the shop makes lots of sales per day, or the owner is away for a while.

    3) If Notch comes up with a new use for the material used for one of your currencies, it could radically change the value of it. Then through this currency, all currencies would be affected and thus your entire economy. We've seen this happen in real life too with gold and silver prices.

    Conclusion:

    It is possible, but minecraft really isn't made for it. Preferably you'd have representative money without any actual use(not placeable in-world/not craftable), unrelated to other materials(can't craft money) and with a much higher stack limit. So basically, you need a client-mod.
     
  23. Offline

    msleeper

    Read my second-to-last paragraph.
     
Thread Status:
Not open for further replies.

Share This Page