Giter VIP home page Giter VIP logo

aoe4_overlay's Introduction

AoE4 Overlay

  • DOWNLOAD HERE (Windows)
  • Or run the script with Python 3.6+ (Windows/Mac/Linux)

Screenshot

What does the app do?

  • Shows information about players you are in match with.
  • Provides additional player statistics in-app.
  • Shows an overlay widget for build orders (BO) in two formats:
    • Simple TXT format.
    • Illustrated with resources distribution and game pictures (+ BO step selection).
  • Supports a highly customizable streaming overlay (with CSS/JS).

API calls are done through AoE4World.com. For build orders, check age4builder.com or aoe4guides.com. For questions and issues visit my discord server.

How to use

Windows

  • Download and extract the archive.
  • Run AoE4_Overlay.exe.

Linux

  • cd ~/Documents
  • git clone https://github.com/FluffyMaguro/AoE4_Overlay.git
  • cd ~/Documents/AoE4_Overlay
  • pip install -r requirements.txt
  • python3 src/AoE4_Overlay.py

  • Find your profile by entering your profile ID, Steam ID or player name.
  • Set up the hotkey for showing/hiding overlay.
    • Overlay will be automatically shown when a new game starts (or app starts).

Video tutorial for app setup and using buildorders.

Note: To update the app delete the app folder and extract the new archive elsewhere.

Build orders

  • Two build orders types are available:
    • Simple TXT
    • Illustrated with resources distribution and game pictures (+ BO step selection).
  • Add or remove build orders with Add/Remove build order (write the content on the left panel, and the title on the top of the right panel).
    • Write anything for the Simple TXT format.
    • For the Illustrated format, you need to have a JSON format compatible with the RTS_Overlay from CraftySalamander (see examples here).
    • Many build orders can be downloaded from https://age4builder.com or from https://aoe4guides.com.
      • To get the Simple TXT format, click on Simple TXT Build Order to clipboard on the top of any open build order (M icon).
      • To get the Illustrated format, click on Illustrated Build Order to clipboard on the top of any open build order (salamander icon).
  • Change their order using Move build order up/down.
  • Set up hotkeys (with Hotkey for/to...) for showing/hiding overlay, cycling between build orders and selecting the previous/next step of a build order (only available for the Illustrated format).
    • Use the corresponding hotkeys to show/hide/cycle build orders and steps.
    • You can uncheck a build order so that it does not appear when cycling between the build orders with the dedicated hotkey.
  • Change the overlay font size with Overlay font size.
  • Change the height of the build order images (only for the Illustrated format) with Overlay images height.
  • Change the position of the build order overlay with Change BO overlay position. Once fixed, the upper right corner will never move, but the size of the overlay will be automatically adapted to its content.

Authors

Screenshots

Build order widget (Illustrated format):

Screenshot

Additional civilization stats (currently only for 1v1):

Wintime is the median game length of won games with given civilization (indicates in what game phase the player is the strongest).

Screenshot

Settings:

Screenshot

Game history:

Screenshot

Build order configuration tab:

Screenshot

Built-in randomizer:

Screenshot

Streaming

To use the custom streaming overlay simply drag the overlay.html file to OBS or other streaming software. The file is located in src/html directory in the app folder. Move and rescale as necessary once some game information is shown.

Screenshot

If drag & drop doesn't work, add new source to your scene manually. The source type will be Browser and point to a local file overlay.html.

Overlay active:

Screenshot

  • Streaming overlay supports team games as well
  • The streaming overlay can be fully customized with CSS and JS, see the next section.
  • The override tab can be used to change the information on the overlay. This might be useful when casting from replays or changing a player's barcode to their actual name.

Screenshot

Or change values to something completely different

Screenshot

Customization

  1. Overlay position and font size can be changed in the app.

  2. Build order (BO) font, images size, position and hotkeys can be changed in the app. Other attributes can also be customized in config.json (to find the file click File/config & logs in the app). You have to close the app before making changes to the config file. What can be changed:

    "bo_show_title": true : true to show the BO title, false otherwise

    "bo_title_color": [230, 159, 0] : color for the BO title

    "bo_overlay_hotkey_show": "" : hotkey to show/hide the BO

    "bo_overlay_hotkey_cycle": "" : hotkey to cycle between the different BO available

    "bo_overlay_hotkey_previous_step": "" : hotkey to go to the previous step of the BO

    "bo_overlay_hotkey_next_step": "" : hotkey to go to the next step of the BO

    "bo_font_size": 12 : font size

    "bo_text_color": [255, 255, 255] : text RGB color

    "bo_color_background": [30, 30, 30] : background RGB color

    "bo_font_police": 'Arial' : police font

    "bo_opacity": 0.75 : opacity of the window

    "bo_upper_right_position": [1870, 70] : position for the upper right corner

    "bo_image_height": 30 : height of the images

    "bo_border_size": 15 : size of the borders

    "bo_vertical_spacing": 10 : vertical space between the BO lines

    The images used in the build order overlay can also be defined in the same configuration file (path relative to src/img/build_order).

  3. Team colors can be changed in the config.json. Colors are stored as a list of RGBA colors for team 1, 2, and so on.

    "team_colors": [
        [74, 255, 2, 0.35],
        [3, 179, 255, 0.35],
        [255, 0, 0, 0.35]
      ]
  4. Civilization stats color can be changed in config.json.

    "civ_stats_color": "#BC8AEA",
  5. Streaming overlay customization can be done via custom.css and custom.js in the html folder in app directory. These files will not be overridden with an app update. Look at main.css to see what you can change. In custom.js you can define this function that runs after each update.

    function custom_func(data) {
        console.log("These are all the player data:", data);
    }

Releases & Changelog

All here

aoe4_overlay's People

Contributors

craftysalamander avatar dnaroma avatar fluffymaguro avatar jensbuehl avatar sir-wallaby avatar willfindlay avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aoe4_overlay's Issues

Which is the data source for build order icons?

Hi @maguro , I am a bit puzzled when it comes to adding additional icons in the overlay tool repository.
Which repository to pick? (I see the images in RTS_Overlay as well as AoE4_Overlay). These 2 seem to be already out of sync.
I do not want to risk that the images get out of sync - so where should go what if I were to sync with aoe4guides and provide you with a pull request.

Thanks in advance!

workaround for age4builder.com \n pasting bug

I wrote this basic python code with chatgpt to fix a bug where the json is full of misalignments and "\n"s when pasting it from age4builder.com.

Instructions:
You have to copy the aoe4 build into your clipboard, run this code within a python terminal and then paste it into age4builder. Obviously the modules (json, pyperclip) have to be installed before as well. Enjoy :)

import json
import pyperclip

# Read data from clipboard
clipboard_data = pyperclip.paste()
data = json.loads(clipboard_data)

# Process data
for item in data["build_order"]:
    item["notes"] = [note.replace("\n", "") for note in item["notes"]]
    item["notes"] = [note.replace("  ", "") for note in item["notes"]]

# Copy updated data to clipboard
updated_data = json.dumps(data, indent=4)
pyperclip.copy(updated_data)

"""
This code uses the pyperclip module to read the data from the clipboard using the pyperclip.paste() method. 
It then processes the data using the same loop as before to remove the newline characters from the "notes" field.
Finally, it uses the json.dumps() method to pretty-print the updated data with the indent parameter set to 4, 
and then copies the updated data back to the clipboard using the pyperclip.copy() method.
"""

Buildorder Part stays in backround

Hi,

lately my Hotkeys, name and everything had a reset. So i had to fix up my settings again. That didnt worked well so far.

At the Moment the Build order Part never shows on the screen. I can show the "Name and Profile information". The Hotkey for hiding these Information works. But the build order Part stays in Backround everytime. I tried to delete the whole thing to "reinstall" but its not working and my information still safed on the "new" downloaded Program.

Maybe someone know how to fix that issue?

The AoE 4 overlay does not update

Hello,

When you start a game and the AoE4 overlay is open. It doesn't refresh anymore. I have to restart the software for it to update. Do you have a solution for me please ?

Lost build orders after upgrade

After upgrading to 1.4.0, the build orders I had saved under the build orders tab have disappeared, I'm curious to know if the storage location of the builds I had written there have changed, and if I can recover the old files after having done the upgrade.

Thanks for the support!

BO Overlay doesnt show the pictures

Hi
i use the Overlay regularly.

Somehow it doesnt show the Pictures anymore.

I dont know how to fix it. I tried to install it new, but didn't work. Actually i can read the text but without the pictures so its realy tough to learn from it.

Maybe somebody had the same issue or can help me with that?

thank you in advance.

Aoe4 overlay bug with new expansion build orders

cannot use any new expansion build orders, possibly because their isnt any Jpeg files for the new build orders for the Japanese or Byzantine civs. I dont really know how this program works, but when i paste and then try to open the new build order for one of those civs its super big. So big i cant even see what the order is, and when i try to change the overlay position it just disappears. I use this tool alot and would love an update! Thank you for all the hard work! - Sam

Configs get erased spontaneously

Hey sometimes the configs are deleting themselves (hotkeys/buildorders). Me and a friend had this issue already. Maybe you can find a fix for it :)

the most recent update

hey just wanted to let you know that "Heur.Adv.ML.B" is tripping some virus scanners as "heuristic malware"

Trojan detected

Win defender is going crazy, saying that a trojan is detected Win32:Wacatac.B!ml
In case, this is a serious trojan.

Feature idea - Automatic steps for build orders based on timings

I think I have a great additional idea for this.

At the moment you can only manually go to the next step in a build order. If the build order has a lot of steps this can mess up your game.

Wouldn't it be great if it auto-goes to the next step based on the timings added to the steps? I tried this with macro software but it is kind of buggy and it also doesn't follow the correct timings if it's not every 20 seconds for example.

I'll have a try at it but Python is not my main language so bear with me :D

Build order rotation

hey, when im playing AoE my build order just keeps skipping over and over.. really quickly until the end

Overlay not displayed in-game

Hello! First of all thanks for the amazing job with this overlay, I wonder if you could help me. I on version 1.4.1. For some reasons the overlay runs correctly but is not showed ingame. Any ideas why it might be?

Build Orders Not Saving

My build orders don't save when I close and reopen the app. I have to type them in again each time.

[Feat-request] Translation

Need translation for the settings interface
Can you make a translate system and I can contribute for it

"Elo" shown in overlay is actually player's rating.

I noticed in the overlay that the ELO shown is actually my ranked rating (number used for divisions, bronze - conq).
My hidden elo as reported by AoE4 World is different.

I would suggest to rename "Elo" to "Rating", or show the hidden Elo instead, or show both, though that is probably not necessary.

\n not working properly in build order notes

I want to be able to have multiple task in one tab so i tried to do something like this inside of a note
"notes": [
build @building_economy/mill.png@ \n one to @resource/resource_gold.png@ \n @age/age_2.png@ set all back to @resource/sheep.png@
]

but it does not work as expected. instead it only moves the next icon down

Question: How to modify the css properly?

Another one: In order to get to the same colors in the BO and Match-Overlay, I wanted to update some colors via “custom.css”. No matter what I add (same structure as main.css), the tool does not reflect the updated colors. Is there a trick to it? Could you maybe provide an example how to override at least colors or add it to the readme? :)

Wins with +0 points are counted as a loss

My buddy and I have been 2v2ing on smurf accounts recently and we are currently 51-0. As you can imagine, playing games after that many wins in a row you start to see a couple 1 and 2 pointers. We recently played a match where the enemy team was 700 ELO points below us, which resulting in +0 points for the win. However, the match history component of the overlay appears to record it as a loss.

Here are the relevant screenshots:

image

image

windows defender detect the virus at AoE4_Overlay.exe

Hi,

My windows defender delete AoE4_Overlay.exe every time.
Windows defender detect Trojan:Win32/Wacatac.H!ml.

Could you check the release file?
I check the online virus check service. Some site say it has problem.

regards,
2023-11-26 183600

run from python

Hi

Thank you for your great work!
It works great on windows!

However I can't get it to run on linux... Do you mind sharing instructions on how to make the program run through python?

Thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.