You can run at least five online instances in parallel on the same machine. Each instance has a separate web browser window.
The bot does not need input focus on the operating system level so that you can run any number of instances in the background.
There is currently no functionality for coordination between two instances running on the same game world.
If I configure the bot to run x cycles and after the first cycle a barbarian village is captured by another player, will the bot stop attacking this village or will it send x-1 attacks? Basically, does the bot ever check the coordinates saved after the first cycle? Because if it doesnât it would be pretty obvious you are running a bot.
The bot stops attacking a village when a player conquers it.
Before attacking, the bot checks when it last read reading at these coordinates. If the last reading is too old, it rereads the village data. As we can see in this part of the program code, the threshold is ten seconds:
To clarify, Iâll run the seperate .bat or command and both command consoles will appear and recognize eachother but the chromium being used will close adn then open an entirely new one. what am i doing wrong?
I remember there was a separate version to support running multiple instances on the same machine. I just need to update that branch for the framework changes from a few weeks ago.
I definitely appreciate it! After a couple cycles it will open a new tab and keep the old tab still running. Is there a way to have the Bot run off of 2 separate windows or will it only work in tabs? In my situation, Iâm using it to farm in a main account and a co-op as well. After each cycle it creates a new tab. Eventually while Iâm gone at work I could see 10-20 tabs hindering the performance of the bot and high CPU/Ram Usage.
Using separate command prompts is correct. That is how it should work.
I am looking into the problem with superfluous tabs.
I think this configuration should help to repro this faster: FrontendWeb.Main
EDIT:
Looks like I also should reduce restartGameClientInterval to see the problem.
Turns out there is a rounding error preventing the configured break duration of one minute to work. So I had to change the app-settings to set two minutes break time: FrontendWeb.Main
I see the problem with the growing number of tabs now, even using just a single instance.
Note that browser state like bookmarks and cookies belong to a profile. That means you need to log in to the game for each new browser profile that you create.
Is there any way to set a parameter command similar to avoiding barb, where we can tell the bot to only use preset from these set of villages and ignore the rest? This way I donât have to disable or create a different preset for certain village I want it to continue farming and ignore the other ones.
Also, is there a way for the bot to not send a preset to a bar that has an army returning? Sometimes, you need to run the bot again but it will send a preset to a barb that has a army coming back from it.
I am not sure what the âparameter command similar to avoiding barbâ is.
You mean this one?
farm-avoid-coordinates: List of village coordinates to avoid when farming. Here is an example with two coordinates: â567|456 413|593â
I did not see the connection to coordinates in the other part.
Likely yes, we can take a closer look at how your game client works in that area.
I remember there is a function that counts the number of army movements for the current village. As far as I remember, this number might be coming from a list of movements that we get from the game. Each entry in there might have a property to identify the village.
The information could be in the JSON that we decode with decodeVillageDetailsCommands here:
When you send me a recording of one of your sessions, I can check if we can get it there.
I am not sure what the âparameter command similar to avoiding barbâ is.
You mean this one?
Like is there a way to set a coordinate on a village that you own that the bot will ignore and wonât send unit to farm?
Likely yes, we can take a closer look at how your game client works in that area.
I remember there is a function that counts the number of army movements for the current village. As far as I remember, this number might be coming from a list of movements that we get from the game. Each entry in there might have a property to identify the village.
The information could be in the JSON that we decode with decodeVillageDetailsCommands here:
Hi
You said it âremembers the co-ordinated of farmsâ after the second cycle. I have a favourites list of barbarians to farm. ie. Village 1 has L.cav and farms far, Village 2 has spears and farms close.
Is there a way to input these âfarmsâ for the bot to use? Basically use the farms in the Battle report to ârefarmâ exactly.
or
Is there a way for the bot to farm from a distance ie. 60minutes away, and come closer?
That way the Village 1 cavalry with farm preset âfarm Aâ = far; and the Village 2 spear with preset 'farm B" = closer farms.
The one I linked in this topic does not support that. You could change the program code to do that.
The reversed ordering by distance sounds like it could be simple.
One difference I see is that the linked app uses distance to order the targets instead of time.
Also, is there a way for the bot to not send a preset to a bar that has an army returning?
Likely yes, we can take a closer look at how your game client works in that area.
I remember there is a function that counts the number of army movements for the current village. As far as I remember, this number might be coming from a list of movements that we get from the game. Each entry in there might have a property to identify the village.
The information could be in the JSON that we decode with decodeVillageDetailsCommands here:
github.com
Viir/bots/blob/9b9af9fe313b9aa08c621256102e6afb231eaf99/implement/applications/tribal-wars-2/tribal-wars-2-farmbot/BotEngineApp.elm#L1758-L1761
decodeVillageDetailsCommands : Json.Decode.Decoder VillageCommands
decodeVillageDetailsCommands =
Json.Decode.map VillageCommands
(Json.Decode.at [ âdataâ, âcommandsâ, âoutgoingâ ] (Json.Decode.list decodeVillageDetailsCommand))
When you send me a recording of one of your sessions, I can check if we can get it there.
Not sure what recording or info you need. But shorten the break duration and this is what it does even though theyâre plenty of other barb. Using Tribal Wars 2 farmbot version 2020-12-21
The session recording archive of a session where you had this scenario:
The session needs to be long enough to have the bot sent at least one attack from the village your army is returning to. At this stage, the reading of that part of the game state should have happened already, so that it is included in the recording.