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

Smart High/low weapon selection proof of concept #3720

Draft
wants to merge 33 commits into
base: master
Choose a base branch
from

Conversation

SethDGamre
Copy link
Collaborator

@SethDGamre SethDGamre commented Sep 14, 2024

This is for Hornet and the balance team to review.

Low trajectory weapon overrides the aim of high trajectory. Meaning the turret will prefer targets with direct LOS before reverting to high trajectory aim. Seems to work pretty good.

The high/low toggle button is still there as this is just a proof of concept .

VERSION 2.0 UPDATE

Smart select got a little smarter. There are now 4 aiming states.

  1. not aiming. Any aiming state allowed.
  2. Aiming low. While aiming low, aiming high is prevented. After a half second of not aiming low, aiming high is allowed.
  3. Aiming high. If aiming low has no valid target, aiming high triggers and prevents aiming low for 10 seconds.
  4. Forced Aiming High. If aiming low is active for 1.5 seconds but doesn't shoot, aiming high is enabled for 30 seconds preventing aiming low for the duration.

When the turret returns to idle, it reverts to 0 state.

@SethDGamre SethDGamre added Awaiting GDT Approval Awaiting approval from the Game Design Team (game mechanics, balance only) Awaiting BLT Approval Approval needed from the balance team labels Oct 20, 2024
@SethDGamre
Copy link
Collaborator Author

https://discord.com/channels/549281623154229250/1281629883751071775/1284316479277502616
See here for a series of videos demonstrating performance and operation.

@WatchTheFort WatchTheFort added Approved Approved for implementation by the Game Design Team and removed Awaiting GDT Approval Awaiting approval from the Game Design Team (game mechanics, balance only) Awaiting BLT Approval Approval needed from the balance team labels Oct 20, 2024
scripts/Units/armguard.bos Outdated Show resolved Hide resolved
scripts/Units/armguard.bos Outdated Show resolved Hide resolved
call-script aimCommon(heading, pitch);

// Prevent high-trajectory "bonus shots" while high-trajectory is reloading
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this supposed to be

Suggested change
// Prevent high-trajectory "bonus shots" while high-trajectory is reloading
// Prevent low-trajectory "bonus shots" while high-trajectory is reloading

}

aimCommon(heading, pitch)
{
turn turret to y-axis heading speed <30.000000>;
turn turret to y-axis heading speed <45.000000>;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be a balance change?

return (0);
}
aimingState = 1;
start-script resetState();
if (aimingState > aimingState_aimingLow){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doing math on enum values is a code smell. Those numbers are arbitrary ID numbers, not any quantitative value.

if (aimingState != 2){
resetHighFrame = frame + delayFrames;
if (aimingState != aimingState_aimingHigh){
resetHighFrame = frame + (delayFrames * aimingState);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doing math on enum values is a code smell. Those numbers are arbitrary ID numbers, not any quantitative value.

@SethDGamre SethDGamre force-pushed the smart-high/low-select-exhibition branch from a5e6a7e to abd4295 Compare November 2, 2024 02:36
@nevniv
Copy link
Contributor

nevniv commented Nov 2, 2024

Did I do something wrong, or did you xD I can't pull it down

image

@SethDGamre
Copy link
Collaborator Author

Conflicts? Uhhh... Didn't know there were any

@WatchTheFort
Copy link
Member

@SethDGamre What is the status of this? I still see the debugging code is present.

@SethDGamre
Copy link
Collaborator Author

Waiting on play testing from The balancing team to get their impressions before polishing.

now we don't get random aimstate changes for grids of smartselect turrets. errorstate now works correctly so it switches modes faster.
@WatchTheFort
Copy link
Member

Can you split out the gadgets.lua fixes to a separate PR?

@SethDGamre
Copy link
Collaborator Author

Can you split out the gadgets.lua fixes to a separate PR?

Yes. Absolutely.

I think I'm gonna chop this up into three PR's. Need it all together while I'm testing.

@WatchTheFort WatchTheFort added Awaiting BLT Approval Approval needed from the balance team and removed Awaiting BLT Approval Approval needed from the balance team labels Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved Approved for implementation by the Game Design Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants