- Put weapons offline for sqrt(number)*seconds after one block got destroyed or the stats changed sqrt(number-stat points)*seconds.
You won't make a single big gun for close-combat / brute-force ships
Weapon-CPU table:
- Base-Value | Potential (everything assigned to it) | Current-Value | Points
Available number of stat points = number-blocks /(stat1-points+1) /(stat2-points+1) /... for everything with stat-points >0
Extra-stat-points = sqrt(stat1.minusPoints) + sqrt(stat2.minusPoints) - allow unique weapons which are repurposed.
If the number assigned points exceeds the number available + Extra-stat-points, reset the configuration. Add a save/load for configurations (per weapon cpu).
Free points count toward the already biggest stat and backup the configuration for the case you build on the array or some parts get destroyed.
Stats are: powerEfficiency(between 0, 100% and infinite), damagePerShot, reload, dps, ...
Calculations
- base-value * (plusPoints+1) /(minusPoints+1) for linear functions (like damage)
For area, use square root on the result.
[*]base-value / (1+percentage) for decreasing the base-value and 1- (1-base-value) / (1+percentage) for increasing on somehting like "armourPenetration (0-100)" (if a similar stat exist) and other stats with lower/upper limit.
The values are tied to another by number available points.
With 6 points, you can do 2*3 or 1*6 on two stats (reload and damage for example)