# Modding Q&A thread

**URL:** <https://discourse.cataclysmdda.org/t/modding-q-a-thread/821>\
**Category:** The Lab\
**Created:** [April 14, 2013, 11:19pm UTC](https://discourse.cataclysmdda.org/t/modding-q-a-thread/821 "2013-04-14T23:19:42Z")\
**Posts on this page:** 13\
**Page:** 2

<div class="post-metadata">

**Author:** ![TheGrifter](https://avatars.discourse-cdn.com/v4/letter/t/278dde/32.png) [@TheGrifter](https://discourse.cataclysmdda.org/u/TheGrifter)\
**Post date:** [July 18, 2013, 12:21am UTC](https://discourse.cataclysmdda.org/t/modding-q-a-thread/821/21 "2013-07-18T00:21:59Z")

</div>

How hard would it be to push the functions in iuse.cpp into a JSON file?

---

<div class="post-metadata">

**Author:** ![CIB](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/cib/32/903_2.png) [@CIB](https://discourse.cataclysmdda.org/u/CIB)\
**Post date:** [July 18, 2013, 12:38am UTC](https://discourse.cataclysmdda.org/t/modding-q-a-thread/821/22 "2013-07-18T00:38:25Z")

</div>

I’ve already implemented iuse’s in lua. JSON is probably not going to happen, as it’s not a programming language.

---

<div class="post-metadata">

**Author:** ![Zireael](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/zireael/32/956_2.png) [@Zireael](https://discourse.cataclysmdda.org/u/Zireael)\
**Post date:** [July 19, 2013, 7:40am UTC](https://discourse.cataclysmdda.org/t/modding-q-a-thread/821/23 "2013-07-19T07:40:15Z")

</div>

[quote=“xibalba”]So will all the tables of things - traits, mutations, items, enemies, terrain, bionics, artifacts - eventually have all their resources located in a single location (a bunch of folders full of json files apparently)? Because I really want to do something with artifact generation, traits available at creation, mutation tables, and bionics - but I don’t want to chase down all this data myself.

I mean some things are located in the source files for game mechanics, but I’m not interested in editing game mechanics, except maybe to see more options available to tweak them a bit at character creation and during the game. I don’t want to edit the game mechanics, I just want to balance the game according to what I think makes a good game.

Besides it’s easier to share a bunch of json files than it is to recompile it when I want to play someone else’s changes.[/quote]

Agreed.

---

<div class="post-metadata">

**Author:** ![i2amroy](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/i2amroy/32/909_2.png) [@i2amroy](https://discourse.cataclysmdda.org/u/i2amroy)\
**Post date:** [July 19, 2013, 8:44am UTC](https://discourse.cataclysmdda.org/t/modding-q-a-thread/821/24 "2013-07-19T08:44:09Z")

</div>

> [@xibalba](#):
>
> So will all the tables of things - traits, mutations, items, enemies, terrain, bionics, artifacts - eventually have all their resources located in a single location (a bunch of folders full of json files apparently)? Because I really want to do something with artifact generation, traits available at creation, mutation tables, and bionics - but I don’t want to chase down all this data myself.

That’s the eventual plan, yes, though due to the way that some of it works it might be very difficult to convert some things out (such as bionic and mutation effects). Some of the sooner things that you might be able to expect are the enemies and terrain, both of which hopefully shouldn’t take too much work to convert over (though with terrain memory size might come into play to slow us down a little).

---

<div class="post-metadata">

**Author:** ![TheGrifter](https://avatars.discourse-cdn.com/v4/letter/t/278dde/32.png) [@TheGrifter](https://discourse.cataclysmdda.org/u/TheGrifter)\
**Post date:** [July 20, 2013, 3:38am UTC](https://discourse.cataclysmdda.org/t/modding-q-a-thread/821/25 "2013-07-20T03:38:19Z")

</div>

Will addiction also be farmed out to lua or json files for easy editing? Slurm, now with new hyper addiction.

---

<div class="post-metadata">

**Author:** ![kevin.granade](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/kevin.granade/32/1316_2.png) [@kevin.granade](https://discourse.cataclysmdda.org/u/kevin.granade)\
**Post date:** [July 24, 2013, 7:47pm UTC](https://discourse.cataclysmdda.org/t/modding-q-a-thread/821/26 "2013-07-24T19:47:09Z")

</div>

Yea, it should be possible to export the addition types.

---

<div class="post-metadata">

**Author:** ![kevin.granade](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/kevin.granade/32/1316_2.png) [@kevin.granade](https://discourse.cataclysmdda.org/u/kevin.granade)\
**Post date:** [August 2, 2013, 9:23pm UTC](https://discourse.cataclysmdda.org/t/modding-q-a-thread/821/27 "2013-08-02T21:23:42Z")

</div>

grep pattern \*.cpp \*.h

---

<div class="post-metadata">

**Author:** ![drake1storm](https://avatars.discourse-cdn.com/v4/letter/d/54ee81/32.png) [@drake1storm](https://discourse.cataclysmdda.org/u/drake1storm)\
**Post date:** [August 6, 2013, 11:38pm UTC](https://discourse.cataclysmdda.org/t/modding-q-a-thread/821/28 "2013-08-06T23:38:05Z")

</div>

You could also just use code blocks, open up the project, and hit ctrl+f to do a full project search.

---

<div class="post-metadata">

**Author:** ![Spare](https://avatars.discourse-cdn.com/v4/letter/s/41988e/32.png) [@Spare](https://discourse.cataclysmdda.org/u/Spare)\
**Post date:** [September 1, 2013, 11:07am UTC](https://discourse.cataclysmdda.org/t/modding-q-a-thread/821/29 "2013-09-01T11:07:13Z")

</div>

I want to create new types of buildings. More specifically I want to make campsites spawn near cabins. These campsites would be small clusters of tents, perhaps some corpses and a bear. Which files deal with buildings?

---

<div class="post-metadata">

**Author:** ![i2amroy](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/i2amroy/32/909_2.png) [@i2amroy](https://discourse.cataclysmdda.org/u/i2amroy)\
**Post date:** [September 6, 2013, 12:19am UTC](https://discourse.cataclysmdda.org/t/modding-q-a-thread/821/30 "2013-09-06T00:19:14Z")

</div>

Buildings are in building\_generation.cpp, building\_generation.h, mapgen.cpp, and overmap.cpp depending on what you are doing. Yes you will need to compile after changing them.

---

<div class="post-metadata">

**Author:** ![moist\_zombie](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/moist_zombie/32/131_2.png) [@moist\_zombie](https://discourse.cataclysmdda.org/u/moist_zombie)\
**Post date:** [November 5, 2013, 7:45am UTC](https://discourse.cataclysmdda.org/t/modding-q-a-thread/821/31 "2013-11-05T07:45:18Z")

</div>

Firstly, this thread should possibly be stickied 😃 Had to dig a bit to find it ☹

So… I’ve got this added to monsters.json:

> { "type":"MONSTER", "id":"mon\_human\_terror", "name": "terrified human", "species":"MAMMAL", "symbol":"@", "color":"ltgray", "size":"MEDIUM", "material":"hflesh", "diff":4, "aggression":20, "morale":10, "speed":100, "melee\_skill":4, "melee\_dice":1, "melee\_dice\_sides":3, "melee\_cut":0, "dodge":3, "armor\_bash":0, "armor\_cut":0, "item\_chance":25, "luminance":0, "hp":40, "special\_freq":0, "death\_function":"NORMAL", "special\_attack":"NONE", "description":"A nearly unrecognizable human being, obviously unfit to deal with the stress and danger posed by the cataclysm.", "flags":["SEES", "HEARS", "WARM", "BASHES", "HUMAN", "VIS40", "BONES"], "placate\_triggers":["PLAYER\_WEAK"], "fear\_triggers":["PLAYER\_CLOSE", "HURT", "FIRE", "SOUND", "FRIEND\_ATTACKED"] },

And this tacked to the end of the HOUSE set in monstergroups.json:

> { "type":"monstergroup", "name" : "GROUP\_HOUSE", "\_comment" : "+15% child", "default" : "mon\_zombie", "monsters" : [{ "monster" : "mon\_zombie\_child", "freq" : 150, "cost\_multiplier" : 2 }, { "monster" : "mon\_zombie\_cop", "freq" : 20, "cost\_multiplier" : 2 }, { "monster" : "mon\_zombie\_fast", "freq" : 70, "cost\_multiplier" : 2 }, { "monster" : "mon\_zombie\_grabber", "freq" : 70, "cost\_multiplier" : 1 }, { "monster" : "mon\_skeleton", "freq" : 30, "cost\_multiplier" : 2 }, { "monster" : "mon\_zombie\_smoker", "freq" : 30, "cost\_multiplier" : 5 }, { "monster" : "mon\_zombie\_swimmer", "freq" : 20, "cost\_multiplier" : 2 }, { "monster" : "mon\_zombie\_shrieker", "freq" : 30, "cost\_multiplier" : 5 }, { "monster" : "mon\_zombie\_spitter", "freq" : 30, "cost\_multiplier" : 5 }, { "monster" : "mon\_zombie\_electric", "freq" : 30, "cost\_multiplier" : 5 }, { "monster" : "mon\_zombie\_necro", "freq" : 1, "cost\_multiplier" : 25 }, { "monster" : "mon\_boomer", "freq" : 30, "cost\_multiplier" : 7 }, { "monster" : "mon\_zombie\_brute", "freq" : 10, "cost\_multiplier" : 15 }, { "monster" : "mon\_zombie\_hulk", "freq" : 1, "cost\_multiplier" : 50 }, { "monster" : "mon\_zombie\_master", "freq" : 1, "cost\_multiplier" : 25 } { "monster" : "mon\_human\_terror", "freq" : 320, "cost\_multiplier" : 2, "pack\_size" : [1,10] } ] },

And its crashing my game flat on startup with no debug messages now (after I battled many missing commas)… The only thing I see that could potentially cause it is the inclusion of the pack size in monstergroups, or maybe changing the “flesh” tag over to “hflesh” in the monster code… Do I have some conflicting tags? WHATS WRONG?! ☹ I have a feeling indention or a comma is stealing all my time away :\>

EDIT!: harvested the code strings and updated my experimental, replaced the above code and it works (though I haven’t found my scared humans spawning naturally yet… Guess it was some conflict with some wild SCIENCE I was conducting with ranged weapons on the same build… Burst-fire plasma flamethrower, and then I changed the ammo type for blowgun to “gasoline” to see if it’d spit liquid gas that hadn’t been ignited… It doesn’t, just fiery 3x3 explosions :P) So I’m all good on this one…

---

<div class="post-metadata">

**Author:** ![John\_Candlebury](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/john_candlebury/32/6437_2.png) [@John\_Candlebury](https://discourse.cataclysmdda.org/u/John_Candlebury)\
**Post date:** [November 5, 2013, 8:36am UTC](https://discourse.cataclysmdda.org/t/modding-q-a-thread/821/32 "2013-11-05T08:36:36Z")

</div>

comma between zombie master and human terror?

---

<div class="post-metadata">

**Author:** ![vache](https://avatars.discourse-cdn.com/v4/letter/v/ea666f/32.png) [@vache](https://discourse.cataclysmdda.org/u/vache)\
**Post date:** [November 5, 2013, 4:36pm UTC](https://discourse.cataclysmdda.org/t/modding-q-a-thread/821/33 "2013-11-05T16:36:21Z")

</div>

[http://www.jsonlint.com](http://www.jsonlint.com)

[Previous page](https://discourse.cataclysmdda.org/t/modding-q-a-thread/821.md?page=1)
