-
Notifications
You must be signed in to change notification settings - Fork 243
Implement adjustable shield assist cost #6937
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
base: develop
Are you sure you want to change the base?
Conversation
This reverts commit 39ce22e.
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.
I like the idea of it. I'm not a huge fan of the amount of code that requires it to implement it. In particular, the complexity that is introduced to UpdateConsumptionValues
which was already a difficult function to reason about before these additions.
This makes adjacency and the positive number restriction apply to shield assist consumption.
This is already covered by the regen thread consumption updates. I tested both power stalling and manual re-enabling.
I found an engine bug that you can repair shield HP of disabled shields if you trigger the repair by repairing the unit HP, but I didn't remove the cost logic (in |
I refactored it to try to make it easier to reason about the function by putting the condition branches in order of increasing complexity. |
I assume the usage format of the blueprint values is ok, so I marked the PR as ready for review. |
It was accidentally removed since previously time,energy,mass was always set and then multiplied by the repair ratio afterwards if the conditional was met.
Issue
Cybran shields have terrible buildtime stats due to previously high shield assist costs, as written in #2703.
UEF T3 shields cost significantly more than other shields to assist. This is just a problem with
RegenAssistMult
never being touched, alongside the faction having poor shield stats.Current assist cost stats:
Buildtime stats:
Description of the proposed changes
Implements new shield blueprint fields that make it easier/possible to balance shield assist.
RegenPerBuildRate
: Makes it easier to think aboutRegenAssistMult
by disconnecting the desired balance effect from the regen rate of the shield.AssistCostEnergyPerBuildRate
andAssistCostMassPerBuildRate
: Makes it possible to balance shield assist cost by disconnecting the assist cost from the shield unit's cost stats.I am interested in thoughts on how user-friendly (UI information display and game intuition), how developer-friendly, and how performant the implementation is.
Testing done on the proposed changes
I read the decompilation that mentions the string
"RegenRate"
, which is around where theRegenAssistMult
is used (.text:005F602E).Re-apply the commit with the Aeon T2 shield.
Spawn in the test units:
Damage the shield by groundfiring with the SACU and assist the shield with the T1 engineer. It should repair 50 HP per tick and consume 50m/s and 50e/s, which matches up with the test stats.
Let the shield regen to full, then reclaim the shield with an SACU to damage the unit's HP and see that the engineer consumes an additional 1.89 mass/s and 22.7 energy/s.
Damage the shield, assist, and then reclaim the unit. The engi should update its consumption correctly after the unit is damaged (50% of both the assist and repair costs). This is also an opportunity to see the engine behavior of the repair effects being split evenly when both the shield and unit are damaged: the 50 HP per tick regen will go down to 25 HP per tick after the unit is damaged.
Reclaim the unit, assist, and then damage the shield. The engi should again update the consumption correctly.
Checklist