-
Notifications
You must be signed in to change notification settings - Fork 235
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
Create capture cost reticle #5948
Create capture cost reticle #5948
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really exciting 😃 !
How difficult would it be to include capturability in the rollover info?
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. Lines 3979 to 3981 in d38a6fa
To "multiply the time it takes to capture a unit" it would have to be time = time * (target.CaptureTimeMultiplier or 1) .
|
I'm not certain, we'd need to ask @Hdt80bro or @4z0t about that 😃
It applies to the engineer that is capturing yes, that would be my mistake in the comment. |
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. |
also separate data init from SetLayout
e.g. UEF Civilian truck
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. |
This reverts commit 3714906.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Such a good improvement, apologies that it took this long to review. Looking at this it may also be interesting to have similar reticle's for the reclaim duration when in reclaim mode and for the total damage per second when in attack mode.
I considered a reclaim cursor (it could be immediately useful analytical info) but an implementation would be incomplete:
makeInvincible = function(unit)
unit:SetDoNotTarget(true)
unit:SetCanBeKilled(false)
unit:SetCapturable(false)
unit:SetReclaimable(false)
unit:SetDoNotTarget(true)
unit:SetMaxHealth(1)
unit:SetHealth(nil,1)
unit:SetRegenRate(1)
end
makelowmass = function(unit)
unit:GetBlueprint().Wreckage.MassMult=0.05
end I tried making a reclaim cursor with just blueprint values but it doesn't update when the Sim modifies the blueprint like this, and A DPS cursor seems more appropriate for a UI mod because it's not very useful information and doesn't require any Sim code. |
Ah, you're right - these are valid issues. Especially when the (map) script adjusts the values then all bets are off. |
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.
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.