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

No way for Reaper HUD to visualize abilities that will always reveal the Reaper #1315

Open
Iridar opened this issue Mar 3, 2024 · 5 comments · May be fixed by #1450
Open

No way for Reaper HUD to visualize abilities that will always reveal the Reaper #1315

Iridar opened this issue Mar 3, 2024 · 5 comments · May be fixed by #1450
Assignees
Milestone

Comments

@Iridar
Copy link
Contributor

Iridar commented Mar 3, 2024

UITacticalHUD::UpdateReaperHUD will cap out the per-shot concealment loss at class'X2AbilityTemplateManager'.default.SuperConcealShotMax, which is 80% by default, when targeting non-objective targets.

Existing overrides don't provide enough functionality to bypass this logic.

Existing abilities that always break concealment, like Banish, just visualize as if they keep concealment, and rely on textual description to relay their mechanics.

@Iridar Iridar added this to the 1.28.0 milestone Mar 3, 2024
@Iridar Iridar modified the milestones: 1.28.0, 1.29.0 May 1, 2024
@Iridar Iridar modified the milestones: 1.29.0, 1.30.0 Dec 2, 2024
@BlackDog86
Copy link
Contributor

BlackDog86 commented Jan 6, 2025

The banish ability is a bit strange, in that it doesn't use the normal rules for super-concealment loss. The Concealment rule set on the ability template is eConceal_Always, then it fires off an event after every additional shot which is listened to by SoulReaperListener & this manually triggers SourceUnit.BreakConcealment at the end of the ability, if the reaper doesn't continue shooting stuff.

The main 'trigger', if you like, of the Reaper Shot HUD being displayed and used is related to the SelectedAbilityState.MayBreakConcealmentOnActivation(CurrentTargetID) check in UpdateReaperHUD but basically this function checks various aspects of the ability template for the concealment rules and returns true for stuff like 'shots with vektor rifle' and false for non-hostile stuff or where it's explicitly defined on the template as alwaysconceal. Basically banish is short-circuiting that part of the HUD at the moment, so the correction for it should probably be to adjust some bits on the ability template if possible. I guess the desired output is the shot hud displays 100% chance to reveal, then when you activate the ability, it breaks your concealment, de-activates the reaper HUD and then shoots whoever N times? I'll have a play around and see if I can come up with something a little more visually satisfying.

@BlackDog86 BlackDog86 self-assigned this Jan 6, 2025
@BlackDog86
Copy link
Contributor

This is an example of the art of the possible:
https://github.com/user-attachments/assets/a616a850-2b2e-4e4b-9e1f-7d823192383f
I added a check for ActivatedAbilityState.GetMyTemplate().ConcealmentRule != eConceal_Never to both XCGS_Unit::OnAbilityActivated and UITacticalHUD::UpdateReaperHUD, along with setting SuperConcealedModifier to 100 if eConceal_Never is set on the ability template, then changed the banish concealment rule from eConceal_Always to eConceal_Never and commented out the bit of the eventlistener which breaks concealment after the ability fires.

The visualisation isn't awful but I'd hesistate to say whether it's better than the base game. Still, a fix similar to this could be used to allow the Reaper HUD to still be used, rolled against etc. in a straightforward way - all that would be required would be setting eConceal_Never on the ability template and it should basically work.

Happy to submit a draft PR but I still think the implementation needs a bit of work.

@BlackDog86 BlackDog86 linked a pull request Jan 6, 2025 that will close this issue
@Iridar
Copy link
Contributor Author

Iridar commented Jan 6, 2025

Yeah Banish isn't the best example since it uses special logic to break concealment, but the problem is that there's basically nothing you can do to make the UI display 100% to reveal with currently available tools.

@Tedster59
Copy link
Contributor

are we not able to add a hook to allow mods to override/update the reveal chance?

@Iridar
Copy link
Contributor Author

Iridar commented Jan 6, 2025

We probably could, I'm just pointing out it hasn't been done yet.

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

Successfully merging a pull request may close this issue.

3 participants