# Modding Help: Where Is This Located?

**URL:** <https://discourse.cataclysmdda.org/t/modding-help-where-is-this-located/27144>\
**Category:** The Toolbox\
**Created:** [October 6, 2021, 8:04pm UTC](https://discourse.cataclysmdda.org/t/modding-help-where-is-this-located/27144 "2021-10-06T20:04:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dalamar\_Aaefe](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/dalamar_aaefe/32/6515_2.png) [@Dalamar\_Aaefe](https://discourse.cataclysmdda.org/u/Dalamar_Aaefe)\
**Post date:** [October 6, 2021, 8:04pm UTC](https://discourse.cataclysmdda.org/t/modding-help-where-is-this-located/27144/1 "2021-10-06T20:04:16Z")

</div>

Hello, I’ve spent the last two days opening every Json file and much to my dismay I cannot seem to find a few things, so if someone wouldn’t mind pointing me in the right direction or explaining how it works to me I’d greatly appreciate it.

1): The Monster Flag groups such as “SEES” “HEARS” etc, I’ve got a few custom monsters I’m making and want to see how the code actually looks from a technical side for those things.  
2): The mutation flags that don’t seem to exist?? Like Pain Resistance and how the game tracks it/how it works etc, because where most things will add a modifier I can’t crack the pain resist code.

Thanks in advance for helping a newbie.

---

<div class="post-metadata">

**Author:** ![Venera3](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/venera3/32/10569_2.png) [@Venera3](https://discourse.cataclysmdda.org/u/Venera3)\
**Post date:** [October 6, 2021, 8:28pm UTC](https://discourse.cataclysmdda.org/t/modding-help-where-is-this-located/27144/2 "2021-10-06T20:28:41Z")

</div>

The code part of the game lives in /src (either download the source code from github or clone the git repo), you want an editor capable of searching in files/folders like Notepad++.

---

<div class="post-metadata">

**Author:** ![Valase](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/valase/32/6972_2.png) [@Valase](https://discourse.cataclysmdda.org/u/Valase)\
**Post date:** [October 7, 2021, 5:10am UTC](https://discourse.cataclysmdda.org/t/modding-help-where-is-this-located/27144/3 "2021-10-07T05:10:08Z")

</div>

> [@Dalamar\_Aaefe](#):
>
> 1): The Monster Flag groups such as “SEES” “HEARS” etc, I’ve got a few custom monsters I’m making and want to see how the code actually looks from a technical side for those things.

They are assigned internal MF\_[FLAG] values in [monstergenerator.cpp](https://github.com/CleverRaven/Cataclysm-DDA/blob/63d6375d6b27b461bbb25bee3773cf9c8bdceeeb/src/monstergenerator.cpp#L89-L214) which are then used to check for flags in different cases (for example `character.has_flag( MF_FLAMMABLE )` or like it’s used in [monster.cpp](https://github.com/CleverRaven/Cataclysm-DDA/blob/63d6375d6b27b461bbb25bee3773cf9c8bdceeeb/src/monster.cpp#L959-L962)).  
The description/definition can be found in [mtype.h](https://github.com/CleverRaven/Cataclysm-DDA/blob/63d6375d6b27b461bbb25bee3773cf9c8bdceeeb/src/mtype.h#L67-L187).

> [@Dalamar\_Aaefe](#):
>
> 2): The mutation flags that don’t seem to exist?? Like Pain Resistance and how the game tracks it/how it works etc, because where most things will add a modifier I can’t crack the pain resist code.

Pain Resistance [exists as a mutation](https://github.com/CleverRaven/Cataclysm-DDA/blob/f37125ab1b668a3a73a3261652e05242eb00bdea/data/json/mutations/mutations.json#L383-L393) with the ID `PAINRESIST`.  
As for how the game checks it: It checks if the character has the trait/mutation [as soon as a situation arises that would cause pain](https://github.com/CleverRaven/Cataclysm-DDA/blob/8dac6013d1f09cf45aac64a44dcf5a5098ed93e5/src/character.cpp#L10066-L10091), right before applying it.

---

<div class="post-metadata">

**Author:** ![Bio](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/bio/32/6690_2.png) [@Bio](https://discourse.cataclysmdda.org/u/Bio)\
**Post date:** [October 8, 2021, 3:57pm UTC](https://discourse.cataclysmdda.org/t/modding-help-where-is-this-located/27144/4 "2021-10-08T15:57:10Z")

</div>

checking the doc files folder also helps if you need a refresher on how things work. And because the game is a conglomerate of contributions from different people, sometimes things can be “hiding” in the same file instead of the usual format of being seperate files, since some people don’t follow the same format. For example I’ve found sometimes when trying to track down the location of overmap files they can sometimes be hiding inside the mapgen files, instead of a separate folder.  
What this means in your case in that instead of looking in different folders or files, the stuff you’re looking for might have already been defined in the same file as the thing its grabbing from. E.G. pain resistance might be in one entire folder, instead of spread out all across the json files
