Trading & Resource Management Goals

Trade

Usage: config trade:[switch]
Example: config trade:3
Switch: 0 - Bot managed trading disabled
1 - Trading enabled
2 - Faster trading enabled
3 - Aggressive trading enabled

With this goal enabled, Y.A.E.B. will buy and sell resources in an attempt to achieve the quantities set in ResourceLimits. By default, the bot will not sell your food below 1 day's worth supply left. If you have config extrafood configured with a higher number, then it will not sell below that higher number.

Resourcelimits

Usage: resourcelimits food lumber stone iron
Example: resourcelimits 2b 50m 2b 20m

This directive will instruct Y.A.E.B. how many of each resource you wish to keep in the city, so that it can buy and sell via config trade to achieve it. The bot will put more value on lumber and iron over food and stone, so when it is first turned on you will notice that it will sell food/stone in order to buy lumber/iron. The bot is a powerful tool, but it is not a miracle worker. If you put unreachable amounts, it will not reach them, and will probably dwindle your food supply down trying. This works best if you set the limits to just a little more than what you currently have, and increase it slowly as it buys.

Keepresource

Usage: keepresource coords res_to_keep quantity
Example: keepresource 111,222 f:1b 50m
keepresource OtherCity w:20m,i:20m 5m

This goal will allow you to keep a specified amount of resources, and send all extra to another location. In the 1st example above, the bot will keep 1 billion food in this city, and if it gets extra it will send the extra to 111,222 in increments of at least 50 million. In the 2nd example above, the bot will keep 20 million lumber and 20 million iron, and send all extra to OtherCity in increments of at least 5 million.

Only one keepresource line is possible per city, and it can only send to one city. Keepresource uses transports to send with, and will send as much over the "kept" amount as it has resources and transports available to send as long as it's at least the minimum quantity specified.

Sendresources

Usage: sendresources coord type local_min remote_min remote_request [trooptype]
Example1: sendresources OtherCity food 1b 100m 50m
Example2: sendresources AnotherCity wood 30m 20m 5m cavalry
Example3: sendresources OtherCity food 1b -1 50m
Example4: sendresources OtherCity food 1b 100m -1
Example5: sendresources OtherCity food -1 100m 50m

Sendresources works much the same as keepresources, except it sends a specific resource to a specific city in a specific amount. A value of -1 may be used for one of the quantities to override the specific amount sent, or to disregard the local or remote minimum amount. As many sendresources lines as you wish are possible per city, and each one may contain a different resource to send and/or city to send to.

In the 1st example, the bot will send 50 million food to OtherCity if ThisCity has at least 1 billion food and OtherCity falls below 100 million food. Since no trooptype is set, the bot will default to sending with transports.

In the 2nd example, the bot will send 5 million wood to AnotherCity if ThisCity has at least 30 million and AnotherCity has under 20 million, and it will use cavalry to transport the wood.

When -1 is used for the remote_min amount, the bot will not check what the city to send to has first, and will instead send the requested amount every time it has enough in ThisCity to meet the local_min. By using -1 this way, the bot is able to send to coordinates on another account, for example from a feeder account to a main account. In the3rd example above, the bot is told to send 50mil at a time to OtherCity, as long as ThisCity has 1 billion.

When -1 is used for the sending quantity, the bot will send however much the city can send, limited only by the transports sending it. In the 4th example, the bot will send as much food as possible from ThisCity to OtherCity, until ThisCity falls below 1bil left, or OtherCity reaches the 100mil goal.

When -1 is used for the local_min, the bot will send the quantity to the destination when it falls below remote_min, regardless of the amount in the current city, until it runs out of resources. In the above 5th example, ThisCity will send batches of 50mil food to OtherCity if OtherCity falls below 100mil food, regardless of how much food is in ThisCity.

Requestresources

Usage: requestresources coord type local_min remote_min remote_request [trooptype]
Example: requestresources OtherCity food 100m 1b 50m
requestresources AnotherCity iron 20m -1 5m cavalry

Requestresources works just like Sendresources, except in reverse. In the 1st example above, the bot will request 50 million food from OtherCity if ThisCity has under 100 million food and OtherCity has at least 1 billion food. Since no trooptype is set, the bot will default to sending with transports. In the 2nd example above, the bot will request 5 million iron from AnotherCity if ThisCity has under 20 million iron, regardless of how much iron is in AnotherCity, and it will use cavalry to transport the iron. The use of -1 is possible with requestresources exactly as detailed above with sendresources.

Warehousepolicy

Usage: warehousepolicy food% lumber% stone% iron%
Example: warehousepolicy 34 33 0 33

This allows the bot to adjust the amount of resources stored in the warehouse. The total amount cannot exceed 100%.