The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 66 - File: global.php(961) : eval()'d code PHP 8.0.26 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/global.php(961) : eval()'d code 66 errorHandler->error_callback
/global.php 961 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "fragment" - Line: 1494 - File: inc/class_parser.php PHP 8.0.26 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 1494 errorHandler->error_callback
/inc/class_parser.php 1640 postParser->mycode_parse_video
[PHP] postParser->mycode_parse_video_callback
/inc/class_parser.php 513 preg_replace_callback
/inc/class_parser.php 228 postParser->parse_mycode
/printthread.php 203 postParser->parse_message
Warning [2] Undefined array key 0 - Line: 1587 - File: inc/class_parser.php PHP 8.0.26 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 1587 errorHandler->error_callback
/inc/class_parser.php 1640 postParser->mycode_parse_video
[PHP] postParser->mycode_parse_video_callback
/inc/class_parser.php 513 preg_replace_callback
/inc/class_parser.php 228 postParser->parse_mycode
/printthread.php 203 postParser->parse_message

Dwelvers Forum
Dwelvers Journal - 2014.06.25 - Tradingsystem v2.0 - Printable Version

+- Dwelvers Forum (
+-- Forum: Dwelvers (
+--- Forum: News! (
+--- Thread: Dwelvers Journal - 2014.06.25 - Tradingsystem v2.0 (/showthread.php?tid=982)

2014.06.25 - Tradingsystem v2.0 - Rasmus - 25-06-2014

Tradingsystem v2.0

I found a lot of flaws with the last news post I made introducing the new trading system. The thing that bugged me the most was that it was way to complicated and hard to keep track of everything.

So I remade it with a lot of help from BurningPet. Now instead of just having a trading menu we also have a new menu with trading routes that looks like this:


So this is how this works. We have 20 different trading posts spread out over the map, each trading post offers something unique to trade with. For example "10x Antroots -> 1x Gold" and so on.
A little down to the left from the center of the map you can see the head the Dark Mother (will be redesigned), this is where you dungeon is.
On the top right corner of the map you can see a road icon with the number "x3" next to it. This shows how many trading routes you have available to choose. For every portal the player claims this number will increase, and for every trading post the player makes available this number will decrease.
From start the player don't own any trading post, this means that on the map nothing is highlighted in yellow. When the player for the first time claims a portal he will gain access to a trading post that he chooses himself.
From the Dark Mother icon there are some lines/links that goes to some of the neighbour trading posts. So when the player chooses the next trading post he wants to access he can only choose amongst them that are linked to a already owned trading post, so for the first time he can only choose amongst those trading posts that are linked to the Dark Mother icon on the map.
Once he have chosen a trading post he will be given to choose a trading post linked to that trading post and so on, as long as he have claimed enough portals that is.

So, in this picture I have chosen seven trading posts, this means that I am able to trade with these. This takes me to the next menu, the trading menu:


Here in the left menu you can see the trading options the player has. In this case there are seven, the same number as the number of trading posts I gained access to in the "trading routes" menu.
By left-clicking on these trading options the trade gets moved to the right side of the menu under "In process" as shown in the picture. This means that these are being "processed". If the player left-clicks on those that are "In process" they will get cancelled and disappear from the "In process" menu.

Still todo

There are still some things to add to make this work completely. First of I will need to build a trading room. The idea is that once the player makes a trade so that it falls under the category "In process", the imps will start collecting the items needed for the trade from the storage rooms to the trading room. Once all the items are in place the player will get the option to execute the trade, and the workers in the trading room will take the items and run up with them into the nearest claimed portal.

Then depending on how far away the trade post is on the map, the longer it will take for the imp to come back from the portal with the traded items.

Additional features for this is that the more the player trades with a certain trading post the higher the trading price will become, but if the player stops trading the price will get back to normal after a while.

Trading options

It will not be completely straight forward for the player to just keep on trading the item he wants. As the trading price for each trade made will increase the player will have to find other ways to get the item that he wants.

For example, lets say we have these three trading posts:
  • Trading post 1: 4 Wood -> 1 Iron Ingot
  • Trading post 2: 2 Iron Ingot -> 1 Gold
  • Trading post 3: 20 Wood -> 1 Gold

Here the player can make two trades to get more gold for less wood by using option 1 and 2, but the downside is that this will take longer time than using option 3 directly.

Another way to force the player from spamming just one trading option is that the trading price will increase, and he will have to start producing wood to get gold and start producing iron ingot.

For the future

When I presented the last trading system there were a lot of good ideas on being able to trade with creatures or caravans. I just want to say that I did read them and I really liked some of the ideas. It is very possible that some of them will be introduced as a addons to this trading system, I imagine meeting a merchant of some sort in the dungeon would give the player an extra trading option in the trading menu, and instead of running up a portal the imps will run to the merchant. So these ideas a very compatible.

In the future we will probably get a lot more items than there are trading posts, therefore I just want to say that when that day come I will make it so that the trading posts will enable more than one trade.


All trading posts, the links, and what they trade are defined in xml files that are linked to the map. So when creating own maps the player will have the option to create his own trading system as well.

[UPDATED 14-07-10]

There have been some minor adjustments to this system, the player will still get a new trading route for each portal he claims, but instead of just being able to select the trading routes from the production menu the player now select and link trading routes directly to the portal he or she claims. So when the imps run away with the cart to make the trade he has to go to the right portal and not just any portal.

It is explained in more detail in this video:

RE: - Sebt - 25-06-2014

If you want to discuss about this system you can do it here: New trading system and further development. Smile