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

Automatically rotate the Monkeylord towards targets, limited outside a range #6574

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

lL1l1
Copy link
Contributor

@lL1l1 lL1l1 commented Dec 4, 2024

Description of the proposed changes

Cherry picked the now-reverted Monkeylord auto-rotation changes from #6437. In summary, the ML has angle-restricted weapons that it cannot use when idle, and they make up a significant 450 DPS, so it would be nice if they fired automatically when they can, but on the other hand the ML is slow turning and reliant on micro so turning it automatically is not exactly desired.

Add a dummy weapon that limits the bolters' auto rotation behavior to outside 50 range:

  • The target check interval is 0.1 so that the ML doesn't rotate in the time it takes for the dummy weapon to acquire the target.
  • The rate of fire is 0 so that OnFire only ever gets called once.
  • The tracking radius is 1 so that the range in the BP is what is actually used for the unit behavior.
  • The necessary targeting fields mimic the bolters/laser valid targets.
  • The SlavedToBody fields stop the autorotation behavior of the bolters.
  • It is placed after the laser so that the unit walks into laser range on an attack task, but after the bolters so that its SlavedToBody angle limits have priority.

I think this is the absolute minimum for an AI dummy weapon, it should be replicated to the other dummy weapons (various forms of AA-only units, and transports).

Testing done on the proposed changes

Testing from the previous PR (since this is cherry picked):

The units can hit a spirit moving around the unit at max range.

  • ML does not rotate for targets outside 50 range, and it goes into laser range when on attack task (attack order, attack move/patrol order).
  • Logging the OnFire and OnGot/LostTarget functions of the base weapon class.

Checklist

  • Changes are annotated, including comments where useful
    • will split blueprint annotations to a different PR since this is a dubious change for balance
  • Changes are documented in the changelog for the next game version

lL1l1 added 4 commits December 4, 2024 10:17
Its bolters fire together only within 45 degrees in front. 39 degrees arc range allows it to lead the target and fire on it while turning.
Auto turning can get annoying when microing in close range and trying to maintain desired rotation for maneuvering around the enemy formation.
@lL1l1 lL1l1 added the area: balance idea related to suggestions for unit balance label Dec 4, 2024
@lL1l1 lL1l1 added this to the Development I of 2025 milestone Dec 4, 2024
@lL1l1 lL1l1 marked this pull request as ready for review December 4, 2024 19:47
@lL1l1 lL1l1 requested a review from Rhaelya December 4, 2024 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: balance idea related to suggestions for unit balance
Projects
Development

Successfully merging this pull request may close these issues.

1 participant