So Glowcaps have got radium, phosphorus and nutriment in them with radium being 10% of potency as well with phosphorus having 10% of 100 with nutriment having 4%.
If it’s at 100 potency, I should be getting 24 reagents, right?
For some reason, this is not working in game and it instead gave me 27 reagents
I modified the yield and harvest variable, but that’s it, it shouldn’t be doing this, but why is it?
It looks like the reagent amounts are being rounded up. No idea why, might be a hidden bonus to potency or something?
could it have anything to do with the fungal metabolism trait
But it’s MORE than it’s supposed to be, by SEVERAL units, so if it’s rounded up or down it’s still too much or too little.
I don’t know. It always puts yield to 1 and eliminates the need for water, so I don’t see how it would.
Welcome to the game full of glorious bugs from 2015 that everyone just got used to and never bothered fixing.
First of all, the “percentage” that a plant trait mentions is not a percentage at all it is in fact just straight up converted to units using simple math that multiplies the number by 100, second of all, it adds +1u to every trait up to the cap, and everything that exceeds 100u gets cut off.
Example: (Just making these up, none of these genes actually exist ingame)
God bless shitcode.
This bit can be tested by using Omega Cannabis, which has a container size of 420u, a 10% trait should then reasonably result in 42u, but it doesn’t, it is still 11u.
I know that, I meant it’s the percentage of the potency, not the percentage of the total reagents inside of it.
You said something about traits adding units? Could you please explain more of that?
The code logic just assumes all plants are 100u, which is close to the truth since only a single plant is actually over 100u.
The actual math, for the plant in your example, looks as follows:
radium/phosphorus: (0.1 x 96) + 1 = 10.6
nutriment: (0.04 x 96) + 1 = 4.84
The actual amounts you have are 10.6u and 4.84u, but the plant analyzer will round the displayed values up, if you throw the plant in a grinder and check the exact amounts with goggles, you would see it is in fact 10.6 + 10.6 + 4.84 units of reagents.
The only actual error in the logic is the +1 which stems from some apparent oversight in the code.
What +1? In the example you gave me it adds up to what’s in the screenshot if rounded up.
This math here is the reagent trait (0.1), times the potency (96), plus 1.
The plus 1 is inexplicably there somewhere in the code for no real reason and is the answer to why a 10% trait provides 11u instead of 10u in a 100 potency plant.