Basic Setup Guide
Started by uid0




0 posts in this topic
uid0
Administrator

Administrators

3
401 posts 36 threads Joined: Feb 2021
Information  08-23-2021, 02:53 PM -
#1
Prerequisites This tutorial will cover the install using MEmu, it's possible to use other emulators, however the only emulator we officially support is memu. You can use Bluestacks, LD, Nox, even an Android Phone. This bot works through ADB, so as long ADB is present it should work anywhere. 


Settings for emulation

This bot uses image recognition to detect what is happeing in the game, the gameplay must be fluid to avoid syncronization issues. 
  • Set the emulator resolution to 1280x720 @ 240 DPI (on memu, go in Settings --> Screen)
  • If you have issues with lag, try setting half of your CPU cores to the emulator. So, if you have 4 cores, set the VM to have only 2 cores and not 4, this is a common mistake, sometimes less is more with emulators, try finding the best settings in the Engine tab with your hardware, you will have to test these, since they can change a lot on different hardware. 
  • If you are not using MEmu you might need to enable ADB

Settings for the game
  • Make sure the game language is set to English
  • In the graphics settings make sure the resolution slider is set to 100%, all other settings can be on low.
  • Disable any ongoing mission with your assistant. They could interfear with some recognitions. 

  • [Image: jkqjdIA.png]
  • Display Filter Tag must be off. If possible use the default order for the categories.

Understanding bot files and folders

Folders

Code:
Moonrock Main Folder
├───adb
├───config
├───lua
├───refs
├───tessdata
├───x64
└───x86
  • adb: contains adb executables 
  • config: folder for storing config files for multinstance
  • lua: folder containing the lua scripts to run
  • refs: image reference files
  • tessdata: english dictionary for the OCR
  • x86/64: libs for Tessract (OCR)

Files

Executables
Code:
│  Moonrock.exe
│  InstanceManager.exe
  • Moonrock.exe: bot engine main executable.
  • InstanceManager.exe: instance manager & ground control server GUI.

Config Files
Code:
│  auth.json
│  config.json
│  groundcontrol.json
│  gcs.json
│  tolerances.json
  • auth.json: contains your forum login details and API keys for third party services
  • config.json: default config file, generated on first start. This is also the file the bot loads when no config file is specified.
  • groundcontrol.json: client connection settings for the GroundControl System.
  • gcs.json: server connection settings for the GroundControl System.
  • tolerances.json: override file for the image detection.
Helper Scripts
Code:
│  LogToFile.ps1
│  ConnectBluestacks.ps1
│  start_multi_console.bat
  • LogToFile.ps1: start the bot and logs it's output to file.
  • ConnectBluestacks.ps1: connects Bluestacks instances to adb, not required for other emulators. More informations inside the script.
  • start_multi_console.bat: an example on how you can automatize starts and pass parameters to the bot.

The configuration file

By default, when you start Moonrock.exe it will load it's settings from "config.json", or generate a new one.

It's possible to start the bot with a specific config file by passing it as a console argument, for example, if we have or config file in the folder "jita" we can start the bot and pass the file this way:
Code:
Moonrock.exe --instance jita\config_name.json

Config file content
Code:
{
  "InstanceName":"default",
  "ADBPath":"",
  "ADBSocket":"127.0.0.1:5037",
  "ADBInstancePort":0,
  "DeviceID":0,
  "CloneID":1,
  "Mode":2,
  "Venture":false,
  "Verbosity":1,
  "Killswich":true,
  "RandomizeInput":true,
  "SendStats":true,
  "BeltsClusterPriority":0,
  "Miners":null,
  "Strip_Miners":null,
  "Stabs":null,
  "Timings":{
      "AlignTime":10,
      "WarpTime":40
  },
  "RedScanSensitivity":0.97,
  "ScanLocalInBelt":true,
  "ScanBeforeUndock":true,
  "SendRedNotification":false,
  "OnlyApproachAsteroids":false,
  "SendRedNotificationDelay":2,
  "RescanDelayAfterGCSRecall":2,
  "WatchDogMode":false,
  "OresToMine":[
      14,
      5,
      15,
      3,
      8,
      1
  ]
}
  • InstanceName: a friendly name, can be you char name, this is purely cosmetic in alerts.
  • ADBPath: alternative path to ADB.exe.
  • ADBSocket: the ADB deamon socket (note, this is NOT the device socket, ex what you find in the BS settings).
  • DeviceID: the ID of the device to use, starting at zero. For example, if you have 4 android device, device one is gonna be 0, device 4 is gonna be 3.
    Important
    The id is assigned by ADB, if you start the instances in a mixed order the id will not reflect the instances. Make sure to start your instance sequentially. This is an option in Multi-memu.
  • CloneID: one for the first clone, two for the second clone, three for the third clone  Rolleyes
  • Mode: unused. Was used to switch from ADB capture to WinAPI, might comeback.
  • Venture: enables venture mode.
  • Verbosity: sets the verbosity level of the bot log. Set to three to have the maximum log level.
  • Killswich: quits the game if podded.
  • RandomizeInput: randomizes clicks and swipes.
  • SendStats: when set to true the bot will share some data with us. This data includes: the time it took to make a mining cycle, how much isks you got from that cycle. No additional details are sent, your privacy is safe.
  • BeltsClusterPriority: Zero makes no distinction between clustlers and belts, one prioritizes belt, two prioritize clusters.
  • Miners/Strip_Miners/Stabs: override for the Miners/StripMiners/Stab position in case automatic detection fails.
  • AlignTime: the time in seconds you ships takes to align, on max skills it should be around 10 seconds.
  • WarpTime: an estimate of the general time it takes to fly to the belt.
  • RedScanSensitivity: deprecated way of setting the scan sensitivity, now all tolerances can be overrided.
  • ScanLocalInBelt: scan or not the local list while mining in belt.
  • ScanBeforeUndock: scan for reds before undocking from station.
  • SendRedNotification: sends a Discord/Telegram notification with a screenshot of the local if notifications are configured.
  • OnlyApproachAsteroids: approaches asteroids without locking them.
  • SendRedNotificationDelay: delay in minutes for RED notifications to prevent spamming. Set to 0 to disable.
  • RescanDelayAfterGCSRecall: delay in minutes after a flee command from the GroundControl Server before rescanning the local.
  • WatchDogMode: sets the instance as a watchdog bot.
  • OresToMine: array of the ores to mine in a venture. 
Auth file content
Code:
{
  "username":"",
  "password":"",
  "imgur_api":"",
  "discord_webhook":"",
  "telegram":{
      "apikey":"",
      "chat_id":""
  }
}
  • Username: your forum username.
  • Password: your forum password.
  • Imgur_api: the imgur ClientID api key, you can get one here. Make sure to check "Anonymous usage without user authorization".
  • Discord_webhook: you can find how to get the url here.
  • Telegram ApiKey/Chatid: telegram setup is a bit more fiddly and requires some knoledge of how telegram bot works. After generating an API Key with the botfather and adding the bot to the group, you will need to find the chat id of that particular group. there is no integrated way of getting chat id directly from the standard Telegram app. You can read more here and here.

Setting up a client

When setting up a new client, you will need to edit a few settings:
  • InstanceName: this is cosmetic, but useful, sets the name of the client in messages, notifications and GCS.
  • CloneID: which clone to select in case of a game crash.
  • DeviceID: which device should the bot connect to.
  • AlignTime/WarpTime: the defaults are ok for all kind of players, but they waste a lot of time. Change them accordingly your skills/distance.
  • Verbosity: set this to 3 in the first runs, so you can have full log.

If you need to setup more clients, the process is the same, copy the config file, give it a new name (keep the .json extension) and change the settings accordingly your preferences. You can keep the config file in the config folder, or in the main folder.
By default, if you start the bot with no parameters it will only load the config.json file in the same folder as the executable. If you want to load a custom config you can do it manually (using the console argumets of the bot), by making a script (see start_multi_console.bat as an example) or by GUI using the InstanceManager.

Before doing multi-instances, make sure the bot is running correctly with a single instance, if no issues are found, you can start to scale up your setup.

For setting up the dump station, you will need to set the desired station a a location bookmark using the in-game location maker. The dump station must be set as the first station of the list:

[Image: ULUtRy6.png]
*There is a 1/1000 possibility that the bot clicks on the low side and gets the second bookmark to activate. This is due to the click randomization system, happens very, very rarely, to be sure, set both first bookmarks as the desidered station.

Starting the bot
The bot can start with the game closed or not ingame. It's not adviced as the process of getting ingame is a bit slow, and it's main propouse is to get back ingame if the game crashes.
Client can be INSPACE/INSTATION/INBELT, they will resume their work.

The bot can be started standalone by running the Moonrock executable or in bulk using the InstanceManager. For testing configs it's adviced to run the bot standalone.
You can pass the configuration file using the --instance console argumet:
Code:
Moonrock.exe --instance [path to config file]
This post was last modified: 08-23-2021, 03:05 PM by uid0.


Possibly Related Threads…
Thread Author Replies Views Last Post
  Any detailed setup guide? ProlificOre 2 95 03-15-2022, 11:57 PM
Last Post: ProlificOre
  new member need of help in setup Cold88 17 1,198 08-07-2021, 12:55 PM
Last Post: uid0

Forum Jump:


Users browsing this thread: 1 Guest(s)