Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Somehow make it step with a timer #34

Open
jmstefans opened this issue Jan 30, 2024 · 9 comments
Open

Feature Request: Somehow make it step with a timer #34

jmstefans opened this issue Jan 30, 2024 · 9 comments

Comments

@jmstefans
Copy link

Would be nice to not have to hit a key to move to the next step. Is it possible to automatically move to the next step based on a timer? Thank you cool overlay

@CraftySalamander
Copy link
Contributor

Hi.
I am the developer of the BO part. More exactly, I developed another overlay only for build orders (RTS Overlay, at the moment for AoE2, AoE4 and SC2) and ported the BO code in the overlay from @FluffyMaguro.

A few weeks ago, I started experimenting with timer based builds in RTS Overlay, but only targeting SC2 (and potential future RTS) at the moment. This is still in development on this branch.
I am not sure it would be so valuable for the 'age of' franchise due to the randomness of the map generation and the complexity of the BOs (several lines are often needed to describe what to do, in contrast to SC2 simplified macro).
On top of that, this requires to have time indications for all steps, and very few AoE4 BOs meet this requirement.

@jensbuehl
Copy link
Contributor

jensbuehl commented Feb 27, 2024 via email

@CraftySalamander
Copy link
Contributor

In fact, at the end, I still got tempted and started to also try this feature implementation for AoE2/AoE4.

My idea to solve this is to provide in the overlay a function capable of estimating (i.e. no 100% guarantee) the timings of each step.
I already did it for AoE2, you can see the basic idea here.

I prepared the template for the same feature for AoE4 (here) but still needs to implement it.

@jensbuehl I will tell you when it is ready in case you want to adapt it for https://aoe4guides.com 😉

@CraftySalamander
Copy link
Contributor

@jensbuehl I prepared the first timing evaluation for AoE4 here.

However, I still need to finish the timing overlay feature to use it and check if it works on a few BOs.

@CraftySalamander
Copy link
Contributor

@jmstefans See the demo for the timer feature in this video :-)

@CraftySalamander
Copy link
Contributor

@jensbuehl the timing evaluation code is ready here (could potentially be improved with more cases, but it is a good start.

Up to you to see if you want to also add the feature to https://aoe4guides.com

@jensbuehl
Copy link
Contributor

Thank you! Will take a look when time permits.

@jensbuehl
Copy link
Contributor

@CraftySalamander Looks impressive, yet complex. I had a simplified algorithm in mind as a starting point which just interpolates between given timestamps. The result might still be "exact enough".

In a first draft I do not think that I will take villager production times or bonuses into account, since we have really inconsistent data and not everyone is even using icons, but e.g. text in different languages. I do not want to parse and maintain that. Also, construction times would have to be considered. Depending on how many villagers are building. We do not even have that information and would have to guess yet again. So, I am not sure if your (too exact :) ) algorithm is really adding that much value due to the mostly bad data we have as input and the wild guesses we have to make.

In other words: the build orders are not "model based" and therefore error prone and hard to process properly. I would hope for aoe4world game data at some point to provide good guesses and timestamps. Until then, I might rather "interpolate" with something as simple as follow over re-implementing the game logic. Having an exact algorithm based on bad data still leads to bad data. :)

E.g.
Step 1 at 0:00
Step 2 no timestamp (villager difference to previous step is 2)
Step 3 no timestamp (villager difference to previous step is 3)
Step 4 at 4:00 (villager difference to previous step is 1)

turns into (spaced evenly)
Step 1 at 0:00 (80 sec)
Step 2 at 1:20 (80 sec)
Step 3 at 2:40 (80 sec)
Step 4 at 4:00

or (including villager weight)
Step 1 at 0:00 (240 sec * 2/6 = 80 sec)
Step 2 at 1:20 (240 sec * 3/6 = 120 sec)
Step 3 at 3:20 (240 sec * 1/6 = 40 sec)
Step 4 at 4:00

Much easier to grasp with not that much "magic" happening.
Maybe even rounding to 5s would be acceptable.

Of course, this approach is based on the assumption that at least the age up time is given or at least some steps have time stamps. If we do not have any timestamps at all, then we would have to fallback to something like you did: Make estimations based on villager counts.

@CraftySalamander
Copy link
Contributor

@jensbuehl Up to you to see what you want to add on https://aoe4guides.com ;-)

On RTS_Overlay, I initially designed it for AoE2, where it seems to work perfectly (correct to the second on 15 BOs I tested).

For AoE4, it was working well on the 3 BOs I tested (French, Jeanne & OOTD), but I tested it less extensively.
But, it requires (at least) to have the correct number of villagers indicated.

AoE4 is a bit less constrained than AoE2 of course. Building information time is not important (normally) in AoE4 since villager production time should not be impacted (in contrast to AoE2).

But the call is yours :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants