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

implement off GCD apl actions #1118

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

Adamrch
Copy link
Contributor

@Adamrch Adamrch commented Oct 8, 2024

image

@Adamrch
Copy link
Contributor Author

Adamrch commented Oct 8, 2024

image

@Adamrch
Copy link
Contributor Author

Adamrch commented Oct 8, 2024

image

@NerdEgghead
Copy link
Contributor

NerdEgghead commented Oct 14, 2024

At a high level, the way the Cata sim approaches this issue in a more general way is by attaching a separate Timer pointer to the Unit in addition to the existing GCD timer. The GCD timer is only used for CanCast() checks when appropriate, while the separate rotation timer is the one checked within APL. Dynamic events that can trigger rotational decisions, such as auto-attacks, must simply call a ReactToEvent() helper that automatically sets the rotation timer to be ready after a latency / reaction time delay, analogous to the 0.2s you have hardcoded in the posted example. Likewise, an APL can schedule an off-GCD rotational evaluation at a desired time in the future simply by executing the Wait or WaitUntil actions.

Unfortunately the current Cata rotation timing / spell queueing functionality was implemented piecemeal, so it's not neatly packaged into a single PR. I've gone through my commit history and put together a dump of all the relevant commits in order:

wowsims/cata@eb38dcd
wowsims/cata@bcf38ff
wowsims/cata@4c5bf00
wowsims/cata@46274e3
wowsims/cata@8ddad72
wowsims/cata@26422bc
wowsims/cata@ee934e3
wowsims/cata@9b2cf68
wowsims/cata@ed5a393
wowsims/cata@6485843

@Adamrch
Copy link
Contributor Author

Adamrch commented Oct 17, 2024

I'm not trying to model spell queueing, just model in the APL doing something after a delay. It shouldn't be a single static value. It should be something exposed to the API. It seems to be working just fine without modeling spellqueueing.
It is also intentional to be able to set the value to what I want as I cant press keys consecutively in game at any timing I want. 50ms (two keys next to each other), 100 ms, (mouse wheel up followed by down) or just mashing fast.

@Adamrch
Copy link
Contributor Author

Adamrch commented Oct 17, 2024

I'm not interested in porting spellqueueing over from cata at the moment because it is something completely different than what I am trying to accomplish, and would not serve the purpose I need for the ret rotation.

@Adamrch
Copy link
Contributor Author

Adamrch commented Oct 17, 2024

I believe if we are so focused on keeping the APL the same across more versions of the game maybe we should have a git submodule for APL (that's shared across SoD and Cata)

@Adamrch
Copy link
Contributor Author

Adamrch commented Oct 17, 2024

"Dynamic events that can trigger rotational decisions, such as auto-attacks, must simply call a ReactToEvent()" does this let you set the reaction time when you create the APL action? If I had two such actions could I set a different time for each?

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

Successfully merging this pull request may close these issues.

2 participants