Module Merchant
Resources are very important in the game. Buildings, troops, research - all this requires a huge amount of resources
One city is quite capable of providing itself with resources, but while it will save resources for building - a lot of time will pass, while in other cities at that time resources may be useless, everything is already built, and they simply lie in the warehouse
Forwarding resources from one city to another - just the module Merchant is designed!
How it work
The first step is to classify cities into suppliers and consumers, you can do this either in the bot settings ("Merchant" tab) or in the "Info" tab for the city:
- P - Provider, this city will send resources
- C - Consumer, this city will receive resources
- D - Disabled, mobule dont work with this town
Also with the classification of cities, you need to specify for consumers the amount of resources that they will receive
For example, there are two cities:
- Town1 - provider, available 10000 wood, 10000 stone и 10000 silver, market capacity 5000
- Town2 - consumer, in this town you construct Light Ships
One Light Ships cost: 1170 wood, 270 stone and 720 iron. Obviously, if you send all the resources to this city in the same proportion, you will get a skew, the city does not need more stone, and this resource will simply be in the warehouse dead weight
For this reason, the bot operates not with quantity, but with the proportions of sent resources. In this case, the proportion is: 1170 wood, 270 stone and 720 silver. Set it in Town2 settings:
Next, bot calculates amount of resources sent, which corresponds to the specified proportion of the
consumer. Market capacity is 5000, this amount can be placed:
[5000 (market capacity)] / [1170+270+720 (consumer proportion)] = 2.31 ships
Thus the sending will be:
- Wood: 2.31*1170=2702
- Stone: 2.31*270=623
- Iron: 2.31*720=1663
- Total: 2702+623+1663=4988 resources
The next step is creating an order to forward these resources from Town1 to Town2 and put them in the queue. We pay attention, the minimum amount of resources a bot can send is 1000, if the sending contains a lower value, the bot will not send it
Warehouse overflow
When consumer its own town, it is known how much it currently has resources and how many resources are moving into city. Having this data it is possible to determine how much resources will be added to the customer's warehouse. This setting is designed specifically for such situations, if the consumer can not take more resources than the storage room
Again, the example given is the same, but it is known that in the consumer:
- Warehouse: 10000
- Wood: 8000
- Stone: 4000
- Iron: 9500
Also, resources on the way for this consumer:
- Wood: 1000
- Stone: 1000
Knowing these data, it is not difficult to calculate how much a resource can still get into the consumer:
- Wood: 1000 = 10000 (warehouse) - 8000 (avaiable in town) - 1000 (on the way)
- Stone: 5000 = 10000 (warehouse) - 4000 (avaiable in town) - 1000 (on the way)
- Iron: 500 = 10000 (warehouse) - 9500 (avaiable in town) - 0 (on the way)
In the previous example, we decided that the provider would create a package containing:
- Wood: 2702
- Stone: 623
- Iron: 1663
Sending will exceed the available space in the supplier's warehouse, and the bot will correct resources, select minimum value from sending and consumers's warehouse:
- Wood: 1000
- Stone: 623
- Iron: 500
Limit sending duration
Often duration between provider and consumer can be quite large, and you do not want block market for so long. To do this, there is the "Limit time" setting available in the "Info" tab for the provider city
With its, you can inform the bot that provider does not select consumers, sending in which will take longer than you want
Send resources interval
This setting tell bot how often make send resoruces orders from providers to consumers
Once in specified interval bot will choose for each provider one consumer, and try to send him resources