Farm Manager - Tribal Wars 2 Farmbot

Wow Viir, that was beyond expectation when it came to your reply.

I am really grateful, absolutely amazing and very prompt. I also believe you answered a lot of questions many people might have had. (3 people I know of haha)

You should consider a small FAQ! -

I had a hunch it might remember the previous locations if you run it in multiple cycles, but I didn’t bother to give it a try until I understood the concept of it. Now that I know it does not send out to the same barb village as before - it all makes sense that it finishes the 50 attacks.

A small improvement:
Not everyone has cavalry (fast farming units) in all their villages - would there by any chance be possible to prioritize non cavalry unit villages first, then going to them?

This way it will send infantry (slow farmers) to the closest barb villages, and the cavalry to the furthest - improving efficiency. Maybe defined by the phrase “fast” or “slow” in the preset.

And I believe something a lot of people would really love - set a limit for minimum barb point villages - maybe even defined to the different presets?

Also: Does the bot use credits when it is on pause? It would be really nice to have it on constantly so it never forgets a “session” like you describe it… instead of having to refind all those barbs all the time.

1 Like

Thank you for the explanation, great ideas to refine the user guide.

I will look into it, will post here again when I have a more concrete idea of how it would work. I think there will be a list of presets and villages in an example to illustrate it.
If I understand you correctly, the preset list could look like this:

  • “fast A”
  • “fast B”
  • “slow A”
  • “slow B”

That sounds much simpler. It seems this needs not as much explanation, so I can implement that soon.

Yes.

At the moment I don’t have a solution for this. The idea is to have the engine save the bots memory to your account eventually. Then the bot could load that information on startup.

Or, actually. I might have an idea that could work better, let me know if you disagree of course. Just trying to lend out a hand, your the man here.

Maybe you define, yourself as the player, what villages the bot takes in what order - this way if I move cavalry here, or that there… or whatever I do with the villages… I can just worry about changing their priority. The lower the number, the higher the priority.

Preset names: split on 4 villages =

  • Farm 1

  • Farm 2

  • Farm 3

  • Farm 4

Obviously, it will start sending out attacks from when it detects the lowest number so village with farm 1, then 2, then 3 and so forth. Also, you can make it a configurable state. So maybe priority_farming “1” for on or priority_farming “0” for off. Adds more fun for us - and I know people would appreciate more configs that are simple like this.

@Lanson I don’t understand it yet. It would need some discussion to get it into my brain. I don’t see this fit into this thread, but we can discuss it if you open a new topic.

I will update this topic when I have implemented the other feature for filtering targets by their points.

I implemented this today. You can use the new app setting farm-barb-min-points to enable this feature:

botengine  run-bot  --online-session  --app-settings="farm-barb-min-points=1000"  https://github.com/Viir/bots/tree/84abb44190c2ec856fb4677e2f7e888acee7c6ad/implement/applications/tribal-wars-2/tribal-wars-2-farmbot

I updated the bots description accordingly:

[...]
   ## Configuration Settings

   All settings are optional; you only need it in case the defaults don't fit your use-case.
   You can adjust three settings:

   + 'number-of-farm-cycles' : Number of farm cycles before the bot stops completely. The default is 1.
   + 'break-duration' : Duration of breaks between farm cycles, in minutes. You can also specify a range like '60-120'. I will then pick a random value in this range.
   + 'farm-barb-min-points': Minimum points of barbarian villages to attack.
[...]

Has anyone been banned for using this bot? I remember using it back in 2016 and never had any issues.

The Tribal Wars 2 farmbot recently saw a lot of updates to make it more efficient. I updated the guides to integrate version 2020-03-25. To summarize, the most significant improvements:

  • Faster farming: The newest version sends between 800 and 1000 attacks per hour.
  • New feature to avoid smaller barbarian villages. You can set a threshold for minimum points using the app-settings.
  • Improved user interface, including a detailed report on the last completed farm cycle and many improved status description texts.

i had some credits in 2018, where are they ?

For the 2018 version, nothing changed. The credits for the 2018 version are still at https://manage.botengine.org/credits.

hey, i installed it, and it works, but my question is, if it runs through 1 farm cycle, does it strats automaticly a second? because it says to continu press any key, when i do that, its gone

No, by default it stops after one farm cycle. You have to apply settings to make it run multiple cycles.

To use settings, run the bot using the Windows app called ‘Command Prompt’ (cmd.exe). This app comes by default with any Windows 10 installation.

To run the bot with default settings, you would use this command:

botengine  run-bot  "https://github.com/Viir/bots/tree/ed9cd75aa0e0c11090a2ce2af1d69b3ea3ca153f/implement/applications/tribal-wars-2/tribal-wars-2-farmbot"

Command to start Tribal Wars 2 Farmbot without settings

To run the bot with different settings, expand that command by adding the --app-settings argument.
Here is an example of app-settings for three farm cycles with breaks of 20 to 40 minutes in between:

--app-settings="number-of-farm-cycles = 3, break-duration = 20 - 40"

To apply these settings to the bot, add them into the run-bot command used to start the bot:

botengine  run-bot  --app-settings="number-of-farm-cycles = 3, break-duration = 20 - 40"  "https://github.com/Viir/bots/tree/ed9cd75aa0e0c11090a2ce2af1d69b3ea3ca153f/implement/applications/tribal-wars-2/tribal-wars-2-farmbot"

Command to start Tribal Wars 2 Farmbot with settings

When you have applied settings for multiple farm cycles, the bot displays this message during the breaks between farm cycles:

Next farm cycle starts in 17 minutes. Last cycle completed 16 minutes ago.

i have windows 7 , the bot stops after 1 session, i cant putt something in the command promp, can you make it work for windows 7 ? i cant change the bot options

I have no plans to develop for Windows 7.

the bot never started on my windows 10 PC , what did i do wrong ?

i did folow the instructions
Screenshot - 28ed88af967dfd33d30ef2bae5f69427 - Gyazo
i try to instal it Screenshot - 6a0435a0753709587745367f4042bb50 - Gyazo

In this screenshot, I see that the bot was somehow started with version 2020-02-03 of the botengine app. That version is older than the latest and not compatible with the latest version of the Tribal Wars 2 bot.

After installing the botengine app version from https://botengine.blob.core.windows.net/blob-library/by-name/2020-03-18-botengine-console.zip (following the guide at bots/guide/how-to-install-the-botlab-client-and-register-the-botlab-command.md at main · Viir/bots · GitHub) the bot should work.

When you run the bot again after that installation, the title of the console window should contain the text “2020-03-18”, in contrast to the screenshot above with the error message.
Also, the newest version of the app writes the version ID in the console contents when the bot session ends (including caused by an error like this), so we should see the version there too.

Yes, that looks good :+1: Going by the report of the installation I see in that screenshot, I think it will use the correct version the next time you start the bot using the bat script file.

Notes for Engineering

Seems like problems like this one could be prevented by having the app check if there is a newer version is available for download and display a warning. Also, maybe the script could specify a particular version of the app to provide more specific warning or error messages.

i think bots are most reliable these days !!

Hi, I have 2 things (1 some kind of bug, and a question):

I noticed today that I found an issue that my bot just farmed one village, then directly saying that he finished his cycle. (hard resetting the bot did nothing for me). So I had my bot running for an entire afternoon for nothing haha.

2.Do times between farm rotations get billed?

Cheers mate, loving it.

What was the output from the bot after this cycle?

As long as the bot is running or paused yes. The billed time is the timespan between start of the session and end of the session.

Just that the bot finished his cycle, and that he’s taking a break untill the next given cycle. If it occurs again, I’ll take screens.

Yes, a screenshot of the CMD window would be start.