Would someone please explain to me how drop groups etc work - because I appear to be doing something very, very wrong with mine.

Referencing the attached image. By the presence of Ore I know that this particular "First Find" has included the following drop group:
heavy_machinery,wta_ruins_mining1,10
metals,wta_ruins_mining1,40
ore,wta_ruins_mining1,30
supplies,wta_ruins_mining1,20
According to the Wiki: "An example of "dropValue" might be "drop 10,000 credits worth of fuel, supplies, metals, and heavy machinery". The actual value will be within 50% of the target amount." In the following code:
// does it have at least moderate stuff to mine?
if (getOre() > 1) {
d = new DropData();
d.chances = colonySize;
d.group = "wta_ruins_mining1";
d.value = 2000 * ruinsSize;
d.valueMult = multEnhanced;
dropValue.add(d);
}
colonySize = 3 (just founded)
ruinsSize = 1 (scattered ruins)
multEnhanced = 1.25 (first drop + Alpha AI Core)
The above code has:
* Chosen the Ore (30% chance) as one of the choices
* 2000cr * 1 (ruinsSize) = 2000cr --- I will assume the worst case, under that by 50%, or only 1000cr of Ore
* 1000cr * 1.25 = 1250cr worth of ore
* 1250cr / 10 cr (Ore cost) = 125 ore
So the 10 Ore in my screenshot is approximately 8% of the Ore which I was expecting to have been returned as a minimum.
It gets worse, there are 2x more drop groups which would have been added (metals, supplies, heavy machinery, fuel). One of those should have had 3 choices at 3000cr value, and the second should have had 9 more choices at 3000cr. The returned 4x fuel (ie 1000 / 25 = 40) are nowhere near what I'm thinking should have been returned.
Please help me figure out what it is that I've messed up so badly.
--edit--
Okay, figured it out. I'm a damn idiot.
The value is the total pie, divided by the number of choices. Each choice then becomes (totalvalue / choices) amount of X chosen item from the drop group.
So to have it work like I was thinking, I will need to multiply the pie-size by the number of choices first. In this case, the colony size.
--edit-edit--
Or if I want to be more "realistic", it could be: 3000 * ruinsSize * ruinsSize * colonySize
Though it might be somewhat overboard for Vast Ruins on a size 6 Colony.
[attachment deleted by admin]