[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

    jwideman

    Well, according to that, the database file is locked. This can happen when two plugin try to write to that same database file and one of them is multithreaded. Another possibility is that for some reason the machine was shutdown wrong - power failure, hitting the power switch, anything that didn't give the plugins a chance to unlock the file. And finally, the plugin left the file locked when it shouldn't have.
    To narrow things down... did the machine crash or lose power?
     
  3. Offline

    dademon

    Using #440 recommended, iConomy 4.1 and DynamicMarket 0.4.8.1

    This plugin conflicts with BigBrother 1.6.3 (current). They both try to write to sqlite database simultaneously. Bigbrother wins, so locks database for dynmarket, causing it to fail.

    Code:
    2011-03-03 02:00:55 [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
    
     
  4. Offline

    mattekure

    I am also getting the locked error, no crashes or lose power. CB #440, Iconomy 4.1, clean install, then DM 0.4.8.4, reboot and get the locked error.
     
  5. Offline

    lenocinor

    I'm getting the locked error too. CB #440, Iconomy 4.2 indev, and latest DynamicMarket.
     
  6. Offline

    jwideman

    It shouldn't be due to BB or any other plugin that uses sqlite, since each has their own database file. What it sounds like is the third option - DM is leaving the file locked.
     
  7. Offline

    Raspberry

    I tried to use JDBC and received the following error with the default DynamicMarket.settings file:

    Code:
    22:13:46 [INFO] [DynamicMarket] Creating database.
    22:34:27 [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
    22:34:27 [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)
    
    I'm not sure how the DB can be locked since it didn't exist yet... maybe that's why it's locked ;)

    So I downloaded the MySQL connector and tried that and I receive this error:
    Code:
    22:05:11 [SEVERE] com/nijiko/coelho/iConomy/system/Bank loading DynamicMarket v0.4.8.1 (Is it up to date?)
    
    The MySQL server has the appropriate user and db created to accommodate the DynamicMarket config file.

    I'm also using GroupManager and the latest CraftBukkit:
    Code:
    22:10:35 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-487-g108eceb-b484jnks (MC: 1.3)
    If I change the config value of economy-plugin iconomy4 from iconomy3, the Java Error goes away but I get a SEVERE error at startup:

    Code:
    22:10:35 [INFO] Starting minecraft server version Beta 1.3
    22:10:35 [INFO] Loading properties
    22:10:35 [INFO] Starting Minecraft server on *:25565
    22:10:35 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-487-g108eceb-b484jnks (MC: 1.3)
    22:10:35 [INFO] Preparing level "world"
    22:10:35 [INFO] Preparing start region
    22:10:36 [SEVERE] [DynamicMarket] Invalid economy setting for 'economy-plugin='.
    22:10:36 [INFO] GroupManager - Scheduled Data Saving is set for every 10 minutes!
    22:10:36 [INFO] GroupManager version 0.99c is enabled!
    22:10:36 [INFO] Fake Permissions version 2.0 is enabled!
    22:10:36 [INFO] [DynamicMarket] Standard Permission plugin enabled.
    22:10:36 [INFO] [DynamicMarket] version [0.4.8.1] (Caribou) enabled
    22:10:36 [INFO] [HeroicDeath] 1.4.3.138 enabled.
    22:10:36 [INFO] AppleTree activated.
    22:10:36 [INFO] Varietree version 0.1 is enabled!
    22:10:36 [INFO] Varietree: Permissions support enabled
    22:10:36 [INFO] [Towny] Database: [Load] flatfile [Save] flatfile
    22:10:36 [INFO] [Towny] Using: Permissions
    22:10:36 [INFO] [Towny] Version: 0.45 - Mod Enabled
    22:10:36 [INFO] Big Catch version 0.3 is enabled!
    22:10:36 [INFO] [iGrow : 1.0] Enabled!
    22:10:36 [INFO] Loading map 'org.dynmap.kzedmap.KzedMap'...
    22:10:36 [INFO] Loading renderer 'org.dynmap.kzedmap.DefaultTileRenderer'...
    22:10:36 [INFO] Loading renderer 'org.dynmap.kzedmap.CaveTileRenderer'...
    22:10:36 [INFO] Activated world 'world' in Dynmap.
    22:10:36 [INFO] Loading map 'org.dynmap.kzedmap.KzedMap'...
    22:10:36 [INFO] Loading renderer 'org.dynmap.kzedmap.DefaultTileRenderer'...
    22:10:36 [INFO] Dynmap WebServer started on null:8123
    22:10:36 [INFO] MobileAdmin: Starting server...
    22:10:36 [INFO] MobileAdminBukkit version 2.2 is enabled!
    22:10:36 [INFO] MobileAdmin: Server listening on port 5839
    22:10:36 [INFO] [iConomy] Certain nodes in the properties are missing.
    22:10:36 [INFO] [iConomy] Please backup your current iConomy.yml and let us recreate it.
    22:10:36 [INFO] [iConomy] Logging is currently disabled.
    22:10:36 [INFO] [iConomy] v4.2 (Kristen) loaded.
    22:10:36 [INFO] [iConomy] Developed by: [Nijikokun, Coelho] (Coelho is Smexier)
    22:10:36 [INFO] HelpPages version 1.0 is enabled!
    
    The setting 'economy-plugin' isn't listed in the config parameters file here:
    http://dl.dropbox.com/u/20248143/DynamicMarketDocs/DynamicMarket_Settings_v.0.4.6%2B.html

    So I'm not sure what the values should be.


    Ok... so then I tried giving the minecraft user FULL Admin rights to the MySQL DB Server, but without a pre-existing DB just to see if it'd create its own. Nope.

    Code:
    22:22:01 [SEVERE] [DynamicMarket]: SQL Error connecting to mysqldatabase: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown database 'minecraft'
    22:22:01 [INFO] [DynamicMarket] Creating database.
    22:22:01 [SEVERE] [DynamicMarket]: SQL Error connecting to mysqldatabase: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown database 'minecraft'
    22:22:01 [SEVERE] [DynamicMarket]: SQL Error connecting to mysqldatabase: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown database 'minecraft'
    
    So then I created the DB again by hand and then I received this again:

    Code:
    22:25:45 [INFO] [DynamicMarket] Creating database.
    22:25:45 [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:122)
            at com.gmail.haloinverse.DynamicMarket.DatabaseMarket.createTable(DatabaseMarket.java:54)
            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:169)
            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)
    
    Here's my DynamicMarket.settings file:

    Code:
    #Minecraft Properties File
    #Wed Mar 02 22:05:11 CST 2011
    default-shop-account-free=true
    text-colour-bracket=d
    text-colour-param=b
    default-shop-account=
    mysql-db=jdbc\:mysql\://localhost\:3306/minecraft
    mysql-dbengine=MyISAM
    economy-plugin=iconomy3
    wrapper-mode=false
    text-colour-command=f
    csv-file-path=plugins/DynamicMarket/
    simple-permissions=false
    text-colour-error=c
    shop-tag={BKT}[{}Shop{BKT}]{}
    csv-file=shopDB.csv
    text-colour-normal=e
    transaction-log-autoflush=true
    items-db-path=plugins/DynamicMarket/
    wrapper-permissions=false
    database-type=sqlite
    transaction-log-file=transactions.log
    max-items-per-sale=64
    mysql-user=minecraft
    max-items-per-purchase=64
    mysql-pass=<snip>
    
    and the database did not actually populate.

    Any thoughts?
     
  8. Offline

    jwideman

    Doesn't iConomy 4 need Permissions 2.5?
     
  9. Offline

    imaxorz

    I'm getting same error as Raspberry.

    CF 440
    iConomy 4.1
     
  10. Offline

    Color42

    tested on 493 with towny and iConomy 4.2indev and permissions 2.5.1 no issues
     
  11. Offline

    Andreas Brisner

    economy-plugin=iconomy3 <-- This NEEDS to be iconomy4. I am pretty sure I changed that in the latest version I put out there.
    As for the sqlite problems, I am not that familiar with sqlite, but I can take a look at it :3 Personally I use mysql as it beats the living crap out of sqlite :3
    Ive had nothing but problems with sqlite on our production server, and LWC still uses it, and still fucks up during a reload. Which means i cant reload the server, because then it breaks LWC..
     
  12. Offline

    Austinjs0102

    Only issue i am having is buying something. says i have not enough currencys to buy an item. Even tho i do have plenty. Should DynamicMarket be in the same DB as iConomy or should it have its own?

    Also i am unable to sell any items on my account.
     
  13. Offline

    jwideman

    Doesn't matter. Think of iConomy as your bank and its API is a debit card. When you go to the store, the store doesn't know anything about who keeps how much money in the bank. It just takes money out of your account via your debit card.
     
  14. Offline

    Austinjs0102

    Alright, i just seem to be having troulbe buying and selling npw:(
     
  15. Offline

    Andreas Brisner

    I am not running this version myself, but I will test it after a quick reboot :)
    It worked the last time I tried it :) (I allways try before I upload)
     
  16. Offline

    imaxorz

    I got everything working, but it won't let me buy or sell anything anything.
    When buy it says I don't have enough money, lets me sell, but I get no money for it.

    I get no errors on start up, but it seems like DynamicShop and iConomy aren't connected.

    Dynamic shop tells me I have no currencys. Which is I'm assuming default name for currency.

    I'm using latest iConomy 4.2

    This is the only thing I need to get working :(
     
  17. Offline

    Tarkington

    I am getting the SQLite DB Locked error as well.

    CB: 493
    DynamicMarket: 0.4.8.1
    iConomy: 4.1 (Kristen)
    Permissions: 2.5 (Pheonix)

    This is a clean install, so there is no database yet, so I don't see how it could possibly be locked....
     
  18. Offline

    mutiny

    to get dynamic market to work with iconomy4.1 i had to put iconomy3 as the money handler, even tho for iconomy4 i had to use iconomy4 as the setting. Unfortunately i had the database locked problem as well however switching to the newest dynamic market seems to have cleared that up
     
  19. Offline

    Tarkington

    I just upgraded, but it's still not working. Here's what happens when I start it up.
    Code:
    15:28:20 [INFO] Starting minecraft server version Beta 1.3
    15:28:20 [INFO] Loading properties
    15:28:20 [INFO] Starting Minecraft server on ------------------------------------
    15:28:20 [WARNING] **** SERVER IS RUNNING IN OFFLINE/INSECURE MODE!
    15:28:20 [WARNING] The server will make no attempt to authenticate usernames. Beware.
    15:28:20 [WARNING] While this makes the game possible to play without internet access, it also opens up the ability for hackers to connect with any username they choose.
    15:28:20 [WARNING] To change this, set "online-mode" to "true" in the server.settings file.
    15:28:20 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-493-g8b5496e-b493jnks (MC: 1.3)
    15:28:20 [INFO] Preparing level "CaptureTheFlag"
    15:28:20 [INFO] Preparing start region
    15:28:21 [INFO] [Permissions] version [2.5] (Phoenix) was Initialized.
    15:28:21 [INFO] [DynamicMarket] Creating database.
    15:28:25 [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
    15:28:25 [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)
    15:28:25 [INFO] [Permissions] version [2.5] (Phoenix)  loaded
    15:28:25 [INFO] [iConomy] Logging enabled.
    15:28:25 [INFO] [iConomy] v4.1 (Kristen) loaded.
    15:28:25 [INFO] [iConomy] Developed by: [Nijikokun, Coelho] (Coelho is Smexier)
    15:28:25 [INFO] Done (0.432s)! For help, type "help" or "?"
    
    And my config file. I've tried "economy-type=iconomy4" as well, same result.
    Code:
    #Minecraft Properties File
    #Wed Mar 02 23:37:48 EST 2011
    max-items-per-sale=64
    mysql-dbengine=MyISAM
    mysql-db=jdbc\:mysql\://localhost\:3306/minecraft
    shop-tag={BKT}[{}Shop{BKT}]{}
    mysql-user=root
    items-db-path=plugins/DynamicMarket/
    database-type=sqlite
    mysql-pass=pass
    max-items-per-purchase=6400
    simple-permissions=true
    default-shop-account=Huanconomy
    economy-type=iconomy3
    default-shop-account-free=true
    transaction-log-file=log.txt
    transaction-log-file-autoflush=false
    
     
  20. Offline

    imaxorz

    ^ try to change economy-type=iconomy3 to economy-type=AnyConomy
    Since you are not using iConomy3.
    iConomy4 like you tried is not a valid input for that field.
    --- merged: Mar 3, 2011 8:53 PM ---
    Are you able to buy and sell things? I get no money errors. Its like DynamicMarket can't see iConomy accounts or settings since my currency isn't right either. Everything loads without a single error or a warning though. :-/
     
  21. Offline

    dumptruckman

    Can someone please help me understand the volatility formula? I made a spreadsheet to help me set up all the prices... I used the /shop exportdb as a starting point... Just imported that into excel and added some formulas to calculate the Maximum Buy/Sell and Minimum Buy/Sell prices for every item. After countless trial and error I thought I had it right so I stripped the formulas and turned it back into a CSV and imported it. Now, seeing one of my items at the StockCeil the price is WAAAY different from what I had predicted.

    Example item:
    Code:
    SugarCane x64
    BP: 300
    Vol: 500
    ST: 30
    sLow: -30
    sHigh: 200
    sFloor: -25
    sCeil: 19
    
    I estimated the sell price to be ~11 at Stock: 19 but it's currently at Stock: 19 and the sell price is 83!

    My original formula for the minimum buy price was:
    basePrice x (1 - (ABS(stockCeil) x (Vol x 0.0001)))

    but I had to change it to:
    basePrice x (1 - (ABS(stockCeil) x (Vol x 0.0000635)))
    to get the price to reflect the server.

    The issue with that second formula is that it doesn't work for other items so it seems apparent there is some missing math.

    Can someone help me?

    Also, here's the formula for the Max buy price I was using. I'm adding it because maybe there's a better way besides the obviously wrong math.
    basePrice x (1 + (ABS(stockFloor) x (Vol x 0.0001)))

    Also, one more thing about the example item. The stock does not appear to move past 19 even when more is sold to the shop... Perhaps I am confusing stockCeil and stockHigh?
     
  22. Offline

    imaxorz

    I don't think those formulas are right as it change the price of the item after every item, not after it totals them up.
     
  23. Offline

    dumptruckman

    The formulas I presented are suppose to represent what the price for 1 stack would be when the stock limits are reached.
     
  24. Offline

    imaxorz

    Oh, sorry I don't know then.

    Is the new version of the sop working for you?
     
  25. Offline

    Andreas Brisner

    First of all, the latest version does NOT support ANY other types than iconomy4 in there.
    After reading about 10 of the last comments.. People.. 0.4.8.1 is outdated.. Please do download the newest one :3 Link at bottom..

    Actually, its the only valid option. Atleast if you downloaded 0.4.8.4.

    Please get the newest :3

    http://80.64.207.220/0.4.8.4/DynamicMarket.jar
     
  26. Offline

    imaxorz

    Wow, I'm really sorry I didn't realize that. I was going by what the first post said was the new version.

    It now works as it should :)

    Thank you so much, this made my day ha.
     
  27. Offline

    Andreas Brisner

    I just loaded up newest CB (b493) with BB (MySQL) installed, and DynamicMarket 0.4.8.4(Mysql) with "iconomy4" as the "moneyhandler" and everythings works fine. I will switch both to SQLite then get back to you.

    Please do make sure you are running 0.4.8.4 and not 0.4.8.1 :)

    Edit: As I just found out I didnt run BB.. I will install it and try again :)
    --- merged: Mar 3, 2011 10:43 PM ---
    bah... *finds first post and edits it*
    --- merged: Mar 3, 2011 11:03 PM ---
    OK, so I just loaded up BB, iConomy and DM with sqlite, and sure enough I received this when trying to buy:
    0:01:01 [SEVERE] [DynamicMarket]: Error executing update statement [[email protected]] with sqlite: java.sql.SQLException: [SQLITE_BUSY] The database file is locked (database is locked)

    I will take a look at it, then get back to you :) (Fyi, running bigbrother with sqlite is a BAD idea.. As it logs EVERY lava movement, and leaves, this can easily add up to several million rows in a few days..)
     
  28. Offline

    lenocinor

    Installed this (and still have iConomy 4.2 and Permissions 2.5.1, and nothing else), and now I get this exception:
    Code:
    2011-03-03 18:52:24 [SEVERE] [DynamicMarket]: Database connector not found for sqlite: java.lang.ClassNotFoundException: org.sqlite.JDBC
    2011-03-03 18:52:24 [INFO] [DynamicMarket] Creating database.
    2011-03-03 18:52:24 [SEVERE] [DynamicMarket]: Database connector not found for sqlite: java.lang.ClassNotFoundException: org.sqlite.JDBC
    2011-03-03 18:52:24 [SEVERE] [DynamicMarket]: Database connector not found for sqlite: java.lang.ClassNotFoundException: org.sqlite.JDBC
    2011-03-03 18:52:24 [SEVERE] [DynamicMarket]: Database connector not found for sqlite: java.lang.ClassNotFoundException: org.sqlite.JDBC
    2011-03-03 18:52:24 [SEVERE] [DynamicMarket]: Database connector not found for sqlite: java.lang.ClassNotFoundException: org.sqlite.JDBC
    2011-03-03 18:52:24 [SEVERE] [DynamicMarket] Database creation *failed*.
    2011-03-03 18:52:24 [SEVERE] [DynamicMarket]: Database connector not found for sqlite: java.lang.ClassNotFoundException: org.sqlite.JDBC
    
    This is despite the fact that I do have the connector in the main Bukkit directory, which, when I only use iConomy and Permissions, works fine for persisting iConomy data.

    Also this error:
    Code:
    2011-03-03 18:52:24 [INFO] ConnectToiConomy
    2011-03-03 18:52:24 [SEVERE] Could not pass event PLUGIN_ENABLE to DynamicMarket
    java.lang.NoClassDefFoundError: com/nijiko/coelho/iConomy/system/Bank
    	at com.gmail.haloinverse.DynamicMarket.DynamicMarket.connectToiConomy(DynamicMarket.java:265)
    	at com.gmail.haloinverse.DynamicMarket.DynamicMarket.connectEconomy(DynamicMarket.java:257)
    	at com.gmail.haloinverse.DynamicMarket.DynamicMarket$MyServerListener.onPluginEnabled(DynamicMarket.java:84)
    	at org.bukkit.plugin.java.JavaPluginLoader$32.execute(JavaPluginLoader.java:289)
    	at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
    	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:225)
    	at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:424)
    	at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:187)
    	at com.gmail.haloinverse.DynamicMarket.DynamicMarket.checkiConomy(DynamicMarket.java:216)
    	at com.gmail.haloinverse.DynamicMarket.DynamicMarket.onEnable(DynamicMarket.java:111)
    	at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:140)
    	at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:426)
    	at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:187)
    	at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:76)
    	at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:57)
    	at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:187)
    	at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:174)
    	at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:120)
    	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:227)
    	at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Caused by: java.lang.ClassNotFoundException: com.nijiko.coelho.iConomy.system.Bank
    	at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    	at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:30)
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    	... 20 more
    2011-03-03 18:52:24 [INFO] [iConomy] Logging enabled.
    2011-03-03 18:52:24 [INFO] [iConomy] v4.2 (Beatrix) loaded.
    2011-03-03 18:52:24 [INFO] [iConomy] Developed by: [Nijikokun, Coelho]
    2011-03-03 18:52:24 [SEVERE] com/nijiko/coelho/iConomy/system/Bank (Is it up to date?)
    java.lang.NoClassDefFoundError: com/nijiko/coelho/iConomy/system/Bank
    	at com.gmail.haloinverse.DynamicMarket.DynamicMarket.checkiConomy(DynamicMarket.java:220)
    	at com.gmail.haloinverse.DynamicMarket.DynamicMarket.onEnable(DynamicMarket.java:111)
    	at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:140)
    	at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:426)
    	at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:187)
    	at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:76)
    	at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:57)
    	at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:187)
    	at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:174)
    	at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:120)
    	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:227)
    	at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    
    But I double-checked and have the latest iConomy, which works when DynamicMarket isn't in my plugins folder. Any ideas?
     
  29. Offline

    Andreas Brisner

    Database connector:
    It has to one of these places:
    ../lib/mysql.jar ../lib/sqlite.jar ../sqlite-v056.jar ../lib/sqlite-v056.jar ../lib/mysql-connector-java-5.1.15-bin.jar ../mysql-connector-java-5.1.15-bin.jar ../mysql-connector-java-bin.jar

    relevant to /plugins/ folder.

    I have an idea for what the last problem there could be. I will have a look at it :)
     
  30. Offline

    lenocinor

    So, ../sqlite-v056.jar should work since it's referencing the main folder, except the jar has to be renamed from sqlitejdbc-v056.jar (the name it has when you download it). Is it ok to just place that second renamed copy in the Bukkit folder, or will it cause conflicts?
     
  31. Offline

    Andreas Brisner

    Im about to release a new version now, but just to answer quicky. I had a chat with someone that knows sqlite pretty well, and that person said that each plugin needs its own sqlite.jar.

    Therefore I've just added DynamicMarket/sqlitejdbc-v056.jar to the classpath, and I recommend that you put a copy of the sqlite jar in there. (MySQL is fine with sharing lib's so no change there)

    New release within 10 mins, should fix the loading errors, and the LOCKED table errors.

    Edit:
    Plugin no longer supports having the sqlite lib in ../lib, it now has to be in DynamicMarket folder! (Does NOT apply to mysql libs)
     

Share This Page