Taking a Vagabond BP as an example I can’t figure out how the above function calculates the composite materials needed.
For quantity of 1 it spits out Ferrogel quantity in components of 200 but in reality for a 0/0 Vagabond blueprint without any structure bonuses it should be:
Am I missing something here? Is someone able to reproduce it or has a solution how to properly calculate the composite materials needed for T2 production?
The recursion makes the explosion a tricky function, I can add a note to debug this specific flow but it’s a messy process, helps to know which material its messing up though.
I mostly tested it on T2 battleships, and got it close enough, but sadly something is going haywire.
Since it’s a 0/0 calculation the gain of spending effort on it is kinda low, but I’d ofc want it to be working. I’ll see if I can get some time to look at this specific instane.
I noticed it mostly on Ferrogel. Here is an example for Vagabond output
Ferrogel is needed for Deflection Shield Emitter and Plasma Thruster. In my case for 10 Vagas I need 4098 Deflection Shield Emitter and 683 Plasma Thruster.
I use Blueprint Explosion on an entire array of needed adv. components. The function spits out 4479 Ferrogel with 19 excess material.
Correct value would be 4781 (4098 + 683) as the game seem to apply the quantity bonuses to the quantity of 1 of the output product.
Strangely if I feed the explosion function the components individually then the output is correct.