Quantcast
Channel: FreeOrion
Viewing all articles
Browse latest Browse all 251

Scripting & Balancing • help with implementing ARC SYPHONs

$
0
0
i did a mostly-working implementation for arc concentration (see forum post) in PR-4951


SR_ARC_SYPHON.focs.txt

ok, i have a timing problem and at the moment i am not sure i can solve it.

what the code does, is; the SR_ARC_SYPHON part does three effects after another
  • for each ship arc disruptor in the fleet add the number of shots to the capacity of a special
  • the capacity gets distributed between all ships with arc syphon parts
  • all disruptors in the fleet get shots set down to zero (if the special capacity is greater zero)
at the moment the shots oscillate from the arc disruptors to the arc syphons and back again, this is working okayishly, but i think it results in some unnecessary micromanagement.

i thought running the effects late, using the current value of the shots ( by using Value(ShipPartMeter SR_ARC_DISRUPTOR SecondaryStat) ) at TARGET_LAST_BEFORE_OVERRIDE_PRIORITY would fix the oscillation, but it does not.

the arc disruptor shots should be set zero every turn, so the initial meter value should always be zero.
i expected the current meter value of the arc disruptors to be "recharged" by TARGET_LAST_BEFORE_OVERRIDE_PRIORITY.

...maybe weapon meters do not recreated each turn?...

...still need to figure out at which priority the meters are set to max meters..

help, review and ideas appreciated

Statistics: Posted by Ophiuchus — Tue May 28, 2024 12:34 pm



Viewing all articles
Browse latest Browse all 251

Trending Articles