Buildings Queue Behavior Logic

Jul 13, 2018

Buildings Queue logic was developed to build constructions in your villages like a human. So different factors were taken into account to make the decision to build next contruction: construction order and status of your village. Let’s see it in detail:

Complete logic

When TCommander Bot is about to build/upgrade the first construction from the top of the queue, first it checks the status of the village to see if it is possible to build any building.

Resources

If village has enough resources to build that construction go ahead and build it. Otherwise, it will show a red message: Not enough resources!. It also checks if village has enough free crop to build it; and if it doesn’t, it will show a red message: Not enough food. Extend cropland first!

Now if village has enough resources and free crop to build first construction on top, it locks that building before sending request to server:

locked construction

Locked Construction in Buildings Queue

 

Orange background with padlock icon is the style of a locked construction. While a construction is locked you cannot move it or delete it.

After top construction is locked TCommander Bot sends build request to server and if it is successful then it removes top construction from queue and it is shown above the Buildings Queue with due time to finish construction.

However, if for some reason the build request fails; for example if village actually does not have resource to build because it was robbed before refreshing the village, or if there was another building under construction already because you sent build request from different web browser, etc; then TCommander Bot will refresh Buildings Panel and Buildings Queue automatically to synchronize with your village.

 

“Smart Building” function

“Smart building” is a feature that searches other constructions in Buildings Queue when it is unable to build the first construction on top of the queue for any reason. This way you can ensure to keep travian bot building as much constructions as possible and doesn’t stop building unless it is necessary. Ofcourse, this function breaks the order of constructions that you planned but it can make more constructions in less time. So it is up to you if you want to enable it.

This feature is not enabled by default. You can enable it by clicking the brain icon in the upper-right corner of the buildings queue:

enable smart building function

smart building function

 

At this moment it is only checking the resources needed to build the first building on top of the queue. In the future we plan to add more features to be even more smarter. This is the current logic:

  • If village doesn’t have enough resources to build first construction on top, then it will start searching from top to bottom other constructions available in queue that do have enough resources to build.
  • If it finds a construction which required resources are available in village, then it checks if it can be moved to top of the queue. It can not be moved to top if any construction above it is a prerequisite construction. If it cannot be moved to top then it will continue searching until it finds the right construction.
  • If it finds a construction that meets the conditions above, then it is moved to top to start building. Otherwise, it will show a red message: Not enough resources!

 

Let’s see this logic in details with an example.

We have the following situation:

Smart Building

 

Let’s assume we have only 2000 wood, 2000 clay, 2000 iron and 1000 crop in current village.

Village doesn’t have enough resources to build the first construction on top (Marketplace level 16). So it continues iterating to the next construction which is Marketplace level 17 and of course it doesn’t have enough resources for it either. Now next one is Rally Point level 1 and village have enough resources to build it, it also can be moved to top of the queue because Marketplace is not a prerequisite building of Rally Point. So it is moved to top and locked to send build request to game server:

Smart Building

That’s it. It is simple.

 

See also:

Buildings Queue

Buildings Panel

Buildings Tab