[Feature]: Add blueprint fields to adjust shield assistance costs
- Dominant language
- Lua
- Stars
- 264
- Forks
- 260
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 21
Description
## Issue
Currently Cybran ED5 has poor stats to make shield assistance not quickly drain resources. For example the buildtime is around 4.3x higher than it needs to be: #2703
This is because
`Regen = RegenRate * BP / RegenAssistMult`
`Cost/s = BP * BT / (Cost * 0.75 * RegenAssistMult)`
That `Cost` is actually `RepairCost/RegenAssistMult` which is why we can fix it in lua.
https://github.com/FAForever/fa/blob/ba693b0c071ff0afc317661a0cdc3b4f5614935c/lua/sim/Unit.lua#L1158
Changing `RegenAssistMult` changes the cost per second and regen per buildpower simultaneously, so using it is not possible.
## Expected Solution
Add one or multiple blueprint fields that adjust the cost and regeneration in a clear and independent way. The fields would be used during blueprint loading to calculate the `RegenAssistMult` and anything needed for the repair cost formula used for the shield. An example set of fields would be `ShieldMassCostPerHP`, `ShieldEnergyCostPerHP`, and `ShieldBuildTimePerHP`.
A difficulty is that the new calculated repair cost would apply for the repair of a unit's HP and its shield's HP simultaneously, so there would need to be repair cost calculation based on whether the unit, shield, or both are being repaired at the moment, or else repairing a health-damaged shield unit could cost an incredible amount.
Another objective would be populating the shield blueprints with the new values set to whatever they calculate to with the current regen, cost, and `RegenAssistMult` stats.
## Usage
These blueprint values are critical to being able to balance the shield assistance mechanic.
Contributor guide
Assessment
This issue has not been assessed yet.