Bulle
04-10-2008, 06:36 PM
Since its introduction the Bazaar has always been an important part of EQ, and having little in the way of trading on EQEmu is sad. Last time I checked the status on the Bazaar was that some opcodes were missing, preventing a proper implementation at the moment.
To be honest I have never been a fan of the way the Bazaar works, although I like the purpose. As a consequence this replacement departs from the official Bazaar, so it may not appeal to people who would like EQEmu to really match EQ Live feature for feature.
The main gripe I have with the Bazaar is that you need to let your PC connected at all times in the game. That was a nice trick from Sony to artificially raise their amount of simultaneous players back then (anyone remembers their announcement when they broke 100.000 connected ?), but I for one would be glad to drop that altogether.
Here is how a Bazaar replacement could work :
- it is completely written as a web application (hear "e-commerce"), that does its work in the EQEmu server database with the existing tables and a few more.
- it works with the bank inventories of player characters, a so-called "warehouse" which is an off-line storage place, and a trading market
- players connect with their account (there is this password field that is under-used), and can then transfer items/coins from the bank of their characters to the warehouse, and vice-versa. The warehouse has no set limit on the items it can contain, great for those 25 Rusty Halberds you have collected over time.
- once items are in the warehouse the player can send them to the market for sale (apiece or as bundles), with a sale price. The items disappear from the warehouse and enter the market.
- players can search/browse for items for sale, possibly through EQBrowser, which would avoid re-developping a browsing application. A few additional fields in EQBrowser should fit the need
- players can buy items from the market, with the coins stored in their warehouse. Bought items go to their warehouse, and the money paid goes to the warehouse of the seller.
- sellers can withdraw ites from the market when they see fit, the items go back to their warehouse.
- something similar could be done to allow players to register as buyers : they choose which items whey want to buy (and how many), pick a price, deposit the money and other players can then fulfill the order. If some items for sale match the buying price a background daemon could do the transaction for both players.
Note that the warehouse would be account-wide, because I see no reason to do otherwise : players have access to a shared bank, multiple characters and multiple accounts to serve as mules, so they can already have virtually unlimited storage space and transfer items from one character to the other. No reason to complicate things uselessly.
Implementing this is not a huge work, though it will take a bit of time to write. There will be very few pages if I can delegate the browsing to EQBrowser. At the moment I have the first page, the one allowing transfers between the bank and the warehouse. I take special care in making the code robust, as such a tool would be the prime target for cheaters. Players will only be able to transfer items from/to their bank when they are offline to avoid database corruption, transfers and orders will be serialized for each player and item for trade (through DB locks), parameters read from the request are checked and ignored if not appropriate, and parameters in the database queries are properly escaped (for quotes, to avoid script injection). I will almost certainly add some logging about transactions.
It will be written in Java, to run on Tomcat. I know it is one more web server to setup, but I am really not good enough at PHP to write quality code with it, and the Marketplace requires robustness. The performance should not be a problem : a transfer of several items between the bank and the warehouse is typically instantaneous, even in Java.
If you have any opinion on this little project I would be happy to hear it. I hope I can make a version available in a bit.
To be honest I have never been a fan of the way the Bazaar works, although I like the purpose. As a consequence this replacement departs from the official Bazaar, so it may not appeal to people who would like EQEmu to really match EQ Live feature for feature.
The main gripe I have with the Bazaar is that you need to let your PC connected at all times in the game. That was a nice trick from Sony to artificially raise their amount of simultaneous players back then (anyone remembers their announcement when they broke 100.000 connected ?), but I for one would be glad to drop that altogether.
Here is how a Bazaar replacement could work :
- it is completely written as a web application (hear "e-commerce"), that does its work in the EQEmu server database with the existing tables and a few more.
- it works with the bank inventories of player characters, a so-called "warehouse" which is an off-line storage place, and a trading market
- players connect with their account (there is this password field that is under-used), and can then transfer items/coins from the bank of their characters to the warehouse, and vice-versa. The warehouse has no set limit on the items it can contain, great for those 25 Rusty Halberds you have collected over time.
- once items are in the warehouse the player can send them to the market for sale (apiece or as bundles), with a sale price. The items disappear from the warehouse and enter the market.
- players can search/browse for items for sale, possibly through EQBrowser, which would avoid re-developping a browsing application. A few additional fields in EQBrowser should fit the need
- players can buy items from the market, with the coins stored in their warehouse. Bought items go to their warehouse, and the money paid goes to the warehouse of the seller.
- sellers can withdraw ites from the market when they see fit, the items go back to their warehouse.
- something similar could be done to allow players to register as buyers : they choose which items whey want to buy (and how many), pick a price, deposit the money and other players can then fulfill the order. If some items for sale match the buying price a background daemon could do the transaction for both players.
Note that the warehouse would be account-wide, because I see no reason to do otherwise : players have access to a shared bank, multiple characters and multiple accounts to serve as mules, so they can already have virtually unlimited storage space and transfer items from one character to the other. No reason to complicate things uselessly.
Implementing this is not a huge work, though it will take a bit of time to write. There will be very few pages if I can delegate the browsing to EQBrowser. At the moment I have the first page, the one allowing transfers between the bank and the warehouse. I take special care in making the code robust, as such a tool would be the prime target for cheaters. Players will only be able to transfer items from/to their bank when they are offline to avoid database corruption, transfers and orders will be serialized for each player and item for trade (through DB locks), parameters read from the request are checked and ignored if not appropriate, and parameters in the database queries are properly escaped (for quotes, to avoid script injection). I will almost certainly add some logging about transactions.
It will be written in Java, to run on Tomcat. I know it is one more web server to setup, but I am really not good enough at PHP to write quality code with it, and the Marketplace requires robustness. The performance should not be a problem : a transfer of several items between the bank and the warehouse is typically instantaneous, even in Java.
If you have any opinion on this little project I would be happy to hear it. I hope I can make a version available in a bit.