GSOC2011 - Ember UI improvements/OldTradingDesign

From WorldForgeWiki
Jump to: navigation, search

This page holds an old trading design centred around commands instead of natural language and chat.

Trading / Merchant interaction design

I have started thinking and discussing various ideas about how trading and merchant interaction could work. At the moment, I am inclined to separate ware browsing and the trading itself under the hood.

Under the hood

Basic trading mechanics between 2 entities

Lets say player A wants to trade his axe for player B's pig.

  1. player A sends TradeRequest to player B, TradeRequest will contain a reference to a list of items player A gives for a trade
  2. player B receives the request and is given an option to put something up for a trade, he sends TradeResponse with a pig to player A
  3. player A now sees both sides of the deal, his axe and player B's pig, he now has 2 choices - Decline or Accept
    • in case he declines, both parties are optionally given a chance to alter their offerings (decline is a TradeResponse)
    • in case he accepts, transaction should start - items in both lists are locked by the server to prevent scamming and server exchanges them for both entities (in case of a failure - no inventory space or such - the transaction is rolled back with an error message)

Merchant ware browsing

Players have to know what wares do merchants have in stock. This is queried with a different set of commands than trade and give.

  1. buyer sends WareBrowseRequest
  2. merchant sends WareBrowseResponse with list of item he/she has in stock (references to them) with quantities, the quantities are only valid at the time they are sent and are not in any way assured to stay valid (no locking mechanisms at this point, player is just browsing)

Merchant trading

So the player browses merchant's wares, he/she decides to buy something, let's say an axe. In my opinion the seller has to issue a trading request.

  1. player sends some sort of a notification to the merchant that he/she wants to buy an axe (or more items) with quantities. I am a bit torn on this because I would like to be able to buy items with just chat. Lets say I walk into a marketplace and I say: MerchantName: I want to buy an axe. The merchant could react to this and issue a trading request to me. This could of course be made more convenient by Ember or other clients for players that don't prefer to buy things via chat. The client would simply send fabricate and send this chat message.
  2. merchant sends a TradeRequest with a list of items player wanted to buy and all the trading mechanics apply at this point (player has to send a TradeResponse back with a list of items he wants to trade for the merchant's wares, this should preferrably be money as the merchant will refuse anything else - this should be made more convenient by the client - Ember could auto add the amount of money merchant requested)

How could this look in a client

Player to player trading

When the client receives a TradeRequest, it should show up a UI window showing who is requesting the trade and what does he/she want to trade. As a response, player could drag n drop inventory items to the trading window to put them for a trade. After placing all desired items for trade, player pressed the "Accept" button and sents a TradeResponse to the other entity.

To initiate a trade, player would click on an entity and click Trade in the context menu.

Error creating thumbnail: Unable to save thumbnail to destination

Merchant interaction

To initiate merchant interaction, player would click on the merchant and select Buy/Sell from the context menu. The client sends a WareBrowseRequest to the merchant as a response and receives a WareBrowseResponse that it shows to the player in form of a list of items, quantities and prices. When the current player clicks an item, a modal window would pop, asking how many items player wants to buy. Upon inserting the number and pressing Accept, client would automatically ask the merchant to issue a trade request and auto accept it with desired price.

Error creating thumbnail: Unable to save thumbnail to destination

Ideas for improvement

WareBrowseResponse lists items as a plain list, an array. Perhaps it would be nice to list them in a tree to allow categories. However at this point I find this superfluous, especially since most merchants are focused on one category of goods. Also this can be improved later on because it doesn't depend on the trading mechanics.