# Mutations/Traits that give effects

**URL:** <https://discourse.cataclysmdda.org/t/mutations-traits-that-give-effects/19411>\
**Category:** The Toolbox\
**Created:** [March 27, 2019, 6:48am UTC](https://discourse.cataclysmdda.org/t/mutations-traits-that-give-effects/19411 "2019-03-27T06:48:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Trivega](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/trivega/32/3306_2.png) [@Trivega](https://discourse.cataclysmdda.org/u/Trivega)\
**Post date:** [March 27, 2019, 6:48am UTC](https://discourse.cataclysmdda.org/t/mutations-traits-that-give-effects/19411/1 "2019-03-27T06:48:14Z")

</div>

Is it possible to create a mutation that comes with an effect or causes one? Can’t seem to work out how I would go about do so. I’m working on some new scenarios, and the idea would be you start off with these effects. Here’s a couple of examples.

Cursed - every now & then gives person the Attention effect.  
Unstable Atoms - every now & then gives the person the Teleglow effect.  
Gassy - randomly release smoke clouds as though one dropped a smoke grenade.  
Blind/Deaf - either permanent or very limiting sight/hearing

I’m exploring the json files, but can’t work out how attach effects to things like mutations or professions. What would the code for that look like? Possible?

---

<div class="post-metadata">

**Author:** ![Fris0uman](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/fris0uman/32/8607_2.png) [@Fris0uman](https://discourse.cataclysmdda.org/u/Fris0uman)\
**Post date:** [March 27, 2019, 11:46am UTC](https://discourse.cataclysmdda.org/t/mutations-traits-that-give-effects/19411/2 "2019-03-27T11:46:41Z")

</div>

You can do it through c++ edits  
AFAIK you can’t do it through json.

---

<div class="post-metadata">

**Author:** ![BushElito](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/bushelito/32/4767_2.png) [@BushElito](https://discourse.cataclysmdda.org/u/BushElito)\
**Post date:** [March 27, 2019, 1:48pm UTC](https://discourse.cataclysmdda.org/t/mutations-traits-that-give-effects/19411/3 "2019-03-27T13:48:38Z")

</div>

First you need to know JSON files are basically data files.  
They describe how an object looks, behaves, what effects it has and so on, but you can’t define _how_ those effects would work.

So the only way to add functions that define the effects inside c++ files. Then (idk how exactly it would work) it would be as simple as adding `"effect" : ["some_fancy_effect_that_has_the_functions_name_or_id"]`

TLDR no way in plain JSON.

---

<div class="post-metadata">

**Author:** ![Trivega](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/trivega/32/3306_2.png) [@Trivega](https://discourse.cataclysmdda.org/u/Trivega)\
**Post date:** [March 28, 2019, 12:31am UTC](https://discourse.cataclysmdda.org/t/mutations-traits-that-give-effects/19411/4 "2019-03-28T00:31:43Z")

</div>

Dang, what about just making it so a scenario or profession starts you off with a status effect, like you start off inflicted with teleglow?

I’m assuming same answer, but hoping its possible since editing json files are easier then the sea of c++ at least for me.

---

<div class="post-metadata">

**Author:** ![BushElito](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/bushelito/32/4767_2.png) [@BushElito](https://discourse.cataclysmdda.org/u/BushElito)\
**Post date:** [March 28, 2019, 3:06pm UTC](https://discourse.cataclysmdda.org/t/mutations-traits-that-give-effects/19411/5 "2019-03-28T15:06:10Z")

</div>

I’m not too familiar that much with the game, but I do understand programming.  
I mean, it is possible to add infection as a start, but I am not sure about teleglow.
