This is probably best illustrated by asking the following question:
"Given I loot a Pass-n-Gas crate, what chance do I have of looting a Ratchet?"
So we start off by looking at the crate.
NOTE: In all these code blocks, a possible path to the ratchet is indicated by -->
<lootcontainer id="90" name="passngasCrate" count="1" size="6,4" sound_open="UseActions/open_cardboard" sound_close="UseActions/close_cardboard" loot_quality_template="qualBaseTemplate">
<item group="groupPassNGas"/>
</lootcontainer>
Pretty simple - only one group.
Now let's look at groupPassNGas
Only one route to the ratchet, via groupPassNGas03, with a prob_template of med (50%):
<lootgroup name="groupPassNGas" count="all">
<item group="groupPassNGas01" count="1"/>
<item group="groupPassNGas02" count="1"/>
--> <item group="groupPassNGas03" loot_prob_template="med" force_prob="true"/>
</lootgroup>
Again, only one path to the ratchet, with a prob_template of veryLow (5%)
<lootgroup name="groupPassNGas03">
<item group="vehiclePartsTiered" loot_prob_template="medLow"/>
<item group="vehicleModSchematics" loot_prob_template="medLow"/>
--> <item group="groupRareToolsTiered" loot_prob_template="veryLow"/>
<item group="schematicsToolsRare" loot_prob_template="veryLow"/>
</lootgroup>
Now things get interesting - two routes to the ratchet, one via groupToolsTiered (no prob specified) and one via groupToolsT2 (prob_template of ProbT2, which is level dependant - 0% under level 80, then climbing from 4% at level 80+)
<lootgroup name="groupRareToolsTiered" count="1">
--> <item group="groupToolsTiered"/>
--> <item group="groupToolsT2" loot_prob_template="ProbT2"/>
<item group="groupToolsT3" loot_prob_template="ProbT3"/>
</lootgroup>
Route #1: groupToolsTiered
This has other tiers involved, and one of them is via route #2 (groupToolsT2)
<lootgroup name="groupToolsTiered" count="1">
<!-- <item group="groupToolsT0" loot_prob_template="ProbT0"/> -->
<item group="groupToolsT1" loot_prob_template="ProbT0"/>
<item group="toolParts" loot_prob_template="ProbT1"/>
--> <item group="groupToolsT2" loot_prob_template="ProbT2"/>
<item group="groupToolsT3" loot_prob_template="ProbT3"/>
</lootgroup>
Route #2: groupToolsT2
This is what actually holds the ratchet
<lootgroup name="groupToolsT2" loot_quality_template="QLTemplateT2">
<item name="meleeToolShovelT2SteelShovel"/>
<item name="meleeToolPickT2SteelPickaxe"/>
<item name="meleeToolAxeT2SteelAxe"/>
<item name="meleeWpnSledgeT3SteelSledgehammer" loot_prob_template="medLow"/>
--> <item name="meleeToolSalvageT2Ratchet"/>
</lootgroup>
=============================================================================================
OK, so that's the whole path, so on to the questions:
1) What is force_prob?
No idea on this one
2) How does it walk through the tree of probabilities, and especially, how come there are multiple probabilities of the same value in the same list?
My initial thought was that it walked through in reverse order of the list, but that idea is kind of shot down in flames I think by some lists which are in the other order, and include other weirdness such as this:
<lootgroup name="groupBuriedWeaponChest">
<item group="groupWeaponsAllScaled" prob="2"/>
<item group="groupArmorScaled" prob="1"/>
<item group="groupModAllScaled" prob="1"/>
<item group="schematicsModsAndGeneralCommon" loot_prob_template="high"/>
<item group="schematicsModsAndGeneralRare" loot_prob_template="low"/>
</lootgroup>
Really not sure WTF is going on here - how can anything have a probability of 200%? Whatever though, 3 items in this list all have a probability of >= 100% so this is very confusing.
Another theory was that multiple items are going to be selected from that list, and each item can only be chosen once, however...
<lootcontainer id="122" name="buriedSuppliesT2" count="2,3" size="8,9" sound_open="UseActions/open_chest" sound_close="UseActions/close_chest" loot_quality_template="qualBaseTemplate">
<item group="groupBuriedWeaponChest"/>
</lootcontainer>
Count of 2-3, so on first roll, weapons would be picked (As prob of 2), then on rolls 2-3 armor or mod would be picked (both have prob of 1) - so schematics could never be picked? Or maybe there is a buff that lets you get extra items, so only if you have a buff and get 4+ items could you ever get schematics? But that still leaves the question of, if you get 2 items, which of the prob1 items would you get?
Whatever, if someone can help me work out what steps the game takes when parsing the loot tables, I would appreciate it
"Given I loot a Pass-n-Gas crate, what chance do I have of looting a Ratchet?"
So we start off by looking at the crate.
NOTE: In all these code blocks, a possible path to the ratchet is indicated by -->
<lootcontainer id="90" name="passngasCrate" count="1" size="6,4" sound_open="UseActions/open_cardboard" sound_close="UseActions/close_cardboard" loot_quality_template="qualBaseTemplate">
<item group="groupPassNGas"/>
</lootcontainer>
Pretty simple - only one group.
Now let's look at groupPassNGas
Only one route to the ratchet, via groupPassNGas03, with a prob_template of med (50%):
<lootgroup name="groupPassNGas" count="all">
<item group="groupPassNGas01" count="1"/>
<item group="groupPassNGas02" count="1"/>
--> <item group="groupPassNGas03" loot_prob_template="med" force_prob="true"/>
</lootgroup>
Again, only one path to the ratchet, with a prob_template of veryLow (5%)
<lootgroup name="groupPassNGas03">
<item group="vehiclePartsTiered" loot_prob_template="medLow"/>
<item group="vehicleModSchematics" loot_prob_template="medLow"/>
--> <item group="groupRareToolsTiered" loot_prob_template="veryLow"/>
<item group="schematicsToolsRare" loot_prob_template="veryLow"/>
</lootgroup>
Now things get interesting - two routes to the ratchet, one via groupToolsTiered (no prob specified) and one via groupToolsT2 (prob_template of ProbT2, which is level dependant - 0% under level 80, then climbing from 4% at level 80+)
<lootgroup name="groupRareToolsTiered" count="1">
--> <item group="groupToolsTiered"/>
--> <item group="groupToolsT2" loot_prob_template="ProbT2"/>
<item group="groupToolsT3" loot_prob_template="ProbT3"/>
</lootgroup>
Route #1: groupToolsTiered
This has other tiers involved, and one of them is via route #2 (groupToolsT2)
<lootgroup name="groupToolsTiered" count="1">
<!-- <item group="groupToolsT0" loot_prob_template="ProbT0"/> -->
<item group="groupToolsT1" loot_prob_template="ProbT0"/>
<item group="toolParts" loot_prob_template="ProbT1"/>
--> <item group="groupToolsT2" loot_prob_template="ProbT2"/>
<item group="groupToolsT3" loot_prob_template="ProbT3"/>
</lootgroup>
Route #2: groupToolsT2
This is what actually holds the ratchet
<lootgroup name="groupToolsT2" loot_quality_template="QLTemplateT2">
<item name="meleeToolShovelT2SteelShovel"/>
<item name="meleeToolPickT2SteelPickaxe"/>
<item name="meleeToolAxeT2SteelAxe"/>
<item name="meleeWpnSledgeT3SteelSledgehammer" loot_prob_template="medLow"/>
--> <item name="meleeToolSalvageT2Ratchet"/>
</lootgroup>
=============================================================================================
OK, so that's the whole path, so on to the questions:
1) What is force_prob?
No idea on this one
2) How does it walk through the tree of probabilities, and especially, how come there are multiple probabilities of the same value in the same list?
My initial thought was that it walked through in reverse order of the list, but that idea is kind of shot down in flames I think by some lists which are in the other order, and include other weirdness such as this:
<lootgroup name="groupBuriedWeaponChest">
<item group="groupWeaponsAllScaled" prob="2"/>
<item group="groupArmorScaled" prob="1"/>
<item group="groupModAllScaled" prob="1"/>
<item group="schematicsModsAndGeneralCommon" loot_prob_template="high"/>
<item group="schematicsModsAndGeneralRare" loot_prob_template="low"/>
</lootgroup>
Really not sure WTF is going on here - how can anything have a probability of 200%? Whatever though, 3 items in this list all have a probability of >= 100% so this is very confusing.
Another theory was that multiple items are going to be selected from that list, and each item can only be chosen once, however...
<lootcontainer id="122" name="buriedSuppliesT2" count="2,3" size="8,9" sound_open="UseActions/open_chest" sound_close="UseActions/close_chest" loot_quality_template="qualBaseTemplate">
<item group="groupBuriedWeaponChest"/>
</lootcontainer>
Count of 2-3, so on first roll, weapons would be picked (As prob of 2), then on rolls 2-3 armor or mod would be picked (both have prob of 1) - so schematics could never be picked? Or maybe there is a buff that lets you get extra items, so only if you have a buff and get 4+ items could you ever get schematics? But that still leaves the question of, if you get 2 items, which of the prob1 items would you get?
Whatever, if someone can help me work out what steps the game takes when parsing the loot tables, I would appreciate it