[INACTIVE][ECON] DynamicMarket v.0.4.8.1 - Versatile Shop Plugin [440-480+?]

Discussion in 'Inactive/Unsupported Plugins' started by HaloInverse, Feb 2, 2011.

  1. Offline

    HaloInverse

    DynamicMarket - Dynamic Global Shop Plugin

    Version: 0.4.8
    Built against: Bukkit 0.0.1 build #412
    Works with: CraftBukkit 0.0.1 builds #440-480 or thereabouts.

    Requires:
    • Permissions 2.5
      • Very recommended, but now optional! See "DynamicMarket.settings" below.
    • iConomy 4.1
    • Either of:
      • SQLite (easiest to set up, reccomended)
      • MySQL (more troublesome, more powerful)
    Buy items, sell items, admins set prices, et cetera. However, there's a lot going on under the hood...

    READ THIS BEFORE PROCEEDING.
    Seriously. (open)

    This plugin has a great deal of flexibility, but the price of more flexibility is more command options to control that flexibility. Computers just aren't very psychic.

    While in-game help exists for commands, the output from /shop help (<topic>) is intended to be a quick reference, not exhaustive documentation. Full instructions simply won't fit on the MineCraft client's tiny text display.

    You should read and understand the following sections before installing this plugin and setting up your shop. If not, you should at least read and understand the following sections while you are setting up your shop items.


    The big feature: Dynamic pricing. Items can be set to increase in price as they are purchased from the shop, and decrease in price as they are sold back, simulating open market conditions. The initial prices of items are just considered a starting point - user transactions will eventually adjust an item's price to a near-ideal level, based on actual value vs. rarity.

    However, as of 0.4.5, the configuration fields are now flexible enough to allow a range of behaviours, from fixed pricing with no stock limits, to fully-dynamic pricing with finite stock levels.

    This is by no means "complete" in the sense of "finished adding features", but it is complete enough to be functional and usable.

    Current Features (open)

    New & Current Features:
    • Buying and selling of items:
      • Item prices can be set to dynamically adjust according to supply and demand. This is highly adjustable, including the rate of price increase/decrease per transaction, optional hard overstock/understock limits, price ceilings/floors, etc. Leaving all the extra features turned off makes an item's price fixed and always-in-stock, like a basic "flat rate" shop.
      • Subtypes of items are fully supported.
      • List of items in the shop is broken into pages, accessible by number.
        • Partial-name searching! "/shop list wood" shows everything with "wood" in the name.
      • Item names for buy/sell/info also use partial substring matches.
      • A dynamically-priced item might cost more for 10 items than the cost of 1 item multiplied by 10, due to stock depletion. So, the "/shop <id>" command now takes an optional ":<count>" parameter, so you can get a quote for the actual buy/sell price of larger numbers of items.
    • Administration:
      • Shop items are edited via a "tag" system, so you don't have to re-enter every field for each small change. Plus there's a few utility tags which do other things to an item's record...
      • Item names are now editable, and will persist (independent of items.db) until the item's record is deleted.
        • This also makes items.db a convenience instead of a necessity, since items can be added by ID and then immediately renamed.
      • A "Default" item exists in the shop, which cannot be bought or sold, but serves as the base data for any new items you add to the shop. Any tags not supplied when you add an item will be copied from whatever you put into "Default".
      • Basic sanity-checking on input data has been added. Also, adjusting an item's bundle-size will rescale its price automatically.
      • Items can be set to be purchasable but not sellable, or vice versa. (Set either price to -1 to disable that transaction type for that item.)
        • Tags like "canbuy:n" and "nosell" can now be used.
      • An extended in-game help system. "/shop help" lists available commands and help topics. "/shop help <topic>" gives help on a shop command or other shop-related topic listed in the main help.
      • The list of commands displayed is filtered by the user's current permission level.
      • Shortcuts for all commands (except for database reset).
      • All commands except for "/shop buy" and "/shop sell" can be accessed through the Bukkit console. No need to log in to add or update items!
      • Access to the entire shop is now restrictable by permission.
      • Highly informative error messages, to help reveal why your database exploded. (Which really shouldn't happen, but you never know...)
      • The shop DB can now be exported to a .csv file, edited in your favorite spreadsheet, and re-imported back into the database, making large-scale changes easier.
      • NEW: The revenue/cost of transactions can now be transferred to another account. With the basic plugin, this can be an admin's iConomy account, or a dummy "GovernmentBank" account. (Don't use that name, or some bright spark will register that username and exploit you.) With a wrapper plugin, this can be set to link a shop's funds directly to an owning player's iConomy balance.
      • NEW: Transaction logging to a comma-delimited file, ready to import into a spreadsheet for nefarious financial analysis!

    Market Mechanics (open)

    Quick Market Mechanics Description:
    • Instead of a "buy price" and a "sell price", items now have a "base price" and a "sales tax". The "buy price" is based on the base price (adjusted by stock, if set to do so), and the "sell price" is based on (<buy price> - <sales tax%>). So if the sales tax is set to 25, then an item's selling price will be 75% of its purchase price. (The sales tax is entered as a number from 0 to 100, representing 0% to 100% tax.)
      • Using the old "/shop add <id> <buyprice> <sellprice>" format still works - the plugin just calculates the base price and sales tax, so that the buying and selling prices come out right.
    • Shop items have a "stock level", which is not necessarily a literal count of items in stock. By default, the stock level is considered an offset from baseline, rather than an absolute count.
      • Items with stock near zero are considered to be in "average" supply, and will be priced at their base price.
      • Items with a positive stock are considered "in surplus", and will be priced below their base price.
      • Items with a negative stock are considered "understocked", and will be priced above their base price.
      • This interpretation of stock levels can be made to behave like literal counted stock, by setting an item's StockFloor to zero, which prohibits negative stock.
    • Items have a "volatility", which indicates how quickly the price changes based on changes in stock level. It represents the percent increase in an item's price per item purchased, multiplied by 10000. V=1 (the lowest level) means that 100 items would have to be purchased to raise the price by 1%. V=10000 (the highest level) means that 1 item purchased would raise the price by 100% (doubling the price). (More examples in tags.txt)
      • There is also "inverse volatility", which represents the number of items needed to be bought in order to double the buying price (or halve it, if selling). This is more convenient for some people's mindsets, and is converted into volatility when entered.
    • The "sell price" is actually calculated from the buy price at the current stock level + 1, rather than the current stock level. This is to prevent gaining endless money by buying an item (driving the price up) then immediately selling it back (dropping the price) - if <sales tax> = 0, then buying-then-selling like this produces zero net gain/loss (as it should).
    • The tag presets "fixed", "float", "finite", and "flat" allow you to quickly set up common options. If used with the "Default" item before adding items to your shop, this will allow you to set the overall behaviour of the shop easily. See Tag Reference for further details.

    Commands (open)

    Commands:

    <Angle Brackets> denote parameters.
    (Round Brackets) denote optional sections.
    The brackets themselves are not part of the command; they are just used to describe syntax. Brackets should not be typed.
    If executing shop commands through the Bukkit console, leave off the initial slash.

    /shop - Shows the main help page. Lists commands and shortcuts.
    /shop help - Ditto.
    /shop help <topic> - Shows help on the given command or subject.
    /shop help tag <tagName> - Shows help on the given item tag.
    /shop <id>( :<count>) - Shows current buy/sell information on the given item.
    <id> can be an item name or a type number with an optional subtype:
    <id> = <itemName> | <itemID> | <itemID>,<subtypeID> | Default
    If <count> is used, shows the total price for the given number of items/bundles.
    /shop list (<partname>) (<pageNum>) - Lists a page of items in the shop. Default page = 1.
    If <partname> is used, lists only items with <partname> as part of their name.
    /shop buy <id>( :<quantity>) - Purchases an item. Default quantity is 1 bundle.
    /shop sell <id>( :<quantity>) - Sells an item. Default quantity is 1 bundle.
    /shop add <id>( :<bundleSize>) (<buyPrice> (<sellPrice>)) <tagList> - Adds an item to the shop list.
    <buyPrice> and <sellPrice> are accepted for convenience, and are internally converted to BasePrice and SalesTax.
    Unused tags will have their data copied from the Default item.
    Transactions will be in multiples of <bundleSize>. Default quantity is 1 item per bundle (unless overriden with the Default record)
    /shop info <id> - Shows much more detailed information about an item in the shop, such as stock level, volatility, etc.
    /shop update <id>( :<bundleSize>) (<buyPrice> (<sellPrice>)) <tagList> - Edits an item's shop data record.
    Data is first copied from the old record, then tags are applied in order of entry.
    NEW! <id> can be "all", applying changes to all items in the shop list.
    /shop remove <id>- Removes an item from the shop list.
    /shop reload - Reboots the plugin, reloading the configuration file and items.db.
    /shop reset - Deletes and recreates the shop database from scratch. Asks for an extra confirmation before doing so.
    /shop exportdb - Exports the shop database to a .csv file. The name and location are configured in SimpleMarket.settings. (Default: Plugins/DynamicMarket/shopDB.csv)
    /shop importdb - Imports a .csv file into the shop database. Same file location as used by the exportdb command. Note that the previous contents of the database are NOT cleared out before importing, so you may want to do a "/shop reset" before importing. The file's format MUST match the format of the exported file (except for quote marks, which are stripped out on import).

    Tag Reference
    Tag Usage Examples
    Permissions (open)

    Permissions:

    'dynamicmarket.access' : Grants basic access to the root /shop command.
    'dynamicmarket.buy' : Grants purchase rights.
    'dynamicmarket.sell' : Grants selling rights.
    'dynamicmarket.items.add' : Grants the ability to add new items to the shop.
    'dynamicmarket.items.update' : Grants the ability to edit items in the shop.
    'dynamicmarket.items.remove' : Grants the ability to remove items from the shop.
    'dynamicmarket.admin' : Grants the ability to delete-and-rebuild the shop database, and to reboot the plugin.

    Installation/Setup (open)

    Installation/Setup:
    • If you haven't already done so, install Permissions and iConomy, and ensure they work.
    • Copy DynamicMarket.jar into your Plugins/ folder.
    • NEW: Copy items.db into Plugins/DynamicMarket/ (or whichever directory you specify in DynamicMarket.settings) (DynamicMarket will work with other plugins' items.db files, but not all plugins will handle the extra subtype data in the items.db linked below.)
    • NEW: Copy either the SQLite connector or the MySQL connector into your main MineServer/Bukkit folder.
      • Or, if you have a MySQL server running, edit DynamicMarket.settings to specify the MySQL server, login, and password.
    • Edit plugins/Permissions/config.yml, and give everybody the appropriate permissions.
      • Most users would get 'dynamicmarket.access', 'dynamicmarket.buy', and 'dynamicmarket.sell', unless you want to restrict such commands to registered/VIP users.
      • Mods would probably get 'dynamicmarket.items.*'
      • Admins should get 'dynamicmarket.admin', if they don't already have '*'.
    • (Re)Start your MineCraft server. Errors may be thrown to the console, but the file Plugins/DynamicMarket/DynamicMarket.settings should be created.
    • Edit DynamicMarket.settings. Particularly, the setting "database-type".
      • "database-type=sqlite" : Use the SQLite connector. This is the simpler option. No further database access configuration should be needed.
      • "database-type=mysql" : Use the MySQL connector. You will need to set the options "mysql-user", "mysql-pass", and "mysql-db", as well as having a working MySQL server installation set up already.
    • NEW: Log in to MineCraft as someone with 'simpleMarket.admin' permission, or use the Bukkit console. Use "/shop reload" to load the edited config file.
    • Use /shop add to fill the market with tasty blocks at scandalous prices.
      • You WILL want to use "/shop update default" to set up some sensible default values for the items you will be adding, so you don't have to do so much typing for every item. (Or at least inspect the Default entry, to be sure you agree with it.)
      • If you want to make all of the items in the shop use dynamic pricing, set up the parameters in the Default item FIRST, so you don't have to go back and modify 100+ items to support variable pricing.

    DynamicMarket.settings Reference

    Downloads:
    • DynamicMarket 0.4.8.1 (.jar) (.7z) (iConomy 4.1, Permissions 2.5)
    • DynamicMarket 0.4.8 (.jar) (.7z) (iConomy 3.0, Permissions 2.1)
    • DynamicMarket 0.4.6.1 (.jar) (.7z) (iConomy 2.1 / Cookies+iConomy Wrapper)
    • DynamicMarket Source on GitHub
    • items.db <-- Contains subtypes. Put this in /Plugins/DynamicMarket/.
    • SQLite Connector (reccomended) Put this in your MineCraft server/Bukkit root.
    • MySQL Installation Guide (not so easy, probably not recommended for SQL server beginners)
    • Sample shopDB.csv Many (but not all) items, set up for floating-stock+floating-prices. Edit it if you like, then put this in your Plugins/DynamicMarket folder and use /shop importdb to load the items into your shop.
    DynamicMarket Wrapper Plugins:
    • DMWrapper: Restricts shop access to specific regions. Outdated.
    Want to integrate DynamicMarket's shop functions into your own plugin? Read this!
    To Do List(s) (open)


    To Do for v.0.5:
    • Logging of transactions. Done.
      • Global messages to alert to price changes.
    • Item classes: Use Permissions to control access to certain types of items, i.e. make safe items (gravel, stone, iron) available to anyone, but limit traffic in dangerous items (TNT, lava buckets, monster spawners) to VIPs. (For example.)
    • Customizable interface/highlight colours. Done.
    • Clean up the d*** out-of-date comments in the code. (Working on it.)
    To Do before 1.0:
    • Optional auto-transactions triggered by price disparities in raw/processed materials.
    • Possible migration of the new help system to a separate plugin, unless the expanded features needed become available in MCDocs or Bukkit.
    • Migrate config file handler to Yaml.
    • Random fluctuations of stock levels (would make the market more lively on a low-population server)
    • Stock levels drift back to rolling averages (smoothes out short-term price spikes, allows for long-term price drifting)

    Recent Changes:

    0.4.8.1:
    • Migrated to Permissions 2.5, iConomy 4.1.
    0.4.8:
    • shopLabel moved from a table name suffix to a table field.
    • Using "all" as the item name now applies the given tags to all items with the current shopLabel.
    • Altering an item's bundleSize now changes its stock level, as well as its basePrice.
      • New stock level is rounded down, to stave off future item duplication issues.
    • Sanity-check behaviour changed to make database queries more efficient and fend off future exploits:
      • stockHighest/stockLowest set to stock if lower/higher than stock.
      • stockCeil/stockFloor is set to stockFloor if lower/higher than stock.
      • priceCeil is raised to priceFloor if priceCeil<priceFloor.
        • Previous behaviours: Swap if order wrong, range-crop stock if outside highest/lowest/floor/ceil.
    • Fixed bug: Adding items without specifying count did not import count from default record.
    0.4.7:
    • Upgraded to iConomy 3.0.
    0.4.6.1:
    • Rolled back iConomy calls to 2.x style, to be compatible with Cookies' iConomy wrapper.
    0.4.6:
    • Support for transaction funds to be backed by an iConomy account.
      • Account link parameters added to wrapper-call messages.
    • Wrapper calls streamlined.
    • Added basic transaction logging.
    0.4.5:
    • Volatility can now go as low as 0.
      • In this way, stock can still be counted without affecting price.
    • CSV import/export now uses +INF / -INF as shorthand for min/max values in applicable fields.
    • Message colours now customizable in DynamicMarket.settings.
    • Expanded help on tags/presets.
    • Changed "fixed" tag, splitting its function with "flat".
    • Added tag presets "flat" and "finite".
    • Updated tag "renorm" to accept an optional new stock level other than 0.
    Full Changelog

    Credits:
    • Nijikokun: SimpleShop v.1.1, on which this was based. (And for Permissions and iConomy, on which this relies.)
    • AtomicAcidBath: Assistance with tracking down a hard-to-see MySQL syntax error.
     
    SoapFlakes and Mahngiel like this.
  2. Offline

    shane3x

  3. Offline

    Echo404

    We haven't done too much experimentation since we were already over our server maintenance target time, but I'll see if I can get you more specifics tomorrow during our next scheduled maintenance. From the limited experience I have with the error, it seems to pop up anytime the database file is accessed (including it's initial creation); I assume that for some reason unbeknownst to me the server never finishes accessing the file, and so it's still in use the next time around.

    Somewhat unrelated, I was wondering if it would be possible to separate the shop reload command from the other administrative commands? I would have liked to have given my users the ability to reload the shop on their own, potentially granting them temporary access to the shop (until the database locked again), however doing so would have also given them access to commands that I would prefer they not have...
    --- merged: Mar 4, 2011 8:11 AM ---
    Lenocinor, the solution that my server came up with for the partial-stack issue was to set all the buy and sell prices for a single item (not a stack as you seem to have). This way, any amount of the item can be bought and sold at any time by the user adding the "colon amount" (for example "/shop buy cobblestone:12" would buy only 12 cobblestone) to the end of their command.
     
  4. Offline

    Andreas Brisner

    @lenocinor
    imo its better to have smaller stacks. Remember the shop keeps a stock.. How do you keep 4.33435435 items in stock?
    1/2 64-stack is 0.5 items, thats just not possible.. (It is possible, but alot would have to be changed.)

    Either make smaller items (as Echo said) and use /shop buy <item>:<amount> or instruct your users that items are sold in stacks of 64.. Stacks of 64 will also allow for more variable prices.. I might look into making it more iconomy 4 compatible (Support 00.00 coin)
    I replied in your thread
     
  5. Offline

    lenocinor

    I appreciate the suggestion. I thought about doing that, but then it means that things you want to buy in bulk have hard-to-calculate pricing. It basically removes the bundle functionality from the store, which I find useful. It's nice to have most of my prices be multiples of 25 and 50 (I did a bit of rounding when making them), and in quantities people would actually want to buy.

    I'll change it if I have to, but I like the idea of buying bundles, and selling UP TO the bundle number specified. I think it'd be the best of both worlds.

    EDIT: And it makes selling kind of a pain. You need to know exactly how much you have of something to sell if the stacks are 1.
    --- merged: Mar 4, 2011 8:34 AM ---
    Why not just keep track of the number of actual items, instead of stacks? How does the store handle things currently if you had, say, 5 wool in stock and then changed the bundle size to 64 or something? I realize that it would still require a rewrite at this point, and therefore wouldn't really be feasible, but at least it wouldn't require fractional items.
     
  6. Offline

    Andreas Brisner

    If you changed bundlesize you would have had 5x64 instead of 5x1
     
  7. Offline

    shane3x

    Any ETA on when this will support iConomy 4.2?
     
  8. Offline

    Hakaslak

    CB 493, Dynamic Market 0.4.8.5, iConomy 4.3

    2011-03-04 02:11:47 [SEVERE] com.nijiko.coelho.iConomy.iConomy cannot be cast to com.nijiko.coelho.iConomy.iConomy loading DynamicMarket v0.4.8.5 (Is it up to date?)
    java.lang.ClassCastException: com.nijiko.coelho.iConomy.iConomy cannot be cast to com.nijiko.coelho.iConomy.iConomy
    at com.gmail.haloinverse.DynamicMarket.DynamicMarket.checkiConomy(DynamicMarket.java:224)
    at com.gmail.haloinverse.DynamicMarket.DynamicMarket.onEnable(DynamicMarket.java:109)
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:118)
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:414)
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:187)
    at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:83)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:61)
    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:204)
    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:191)
    at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:131)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:246)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
     
  9. Offline

    dumptruckman

    Because it says 0.4.8.1 at the top and it's made by HaloInverse? Perhaps people don't see Plugin Developer below your name and don't think to look at your posts. Anyway, since you're dev now apparently, can you help me with this?
     
  10. Offline

    Tarkington

    Whenever we try to buy from the shop, we get this error.
    Code:
    11:11:18 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'shop' in plugin DynamicMarket v0.4.8.5
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:33)
            at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:80)
            at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:183)
            at net.minecraft.server.NetServerHandler.c(NetServerHandler.java:619)
            at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:582)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:576)
            at net.minecraft.server.Packet3Chat.a(SourceFile:24)
            at net.minecraft.server.NetworkManager.a(SourceFile:230)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:75)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:357)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:272)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Caused by: java.lang.NullPointerException
            at com.gmail.haloinverse.DynamicMarket.iListen.delta_balance(iListen.java:481)
            at com.gmail.haloinverse.DynamicMarket.iListen.shopSellItem(iListen.java:721)
            at com.gmail.haloinverse.DynamicMarket.iListen.parseCommand(iListen.java:1003)
            at com.gmail.haloinverse.DynamicMarket.DynamicMarket.onCommand(DynamicMarket.java:134)
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:31)
            ... 12 more
    Version info listed below, as reported by Essentials
    Code:
    >version
    11:24:28 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-493-g8b5496e-b493jnks (MC: 1.3)
    11:24:28 [INFO] This server is also sporting some funky dev build of Bukkit!
    >version Essentials
    11:24:31 [INFO] Essentials version 2.0.249
    11:24:31 [INFO] Provides basic commands for Bukkit, utilizing EssentialsCore.
    11:24:31 [INFO] Website: http://www.earth2me.net:8001/
    11:24:31 [INFO] Authors: Zenexer, ementalo, Eris, EggRoll, xmlns and Brettflan
    >version iConomy
    11:24:38 [INFO] iConomy version 4.2
    11:24:38 [INFO] Authors: Nijikokun and Coelho
    >version DynamicMarket
    11:24:43 [INFO] DynamicMarket version 0.4.8.5
    11:24:43 [INFO] A shop plugin building towards an interesting and flexible market system.
    
    11:24:43 [INFO] Author: HaloInverse(fork by arensirb)
    >version Permissions
    11:25:00 [INFO] Permissions version 2.5
    11:25:00 [INFO] Website: www.theyeticave.net
    11:25:00 [INFO] Author: TheNo1Yeti
    >
     
  11. Offline

    Nijikokun

  12. Offline

    Andreas Brisner

    holy crap halo, suddenly awoke from the dead :3
     
  13. Offline

    Vittek

    Well everything works with MySQL the only thing that does not work is adding items to the DB. Then I get this error.


    Removing items, buying items, everything works. Happens with 8.4.5 and the above version Nijikokun just posted. Using CB 493, Groupmanager (latest 1 alpha) and iConomy4.3. Any helps would be appreciated.

    I already wiped the MySQL DB and let it get rebuilded from scratch.. same error.

    EDIT: found the problem, item.db was wrong, redownloaded it and replaced it now it works, thanks!
     
  14. Offline

    lenocinor

    Updating to newest iConomy and Permissions seems to have fixed my shop item persistence issue. The guy above whose database kept dropping all the items on reboot, try that.
     
  15. Offline

    dotnabox

    @lenocinor Mine zipping your plugins folder for me and linking it? I can't for the life of me figure out why my stocked items disappear when I restart.
     
  16. Offline

    Eckhart

    Mine are disappearing as well.

    I can log in, import a DB, and it works fine. Creates a shops.db-journal file in the /plugins/DynamicMarket folder and everything's listed. I then shut the server down and start it back up, at which point the .db-journal is deleted and my shop is empty.

    The shop also empties itself when I run a /shop reload ingame. At no point does an error pop up in the bukkit console.

    This is with iConomy 4.3.3, Permissions 2.5.2 on Craftbukkit 443 on MineOS Linux. Dynamic market 0.4.8.5

    Edit:
    When I delete the /dynamicmarket/ folder and boot again, so the plugin remakes it, I get this:
    Code:
    2011-03-04 14:14:56 [INFO] [DynamicMarket] Downloadeded SQLite Successfully.
    2011-03-04 14:14:56 [INFO] [DynamicMarket] Creating database.
    2011-03-04 14:14:56 [SEVERE] [DynamicMarket] Database creation *failed*.
    2011-03-04 14:14:56 [INFO] [DynamicMarket] Standard Permission plugin enabled.
    2011-03-04 14:14:56 [INFO] [DynamicMarket] iConomy connected.
    2011-03-04 14:14:56 [INFO] [DynamicMarket] version [0.4.8.5] (Phoenix) enabled 
    It actually creates a shop.db, 3,072 B in size - But this size also never changes when imports are conducted.

    Edit 2: Updated to the latest recommended build of bukkit, #493, and there was no change.

    Interesting discoveries here.. with Nijikokun's version above the database creation is a success, and the original import persists. However, I can't use the shop with Nijikokun's, I have to use 0.4.8.5 to actually buy from the shop. But with 0.4.8.5 the price changes which happen as a result of buying/selling don't persist.

    Completely baseless hypothesis time!
    I assume the db-journal file is what holds the changes to the db while running, or something, and that these are intended to be writen to the .db file, which never occurs - Which is why the changes aren't persistent, because the db-journal file is not persistent.
     
  17. Offline

    dotnabox

    @Eckhart The problem for us is that shop.db-journal is not being created upon first run. I am talking with lenocinor via PM about what he/she did to get it working. I'll post my results here.
     
  18. Offline

    T.E.

    Hello,

    I just re-installed bukkit in a linux box (ubuntu 10.10, no gui). I have everything working but Dynamic market has en error when trying to create the databases. Using: Essentials build 2.0.249, [iConomy] v4.3 and [Permissions] version [2.5.2].

    Could it be an issue with linux permissions or java not installed properly? Everything else works.

    Code:
    14:32:42 [SEVERE] [DynamicMarket]: Error executing statement [CREATE TABLE Market ( id INTEGER PRIMARY KEY AUTOINCREMENT, item INT NOT NULL, subtype INT NOT NULL, name TEXT NOT NULL, count INT NOT NULL, baseprice INT NOT NULL, canbuy INT NOT NULL, cansell INT NOT NULL, stock INT NOT NULL, volatility INT NOT NULL, salestax INT NOT NULL, stockhighest INT NOT NULL, stocklowest INT NOT NULL, stockfloor INT NOT NULL, stockceil INT NOT NULL, pricefloor INT NOT NULL, priceceil INT NOT NULL, jitterperc INT NOT NULL, driftout INT NOT NULL, driftin INT NOT NULL, avgstock INT NOT NULL, class INT NOT NULL, shoplabel TEXT NOT NULL DEFAULT '');CREATE INDEX itemIndex ON Market (item);CREATE INDEX subtypeIndex ON Market (subtype);CREATE INDEX nameIndex ON Market (name);CREATE INDEX shoplabelIndex ON Market (shoplabel)] with sqlite: java.sql.SQLException: database is locked
    14:32:42 [SEVERE] null loading DynamicMarket v0.4.8.1 (Is it up to date?)
    java.lang.NullPointerException
            at com.gmail.haloinverse.DynamicMarket.MarketItem.<init>(MarketItem.java:96)
            at com.gmail.haloinverse.DynamicMarket.DatabaseMarket.createTable(DatabaseMarket.java:57)
            at com.gmail.haloinverse.DynamicMarket.DatabaseCore.initialize(DatabaseCore.java:34)
            at com.gmail.haloinverse.DynamicMarket.DatabaseCore.initialize(DatabaseCore.java:28)
            at com.gmail.haloinverse.DynamicMarket.DatabaseCore.<init>(DatabaseCore.java:23)
            at com.gmail.haloinverse.DynamicMarket.DatabaseMarket.<init>(DatabaseMarket.java:20)
            at com.gmail.haloinverse.DynamicMarket.DynamicMarket.setup(DynamicMarket.java:171)
            at com.gmail.haloinverse.DynamicMarket.DynamicMarket.onEnable(DynamicMarket.java:105)
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:118)
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:414)
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:187)
            at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:83)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:61)
            at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:204)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:191)
            at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:131)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:246)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    
     
  19. Offline

    Eckhart

    The .db-journal isn't created upon first run from what I'm seeing. The .db is, but the .db-journal doesn't appear until after I try to run an importdb or add command.

    @T.E. Try using the 0.8.4.5 release from the previous page.
     
  20. Offline

    T.E.

    worked like a charm...thanks.
     
  21. Offline

    JohnnyR

    I'm getting the database locked error as well. I take it this plugin is broken right now?
     
  22. Offline

    HoppyDragon

    Same here as well.
     
  23. Offline

    Fuzzwolf

    [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'shop' in plugin DynamicMarket v0.4.8.1
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:33)
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:80)
    at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:183)
    at net.minecraft.server.NetServerHandler.c(NetServerHandler.java:619)
    at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:582)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:576)
    at net.minecraft.server.Packet3Chat.a(SourceFile:24)
    at net.minecraft.server.NetworkManager.a(SourceFile:230)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:75)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:357)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:272)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Caused by: java.lang.NullPointerException
    at com.gmail.haloinverse.DynamicMarket.iListen.hasPermission(iListen.java:53)
    at com.gmail.haloinverse.DynamicMarket.iListen.parseCommand(iListen.java:1007)
    at com.gmail.haloinverse.DynamicMarket.DynamicMarket.onCommand(DynamicMarket.java:126)
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:31)
    ... 12 more

    The only possible cause of this that I am aware of is if I messed up on the SQLite part. I uploaded the .jar into my plugins, then uploaded the SQLite connector as it was to my bin, yet I got this error. Any ideas?
     
  24. Offline

    Eckhart

    @Fuzzwolf

    Try the 0.4.8.5 release on page 13.
     
  25. Offline

    N3X15

    0.4.8.5 version by Niji has a major memory leak. After installing it, I get java heapspace errors constantly.
     
  26. Offline

    shane3x

    What program should I use/download to open and modify .db files? Also any ETA on support for iConomy 4.3.2?
     
  27. Offline

    SplenectomY

    There is a link in the op for a shopDB.csv file, which can be imported into a .db using the plugin's commands. Microsoft Excel can read and edit .csv files with no problem.
     
  28. Offline

    Color42

    No offence to Niji but the quick fixes provided rarley work
     
  29. Offline

    imaxorz

    Is exporting and importing working for you guys?

    I get a message that export is successful, but there is no output file.

    Same with importing, says its successful, but nothing changes.

    I'm using the one Nijikokun posted, is that my problem? Does importing/exporting work in 4.8.5 thats one page 13?
     
  30. Offline

    N3X15

    After I'm done with some of my Capstone project stuff today, I'll see if I can fix some things.

    TODO LIST:
    1. Track down memory leaks.
    2. Convert to decimals (as you can now use 1.33 coin instead of 133).
    3. I forgot
     
  31. Offline

    Echo404

    It would seem that I made a liar out of myself... Apparently I was using 0.4.8.4 rather than 0.4.8.5 which was the cause of my problems. The shop seems to be functioning correctly now after updating, and the database no longer keeps locking itself; thanks for the help even though the problem was my stupidity and not the plugin itself.
     

Share This Page