Farm Manager - Tribal Wars 2 Farmbot

Got it, how do you want me to send it to you?

I’ve also found an issue where if you have over 30 village the bot fails to continue sending commands after 1-2 hours. It will continue to go on a loop looking for barbs without finding one and just stops sending. I’ve gotten a session recording of that as well, just don’t know how to send it to you.

You can send it via email to support@botengine.org

In general, another option to share a session recording archive is attaching it to a GitHub issue like here: Cannot find Asteroid, keep warping · Issue #31 · Viir/bots · GitHub

Thanks, sent one of the recording. Looks like I misplace the other one, so i’ll need to redo that one.

I got one zip-archive via email named session-2021-02-13T19-19-54-3c13a3.zip

When you select event 70 of that session, you can see this in the status text from the bot:

[
]
Checked 3 unique coordinates and found 2 villages, 0 of which are barbarian villages.
Found 1 own villages.
[
]

So this is a scenario where you had only one village. Is that the session I should look into?

Hi so I have sent both session recording to the email.

Confirm I got session-2021-03-05T01-37-05-6d3698.zip via email. I am looking at this recording now to understand your scenario.
The app used in this session was d0b382bd42/8aa8bcf7be, the latest version of the Tribal Wars 2 farmbot.
I start by looking at the status texts to get an overview:

  • Number of own villages was more than 50.
  • In event 43192, about 3,5 hours after beginning the session, the bot sent an attack. The session recording from said archive ends a little bit later.

Is that correct? What should we do with that one? Should we consider this session for improving the app?

I think so, I just know after a few hours the bot will no longer send attacks anymore and looking through the CMD all it says is looking for new barbs where it will just keep looking forever but never finds one to send. Hopefully, that shows in the recording. It only has this issue when I have over 30-40 village, but if I have less 30 village than it functions fine for days of running.

If you need me too I can set up a recording for 24 hours if that helps figure out what is happening.

Ok, maybe I was too fast looking into the details of that particular session. If the problem never occurred in the recorded timeframe, the recording might not tell us anything useful. That recording in session-2021-03-05T01-37-05-6d3698.zip was shorter than four hours, so maybe it just does not happen within the first four hours.

Did you see a case where that problem occurred within the first ten hours?

If you are not sure if the problem happens in less than 24 hours, that would be the next step.

In any case, I will look at the other recording to expand the reading of returning armies.

Tried running the bot on a VM. I keep getting this error, I downloaded the latest bot engine 2020-12-08 but can’t figure this out


Below is the beginning of the app description found on the catalog:

{- Tribal Wars 2 farmbot version 2021-01-14
   I search for barbarian villages around your villages and then attack them.

[...]

This script applies the configuration found at https://catalog.botengine.org/8aa8bcf7be9a8af71f65854469bf1e2dd98a9f63151e1f67d4c24d412fe6697c/configure-run-app/eyJvbmxpbmVTZXNzaW9uIjp0cnVlLCJhcHBTZXR0aW5ncyI6IiIsInBhdXNlQXBwS2V5cyI6IiIsInNlc3Npb25MZW5ndGhMaW1pdCI6Ijk5OSIsImRldGFpbGVkU2Vzc2lvblJlY29yZGluZyI6IiJ9

I am recording a log of this session to file 'C:\Users\User\AppData\Local\botengine\run-app-session\2021-03-11T00-40-48-db3635\session.2021-03-11T00-40-48-db3635.jsonl'
This source looks like a URL. I try to load the app from Github
I found 10 files in 'https://github.com/Viir/bots/tree/8a103a672f2b19455c41c67cf2e14e88131202b2/implement/applications/tribal-wars-2/tribal-wars-2-farmbot'.
I loaded app d0b382bd4254d5cba7394c6910580e0781810de86a5d0d568faf3215e78951b9.
I got an online session key. I ask the server to test this key. This might take a few seconds...
Looks like this key works, I continue to start the app in an online session...
Starting the app....

run v2020-12-08 failed with exception: System.NotImplementedException: Failed for 1 attempts. Output file not found. Maybe the output from the Elm make process from the last attempt helps to find the cause:
Exit Code: 1
Standard Output:
Dependencies ready!
'
Standard Error:
'-- PROBLEM LOADING PACKAGE LIST ------------------------------------------------

I need the list of published packages to verify your dependencies, so I tried to
fetch:

    https://package.elm-lang.org/all-packages

But my HTTP library is giving me the following error message:

    InternalException (HandshakeFailed (Error_Protocol ("certificate has unknown CA",True,UnknownCa)))

Are you somewhere with a slow internet connection? Or no internet? Does the link
I am trying to fetch work in your browser? Maybe the site is down? Does your
internet connection have a firewall that blocks certain domains? It is usually
something like that!

'
   at Kalmit.ProcessFromElm019Code.CompileElm(IImmutableDictionary`2 elmCodeFiles, IImmutableList`1 pathToFileWithElmEntryPoint, String outputFileName, String elmMakeCommandAppendix)
   at Kalmit.ProcessFromElm019Code.CompileElmToJavascript(IImmutableDictionary`2 elmCodeFiles, IImmutableList`1 pathToFileWithElmEntryPoint, String elmMakeCommandAppendix)
   at Kalmit.ProcessFromElm019Code.ProcessFromElmCodeFiles(IImmutableDictionary`2 elmCodeFiles, Nullable`1 overrideElmAppInterfaceConfig)
   at Kalmit.PersistentProcess.PersistentProcessWithHistoryOnFileFromElm019Code..ctor(IProcessStoreReader storeReader, IImmutableDictionary`2 elmAppFiles, Action`1 logger, Nullable`1 overrideElmAppInterfaceConfig)
   at BotEngine.Windows.Console.RunAppSession.Run(TreeComponent appCodeTree, Func`2 getFileFromHashSHA256, String appProcessRecordingDirectory, Action`1 logEntry, Action`1 addSessionLogEntry, String appSettings, String sessionCustomName, AppSourceStructure appSource, String keyToStartOnlineSession, IEnumerable`1 sessionLengthLimits, IImmutableList`1 pauseAppKeys, IImmutableList`1 statusDisplayAdditionLines, RunSimulation simulation, InterProcessCommunicationState interProcessCommunication) in D:\a\dev-of-botengine\dev-of-botengine\implement\client\windows-console\BotEngine.Windows.Console\RunAppSession.cs:line 54
   at BotEngine.Windows.Console.BotEngine.runAppWithOptionsFromCommandLine(String appSourceInputAddress, String appSettings, String pauseAppKeysString, Boolean onlineSession, String keyToStartOnlineSession, String sessionLengthLimitArgumentString, RunSimulation simulation, Nullable`1 detailedSessionRecording) in D:\a\dev-of-botengine\dev-of-botengine\implement\client\windows-console\BotEngine.Windows.Console\Program.cs:line 713
[2021-03-11T00-40-59] v2020-12-08 Session ended.

This error can happen depending on your certificate configuration in Windows. You will not get this error with the default configuration from Windows 10.

I have seen such an error before:

I have observed such error messages on a system with stricter SSL certificate configuration than found on Windows 10: elm-fullstack/2018.deploy-to-azure-web-app.md at c1b9d57ce89f3421dae2e878a1b9327cc63acac3 · elm-fullstack/elm-fullstack · GitHub

Maybe the configuration regarding root certificate on your system is different from the default coming with Windows 10?

When you open https://package.elm-lang.org/all-packages, what does your web browser say about the certificate?

https://package.elm-lang.org/all-packages certificate

Does your system classify the certificate as OK?

What version is displayed when you open the program winver?

When I go to that link on my browser on the VM it just gives me a bunch of text. Not too sure what to look for.
Can’t upload a bigger picture, picture cap is 16KB :confused: (Link to the picture: Screenshot-2021-03-11-171439 — ImgBB)
image

Drklord I had the same issue running through Window Sandbox.

Once I opened up the URL with the default browser the error message went away. I guess it needed to be initialized somehow.

I had a batchfile run this command on startup to clear the issue.

start microsoft-edge:https://package.elm-lang.org/all-packages
1 Like

Looks like you’re right, after running the bot it started working. Thanks~!

I looked into the session recording archive session-2021-03-05T15-34-28-8fd611.zip
This archive contained all the necessary information to adapt the bot program code. I uploaded the update of the farmbot here:

You can run it from https://catalog.botengine.org/1720bbc5d97a625a4df82990af61f829b4a8e2ddded726a3fa2e15472cee40ca

1 Like

Hi Michael
I can’t start the application again, it stopped working by itself
Fail

I downloaded the latest zip file. 2021-02-20, made a new script and I still can’t run it

run-bot

You need to split them with comma and not by enter a new line

1 Like