Add test to make sure all random weighted tables add to base 10 - #5612
Add test to make sure all random weighted tables add to base 10#5612Mackamuir wants to merge 4 commits into
Conversation
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (24)
🚧 Files skipped from review as they are similar to previous changes (24)
📝 WalkthroughSummaryAdds Rescales approximately 50 prototype tables to integer weights while preserving their relative probabilities. Changes cover reactor parts, drinks, reagents, salvage, objectives, threats, species, ores, triggers, and loot tables. User impactGameplay probability distributions remain equivalent or closely preserved. The new validation prevents invalid weighted tables from entering the game. Risk areas
Guideline gaps
WalkthroughThis change converts weighted-random prototype values to integer scales, adds Starlight boundary markers, rebalances selected distributions, and adds integration tests for normalized totals and valid individual weights. ChangesWeighted prototype normalization
Estimated code review effort: 3 (Moderate) | ~25 minutes Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Honestly I knew this was going to have merge conflicts and this will probably cause merge conflicts for the rest of time |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@Resources/Prototypes/_Starlight/Procedural/bluespace_harvester_pools.yml`:
- Around line 3-27: Recalculate the weights while preserving each table’s
intended distribution so the totals match a power of ten: in
Resources/Prototypes/_Starlight/Procedural/bluespace_harvester_pools.yml lines
3-27, make BluespaceHarvesterExoticHatTable total 10000; in
Resources/Prototypes/Objectives/objectiveGroups.yml lines 15-58, make
TraitorObjectiveGroupSteal total 1000; and in
Resources/Prototypes/_Starlight/Objectives/objectiveGroups.yml lines 61-78, make
VampireObjectiveGroupSteal total a power of ten.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: f70180e1-0093-430e-ba89-258d8be67a7f
📒 Files selected for processing (24)
Content.IntegrationTests/Tests/_Starlight/WeightedRandomPrototypeTest.csResources/Prototypes/Anomaly/behaviours.ymlResources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_fun.ymlResources/Prototypes/Entities/Objects/Misc/spaceshroom.ymlResources/Prototypes/Entities/Objects/Specific/Janitorial/janitor.ymlResources/Prototypes/Entities/Structures/Machines/Computers/techdiskterminal.ymlResources/Prototypes/Entities/Structures/Machines/salvage.ymlResources/Prototypes/GameRules/meteorswarms.ymlResources/Prototypes/GameRules/variation.ymlResources/Prototypes/Hydroponics/randomChemicals.ymlResources/Prototypes/Objectives/objectiveGroups.ymlResources/Prototypes/Procedural/Magnet/asteroid_ore_gens.ymlResources/Prototypes/Procedural/salvage_rewards.ymlResources/Prototypes/Species/species_weights.ymlResources/Prototypes/XenoArch/triggers.ymlResources/Prototypes/_FarHorizons/Entities/Objects/Power/FissionGenerator/reactor_parts.ymlResources/Prototypes/_Goobstation/threats.ymlResources/Prototypes/_Starlight/Entities/Structures/Walls/asteroid.ymlResources/Prototypes/_Starlight/Objectives/objectiveGroups.ymlResources/Prototypes/_Starlight/Procedural/bluespace_harvester_pools.ymlResources/Prototypes/ore.ymlResources/Prototypes/secret_weights.ymlResources/Prototypes/silicon-laws.ymlResources/Prototypes/threats.yml
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
Content + Integration Test ResultsSummary:
Failed Tests:
Github Test Reporter by CTRF 💚 |
|
oh god the secret weights dear lord that's unreadable |
|
yeah uhh I realized how bad of a idea this is (neverending merge conflicts with upstream) uhh cancel this (although if we got it upstream it would be nice) |
Short description
Adds a test to make sure all random weighted tables add to base 10, and also, make all 50 something not compliant tables add to base 10.
Why we need to add this
Walks came up to me and said Law 2: can we get a test that all weightedrandom (and variant) prototypes have a sum total of some power of 10
Most of them I could convert using math, but Resources/Prototypes/_FarHorizons/Entities/Objects/Power/FissionGenerator/reactor_parts.yml and Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_fun.yml had to be massaged a bit to get it to base 10
Checks