Jump to content

loot probabilities


falcon470

Recommended Posts

so im making a new mod for my freinds to use on our private game item is working how ever the loot probabilities i dont understand how the game decides what will be droped i want the item to have a 5 percent chance of droping after exporting the configs some catagories were easy tally up the total prob of every thing and x .05 percent on the cacluator boom easy

i think....... other catagories confuse me itemgroup medicine for example doenst give me a prob on that one scrolling to the item group it self it also doesnt have prob and testing it doesnt drop medicine every time,

 

so my question is two things how does it determine for example abouve group itemgroup medicine and two how does the game actully decide out of the prob what the item will be how does the system work for loot really? thanks post all info you know here will be a great help

Link to comment
Share on other sites

On 9/17/2020 at 10:28 PM, falcon470 said:

so im making a new mod for my freinds to use on our private game item is working how ever the loot probabilities i dont understand how the game decides what will be droped i want the item to have a 5 percent chance of droping after exporting the configs some catagories were easy tally up the total prob of every thing and x .05 percent on the cacluator boom easy

i think....... other catagories confuse me itemgroup medicine for example doenst give me a prob on that one scrolling to the item group it self it also doesnt have prob and testing it doesnt drop medicine every time,

 

so my question is two things how does it determine for example abouve group itemgroup medicine and two how does the game actully decide out of the prob what the item will be how does the system work for loot really? thanks post all info you know here will be a great help

If i understand correctly looking a the loot.xml file, it is based on which level AND on which gamestage you are at the moment...

Qouted from the loot.xml file, it states the following:

 

<!-- Overrides the probability on a per item basis. -->
<!-- Level is the loot gamestage of the player / party. For LOOT gamestage, the GS of the player with the highest GS in the part is being used. -->

 

Further down the loot.xml file it states:

 

<!-- This generates items with Quality Levels based on the player party's gamestage. The  LootGamestage  effect is added to that.

 

level : gamestage
default_quality / quality : the item tier
prob : probability of rolling this tier range

 

The list is worked from the top. If you get a hit, the associated QL is generated.
If there is no hit the default quality is used.

 

A single player on default diff can have a GS of up to 480 without perks.-->

 

<!--The overall plan for loot distribution:
- no Tier 3 items before level 20.  (GS 50)
- no Quality 6 items before level 40. (GS 100)  QL5 at 70, QL4 at 40-->

 

So it other words, the game looks at which level you are AND on which Gamestage, and then decides what the probabilities are to give you the desired item/loot.

So for example: a level 1 player on gamestage 5 gives a prob of 0.5% of lets say an bottle of water. Then if it decides to give you that item, then it looks to the quality of that item...  If all those requirements stated by the Loot.xml file are met, then it will give you that item, otherwise the game decides to give you one other item that you don't like... So all, in all, it is based on the number stated by the loot.xml and are pretty random...

 

It is pretty tricky if you look at the loot.xml lines... But i do hope i could help you on your way to understand how it may work... Hope this will guide you on your way to build your modlet...

Link to comment
Share on other sites

18 hours ago, renejant said:

If i understand correctly looking a the loot.xml file, it is based on which level AND on which gamestage you are at the moment...

Qouted from the loot.xml file, it states the following:

 

<!-- Overrides the probability on a per item basis. -->
<!-- Level is the loot gamestage of the player / party. For LOOT gamestage, the GS of the player with the highest GS in the part is being used. -->

 

Further down the loot.xml file it states:

 

<!-- This generates items with Quality Levels based on the player party's gamestage. The  LootGamestage  effect is added to that.

 

level : gamestage
default_quality / quality : the item tier
prob : probability of rolling this tier range

 

The list is worked from the top. If you get a hit, the associated QL is generated.
If there is no hit the default quality is used.

 

A single player on default diff can have a GS of up to 480 without perks.-->

 

<!--The overall plan for loot distribution:
- no Tier 3 items before level 20.  (GS 50)
- no Quality 6 items before level 40. (GS 100)  QL5 at 70, QL4 at 40-->

 

So it other words, the game looks at which level you are AND on which Gamestage, and then decides what the probabilities are to give you the desired item/loot.

So for example: a level 1 player on gamestage 5 gives a prob of 0.5% of lets say an bottle of water. Then if it decides to give you that item, then it looks to the quality of that item...  If all those requirements stated by the Loot.xml file are met, then it will give you that item, otherwise the game decides to give you one other item that you don't like... So all, in all, it is based on the number stated by the loot.xml and are pretty random...

 

It is pretty tricky if you look at the loot.xml lines... But i do hope i could help you on your way to understand how it may work... Hope this will guide you on your way to build your modlet...

I don't see anything here that points to the player level being used anywhere in loot selection. It is always gamestage that is used, but naturally gamestage depends a lot on player level.

 

 

 

 

Link to comment
Share on other sites

@meganoth You are right... it is just a combination of factors that are into play here...

 

@falcon470   I have taken a look again, and to me it seems like, items are also categorised into which lootcontainers it has to drop. Lootcontainers are for example a cupboard, thrashcans, bags etcetera...  Each LC contains a line that says which items has to be into that when u open it ingame.

 

<lootgroup name="cupboard">
    <item name="drinkCanEmpty"/>                 <---- item will ALWAYS be in here
    <item group="cannedfood" prob="0.5"/>   <---- states a probability chance it drops
    <item group="seeds" prob="0.05"/>
    <item name="drinkJarBoiledWater" prob="0.5"/>
    <item name="drinkJarEmpty" count="1,4"/>
    <item name="resourceElectricParts" count="1,2" prob="0.05"/>
    <item name="resourcePotassiumNitratePowder" count="10,20" prob="0.15"/>       <---- states a probability chance AND gives a min/max number of items that may drop
    <item group="dyes" prob="0.1"/>
</lootgroup>

 

so you have to define each lootcontainer to tell the game that it has to have that item you want in there, then you give a count number or probability number OR both!

if you give the prob="1" than you make sure that item will always drop into that lootcontainer, every number below that is a percentage number of a rolling drop chance....

 

I hope you understand now better how it works... I am not an expert on this, because my knowledge is still pretty basic here.... so i could be wrong about this because TFP keeps changing a lot of files over time... 

Link to comment
Share on other sites

1 hour ago, renejant said:

if you give the prob="1" than you make sure that item will always drop into that lootcontainer, every number below that is a percentage number of a rolling drop chance....

I think this is wrong. I'm not an expert myself and have not tested this conclusively, but look at the following container:

 

<lootgroup name="electricalDevices">
        <item name="resourceElectricParts" count="5,10" prob="1"/>
        <item name="resourceElectricParts" count="3,10" prob="0.5"/>
        <item name="generatorbank" prob="1"/>
        <item name="batterybank" prob="0.7"/>
        <item name="pressureplate" count="1,5" prob="1.0"/>
        <item name="ceilingLight01_player" count="1,6" prob="1.0"/>
        <item name="electrictimerrelay" count="1,3" prob="1.0"/>
        <item name="electricwirerelay" count="5,15" prob="1.0"/>
        <item name="motionsensor" count="1,2" prob="1.0"/>
        <item name="speaker" count="1,2" prob="1.0"/>
        <item name="switch" count="3,9" prob="1.0"/>
        <item group="schematicsElectrical" count="1" prob="1.0"/>
</lootgroup>

<lootgroup name="workingStiffsSub" count="1,2">
        <item group="groupToolsTiered" prob="6"/>
        <item name="resourceRepairKit" count="1,4"/>
        <item name="smallEngine" prob="0.3"/>
        <item group="workstationToolsScaled" prob="2"/>
        <item group="automotive" prob="1"/>
        <item name="resourceForgedIron" count="12,20" prob=".5"/> <!-- together 3% per crate -->
        <item name="resourceForgedSteel" count="8,14" prob=".5"/>
        <item name="resourceScrapPolymers" count="35,50" prob=".4"/>
        <item group="electricalDevices" prob="1"/>
        <item name="resourceMechanicalParts" count="4,10" prob="1"/>
        <item name="meleeToolPaintTool" prob="0.4"/>
        <item name="meleeToolWireTool"/>
        <item name="resourceLockPick" count="1,4"/>
        <item group="toolParts"/>
</lootgroup>
<lootgroup name="workingStiffsBox" count="all">
        <item group="groupToolsTiered"/>
        <item group="workingStiffsSub"/>
</lootgroup>

If you were right and "1" would be certainty, how could there ever be a pressureplate found in the lootgroup electricalDevices ? It would always have a resourceElectricParts in it (if the selection is done in order) or a workingStiffsBox would always have resourceElectricParts AND a generatorbank in it, obviously that isn't the case in game.

 

A few people at least including me believe that the probabilities are added up and each number is then divided by this to get at the percentage. In other words the probabilities are normalized so they add up to 100%. And yes, that would mean "1" would be the same as "1.0" and have no special meaning.

 

So electricalDevices probabilities add up to 11.2. The probability to find a generatorbank in it would be 1/11.2 =  0.08 aka 8%. A batterbank would have .7/11.2= 0.06 aka 6% probability to be found in the lootgroup electricalDevices.

 

Link to comment
Share on other sites

i would have to say yes some probablities total up to like 22 at the same time it seems like some prob are hidden or theres a number system going on behind the scences as

drink jar empty has no prob, if i hadnt tested it id say it means it always drops but this is not the case. some times the cupboard is completely empty

Link to comment
Share on other sites

@meganoth have you tried increasing the prob number to see what happens? maybe increasing will increase the drop chance...

 

@falcon470 yes, there is an uncertainty factor into play which i cannot completely understand yet, so most things here i say is a total quess.... i am just trying to help with the knowledge i do have about the files... like i said before... im not an expert nor will i claim it to be one...

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...