# How does "place\_loot"'s chance work?

**URL:** <https://discourse.cataclysmdda.org/t/how-does-place-loot-s-chance-work/22142>\
**Category:** The Toolbox\
**Created:** [December 4, 2019, 5:50am UTC](https://discourse.cataclysmdda.org/t/how-does-place-loot-s-chance-work/22142 "2019-12-04T05:50:57Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sheeptime](https://avatars.discourse-cdn.com/v4/letter/s/a9a28c/32.png) [@sheeptime](https://discourse.cataclysmdda.org/u/sheeptime)\
**Post date:** [December 4, 2019, 5:50am UTC](https://discourse.cataclysmdda.org/t/how-does-place-loot-s-chance-work/22142/1 "2019-12-04T05:50:57Z")

</div>

so I was figuring how to make a new building, I tried both “chance” and “prob” for the spawning in the “place\_loot”. But setting 100 on both did not guarantee the item spawn every time. Is it base on one is x or x/100? Or does the item spawn rate in world setting also affect the percentage calculation?

really confused by that, thanks for reading

---

<div class="post-metadata">

**Author:** ![Axema](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/axema/32/10822_2.png) [@Axema](https://discourse.cataclysmdda.org/u/Axema)\
**Post date:** [December 4, 2019, 6:44am UTC](https://discourse.cataclysmdda.org/t/how-does-place-loot-s-chance-work/22142/2 "2019-12-04T06:44:58Z")

</div>

> **place\_loot is similar to place\_items**
>
> ```
> "place_items": [{
> "item": "test_items",
> "chance": 50,
> "repeat": [10, 30],
> "x": [1, 2],
> "y": [3, 4]
> }
> ]
> 
> ```

You can use `place_items` instead!

---

<div class="post-metadata">

**Author:** ![sheeptime](https://avatars.discourse-cdn.com/v4/letter/s/a9a28c/32.png) [@sheeptime](https://discourse.cataclysmdda.org/u/sheeptime)\
**Post date:** [December 4, 2019, 10:24am UTC](https://discourse.cataclysmdda.org/t/how-does-place-loot-s-chance-work/22142/3 "2019-12-04T10:24:42Z")

</div>

Ok I did some more tests, and here is what I found out:  
1.“place\_item” does not work with item group, item only  
2.“place\_group” is a thing, but it just doesn’t work ? once I set to “place\_group” nothing spawn again  
3.“chance” and “prob” both work in a confusing way, only thing I am sure is both are not base on %

---

<div class="post-metadata">

**Author:** ![Axema](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/axema/32/10822_2.png) [@Axema](https://discourse.cataclysmdda.org/u/Axema)\
**Post date:** [December 5, 2019, 1:11am UTC](https://discourse.cataclysmdda.org/t/how-does-place-loot-s-chance-work/22142/4 "2019-12-05T01:11:58Z")

</div>

> [@sheeptime](#):
>
> 1.“place\_item” does not work with item group, item only

`place_items` for item group and `place_item` for an item.

> [@sheeptime](#):
>
> 2.“place\_group” is a thing, but it just doesn’t work ? once I set to “place\_group” nothing spawn again

The [doc](https://github.com/CleverRaven/Cataclysm-DDA/blob/395ccd86b47fb6fe5b31ca86440b956412d2e712/doc/MAPGEN.md#23-place_groups) says it is used for spawning monster with monstergroups.

> [@sheeptime](#):
>
> 3.“chance” and “prob” both work in a confusing way, only thing I am sure is both are not base on %

`place_items` uses `chance` where n% is the probability of 100%. Item is then picked from the item group to put into the specified point. The `repeat` is useful too!

---

<div class="post-metadata">

**Author:** ![sheeptime](https://avatars.discourse-cdn.com/v4/letter/s/a9a28c/32.png) [@sheeptime](https://discourse.cataclysmdda.org/u/sheeptime)\
**Post date:** [December 5, 2019, 2:20am UTC](https://discourse.cataclysmdda.org/t/how-does-place-loot-s-chance-work/22142/5 "2019-12-05T02:20:47Z")

</div>

Thanks so much!  
The doc did not have “place\_items” anywhere, this is exactly what I want.  
enjoy the cataclysm 🙂

---

<div class="post-metadata">

**Author:** ![techincal](https://avatars.discourse-cdn.com/v4/letter/t/ebca7d/32.png) [@techincal](https://discourse.cataclysmdda.org/u/techincal)\
**Post date:** [December 5, 2019, 3:13am UTC](https://discourse.cataclysmdda.org/t/how-does-place-loot-s-chance-work/22142/6 "2019-12-05T03:13:37Z")

</div>

IIRC “prob” spawns the item until the probability roll succeeds or something like that (it’s both repeat and probability combined). Meaning low probability numbers generate big stacks of items (or was it the other way around?). It’s been a while so I don’t remember exactly.

Also IIRC 100% chance to spawn made the item spawn regardless of world drop rate, but 99% chance to spawn means it’s subject to world settings.
