Jump to content

Loot.xml - count & prob no respected


Recommended Posts

Hello, there's something I don't understand... Is it right for example with:

 

<lootcontainer id="777" count="1,7"...

          <item name="resourceFeather" count="3" prob="0.49"/>

...

 

This count="1,7" said a random of 1-7 items from the full list?

Or for each items can be looted 7 times in one stack? & so if the loot is spawn, min 3 & max 21 feather will be looted?

 

Because I mod to have more eggs from 2 value "foodEgg" in loot.xml:

 

<lootgroup name="coldfood">
    <item name="foodEgg" count="6,12" prob="0.49"/>
...

 

<lootgroup name="groupBirdNest"...
    <item name="foodEgg" count="1,6" prob="0.49"/>

...

 

But it game, I can have more than 6 or 12 eggs, whatever level 1-300 & skill no point set or all set... (the % loot always 100%)

So please, do I miss something to change?

Link to comment
Share on other sites

Well, it's easy to understand, I just add/change count/prob for foodEgg directly in loot.xml...

 

<lootgroup name="coldfood">
    <item name="foodEgg" count="6,12" prob="0.49"/>
    <item name="foodBlueberryPie"/>
    <item name="foodMeatStew"/>
    <item name="foodRawMeat" count="5,10"/>
    <item name="foodRottingFlesh" count="5,10"/>
    <item name="foodCropCorn"/>
    <item name="foodCropPotato"/>
    <item name="foodCropBlueberries"/>
</lootgroup>

 

<lootgroup name="groupBirdNest" count="1,2">
    <item name="foodEgg" count="1,6" prob="0.49"/>
    <item name="resourceFeather" count="1,5" prob="0.75"/>
</lootgroup>

Link to comment
Share on other sites

50 minutes ago, Life_For_Dead said:

Well, it's easy to understand, I just add/change count/prob for foodEgg directly in loot.xml...

 

<lootgroup name="coldfood">
    <item name="foodEgg" count="6,12" prob="0.49"/>
    <item name="foodBlueberryPie"/>
    <item name="foodMeatStew"/>
    <item name="foodRawMeat" count="5,10"/>
    <item name="foodRottingFlesh" count="5,10"/>
    <item name="foodCropCorn"/>
    <item name="foodCropPotato"/>
    <item name="foodCropBlueberries"/>
</lootgroup>

 

<lootgroup name="groupBirdNest" count="1,2">
    <item name="foodEgg" count="1,6" prob="0.49"/>
    <item name="resourceFeather" count="1,5" prob="0.75"/>
</lootgroup>

 

the count in the lootgroup element means how many of possible items can you find....so with "groupBirdNest" count 1,2 means that you can find both of items in one bird nest or only one, if count is not specified then only 1 item of said group can be found (which item is totally random, that's what prob is for)

 

the count in the specific item means how many of that specific item can you find, 1-6 means random number between 1 and 6 inclusive

Link to comment
Share on other sites

6 hours ago, appenius said:

 

the count in the lootgroup element means how many of possible items can you find....so with "groupBirdNest" count 1,2 means that you can find both of items in one bird nest or only one, if count is not specified then only 1 item of said group can be found (which item is totally random, that's what prob is for)

 

the count in the specific item means how many of that specific item can you find, 1-6 means random number between 1 and 6 inclusive

 

If I understand well, example for groupBirdNest with a count=1,2, if the loot is spawn:

 

- with a count=1 from lootgroup, we can loot, min 1 foodegg or 1 resourceFeather, max 6 foodegg or 5 resourceFeather

 

- with a count=2 from lootgroup, we can loot, min 2 foodegg or 2 resourceFeather or 1 for each, max 12 foodegg or 10 resourceFeather or 6 foodegg + 5 resourceFeather

 

So just to understand a little more, is it possible to set something instead of "count=" by something like "min=" & "max="  or another way?

To force to never have more than the maximum we set like this:

 

<lootgroup name="coldfood" count="1,3">
    <item name="foodEgg" min="6" max="12" prob="0.49"/>
    <item name="foodRawMeat" count="1,4"/>
    <item name="foodRottingFlesh" count="2,6"/>
</lootgroup>

 

Because I try this:

 

<lootgroup name="groupBirdNest" count="1,2">
    <item name="foodEgg" min="1" max="6" prob="0.49"/>
    <item name="resourceFeather" count="1,5" prob="0.75"/>
</lootgroup>

 

I built in speed a prefab with only many birdnest, I spawn it in navezgane, I got no error red/yellow from console but in game, egg's loot never up more than 2 or unlucky...

Link to comment
Share on other sites

1 hour ago, Life_For_Dead said:

 

If I understand well, example for groupBirdNest with a count=1,2, if the loot is spawn:

 

- with a count=1 from lootgroup, we can loot, min 1 foodegg or 1 resourceFeather, max 6 foodegg or 5 resourceFeather

 

- with a count=2 from lootgroup, we can loot, min 2 foodegg or 2 resourceFeather or 1 for each, max 12 foodegg or 10 resourceFeather or 6 foodegg + 5 resourceFeather

 

So just to understand a little more, is it possible to set something instead of "count=" by something like "min=" & "max="  or another way?

To force to never have more than the maximum we set like this:

 

<lootgroup name="coldfood" count="1,3">
    <item name="foodEgg" min="6" max="12" prob="0.49"/>
    <item name="foodRawMeat" count="1,4"/>
    <item name="foodRottingFlesh" count="2,6"/>
</lootgroup>

 

Because I try this:

 

<lootgroup name="groupBirdNest" count="1,2">
    <item name="foodEgg" min="1" max="6" prob="0.49"/>
    <item name="resourceFeather" count="1,5" prob="0.75"/>
</lootgroup>

 

I built in speed a prefab with only many birdnest, I spawn it in navezgane, I got no error red/yellow from console but in game, egg's loot never up more than 2 or unlucky...

If you tried to use "min" or "max" and the game isn't programmed to understand this, those values are just ignored. Don't invent syntax that isn't there.

 

You probably want:

<lootgroup name="groupBirdNest" count="1,2">
    <item name="foodEgg" count="1,3" prob="0.49"/>
    <item name="resourceFeather" count="1,5" prob="0.75"/>
</lootgroup>

This would mean maximum 6 eggs.

 

More complicated distributions can be realized with sub-lootgroups or adding "cobweb" as a  nothing-item (at least I think "cobweb" just adds nothing) or maybe count="0,3" might work, I didn't test that though.

 

Link to comment
Share on other sites

3 hours ago, Life_For_Dead said:

 

If I understand well, example for groupBirdNest with a count=1,2, if the loot is spawn:

 

- with a count=1 from lootgroup, we can loot, min 1 foodegg or 1 resourceFeather, max 6 foodegg or 5 resourceFeather

 

- with a count=2 from lootgroup, we can loot, min 2 foodegg or 2 resourceFeather or 1 for each, max 12 foodegg or 10 resourceFeather or 6 foodegg + 5 resourceFeather

 

So just to understand a little more, is it possible to set something instead of "count=" by something like "min=" & "max="  or another way?

To force to never have more than the maximum we set like this:

 

<lootgroup name="coldfood" count="1,3">
    <item name="foodEgg" min="6" max="12" prob="0.49"/>
    <item name="foodRawMeat" count="1,4"/>
    <item name="foodRottingFlesh" count="2,6"/>
</lootgroup>

 

Because I try this:

 

<lootgroup name="groupBirdNest" count="1,2">
    <item name="foodEgg" min="1" max="6" prob="0.49"/>
    <item name="resourceFeather" count="1,5" prob="0.75"/>
</lootgroup>

 

I built in speed a prefab with only many birdnest, I spawn it in navezgane, I got no error red/yellow from console but in game, egg's loot never up more than 2 or unlucky...

 

Hi Life_For_Dead


Adding min and max doesn't work like @ meganoth said, the game skips it or it may create error.
You could leave it alone like this:

 

<lootgroup name="coldfood" count="1,3">
    <item name="foodEgg" prob="0.49"/>
    <item name="foodRawMeat" count="1,4"/>
    <item name="foodRottingFlesh" count="2,6"/>
</lootgroup>

 

<lootgroup name = "groupBirdNest" count = "1,2">
     <item name = "foodEgg" prob = "0.49" />
     <item name = "resourceFeather" count = "1.5" prob = "0.75" />
</lootgroup>

 

The minimum that gives you eggs is 1, you just have to increase the probability, so that when looting you always get eggs, I have it in my mod like this.

Link to comment
Share on other sites

On 7/28/2020 at 3:57 PM, Life_For_Dead said:

- with a count=2 from lootgroup, we can loot, min 2 foodegg or 2 resourceFeather or 1 for each, max 12 foodegg or 10 resourceFeather or 6 foodegg + 5 resourceFeather

 

 

no that is not right (as far as I know), if you set count to 2 in lootgroup that has 2 items that mean you always get both of the items

 

as far as min and max values, it was already said that game does not understand these properties so it just ignores them, but count property is essentially merged min and max together, the first number is minimum and last maximum

 

 

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...