jensbuehl / aoe4-guides

Source code for aoe4guides.com: Yet another Age of Empires IV build order tool
https://aoe4guides.com
MIT License
17 stars 7 forks source link

Export for Overlay-Tool #36

Closed jensbuehl closed 1 year ago

jensbuehl commented 1 year ago

Idea: Use JSON based "graphical" output. Just skip the icons in the build steps for now. Mapping about like that:

`

"civilization": "{build.civ}",
"name": "{build.title}",
"author": "{build.author}",
"source": "",
"build_order": [
    {
        "age": -1,
        "population_count": -1,
        "time": "{step.time}",
        "villager_count": {step.villagers},
        "resources": {
            "food": {step.food},
            "wood": {step.wood},
            "gold": {step.gold},
            "stone": {step.stone}
        },
        "notes": [
            "Plain text here."
        ]
    }...

`

jensbuehl commented 1 year ago

merged in #41

CraftySalamander commented 1 year ago

Very nice work. Super fast, and seems to work well.

Here are some improvement suggestions:

In case you are wondering what is the difference between RTS Overlay and AoE4 Overlay: RTS Overlay is the tool that I developed, mainly for BOs. AoE4 Overlay is the tool from Maguro that he developed mainly for match stats. In order to avoid splitting the AoE4 community between these 2 tools, I ported the BOs code of RTS Overlay to AoE4 Overlay. In short, they use the same JSON format because they run the same code.

At the moment, the main differences are that AoE4 Overlay has more information about match statistics, while RTS Overlay has more QoLs for BOs (mouse extra buttons, fuzzy search...) and that RTS Overlay supports several games (AoE2, AoE4 and SC2 at the moment | others to come like Stormgate).

jensbuehl commented 1 year ago

Thanks for the additional information and testing! All valid points! I'll take a look. Might take a bit longer since the public holidays are history. ;)

jensbuehl commented 1 year ago

These were mostly very minor changes, so I did it rightaway. Included a link to your project page as well next to the button.

CraftySalamander commented 1 year ago

Great! :-)

CraftySalamander commented 1 year ago

Small extra details. When testing this BO.

I get this for the last step:

"notes": [
            "When white tower complete, balance based on composition.<br>Follow up ideas:<br>- open with knights + longbows<br>- transition into crossbow + spears<br>- build blacksmith and get upgrades<br>- gather relics<br>"
         ]

It would be better to split it like this:

"notes": [
            "When white tower complete, balance based on composition.",
            "Follow up ideas:",
            "- open with knights + longbows",
            "- transition into crossbow + spears",
            "- build blacksmith and get upgrades",
            "- gather relics"
         ]

However, when testing on RTS Overlay, it displays it correctly (so not a necessary change, only a cleaner one).

On the same BO, I also have this note: "Age up&nbsp; with white tower with ~10 villagers from sheep". I do not know where the &nbsp; is coming from.

Small detail, but you can add any extra field in the JSON format (will be ignored by the tool). So, you could for instance save the description in a "description" field, next to "author".

Other than that, it looks very nice on the overlay ;-)

jensbuehl commented 1 year ago

Splitting the lines is changed on dev branch already. The redundant "space" was indeed somehow part of the BO. I just removed it there...