[ECON] TradeCraft-AE v1.1b - Chest/Gold Based Economy [Permissions] [1337] [BukkitDev]

Discussion in 'Inactive/Unsupported Plugins' started by ArmEagle, Apr 21, 2011.

  1. Offline

    ArmEagle

    Jdwede, Montag, Tonysp and 2 others like this.
  2. Offline

    LSky

    I don't really understand how this works. Is there some kind of explanation behind the mechanism this plugin uses in order to safely transfer goods from a chest to a player (or the other way around) without the player being able to steal? This looks like a promising plugin, but I need some more information before I would use this on my server.
     
  3. Offline

    Kosyne

    I second this (both points :3). I'd like to use this as my servers 'main' economy plugin, but there are several neat plugins that have iConomy support. So, by trading TC currency for iCO currency, you could still access those features.
     
  4. Offline

    ArmEagle

    The person setting up a shop, for example cobblestone, would specify a buy rate and/or sell rate for cobblestone. If one is only interested in selling their cobblestone, they only write a 'buy rate' (note, buy/sell is reversed on the sign for the seller, it is targeted at the customer who buys what the shop is selling). But they could also choose to buy cobblestone from customers at a more beneficial rate to them.

    The item sold by the shop always goes on the first line, surrounded by brackets.
    The buy rate (selling to customers) always goes on the second line and the sell rate (buying from customers) on the third. You can write rates simply as "3 : 1" but it is much handier to write it like "buy 3 for 1", etc.

    So about the technicalities. The shop owner can deposit the cobblestone in the chest, then right-clicks the sign and the item amount is stored in a flat file by the plugin. Nothing is in the chest anymore. The same goes for depositing currency (default Gold Ingot) if the shop is setup to buy goods from customers.

    A customer would either deposit related items in the chest, or the currency and then right-click the sign to complete the transaction. Items are swapped for currency and vice versa. All changes in amounts are immediately applied in the flat file.

    The shop owner can retrieve the goods and currency (consecutively) at a later time by right-clicking the sign again. The items are put in the chest at that point. And as some have commented before, that is indeed a point where someone could steal your goods. But besides that, there is no point where someone but the shop owner could steal items from the shop (except if they manage to take a shop owner's name), or if the server admins tamper with the file.

    I hope I've clarified things (and not over-clarified them : ).

    I'll discuss iConomy support later. Have to go now.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 13, 2016
  5. I'm curious how exacly would you place the iConomy money inside the chest for trading :}
     
  6. Offline

    LSky

    Alright, so the chest is used as a transfer medium. The only time you can steal items is by opening the chest when someone else is trading? I would take that as an acceptable risk, I'm mainly concerned about being able to cheat the system and get items for free.
     
  7. Offline

    Lord Chaos

    I guess somehow writing in the amount when clicking a sign or the chest.

    Either that or allow some conversion between this plugins currency and iconomys currency. So if this plugin has gold ingots as currency, then you can convert the iconomy currency back and forth with a convert command. So if the iconomy currency was gold coins. Then you could say that 1 gold coin = 1 gold ingot and then you could convert up to the amount of gold coins you have into gold ingots for trading and you can convert the gold ingots back to iconomys gold coins with a simple command. This would solve it without complex code.
     
  8. Offline

    michael05242002

    The infinite shop works perfectly and it is what I exactly want in minecraft(Icomony is still too complicated for my players). Nevertheless, I think u should fix/improve something because it confused me so much.

    Suggestions:
    1. In the text file, there is a line:
    # Item name, data value, buy exchange rate (item to gold), sell exchange rate (optional)
    Isn't it "gold to item"?

    2. Please make a tutorial in detail steps by steps. I still don't understand how some of the features work.
    Code:
    My first reaction:
    read "place gold or items in the chest, right click the sign"
    huh? Where is the sign:S? What should I write on the sign?(format/parameter)
    A understandable instruction could be like:

    For infinite shop:
    1.Put a chest near a wall.
    2.Put a sign above the chest on the wall.
    3.The sign format should be like that:
    First line:[item] (eg. [cobblestone])
    4.Right click the sign to check the buy/sell rate
    5.Put gold ingot(or other currency item) or target item to the chest and right click the sign for item conversion.
    Note. Buying and selling can be editted in TradeCraft.txt.

    BTW, what is repair shop in "repair-shops-enabled: false"?

    Anyway, it is really a great plugin. I hope it helps:).

    More tutorial:

    For player shop:
    shop set up:

    1.Put a chest near a wall.
    2.Put a sign above the chest on the wall.
    3.The sign format should be like that:
    1st line:[item]
    2nd line:buy x:y
    3rd line:sell m:n
    4th line:name
    (for y gold->x item and m item->n gold)
    eg
    [cobblestone]
    buy 128:1
    sell 100:1
    notch

    deposit and withdrawal by owner

    - Put item(gold) to the empty chest and right click the sign to deposit. (but sometimes the item inside is also withdrew. I don't understand the mechanism.)
    - Right click empty chest to withdraw.

    Buying/Selling by players
    Put gold ingot(or other currency item) or target item to the chest and right click the sign for item conversion(like infinite shop but there is limit).

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 13, 2016
  9. Offline

    Fralexxelarf

    could you implent a command like /TC reload, which reloads the whole plugin inclusive configs? Would be great! =)
     
  10. Offline

    ArmEagle

    You can reload configs by disabling/enabling the plugin. No that isn't mentioned anywhere. And yes, a specific command could be nice, I know. But I need to think about putting the commands there are right now already inside a /tc command as you mention, to 'clean house' a bit.



    Thank you for your point of view as a user, michael05242002. I'll take those steps into mind. I guess this plugin does indeed need a better description. Perhaps I should just start a page on the Bukkit wiki, the forum isn't really ideal for that. It makes for way too large an opening post.

    So, about iConomy support. There are several ways of implementing that.

    • Some command to convert some of the set currency to iConomy value.
    • Set the currency to actually use the iConomy currency. But the nice thing about requiring the shop owner (if buying from players) to put money into a shop, is that they can't lose all their money buy people selling a lot of a good to that player.
    • Have some special chest to trade this plugin's currency to the iConomy currency.
    But why would I actually want to support iConomy? There are already shop plugins using iConomy as basis. You can already use those, even if you just use them in part to convert this plugin's currency.

    I'm not saying that I refuse to support iConomy, clearly there's demand for it. But I wonder why you people are not using those other shop plugins then.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 13, 2016
  11. Offline

    mjmr89

    OH MAH GAD WTF! Just kidding. I'm really happy someone took this up, and I'm sorry for disappearing without a trace. Real life got pretty intense and I also discovered I don't have what it takes to manage a plugin, I'm really just too lazy, to be honest.
     
  12. Offline

    mae

    can you upload to guide moive for everyone? OTL

    + need Iconomy?
     
  13. Offline

    ArmEagle

    Hi mjmr89! Good to at least hear back from you. Life can indeed take you by surprise and give you a lot to handle at times. But the nice thing about open source like this (especially with the easy to use GitHub) is that someone else can take over. Good luck to you!

    I responded quickly to you before. But I still wanted to respond to these two things you mentioned.

    First the buy/sell rates. If you write "Buy 32 for 1", then players can buy 32 of that item for one currency (the default gold ingot). That seems like an 'items to gold (currency)' ratio to me, unless I'm mistaken.


    Second, about the repairshop. I simply haven't looked into how that works yet. The code is in there from when this plugin was made for hMod, but it's simply not enabled. Though I think the only thing stopping it is indeed just that config file setting. But as I said, I haven't tested it at all and it could do weird stuff. First there are other things I want to take care of.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 13, 2016
  14. Offline

    Lord Chaos

    Sure there are other iConomy shops. But as far as I can see they are not as immersive or easy to understand as this plugin is. And as far as I can see, it would be easy to implement the support by simply having a command to buy this plugins currency with iConomy currency. It would only need an option to enable this and have a conversion rate. (which would mostly be 1:1, but some may want another ratio)
     
  15. Offline

    michael05242002

    Oh, I know what you mean. item to gold is corresponding the ratio (item:gold). I have mistaken to "convert gold to item"(buy means gold->item). Thanks:)
     
  16. Offline

    daaniel

    i would really like to use this plugin with BOSEconomy:'(
     
  17. Offline

    Alpha

    This is not working for me... I put

    Line 1: [Stone]
    Line 2: Buy for 32:1
    Line 3: Sell for 0:0
    Line 4: -Alphakid16-
     
  18. Offline

    ArmEagle

    Not that I'm lazy (I am), but why don't you use a shop plugin that should work with BOSEconomy already: http://forums.bukkit.org/threads/ec...est-shop-for-iconomy-and-boseconomy-733.4150/ . Looks to me that one works pretty much like this one, except that it uses a currency plugin as basis.

    Is stone listed in the plugins/TradeCraft.txt file? By default the list is pretty short (the OP has a link to a post on the first page with a complete list though).

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 13, 2016
  19. Offline

    Alpha

    Okay, I have that working but now it says in the game "Can't sell that item here" Why?
     
  20. Offline

    L24D

    @Alpha
    You may have the selling price for the item set to 0:0

    [EDIT]: At least that's usually what causes it...

    Oh, and @ArmEagle
    Confirmed working for b733/734, just in case you needed to know :p
    Working flawlessly actually. +10
     
  21. Offline

    koguchi

    I missed this plugin so much when Hmod died...
    So glad its alive properly now, I might even remove all kits in favour of making people buy and sell!
    :D
     
  22. Offline

    ArmEagle

    That, or you've put an item in there that's not actually the listed item (maybe you made a mistake in writing the ID in the .txt file) or the currency.

    Yes, I know. I just forgot to update the thread title. Though I guess I was waiting with that till I got this new change out, which should be soon.

    Well, I added a few more features and decided to call this the full version 1.0.0. Now to hope I didn't introduce any new bugs :)

    You might want to delete the TradeCraft.properties file and let the plugin copy over the new one (or copy it over yourself from the jar file). Though if you don't, the plugin will just use default values. Note that you can use /tc reload now, so you don't have to restart the server (though you could already disable&enabled the plugin before to reload config files).

    Also, for extra emphasis: all commands are changed to now start with /tc. See the opening post for updated information.

    I also updated the opening post. Added images and a brief manual. If you think that could use more clarification, or if you think this works, please let me know!

    Changelog:
    version 1.0.0
    • Changed all commands to fall under root command /tc and changed some.
    • Can now reload the plugin (will reload config files) using /tc reload.
    • Localization language file will update from the jar if there's been an change (can be disabled with "auto-update-language-files" setting).
    • Shop data will not save when the plugin had an error loading (should never happen outside of testing).
    • If a shop had more items in it than would fit in the chest and the owner would try to take them out, he'd lose the overflow of items/currency. The same would happen if a customer bought/sold a lot (usually only at ridiculous trade ratios. Now the amount of items retrieved by the owner is limited to what will fit. And a customer's buy/sell action will be canceled when items will not fit in the chest.
    • Added comments to the TradeCraft.properties file.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 13, 2016
  23. Offline

    michael05242002

    try
    Line 1: [Stone]
    Line 2: Buy 32:1
    Line 3:
    Line 4: Alphakid16

    make sure the item "stone" is defined in the text file


    Edit: Oh, i don't know that the plugin is updated.
    Is it still works for line"buy 32:1" or I should write "buy 32 for 1"?
    I am afraid of loss of item if I update the plugin.

    more Edit:
    suggestion for optional feature: inform the shop owner when someone bought/sold something
     
  24. Offline

    ArmEagle

    "buy 32:1" "buy 32 for 1" "32 1" "32:1" everything with two numbers works.
    Also, I haven't touched how the data file works in any update, I only changed the formatting of the item ID, but that is backwards compatible, so it should work. But you can of course make a backup of TradeCraft.txt (last two numbers on a row are the item amount and currency amount).

    Hmm, could do that if that other player is online I guess. Otherwise they can use /tc shops to see whether it has changed.
     
  25. Offline

    michael05242002

    It is because sometimes I don't notice that someone bought my things even I check the "/tc shop". But I think it is really optional.
    To make it more perfect, you may add some color for the text to increase the readability.
    It is a nice plugin. Players in my server build a big mall and open several shops with their own personality. Maybe I can upload some photos later:D
     
  26. Offline

    ArmEagle

    What would you like to see colored? With the support of localization a lot of text changes are actually simply possible by (copying and) editing the language file.

    I actually haven't seen a real economy built on a server yet. I have used the infinite shops on our server quite a bit in the past. But I guess our server is just too small and too cooperative to really have use for shops.
     
  27. Offline

    Haduke

    I am having some serious problems with this plugin.

    I can set up the shop with no problem and I have slime balls set as my currency. I right click on the sign and it says I have deposited the wooden planks that I wish to sell. They actually come out of my inventory. I can withdraw them again by right clicking the sign, but they are not in my inventory, nor the chest.

    My friend can right click the sign, and it tells him what is for sell and for how much, yet he can't buy anything.

    When I destroy the chest, all the wooden planks come out.

    What is the problem, and what could I be doing wrong here? I would really like to use this mod because it seems rather simple. I need to get a shop set up on my server, and so far none of them work.
     
  28. Offline

    ArmEagle

    That sound pretty strange, especially the part where you say it takes the wooden planks out of your inventory. It should really only be interacting with the chest inventory. Also, if the planks appear when you break the chest, they should really be in there, there's no other way.

    What version of CraftBukkit and this plugin are you using?
    Do you run any other plugins (specifically ones that have to do with chests or signs)?
     
  29. Offline

    Haduke

    I am using CraftBukkit 733 and Minecraft 15_02.
    I am using TradeCraft version AE-1.0.0-beta1

    The other plugins I am currently using are:

    RedBedSpawn
    BlueTelePads
    DailyBonus
    Jail
    MotherNature
    Minequery (For my server)
    Fullchest
    BluePrintEditor

    I reinstalled the plugin.

    It seems I can add items to the chest and deposit,withdrawl them by right clicking on the sign with no problems.
    However, I can't seem to deposit my currency. How are people going to sale items to me if there is no currency in the chest? My currency is slime balls which is item 341.

    Here is what my TradeCraft file looks like:

    #whether to allow creation and use of infinite shops at all
    infinite-shops-enabled: true
    #whether to allow creation and use of player owned shops at all
    player-owned-shops-enabled: true
    #the object type ID to set the currency
    currency-id: 341
    #the data value so set a sub type for currency
    currency-data: 341
    #the language to use for language files
    language: "en"
    #whether to automatically update language files from the jar when there have been changes
    auto-update-language-files: true
    #repair shops are not tested/supported yet
    repair-shops-enabled: false
    repair-cost: 10
    #to print debug messages or not
    enable-debug-messages: false

    I am a bit confused about 'the data value so set a sub type for currency' What exactly does that mean? I set it to 341 just like I did for the object type ID for the currency.

    It seems I am almost there to make this work. Any help would be greatly appreciated. Thanks!

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 13, 2016
  30. Offline

    ArmEagle

    Well, there is a slightly newer version out, but it shouldn't make a difference.

    I have a little bit of time right now to look on your server if you have time. The next two days will be quite busy for me. So, if you want, whitelist me (my name here is my minecraft ID) and send me the server address in a PM (though I guess it's simply the one in your signature - the PM is mostly just as confirmation and so this thread isn't cluttered).

    ahh, the data bit has to stay at 0. It is the 'damage bit' to support things like colored wool, dyes, logs, etc.
    Try to deposit slime with 0 set and let me know if that works.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 13, 2016
  31. Offline

    Haduke

    I sent you a message with my server IP and this message also included. I am online now on my server, so if you have a couple of minutes please feel free to jump on. Thanks. I added you the whitelist and made you OP so you can try and help me sort this thing out. I was able to deposit the currency now, but when my friend right clicks on the sign, it tells him what he can buy and sell yet there is nothing there.
     

Share This Page