Jump to content

Need help understanding probabilities in loot.xml


evilC

Recommended Posts

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

Link to comment
Share on other sites

I will try to explain it but I am still new around the edges:

 

First, when you loot the crate, there are 3 lootgroups possible in that crate.  You have a count of "1" on that container so it is saying one pass through the various loot groups.  Then you have the count "All" for groupPassNGas which means that each lootgroup will have an equal chance to spawn an item with the exception of the third loot group.  The first two groups have count  of "1" so you will be getting one pick from those loot groups.  The third one that has the tools in it only has a 50% chance of an item being picked from that group.

 

Lets say you pass that first check.  Now it will spawn an item from one of the groups in groupPassNGas03.  As you noted, there is only a 5% chance of the rareToolsTier group of being picked.  Most likely you are going to get either a vehicle part or schematic if you passed the 50% check prior.

 

Okay so lets say your lucky streak has continued and the game did pick the RareToolsTier group.  Now it has a chance of picking one of the three groups depending on your loot stage.  For the ratchet, you need your loot stage to be at least 102 and less than 235 before you have a chance to get something from the T2 group (3%)  - loot stage of 134 is when you start getting a 50% chance.  If your loot stage and roll doesn't get one of the last two groups, you should be getting the first group.  This is based on A20.0.  They fixed the cap issue now for A20.1 so if you are playing experimental, there is no cap for getting a T2 tool now even if you loot stage goes past 235 (if the probability states ProbT2Cap),

 

If you don't get the T2 or T3 group, you get the groupToolsTier loot group which gives you another chance of getting the ratchet.  However, that group has 4 different loot groups in it with various probabilities depending on your loot stage.  This paragraph and the previous one, we cannot  determine a flat chance rate since it depends on your loot stage when you open the container. 

 

If you got lucky and the game rolls for loot group groupToolsT2, you would have a chance of 23% chance of getting the ratchet (1 / (1 + 1+ 1+ 1 + 0.35)) since there are 5 items in that loot group where 4 has prob of 1 and one has prob of 0.35.  If the game rolls the ratchet as your loot item, then the game uses the QLTemplateT2 to determine what level of quality you are rewarded.

Link to comment
Share on other sites

OK, that's gonna take a while to unpack, and obviously your grasp of statistics is way better than mine ;)

FWIW, in case you are interested, I have some sample code (Thread about it here) that parses the loot tables and builds a navigable tree - at the moment it does not really do anything useful, but at the moment I am just working on making it possible to gather all the data it needs to calculate probabilities.

Link to comment
Share on other sites

@BFT2020 I think I now have the program in a state to try and make the same calculations as you do

 

Here is what it is currently outputting for the above query:

 

Showing probabilities for container passngasCrate
Finding probability for loot level 1...
( --> indicates a valid path through to the item )

3 paths were found

PATH #1:
Container: name=passngasCrate, count=1
--> (Group groupPassNGas) GroupReference: count=<Not Set> >>> PROBABILITY = 1
Group: name=groupPassNGas, count=all
--> (Group groupPassNGas01) GroupReference: count=1 >>> PROBABILITY = 1
    (Group groupPassNGas02) GroupReference: count=1 >>> PROBABILITY = 1
    (Group groupPassNGas03) GroupReference: count=<Not Set>, prob_template=med, force_prob=True >>> PROBABILITY = 0.5
Group: name=groupPassNGas01, count=<Not Set>
--> (Group groupToolsTiered) GroupReference: count=<Not Set>, prob_template=med >>> PROBABILITY = 0.5
    (Group schematicsToolsCommon) GroupReference: count=<Not Set>, prob_template=med >>> PROBABILITY = 0.5
Group: name=groupToolsTiered, count=1
    (Group groupToolsT1) GroupReference: count=<Not Set>, prob_template=ProbT0 >>> PROBABILITY = 0.03
    (Group toolParts) GroupReference: count=<Not Set>, prob_template=ProbT1 >>> PROBABILITY = 0
--> (Group groupToolsT2) GroupReference: count=<Not Set>, prob_template=ProbT2Cap >>> PROBABILITY = 0
PATH ABORTED, NOT POSSIBLE AT LOOT LEVEL 1

PATH #2:
Container: name=passngasCrate, count=1
--> (Group groupPassNGas) GroupReference: count=<Not Set> >>> PROBABILITY = 1
Group: name=groupPassNGas, count=all
    (Group groupPassNGas01) GroupReference: count=1 >>> PROBABILITY = 1
    (Group groupPassNGas02) GroupReference: count=1 >>> PROBABILITY = 1
--> (Group groupPassNGas03) GroupReference: count=<Not Set>, prob_template=med, force_prob=True >>> PROBABILITY = 0.5
Group: name=groupPassNGas03, count=<Not Set>
    (Group vehiclePartsTiered) GroupReference: count=<Not Set>, prob_template=medLow >>> PROBABILITY = 0.35
    (Group vehicleModSchematics) GroupReference: count=<Not Set>, prob_template=medLow >>> PROBABILITY = 0.35
--> (Group groupRareToolsTiered) GroupReference: count=<Not Set>, prob_template=veryLow >>> PROBABILITY = 0.05
    (Group schematicsToolsRare) GroupReference: count=<Not Set>, prob_template=veryLow >>> PROBABILITY = 0.05
Group: name=groupRareToolsTiered, count=1
    (Group groupToolsTiered) GroupReference: count=<Not Set> >>> PROBABILITY = 1
--> (Group groupToolsT2) GroupReference: count=<Not Set>, prob_template=ProbT2 >>> PROBABILITY = 0
PATH ABORTED, NOT POSSIBLE AT LOOT LEVEL 1

PATH #3:
Container: name=passngasCrate, count=1
--> (Group groupPassNGas) GroupReference: count=<Not Set> >>> PROBABILITY = 1
Group: name=groupPassNGas, count=all
    (Group groupPassNGas01) GroupReference: count=1 >>> PROBABILITY = 1
    (Group groupPassNGas02) GroupReference: count=1 >>> PROBABILITY = 1
--> (Group groupPassNGas03) GroupReference: count=<Not Set>, prob_template=med, force_prob=True >>> PROBABILITY = 0.5
Group: name=groupPassNGas03, count=<Not Set>
    (Group vehiclePartsTiered) GroupReference: count=<Not Set>, prob_template=medLow >>> PROBABILITY = 0.35
    (Group vehicleModSchematics) GroupReference: count=<Not Set>, prob_template=medLow >>> PROBABILITY = 0.35
--> (Group groupRareToolsTiered) GroupReference: count=<Not Set>, prob_template=veryLow >>> PROBABILITY = 0.05
    (Group schematicsToolsRare) GroupReference: count=<Not Set>, prob_template=veryLow >>> PROBABILITY = 0.05
Group: name=groupRareToolsTiered, count=1
--> (Group groupToolsTiered) GroupReference: count=<Not Set> >>> PROBABILITY = 1
    (Group groupToolsT2) GroupReference: count=<Not Set>, prob_template=ProbT2 >>> PROBABILITY = 0
    (Group groupToolsT3) GroupReference: count=<Not Set>, prob_template=ProbT3 >>> PROBABILITY = 0
Group: name=groupToolsTiered, count=1
    (Group groupToolsT1) GroupReference: count=<Not Set>, prob_template=ProbT0 >>> PROBABILITY = 0.03
    (Group toolParts) GroupReference: count=<Not Set>, prob_template=ProbT1 >>> PROBABILITY = 0
--> (Group groupToolsT2) GroupReference: count=<Not Set>, prob_template=ProbT2Cap >>> PROBABILITY = 0
PATH ABORTED, NOT POSSIBLE AT LOOT LEVEL 1

ALL PATHS HAVE ZERO PROBABILITY

 

 

Finding probability for loot level 102...
( --> indicates a valid path through to the item )

3 paths were found

PATH #1:
Container: name=passngasCrate, count=1
--> (Group groupPassNGas) GroupReference: count=<Not Set> >>> PROBABILITY = 1
Group: name=groupPassNGas, count=all
--> (Group groupPassNGas01) GroupReference: count=1 >>> PROBABILITY = 1
    (Group groupPassNGas02) GroupReference: count=1 >>> PROBABILITY = 1
    (Group groupPassNGas03) GroupReference: count=<Not Set>, prob_template=med, force_prob=True >>> PROBABILITY = 0.5
Group: name=groupPassNGas01, count=<Not Set>
--> (Group groupToolsTiered) GroupReference: count=<Not Set>, prob_template=med >>> PROBABILITY = 0.5
    (Group schematicsToolsCommon) GroupReference: count=<Not Set>, prob_template=med >>> PROBABILITY = 0.5
Group: name=groupToolsTiered, count=1
    (Group groupToolsT1) GroupReference: count=<Not Set>, prob_template=ProbT0 >>> PROBABILITY = 0
    (Group toolParts) GroupReference: count=<Not Set>, prob_template=ProbT1 >>> PROBABILITY = 0.62
--> (Group groupToolsT2) GroupReference: count=<Not Set>, prob_template=ProbT2Cap >>> PROBABILITY = 0.03
    (Group groupToolsT3) GroupReference: count=<Not Set>, prob_template=ProbT3 >>> PROBABILITY = 0
Group: name=groupToolsT2, count=<Not Set>
    meleeToolShovelT2SteelShovel >>>  PROBABILITY = 1
    meleeToolPickT2SteelPickaxe >>>  PROBABILITY = 1
    meleeToolAxeT2SteelAxe >>>  PROBABILITY = 1
    meleeWpnSledgeT3SteelSledgehammer >>>  PROBABILITY = 0.35
--> meleeToolSalvageT2Ratchet >>>  PROBABILITY = 1

Probability for path = ???

PATH #2:
Container: name=passngasCrate, count=1
--> (Group groupPassNGas) GroupReference: count=<Not Set> >>> PROBABILITY = 1
Group: name=groupPassNGas, count=all
    (Group groupPassNGas01) GroupReference: count=1 >>> PROBABILITY = 1
    (Group groupPassNGas02) GroupReference: count=1 >>> PROBABILITY = 1
--> (Group groupPassNGas03) GroupReference: count=<Not Set>, prob_template=med, force_prob=True >>> PROBABILITY = 0.5
Group: name=groupPassNGas03, count=<Not Set>
    (Group vehiclePartsTiered) GroupReference: count=<Not Set>, prob_template=medLow >>> PROBABILITY = 0.35
    (Group vehicleModSchematics) GroupReference: count=<Not Set>, prob_template=medLow >>> PROBABILITY = 0.35
--> (Group groupRareToolsTiered) GroupReference: count=<Not Set>, prob_template=veryLow >>> PROBABILITY = 0.05
    (Group schematicsToolsRare) GroupReference: count=<Not Set>, prob_template=veryLow >>> PROBABILITY = 0.05
Group: name=groupRareToolsTiered, count=1
    (Group groupToolsTiered) GroupReference: count=<Not Set> >>> PROBABILITY = 1
--> (Group groupToolsT2) GroupReference: count=<Not Set>, prob_template=ProbT2 >>> PROBABILITY = 0.03
    (Group groupToolsT3) GroupReference: count=<Not Set>, prob_template=ProbT3 >>> PROBABILITY = 0
Group: name=groupToolsT2, count=<Not Set>
    meleeToolShovelT2SteelShovel >>>  PROBABILITY = 1
    meleeToolPickT2SteelPickaxe >>>  PROBABILITY = 1
    meleeToolAxeT2SteelAxe >>>  PROBABILITY = 1
    meleeWpnSledgeT3SteelSledgehammer >>>  PROBABILITY = 0.35
--> meleeToolSalvageT2Ratchet >>>  PROBABILITY = 1

Probability for path = ???

PATH #3:
Container: name=passngasCrate, count=1
--> (Group groupPassNGas) GroupReference: count=<Not Set> >>> PROBABILITY = 1
Group: name=groupPassNGas, count=all
    (Group groupPassNGas01) GroupReference: count=1 >>> PROBABILITY = 1
    (Group groupPassNGas02) GroupReference: count=1 >>> PROBABILITY = 1
--> (Group groupPassNGas03) GroupReference: count=<Not Set>, prob_template=med, force_prob=True >>> PROBABILITY = 0.5
Group: name=groupPassNGas03, count=<Not Set>
    (Group vehiclePartsTiered) GroupReference: count=<Not Set>, prob_template=medLow >>> PROBABILITY = 0.35
    (Group vehicleModSchematics) GroupReference: count=<Not Set>, prob_template=medLow >>> PROBABILITY = 0.35
--> (Group groupRareToolsTiered) GroupReference: count=<Not Set>, prob_template=veryLow >>> PROBABILITY = 0.05
    (Group schematicsToolsRare) GroupReference: count=<Not Set>, prob_template=veryLow >>> PROBABILITY = 0.05
Group: name=groupRareToolsTiered, count=1
--> (Group groupToolsTiered) GroupReference: count=<Not Set> >>> PROBABILITY = 1
    (Group groupToolsT2) GroupReference: count=<Not Set>, prob_template=ProbT2 >>> PROBABILITY = 0.03
    (Group groupToolsT3) GroupReference: count=<Not Set>, prob_template=ProbT3 >>> PROBABILITY = 0
Group: name=groupToolsTiered, count=1
    (Group groupToolsT1) GroupReference: count=<Not Set>, prob_template=ProbT0 >>> PROBABILITY = 0
    (Group toolParts) GroupReference: count=<Not Set>, prob_template=ProbT1 >>> PROBABILITY = 0.62
--> (Group groupToolsT2) GroupReference: count=<Not Set>, prob_template=ProbT2Cap >>> PROBABILITY = 0.03
    (Group groupToolsT3) GroupReference: count=<Not Set>, prob_template=ProbT3 >>> PROBABILITY = 0
Group: name=groupToolsT2, count=<Not Set>
    meleeToolShovelT2SteelShovel >>>  PROBABILITY = 1
    meleeToolPickT2SteelPickaxe >>>  PROBABILITY = 1
    meleeToolAxeT2SteelAxe >>>  PROBABILITY = 1
    meleeWpnSledgeT3SteelSledgehammer >>>  PROBABILITY = 0.35
--> meleeToolSalvageT2Ratchet >>>  PROBABILITY = 1

Probability for path = ???

Is possible

 

Finding probability for loot level 134...
( --> indicates a valid path through to the item )

3 paths were found

PATH #1:
Container: name=passngasCrate, count=1
--> (Group groupPassNGas) GroupReference: count=<Not Set> >>> PROBABILITY = 1
Group: name=groupPassNGas, count=all
--> (Group groupPassNGas01) GroupReference: count=1 >>> PROBABILITY = 1
    (Group groupPassNGas02) GroupReference: count=1 >>> PROBABILITY = 1
    (Group groupPassNGas03) GroupReference: count=<Not Set>, prob_template=med, force_prob=True >>> PROBABILITY = 0.5
Group: name=groupPassNGas01, count=<Not Set>
--> (Group groupToolsTiered) GroupReference: count=<Not Set>, prob_template=med >>> PROBABILITY = 0.5
    (Group schematicsToolsCommon) GroupReference: count=<Not Set>, prob_template=med >>> PROBABILITY = 0.5
Group: name=groupToolsTiered, count=1
    (Group groupToolsT1) GroupReference: count=<Not Set>, prob_template=ProbT0 >>> PROBABILITY = 0
    (Group toolParts) GroupReference: count=<Not Set>, prob_template=ProbT1 >>> PROBABILITY = 0
--> (Group groupToolsT2) GroupReference: count=<Not Set>, prob_template=ProbT2Cap >>> PROBABILITY = 0.50
    (Group groupToolsT3) GroupReference: count=<Not Set>, prob_template=ProbT3 >>> PROBABILITY = 0
Group: name=groupToolsT2, count=<Not Set>
    meleeToolShovelT2SteelShovel >>>  PROBABILITY = 1
    meleeToolPickT2SteelPickaxe >>>  PROBABILITY = 1
    meleeToolAxeT2SteelAxe >>>  PROBABILITY = 1
    meleeWpnSledgeT3SteelSledgehammer >>>  PROBABILITY = 0.35
--> meleeToolSalvageT2Ratchet >>>  PROBABILITY = 1

Probability for path = ???

PATH #2:
Container: name=passngasCrate, count=1
--> (Group groupPassNGas) GroupReference: count=<Not Set> >>> PROBABILITY = 1
Group: name=groupPassNGas, count=all
    (Group groupPassNGas01) GroupReference: count=1 >>> PROBABILITY = 1
    (Group groupPassNGas02) GroupReference: count=1 >>> PROBABILITY = 1
--> (Group groupPassNGas03) GroupReference: count=<Not Set>, prob_template=med, force_prob=True >>> PROBABILITY = 0.5
Group: name=groupPassNGas03, count=<Not Set>
    (Group vehiclePartsTiered) GroupReference: count=<Not Set>, prob_template=medLow >>> PROBABILITY = 0.35
    (Group vehicleModSchematics) GroupReference: count=<Not Set>, prob_template=medLow >>> PROBABILITY = 0.35
--> (Group groupRareToolsTiered) GroupReference: count=<Not Set>, prob_template=veryLow >>> PROBABILITY = 0.05
    (Group schematicsToolsRare) GroupReference: count=<Not Set>, prob_template=veryLow >>> PROBABILITY = 0.05
Group: name=groupRareToolsTiered, count=1
    (Group groupToolsTiered) GroupReference: count=<Not Set> >>> PROBABILITY = 1
--> (Group groupToolsT2) GroupReference: count=<Not Set>, prob_template=ProbT2 >>> PROBABILITY = 0.50
    (Group groupToolsT3) GroupReference: count=<Not Set>, prob_template=ProbT3 >>> PROBABILITY = 0
Group: name=groupToolsT2, count=<Not Set>
    meleeToolShovelT2SteelShovel >>>  PROBABILITY = 1
    meleeToolPickT2SteelPickaxe >>>  PROBABILITY = 1
    meleeToolAxeT2SteelAxe >>>  PROBABILITY = 1
    meleeWpnSledgeT3SteelSledgehammer >>>  PROBABILITY = 0.35
--> meleeToolSalvageT2Ratchet >>>  PROBABILITY = 1

Probability for path = ???

PATH #3:
Container: name=passngasCrate, count=1
--> (Group groupPassNGas) GroupReference: count=<Not Set> >>> PROBABILITY = 1
Group: name=groupPassNGas, count=all
    (Group groupPassNGas01) GroupReference: count=1 >>> PROBABILITY = 1
    (Group groupPassNGas02) GroupReference: count=1 >>> PROBABILITY = 1
--> (Group groupPassNGas03) GroupReference: count=<Not Set>, prob_template=med, force_prob=True >>> PROBABILITY = 0.5
Group: name=groupPassNGas03, count=<Not Set>
    (Group vehiclePartsTiered) GroupReference: count=<Not Set>, prob_template=medLow >>> PROBABILITY = 0.35
    (Group vehicleModSchematics) GroupReference: count=<Not Set>, prob_template=medLow >>> PROBABILITY = 0.35
--> (Group groupRareToolsTiered) GroupReference: count=<Not Set>, prob_template=veryLow >>> PROBABILITY = 0.05
    (Group schematicsToolsRare) GroupReference: count=<Not Set>, prob_template=veryLow >>> PROBABILITY = 0.05
Group: name=groupRareToolsTiered, count=1
--> (Group groupToolsTiered) GroupReference: count=<Not Set> >>> PROBABILITY = 1
    (Group groupToolsT2) GroupReference: count=<Not Set>, prob_template=ProbT2 >>> PROBABILITY = 0.50
    (Group groupToolsT3) GroupReference: count=<Not Set>, prob_template=ProbT3 >>> PROBABILITY = 0
Group: name=groupToolsTiered, count=1
    (Group groupToolsT1) GroupReference: count=<Not Set>, prob_template=ProbT0 >>> PROBABILITY = 0
    (Group toolParts) GroupReference: count=<Not Set>, prob_template=ProbT1 >>> PROBABILITY = 0
--> (Group groupToolsT2) GroupReference: count=<Not Set>, prob_template=ProbT2Cap >>> PROBABILITY = 0.50
    (Group groupToolsT3) GroupReference: count=<Not Set>, prob_template=ProbT3 >>> PROBABILITY = 0
Group: name=groupToolsT2, count=<Not Set>
    meleeToolShovelT2SteelShovel >>>  PROBABILITY = 1
    meleeToolPickT2SteelPickaxe >>>  PROBABILITY = 1
    meleeToolAxeT2SteelAxe >>>  PROBABILITY = 1
    meleeWpnSledgeT3SteelSledgehammer >>>  PROBABILITY = 0.35
--> meleeToolSalvageT2Ratchet >>>  PROBABILITY = 1

Probability for path = ???

Is possible

 

At the moment, it separates the results into a number of "paths", with each path being a unique route through the groups. Some paths may go through the same groups, and I am unsure as to whether I need to combine them or what to calculate the probabilities.

 

ie given that you have 3 paths:

 

1) groupPassNGas, groupPassNGas01, groupToolsTiered, groupToolsT2

2) groupPassNGas, groupPassNGas03, groupRareToolsTiered, groupToolsT2

3) groupPassNGas, groupPassNGas03, groupRareToolsTiered, groupToolsTiered, groupToolsT2

 

How would I calculate this?

Can I calculate the probability for each path as a whole?

Or, for example, do I need to parse groupPassNGas, then work out the probability of groupPassNGas01 or groupPassNGas03 being picked, etc...

How would that work when the path lengths are different?

Link to comment
Share on other sites

With a bunch of help from Graphko in Discord, I finally got it spitting out what appears to be correct data:

 

LootLevel 1:

Finding probability for loot level 1...
( --> indicates a valid path through to the item )

3 paths were found

PATH #1:
Container: name=passngasCrate, count=1
--> (Group groupPassNGas) >>> PROBABILITY = Base: 1, Adjusted: 1
Group: name=groupPassNGas, count=all
--> (Group groupPassNGas01) >>> PROBABILITY = Base: 1, Adjusted: (All, not forced) 1
    (Group groupPassNGas02) >>> PROBABILITY = Base: 1, Adjusted: (All, not forced) 1
    (Group groupPassNGas03) >>> PROBABILITY = Base: 0.5, Adjusted: (All, forced) 0.5
    Item: name=vehicleWheels, count=1, prob_template=low, force=True >>> PROBABILITY = Base: 0.20, Adjusted: (All, forced) 0.20
Group: name=groupPassNGas01, count=1
--> (Group groupToolsTiered) >>> PROBABILITY = Base: 0.5, Adjusted: 0.3703703703703703703703703704
    (Group schematicsToolsCommon) >>> PROBABILITY = Base: 0.5, Adjusted: 0.3703703703703703703703703704
    Item: name=resourceRepairKit, count=2,5, prob_template=medLow, force=False >>> PROBABILITY = Base: 0.35, Adjusted: 0.2592592592592592592592592592
Group: name=groupToolsTiered, count=1
    (Group groupToolsT1) >>> PROBABILITY = Base: 0.03, Adjusted: 1.0000000000000000000000000000
    (Group toolParts) >>> PROBABILITY = Base: 0, Adjusted: 0
--> (Group groupToolsT2) >>> PROBABILITY = Base: 0, Adjusted: 0
PATH ABORTED, NOT POSSIBLE AT LOOT LEVEL 1
Path probability: 0

PATH #2:
Container: name=passngasCrate, count=1
--> (Group groupPassNGas) >>> PROBABILITY = Base: 1, Adjusted: 1
Group: name=groupPassNGas, count=all
    (Group groupPassNGas01) >>> PROBABILITY = Base: 1, Adjusted: (All, not forced) 1
    (Group groupPassNGas02) >>> PROBABILITY = Base: 1, Adjusted: (All, not forced) 1
--> (Group groupPassNGas03) >>> PROBABILITY = Base: 0.5, Adjusted: (All, forced) 0.5
    Item: name=vehicleWheels, count=1, prob_template=low, force=True >>> PROBABILITY = Base: 0.20, Adjusted: (All, forced) 0.20
Group: name=groupPassNGas03, count=1
    (Group vehiclePartsTiered) >>> PROBABILITY = Base: 0.35, Adjusted: 0.4375
    (Group vehicleModSchematics) >>> PROBABILITY = Base: 0.35, Adjusted: 0.4375
--> (Group groupRareToolsTiered) >>> PROBABILITY = Base: 0.05, Adjusted: 0.0625
    (Group schematicsToolsRare) >>> PROBABILITY = Base: 0.05, Adjusted: 0.0625
Group: name=groupRareToolsTiered, count=1
    (Group groupToolsTiered) >>> PROBABILITY = Base: 1, Adjusted: 1
--> (Group groupToolsT2) >>> PROBABILITY = Base: 0, Adjusted: 0
PATH ABORTED, NOT POSSIBLE AT LOOT LEVEL 1
Path probability: 0

PATH #3:
Container: name=passngasCrate, count=1
--> (Group groupPassNGas) >>> PROBABILITY = Base: 1, Adjusted: 1
Group: name=groupPassNGas, count=all
    (Group groupPassNGas01) >>> PROBABILITY = Base: 1, Adjusted: (All, not forced) 1
    (Group groupPassNGas02) >>> PROBABILITY = Base: 1, Adjusted: (All, not forced) 1
--> (Group groupPassNGas03) >>> PROBABILITY = Base: 0.5, Adjusted: (All, forced) 0.5
    Item: name=vehicleWheels, count=1, prob_template=low, force=True >>> PROBABILITY = Base: 0.20, Adjusted: (All, forced) 0.20
Group: name=groupPassNGas03, count=1
    (Group vehiclePartsTiered) >>> PROBABILITY = Base: 0.35, Adjusted: 0.4375
    (Group vehicleModSchematics) >>> PROBABILITY = Base: 0.35, Adjusted: 0.4375
--> (Group groupRareToolsTiered) >>> PROBABILITY = Base: 0.05, Adjusted: 0.0625
    (Group schematicsToolsRare) >>> PROBABILITY = Base: 0.05, Adjusted: 0.0625
Group: name=groupRareToolsTiered, count=1
--> (Group groupToolsTiered) >>> PROBABILITY = Base: 1, Adjusted: 1
    (Group groupToolsT2) >>> PROBABILITY = Base: 0, Adjusted: 0
    (Group groupToolsT3) >>> PROBABILITY = Base: 0, Adjusted: 0
Group: name=groupToolsTiered, count=1
    (Group groupToolsT1) >>> PROBABILITY = Base: 0.03, Adjusted: 1.0000000000000000000000000000
    (Group toolParts) >>> PROBABILITY = Base: 0, Adjusted: 0
--> (Group groupToolsT2) >>> PROBABILITY = Base: 0, Adjusted: 0
PATH ABORTED, NOT POSSIBLE AT LOOT LEVEL 1
Path probability: 0

Total Probability: 0

 

LootLevel 102:

Finding probability for loot level 102...
( --> indicates a valid path through to the item )

3 paths were found

PATH #1:
Container: name=passngasCrate, count=1
--> (Group groupPassNGas) >>> PROBABILITY = Base: 1, Adjusted: 1
Group: name=groupPassNGas, count=all
--> (Group groupPassNGas01) >>> PROBABILITY = Base: 1, Adjusted: (All, not forced) 1
    (Group groupPassNGas02) >>> PROBABILITY = Base: 1, Adjusted: (All, not forced) 1
    (Group groupPassNGas03) >>> PROBABILITY = Base: 0.5, Adjusted: (All, forced) 0.5
    Item: name=vehicleWheels, count=1, prob_template=low, force=True >>> PROBABILITY = Base: 0.20, Adjusted: (All, forced) 0.20
Group: name=groupPassNGas01, count=1
--> (Group groupToolsTiered) >>> PROBABILITY = Base: 0.5, Adjusted: 0.3703703703703703703703703704
    (Group schematicsToolsCommon) >>> PROBABILITY = Base: 0.5, Adjusted: 0.3703703703703703703703703704
    Item: name=resourceRepairKit, count=2,5, prob_template=medLow, force=False >>> PROBABILITY = Base: 0.35, Adjusted: 0.2592592592592592592592592592
Group: name=groupToolsTiered, count=1
    (Group groupToolsT1) >>> PROBABILITY = Base: 0, Adjusted: 0
    (Group toolParts) >>> PROBABILITY = Base: 0.62, Adjusted: 0.9538461538461538461538461539
--> (Group groupToolsT2) >>> PROBABILITY = Base: 0.03, Adjusted: 0.0461538461538461538461538462
    (Group groupToolsT3) >>> PROBABILITY = Base: 0, Adjusted: 0
Group: name=groupToolsT2, count=2,3
    Item: name=meleeToolShovelT2SteelShovel, count=1, force=False >>> PROBABILITY = Base: 1, Adjusted: 0.5747126436781609195402298850
    Item: name=meleeToolPickT2SteelPickaxe, count=1, force=False >>> PROBABILITY = Base: 1, Adjusted: 0.5747126436781609195402298850
    Item: name=meleeToolAxeT2SteelAxe, count=1, force=False >>> PROBABILITY = Base: 1, Adjusted: 0.5747126436781609195402298850
    Item: name=meleeWpnSledgeT3SteelSledgehammer, count=1, prob_template=medLow, force=False >>> PROBABILITY = Base: 0.35, Adjusted: 0.2011494252873563218390804598
--> Item: name=meleeToolSalvageT2Ratchet, count=1, force=False >>> PROBABILITY = Base: 1, Adjusted: 0.5747126436781609195402298850
Path probability: 0.0098241477551822379408586305

PATH #2:
Container: name=passngasCrate, count=1
--> (Group groupPassNGas) >>> PROBABILITY = Base: 1, Adjusted: 1
Group: name=groupPassNGas, count=all
    (Group groupPassNGas01) >>> PROBABILITY = Base: 1, Adjusted: (All, not forced) 1
    (Group groupPassNGas02) >>> PROBABILITY = Base: 1, Adjusted: (All, not forced) 1
--> (Group groupPassNGas03) >>> PROBABILITY = Base: 0.5, Adjusted: (All, forced) 0.5
    Item: name=vehicleWheels, count=1, prob_template=low, force=True >>> PROBABILITY = Base: 0.20, Adjusted: (All, forced) 0.20
Group: name=groupPassNGas03, count=1
    (Group vehiclePartsTiered) >>> PROBABILITY = Base: 0.35, Adjusted: 0.4375
    (Group vehicleModSchematics) >>> PROBABILITY = Base: 0.35, Adjusted: 0.4375
--> (Group groupRareToolsTiered) >>> PROBABILITY = Base: 0.05, Adjusted: 0.0625
    (Group schematicsToolsRare) >>> PROBABILITY = Base: 0.05, Adjusted: 0.0625
Group: name=groupRareToolsTiered, count=1
    (Group groupToolsTiered) >>> PROBABILITY = Base: 1, Adjusted: 0.9708737864077669902912621359
--> (Group groupToolsT2) >>> PROBABILITY = Base: 0.03, Adjusted: 0.0291262135922330097087378641
    (Group groupToolsT3) >>> PROBABILITY = Base: 0, Adjusted: 0
Group: name=groupToolsT2, count=2,3
    Item: name=meleeToolShovelT2SteelShovel, count=1, force=False >>> PROBABILITY = Base: 1, Adjusted: 0.5747126436781609195402298850
    Item: name=meleeToolPickT2SteelPickaxe, count=1, force=False >>> PROBABILITY = Base: 1, Adjusted: 0.5747126436781609195402298850
    Item: name=meleeToolAxeT2SteelAxe, count=1, force=False >>> PROBABILITY = Base: 1, Adjusted: 0.5747126436781609195402298850
    Item: name=meleeWpnSledgeT3SteelSledgehammer, count=1, prob_template=medLow, force=False >>> PROBABILITY = Base: 0.35, Adjusted: 0.2011494252873563218390804598
--> Item: name=meleeToolSalvageT2Ratchet, count=1, force=False >>> PROBABILITY = Base: 1, Adjusted: 0.5747126436781609195402298850
Path probability: 0.0005231001004352192835621025

PATH #3:
Container: name=passngasCrate, count=1
--> (Group groupPassNGas) >>> PROBABILITY = Base: 1, Adjusted: 1
Group: name=groupPassNGas, count=all
    (Group groupPassNGas01) >>> PROBABILITY = Base: 1, Adjusted: (All, not forced) 1
    (Group groupPassNGas02) >>> PROBABILITY = Base: 1, Adjusted: (All, not forced) 1
--> (Group groupPassNGas03) >>> PROBABILITY = Base: 0.5, Adjusted: (All, forced) 0.5
    Item: name=vehicleWheels, count=1, prob_template=low, force=True >>> PROBABILITY = Base: 0.20, Adjusted: (All, forced) 0.20
Group: name=groupPassNGas03, count=1
    (Group vehiclePartsTiered) >>> PROBABILITY = Base: 0.35, Adjusted: 0.4375
    (Group vehicleModSchematics) >>> PROBABILITY = Base: 0.35, Adjusted: 0.4375
--> (Group groupRareToolsTiered) >>> PROBABILITY = Base: 0.05, Adjusted: 0.0625
    (Group schematicsToolsRare) >>> PROBABILITY = Base: 0.05, Adjusted: 0.0625
Group: name=groupRareToolsTiered, count=1
--> (Group groupToolsTiered) >>> PROBABILITY = Base: 1, Adjusted: 0.9708737864077669902912621359
    (Group groupToolsT2) >>> PROBABILITY = Base: 0.03, Adjusted: 0.0291262135922330097087378641
    (Group groupToolsT3) >>> PROBABILITY = Base: 0, Adjusted: 0
Group: name=groupToolsTiered, count=1
    (Group groupToolsT1) >>> PROBABILITY = Base: 0, Adjusted: 0
    (Group toolParts) >>> PROBABILITY = Base: 0.62, Adjusted: 0.9538461538461538461538461539
--> (Group groupToolsT2) >>> PROBABILITY = Base: 0.03, Adjusted: 0.0461538461538461538461538462
    (Group groupToolsT3) >>> PROBABILITY = Base: 0, Adjusted: 0
Group: name=groupToolsT2, count=2,3
    Item: name=meleeToolShovelT2SteelShovel, count=1, force=False >>> PROBABILITY = Base: 1, Adjusted: 0.5747126436781609195402298850
    Item: name=meleeToolPickT2SteelPickaxe, count=1, force=False >>> PROBABILITY = Base: 1, Adjusted: 0.5747126436781609195402298850
    Item: name=meleeToolAxeT2SteelAxe, count=1, force=False >>> PROBABILITY = Base: 1, Adjusted: 0.5747126436781609195402298850
    Item: name=meleeWpnSledgeT3SteelSledgehammer, count=1, prob_template=medLow, force=False >>> PROBABILITY = Base: 0.35, Adjusted: 0.2011494252873563218390804598
--> Item: name=meleeToolSalvageT2Ratchet, count=1, force=False >>> PROBABILITY = Base: 1, Adjusted: 0.5747126436781609195402298850
Path probability: 0.0008047693852849527439416961

Total Probability: 0.0111520172409024099683624291

 

LootLevel 134:

Finding probability for loot level 134...
( --> indicates a valid path through to the item )

3 paths were found

PATH #1:
Container: name=passngasCrate, count=1
--> (Group groupPassNGas) >>> PROBABILITY = Base: 1, Adjusted: 1
Group: name=groupPassNGas, count=all
--> (Group groupPassNGas01) >>> PROBABILITY = Base: 1, Adjusted: (All, not forced) 1
    (Group groupPassNGas02) >>> PROBABILITY = Base: 1, Adjusted: (All, not forced) 1
    (Group groupPassNGas03) >>> PROBABILITY = Base: 0.5, Adjusted: (All, forced) 0.5
    Item: name=vehicleWheels, count=1, prob_template=low, force=True >>> PROBABILITY = Base: 0.20, Adjusted: (All, forced) 0.20
Group: name=groupPassNGas01, count=1
--> (Group groupToolsTiered) >>> PROBABILITY = Base: 0.5, Adjusted: 0.3703703703703703703703703704
    (Group schematicsToolsCommon) >>> PROBABILITY = Base: 0.5, Adjusted: 0.3703703703703703703703703704
    Item: name=resourceRepairKit, count=2,5, prob_template=medLow, force=False >>> PROBABILITY = Base: 0.35, Adjusted: 0.2592592592592592592592592592
Group: name=groupToolsTiered, count=1
    (Group groupToolsT1) >>> PROBABILITY = Base: 0, Adjusted: 0
    (Group toolParts) >>> PROBABILITY = Base: 0, Adjusted: 0
--> (Group groupToolsT2) >>> PROBABILITY = Base: 0.50, Adjusted: 1.00
    (Group groupToolsT3) >>> PROBABILITY = Base: 0, Adjusted: 0
Group: name=groupToolsT2, count=2,3
    Item: name=meleeToolShovelT2SteelShovel, count=1, force=False >>> PROBABILITY = Base: 1, Adjusted: 0.5747126436781609195402298850
    Item: name=meleeToolPickT2SteelPickaxe, count=1, force=False >>> PROBABILITY = Base: 1, Adjusted: 0.5747126436781609195402298850
    Item: name=meleeToolAxeT2SteelAxe, count=1, force=False >>> PROBABILITY = Base: 1, Adjusted: 0.5747126436781609195402298850
    Item: name=meleeWpnSledgeT3SteelSledgehammer, count=1, prob_template=medLow, force=False >>> PROBABILITY = Base: 0.35, Adjusted: 0.2011494252873563218390804598
--> Item: name=meleeToolSalvageT2Ratchet, count=1, force=False >>> PROBABILITY = Base: 1, Adjusted: 0.5747126436781609195402298850
Path probability: 0.2128565346956151553852703278

PATH #2:
Container: name=passngasCrate, count=1
--> (Group groupPassNGas) >>> PROBABILITY = Base: 1, Adjusted: 1
Group: name=groupPassNGas, count=all
    (Group groupPassNGas01) >>> PROBABILITY = Base: 1, Adjusted: (All, not forced) 1
    (Group groupPassNGas02) >>> PROBABILITY = Base: 1, Adjusted: (All, not forced) 1
--> (Group groupPassNGas03) >>> PROBABILITY = Base: 0.5, Adjusted: (All, forced) 0.5
    Item: name=vehicleWheels, count=1, prob_template=low, force=True >>> PROBABILITY = Base: 0.20, Adjusted: (All, forced) 0.20
Group: name=groupPassNGas03, count=1
    (Group vehiclePartsTiered) >>> PROBABILITY = Base: 0.35, Adjusted: 0.4375
    (Group vehicleModSchematics) >>> PROBABILITY = Base: 0.35, Adjusted: 0.4375
--> (Group groupRareToolsTiered) >>> PROBABILITY = Base: 0.05, Adjusted: 0.0625
    (Group schematicsToolsRare) >>> PROBABILITY = Base: 0.05, Adjusted: 0.0625
Group: name=groupRareToolsTiered, count=1
    (Group groupToolsTiered) >>> PROBABILITY = Base: 1, Adjusted: 0.6666666666666666666666666667
--> (Group groupToolsT2) >>> PROBABILITY = Base: 0.50, Adjusted: 0.3333333333333333333333333334
    (Group groupToolsT3) >>> PROBABILITY = Base: 0, Adjusted: 0
Group: name=groupToolsT2, count=2,3
    Item: name=meleeToolShovelT2SteelShovel, count=1, force=False >>> PROBABILITY = Base: 1, Adjusted: 0.5747126436781609195402298850
    Item: name=meleeToolPickT2SteelPickaxe, count=1, force=False >>> PROBABILITY = Base: 1, Adjusted: 0.5747126436781609195402298850
    Item: name=meleeToolAxeT2SteelAxe, count=1, force=False >>> PROBABILITY = Base: 1, Adjusted: 0.5747126436781609195402298850
    Item: name=meleeWpnSledgeT3SteelSledgehammer, count=1, prob_template=medLow, force=False >>> PROBABILITY = Base: 0.35, Adjusted: 0.2011494252873563218390804598
--> Item: name=meleeToolSalvageT2Ratchet, count=1, force=False >>> PROBABILITY = Base: 1, Adjusted: 0.5747126436781609195402298850
Path probability: 0.0059865900383141762452107280

PATH #3:
Container: name=passngasCrate, count=1
--> (Group groupPassNGas) >>> PROBABILITY = Base: 1, Adjusted: 1
Group: name=groupPassNGas, count=all
    (Group groupPassNGas01) >>> PROBABILITY = Base: 1, Adjusted: (All, not forced) 1
    (Group groupPassNGas02) >>> PROBABILITY = Base: 1, Adjusted: (All, not forced) 1
--> (Group groupPassNGas03) >>> PROBABILITY = Base: 0.5, Adjusted: (All, forced) 0.5
    Item: name=vehicleWheels, count=1, prob_template=low, force=True >>> PROBABILITY = Base: 0.20, Adjusted: (All, forced) 0.20
Group: name=groupPassNGas03, count=1
    (Group vehiclePartsTiered) >>> PROBABILITY = Base: 0.35, Adjusted: 0.4375
    (Group vehicleModSchematics) >>> PROBABILITY = Base: 0.35, Adjusted: 0.4375
--> (Group groupRareToolsTiered) >>> PROBABILITY = Base: 0.05, Adjusted: 0.0625
    (Group schematicsToolsRare) >>> PROBABILITY = Base: 0.05, Adjusted: 0.0625
Group: name=groupRareToolsTiered, count=1
--> (Group groupToolsTiered) >>> PROBABILITY = Base: 1, Adjusted: 0.6666666666666666666666666667
    (Group groupToolsT2) >>> PROBABILITY = Base: 0.50, Adjusted: 0.3333333333333333333333333334
    (Group groupToolsT3) >>> PROBABILITY = Base: 0, Adjusted: 0
Group: name=groupToolsTiered, count=1
    (Group groupToolsT1) >>> PROBABILITY = Base: 0, Adjusted: 0
    (Group toolParts) >>> PROBABILITY = Base: 0, Adjusted: 0
--> (Group groupToolsT2) >>> PROBABILITY = Base: 0.50, Adjusted: 1.00
    (Group groupToolsT3) >>> PROBABILITY = Base: 0, Adjusted: 0
Group: name=groupToolsT2, count=2,3
    Item: name=meleeToolShovelT2SteelShovel, count=1, force=False >>> PROBABILITY = Base: 1, Adjusted: 0.5747126436781609195402298850
    Item: name=meleeToolPickT2SteelPickaxe, count=1, force=False >>> PROBABILITY = Base: 1, Adjusted: 0.5747126436781609195402298850
    Item: name=meleeToolAxeT2SteelAxe, count=1, force=False >>> PROBABILITY = Base: 1, Adjusted: 0.5747126436781609195402298850
    Item: name=meleeWpnSledgeT3SteelSledgehammer, count=1, prob_template=medLow, force=False >>> PROBABILITY = Base: 0.35, Adjusted: 0.2011494252873563218390804598
--> Item: name=meleeToolSalvageT2Ratchet, count=1, force=False >>> PROBABILITY = Base: 1, Adjusted: 0.5747126436781609195402298850
Path probability: 0.0119731800766283524904214559

Total Probability: 0.2308163048105576841209025117

 

Note that these values are 2.5x higher than reality, as I added a count="2,3" to groupToolsT2 so I could test that logic

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...