-
Notifications
You must be signed in to change notification settings - Fork 291
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
Force generator math updates #6244
Force generator math updates #6244
Conversation
…aling with searching multiple parent factions to avoid messy truncated integers.
…g total model weight which includes +/- dynamic adjustment and role-based adjustment.
…r offsets pre-production models and initial production limits
…tter interpolation processing
…doubles instead of in, due to 2^(n/2) generating non-integers on odd values of n
…ication of salvage percentage to conventional math.
…or re-balancing Omni-unit proportions.
…due to complexity of managing multiple factors, including salvage.
…otential conflicting data as well as results that are out of line with provided data.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6244 +/- ##
============================================
- Coverage 28.99% 28.97% -0.03%
- Complexity 13982 13983 +1
============================================
Files 2652 2652
Lines 268296 268509 +213
Branches 47764 47828 +64
============================================
+ Hits 77799 77802 +3
- Misses 186615 186824 +209
- Partials 3882 3883 +1 ☔ View full report in Codecov by Sentry. |
@@ -146,6 +147,21 @@ public boolean isClan() { | |||
return clan; | |||
} | |||
|
|||
/** | |||
* @return true, if unit is base IS tech and mounts Clan tech equipment | |||
*/ |
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.
Are base Clan units with IS equipment not covered by this?
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.
There are comparatively few Clan units with IS tech, and with far lower impact, so it doesn't cover those. This is primarily to hit the early Clan/Clan Invasion refits of classis IS designs with Clan-tech weapons like the Shadow Hawk C, Rifleman C, Warhammer C, and so on.
Maybe change the method name to isMixedISTech, just to be explicit?
// class are the same for all models although a few outliers exist, so | ||
// just look for the first. | ||
if (weightClasses != null && !weightClasses.isEmpty()) { | ||
boolean validChassis = Arrays.stream(curChassis.getModels(). |
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.
Is it necessary to perform this array wrap? It feels like this should work without it.
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.
Indeed it does - now updated
This updates the calculations that convert the XML availability data into a weighted random selection table. Some of it is fine tuning, like ensuring the introduction year adjustments are working as intended, plus readability improvements. The biggest changes:
There's a few outstanding issues I've identified as requiring improvement but deferring to a later PR: