Closed SethDGamre closed 1 month ago
What does TPW mean? Avoid use of acronyms and abbreviations as they are unclear to other developers.
All the TPW functions are declared as globals, they should be locals and declared before they are called. Any API functionality to be exposed should be added to the
GG
table.
I did as you asked, and will be putting them in a sub-table of global GG. functions like discussed in discord Thanks
Power calculations only update on unit created and destroyed, what happens when a unit is captured? Do you actually want to use MetaUnitAdded
and MetaUnitRemoved
?
Power calculations only update on unit created and destroyed, what happens when a unit is captured? Do you actually want to use
MetaUnitAdded
andMetaUnitRemoved
?
I don't see a callin for this on recoil or spring website. I can't concieve of this oversight causing nil errors and a few units leaking here or there isn't a big worry of mine. I DO want to find and impliment a more accurate solution that handles these edgecases though.
I don't see a callin for this on recoil or spring website. I can't concieve of this oversight causing nil errors and a few units leaking here or there isn't a big worry of mine. I DO want to find and impliment a more accurate solution that handles these edgecases though.
Those callins are custom ones implemented within BAR Lua, with the goal of covering all situations with a single callin.
I don't see a callin for this on recoil or spring website. I can't concieve of this oversight causing nil errors and a few units leaking here or there isn't a big worry of mine. I DO want to find and impliment a more accurate solution that handles these edgecases though.
Those callins are custom ones implemented within BAR Lua, with the goal of covering all situations with a single callin.
Donezo
Comments should be formatted to have a space after the
--
Whenever calculating an average, ensure divide-by-zero errors are prevented.
This is done
Wrong button, didn't mean to close
This gadget aims to compile all team power-related tracking in a single gadget to prevent the necessity for redundant power-related tracking. It also provides an array of global functions to be used by other gadgets.
The purpose of power-related calculations is to provide a framework to approximate metrics such as tech progression, relative power levels between teams, campaign event triggering and PvE dynamic difficulty adjustment, and eventually to replace the redundant function that inspired this from unit_evolution.lua
I went through and tested every function. They all work (with admittedly less rigorous testing on the human-specific functions because I'm but one human)