# How to associate an effect\_type with a field\_type?

**URL:** <https://discourse.cataclysmdda.org/t/how-to-associate-an-effect-type-with-a-field-type/22018>\
**Category:** The Toolbox\
**Created:** [November 22, 2019, 1:52am UTC](https://discourse.cataclysmdda.org/t/how-to-associate-an-effect-type-with-a-field-type/22018 "2019-11-22T01:52:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![harison86](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/harison86/32/10005_2.png) [@harison86](https://discourse.cataclysmdda.org/u/harison86)\
**Post date:** [November 22, 2019, 1:52am UTC](https://discourse.cataclysmdda.org/t/how-to-associate-an-effect-type-with-a-field-type/22018/1 "2019-11-22T01:52:20Z")

</div>

I’m trying to make an enemy that puts the player/enemies to sleep with knockout gas. How do I make the gas apply the effect? I’m basing it on tear gas, and have found the tear gas itself in field\_type.json and the Tear gas effect in effects.json, but I can’t tell how they are associated with each other, how the game knows what effect to apply when creatures step into the gas.

---

<div class="post-metadata">

**Author:** ![anothersimulacrum](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/anothersimulacrum/32/10770_2.png) [@anothersimulacrum](https://discourse.cataclysmdda.org/u/anothersimulacrum)\
**Post date:** [November 22, 2019, 4:15am UTC](https://discourse.cataclysmdda.org/t/how-to-associate-an-effect-type-with-a-field-type/22018/2 "2019-11-22T04:15:44Z")

</div>

That’s probably hardcoded. Luckily for you, this very recently got JSON-ized.  
You can see an example here [https://github.com/CleverRaven/Cataclysm-DDA/pull/35618/files](https://github.com/CleverRaven/Cataclysm-DDA/pull/35618/files).

---

<div class="post-metadata">

**Author:** ![Erk](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/erk/32/3871_2.png) [@Erk](https://discourse.cataclysmdda.org/u/Erk)\
**Post date:** [November 22, 2019, 11:43pm UTC](https://discourse.cataclysmdda.org/t/how-to-associate-an-effect-type-with-a-field-type/22018/3 "2019-11-22T23:43:43Z")

</div>

It’s no longer hard coded, some of it is quite freshly changed. A lot of it is documented in effect\_types.md but that file is slightly out of date now. Let me know if I can help
