-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
SubnauticaRandomiser/SubnauticaRandomiser/Logic/Recipes/ModeBalanced.cs
Lines 96 to 106 in c682a62
| private (LogicEntity ingredient, int number) ChooseSecondaryIngredient(LogicEntity entity, int currentValue) | |
| { | |
| LogicEntity ingredient = GetRandom(_validIngredients); | |
| // What's the maximum number of this ingredient the recipe can still sustain? | |
| int max = FindMaximum(ingredient, entity.Value, currentValue); | |
| // Figure out how many to actually use. | |
| int number = _random.Next(1, max + 1, _distribution); | |
| return (ingredient, number); | |
| } |
Secondary ingredient selection does not consider remaining free value in the recipe before rolling an item, so it may pick a highly overvalued one and overshoot the recipe value by jarringly large amounts.
I have a customized recipe data file with AirBladder at value 20, AcidMushroom at 10, AdvancedWiringKit at 250.
[Debug :Subnautica Randomiser] [R] Figuring out ingredients for AirBladder
[Debug :Subnautica Randomiser] Calc max: 5
[Debug :Subnautica Randomiser] [R] > Adding ingredient: AcidMushroom, 1, size: 1
[Debug :Subnautica Randomiser] [R] > Adding primary ingredient AcidMushroom
[Debug :Subnautica Randomiser] Calc max: 5
[Debug :Subnautica Randomiser] [R] > Adding ingredient: AdvancedWiringKit, 1, size: 2
[Debug :Subnautica Randomiser] [R] > Recipe is now valued 270 out of 20
[Debug :Subnautica Randomiser] [R][+] Randomised recipe for [AirBladder].
Metadata
Metadata
Assignees
Labels
No labels