Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Tools

Development::Tools 3rd Party Tools for EQEMu (DB management tools, front ends, etc...)

Reply
 
Thread Tools Display Modes
  #1  
Old 04-10-2008, 06:36 PM
Bulle
Hill Giant
 
Join Date: Jan 2008
Posts: 102
Default Marketplace : Bazaar replacement (WIP)

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.
Reply With Quote
  #2  
Old 04-10-2008, 07:12 PM
circuitdragon
Sarnak
 
Join Date: Jun 2003
Posts: 57
Default

It would be a bit of doing on the GMs part, but just as a though, its it harder to have NPCs for sale? By this I mean, players either buy or rent NPCs in the game. Each player can then trade items to this merchant, and set prices. This way all trading would be done in game, with or without clients online. Possible issues with this though would be lag if say, 300 "merchants" were being placed in the bazaar...but I've no real clue as to how much lag one standing NPC could generate. Just a thought though...but if thats going to have a lot of issues and or become far to complex, your idea sounds awesome just as well.
__________________
You can do nothing, and fail all the time. Or you can try something, and win some of the time.
Reply With Quote
  #3  
Old 04-11-2008, 12:35 AM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

I think this would be an excellent compromise for Bazaar functionality.

In my head, I personally think it would be best to incorporate in-game commands to move items you want to sell into a "bank" (read: a separate table in the DB, maybe called trader_items or something like that), then manipulate everything out of the game, through a web interface. For buyers, you could then send money to your trader account via an in-game command (kinda like a PayPal account) to buy items. Once you buy items, you could then either keep them in your bank until you remove them with another in-game command, or have it automatically put into the first available slot in your inventory or in-game bank.

The reason I think that would be the better way to do it is because characters' money is stored in the profile blob. It is only loaded from the database when loading into the server, so if someone is already logged in and you try to update it, they wouldn't actually lose any money for the transaction. And unless you use the built-in web server, you can't easily find out if someone's logged in or not (unless you use the telnet commands, which is kinda messy).

Luckily, the inventory stuff is all in tables in the database, so that's easy enough to manipulate directly via a web page (and is updated into the database real-time by the server).

Anyways, some stuff to think about...
__________________
GM-Impossible of 'A work in progress'
A non-legit PEQ DB server
How to create your own non-legit server

My Contributions to the Wiki
Reply With Quote
  #4  
Old 04-11-2008, 01:20 AM
ChaosSlayer
Demi-God
 
Join Date: May 2007
Posts: 1,032
Default

I have not read original post in great detail, but thinking how eq2 market works, here general idea layout, how I see the principle.

1. A Db will recieve a new table called BAZAAR (or market)
2. All players will have access to special command like /bazaar (or /market) or posibly #market.
Inside that command players can: add item to the market listing with a price, or search for items offered.
#market add ITEMID PRICE (perhaps dragging icon link into comand line text box woudl work?)
#market REMOVE ITEMID (your own item only of course)
#market listitems (or search for by various options.)
#market BUY ITEMID

One player ADDS the item to the market it is REMOVED from players inventory or bank (or perhaps make a rule item MUST be on a corsor or soemthiogn liek FIRST inventory slot) and a new row is added to the MARKEt table

The MARKEt table will need to have following collumns:

listing_id, itemid, item_name, player_id (seller), price, quantety

When players buys an item, cash is removed from his person, item is removed from the market and put onto buyers cursor, and cash them is added to sellers bank

so in conclsuion - players inside the game can add, remove their own items to the market, and buy them.


The way I see - such structure works no diffirently than build in Gm comands.
No need to stand alone add-ons

Of course my understanding of EMU code only goes so deep, but this seems like simply enough general concept.

Oh yeah - server admin should be bale to restrict access to market for exmaple to specific zones.

Last edited by ChaosSlayer; 04-11-2008 at 09:24 AM..
Reply With Quote
  #5  
Old 04-11-2008, 01:52 AM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

Chaos, I think you and I have the same idea, except mine would also incorporate web interaction, but most of the functionality is there for adding money, moving items, etc, so adding the commands shouldn't be too difficult (knock on wood).
__________________
GM-Impossible of 'A work in progress'
A non-legit PEQ DB server
How to create your own non-legit server

My Contributions to the Wiki
Reply With Quote
  #6  
Old 04-11-2008, 02:55 AM
ChaosSlayer
Demi-God
 
Join Date: May 2007
Posts: 1,032
Default

Quote:
Originally Posted by AndMetal View Post
(knock on wood).


honestly I am a fan of Ec Tunnel style trading - speicaly with small player communities we have, but heck why not =)

PS. posibly coders can actualy use the real bazaar search window for this, since its allready there
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 05:55 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3