fa icon indicating copy to clipboard operation
fa copied to clipboard

Create capture cost reticle

Open lL1l1 opened this issue 1 year ago • 5 comments

A capture cost reticle that displays the energy cost, energy rate, and time for the current selection's total buildrate when mousing over non-allied, capturable units. 38

Improvements: Would be nice to be able to directly check if a unit is capturable or if it has a capture rate modifier. Code-wise, not sure why the teleport reticle was attached to the command mode data, but capture isn't always called with a command mode active (mousing over enemy units tries to capture them) so I can't do that anyway.

lL1l1 avatar Mar 02 '24 08:03 lL1l1

How difficult would it be to include capturability in the rollover info?


SetCaptureTimeMultiplier Multiplies the time it takes to capture a unit, defaults to 1.0. Often used by campaign events.

Isn't this incorrect? It seems like it multiplies the capture time of a unit capturing others, not the capture time of a unit being captured. https://github.com/FAForever/fa/blob/d38a6fa6127e34a571b424f7cae431c633112056/lua/sim/Unit.lua#L3979-L3981 To "multiply the time it takes to capture a unit" it would have to be time = time * (target.CaptureTimeMultiplier or 1).

lL1l1 avatar Mar 03 '24 04:03 lL1l1

How difficult would it be to include capturability in the rollover info?

I'm not certain, we'd need to ask @Hdt80bro or @4z0t about that 😃

Isn't this incorrect? It seems like it multiplies the capture time of a unit capturing others, not the capture time of a unit being captured.

It applies to the engineer that is capturing yes, that would be my mistake in the comment.

Garanas avatar Mar 03 '24 10:03 Garanas

What would be the best way to update the selection when it changes? The selection could change by certain UI actions or more commonly by units dying.

lL1l1 avatar Mar 20 '24 05:03 lL1l1

Does it update the reticle to the new total leftover time remaining when you add additional build power later on onto the capture target?

arch625 avatar Apr 19 '24 07:04 arch625

Does it update the reticle to the new total leftover time remaining when you add additional build power later on onto the capture target?

It doesn't. I looked into it since it's a good idea, but there's no way UI-side to get info about what units are currently capturing an enemy/neutral unit or the capture progress on that unit.

lL1l1 avatar Apr 21 '24 03:04 lL1l1