NiHoel / Anno1800UXEnhancer

Bundle of utility programs to ease playing Anno 1800

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

German/Deutsch: https://github-com.translate.goog/NiHoel/Anno1800UXEnhancer?_x_tr_sl=auto&_x_tr_tl=de&_x_tr_hl=de&_x_tr_pto=wapp

Usage

Statistics Extractor

Tutorial

  • [one-time setup] download, install (and reboot your computer afterwards): vc_redist
  • run the Server.exe from the zip archive which should open a command window and might require administrator rights
  • run Anno1800Calculator from local file (if not done already)
  • run Anno 1800
  • open the statistic menu (population to update number of houses, finance to update number of factories, production to update productivity)
  • alternatively, one can update the population from the overlay of the HUD (not recommended)
  • Tutorial

Rerollbot

Tutorial

  • [one-time setup] download, install (and reboot your computer afterwards): vc_redist
  • Run UXEnhancer.exe
  • Edit the counters to specify how many times you want to buy that item (9999 is the maximum count and equivalent to infinity).
  • (Optional) Set a cost limit. Rerolls are only performed if the costs are below this limit. A limit of 0 means no limit.
  • Open the trade menu of a trader that sells one of the items you want. The bot will start buying / rerolling automatically
  • Hit 'Esc' to pause the bot and close the window
  • Tutorial
  • Thanks to Veraatversus for adapting the AssetViewer

Advices to further speed up rerolling

  1. Close other programs that consume CPU.
  2. Assign UXEnhancer.exe a task priority of "high".
  3. Move the game to the SSD drive.
  4. Lower graphics settings.
  5. Set reroll cost (max.) to 0 (unbounded)

In general, 2 rerolls per second are a really good value and 3 rerolls per second the absolute maximum.

Run the calculator remotely

The server needs to be run on the same computer as Anno. But the calculator can be run on a mobile device (laptop, smartphone, ...) One has to ensure that server and client can communicate:

  1. The desktop computer must be reachable from the mobile device (e.g. be in the same network, inter device communication is enabled by the router and the mobile device can ping the desktop computer)
  2. The port 8000 must be open for incoming traffic (and responses). Check windows defender and / or the antivirus software
  3. Search for 'http://localhost:8000/AnnoServer/Population' in dist\calculator.bundle.js and replace localhost by the IP address of the desktop computer
  4. Open a terminal in administrator mode, navigate to the folder containing the server and enter: ".\Server.exe -h " followed by the ip address of the desktop computer (do not add http or anything else)

Connectivity can be checked by entering the url displayed in the terminal into the browser of the mobile device. Then a log "request received" should appear in the terminal.

Troubleshooting

In case vcruntime140_1.dll is missing, download the vc_redist from https://support.microsoft.com/en-gb/help/2977003/the-latest-supported-visual-c-downloads

In case nothing happens, make sure:

  • the ingame text language and the language of the calculator/bot config are identical

  • the values to be read are not covered by something else (overlay, external program, etc.; basically things you would see when running a screen capturing program)

  • The window mode of the game is set to 'windowed full screen'

  • Disable XBOX DVR

  • Set the gamma value of the game (graphics settings) to its default (center position of the slider)

  • Disable Windows HD Colour (skip this point if you do not know what this is)

  • (Statistics Extractor) the correct island is selected in the statistics screen

  • (Statistics Extractor) the island has a long (> 8 letters) name composed from standard letters (A-Za-z) and with other islands as few characters in common as possible

    • NEGATIVE example: "Múa-1" and "Múa-2": Too short, non standard letter ú and both names only differ in one letter
  • (Statistics Extractor) in the center of the statistics menu the selected entry is fully visible

  • (UXEnhancer) Some items have identical prices and icons. In such cases wrong items might be bought or several counters decremented although only one item was bought.

  • If the game window is not found (e.g. you stream it from a cloud gaming platform), then you can specify the title of the window manually. Enter ".\UXEnhancer.exe -w " (repectively ".\Server.exe -w ") followed by the title of the window in quotation marks. The string you specify is interpreted as a regular expression. This means that '.' is a wildcard and "()[]*" are reserved characters.

If you encounter any bug, feel free to contact me (e.g. open an issue) and if possible perform the following steps

  • Open the program in the console with verbose option:
  • Shift + right click on folder containing the exe file -> Open PowerShell Window -> Enter ".\UXEnhancer.exe -v" or ".\CalculatorServer.exe -v" (without the quotes)
  • Configure and open the store / Open the statistics screen or where the bug occurred
  • Close the program without closing any dialog in Anno
  • Send me the console output + debug_images (+ UXEnhancerConfig.json - if the rerollbot is concerned)

Use prebuild binaries

Build it yourself

Requirements

Build instructions

  • git clone https://github.com/NiHoel/Anno1800UXEnhancer.git
  • cd Anno1800UXEnhancer
  • SETUP.bat
  • vcpkg install boost-property-tree:x64-windows (takes circa 2 minutes)
  • vcpkg install tesseract:x64-windows (takes circa 17 minutes)
  • vcpkg install cpprestsdk[core]:x64-windows (takes circa 10 minutes)
  • vcpkg install opencv4[png]:x64-windows opencv4[jpeg]:x64-windows (takes circa 7 minutes)
  • <build cpp/visual studio/UXEnhancer.sln>

Troubleshooting

  • copy, move, rename errors during installation: make sure that vcpkg resides on a short path (e.g. accass the folder via a drive letter)

  • vcpkg error "Please install the English language pack. Could not locate a complete toolset." -> go to visual studio installer -> visual studio communitiy -> change -> language package -> select english -> click change (bottom right)

  • if visual studio ist not installed on C:/Program Files x86 openGL (as a part of openCV) might fail to build possible fix: microsoft/vcpkg#4377 (untested) or reinstall windows kit on C:/Program Files x86 (can be more tricky than you think)

  • To update the ui_texts.json place the contents from Anno 1800/maindata/data2.rda//data/config/gui/ in cpp/visual studio/CalculatorServer/x64/Release/texts and delete ui_texts.json. Running the server in release will recreate ui_texts.json from the source files.

About

Bundle of utility programs to ease playing Anno 1800

License:Apache License 2.0


Languages

Language:C++ 99.1%Language:Batchfile 0.6%Language:C 0.2%