# The Minor JSON Questions Thread

**URL:** <https://discourse.cataclysmdda.org/t/the-minor-json-questions-thread/12858>\
**Category:** The Toolbox\
**Created:** [November 3, 2016, 1:29am UTC](https://discourse.cataclysmdda.org/t/the-minor-json-questions-thread/12858 "2016-11-03T01:29:38Z")\
**Posts on this page:** 20\
**Page:** 5

<div class="post-metadata">

**Author:** ![Taberone](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/taberone/32/515_2.png) [@Taberone](https://discourse.cataclysmdda.org/u/Taberone)\
**Post date:** [March 14, 2017, 5:28am UTC](https://discourse.cataclysmdda.org/t/the-minor-json-questions-thread/12858/81 "2017-03-14T05:28:36Z")

</div>

(1)What affects how long it takes for a gun to aim in the code, and what determines maximum effective range?

(2)How do I make a profession spawn with a fully loaded RM451 Flamethrower?

---

<div class="post-metadata">

**Author:** ![Coolthulhu](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/coolthulhu/32/2446_2.png) [@Coolthulhu](https://discourse.cataclysmdda.org/u/Coolthulhu)\
**Post date:** [March 14, 2017, 7:06am UTC](https://discourse.cataclysmdda.org/t/the-minor-json-questions-thread/12858/82 "2017-03-14T07:06:14Z")

</div>

Aim depends on handling stat, current weapon skill of the user, dexterity and perception of the user, hand encumbrance of the user, used sights and volume of the weapon used.  
Effective range is just range at which the fully aimed (stability 100%) has a chance of good hit of 50% or more. Anything that affects accuracy affects effective range: perception, arm encumbrance, used sights, skill in used weapon and marksmanship, targeting bionic.

---

<div class="post-metadata">

**Author:** ![wad67](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/wad67/32/7_2.png) [@wad67](https://discourse.cataclysmdda.org/u/wad67)\
**Post date:** [March 26, 2017, 3:54pm UTC](https://discourse.cataclysmdda.org/t/the-minor-json-questions-thread/12858/83 "2017-03-26T15:54:39Z")

</div>

Is there a way for an item blacklist to remove items from the basegame?  
It seems to disable crafting, and spawns although items still start with various professions are are still visible in the wish menu.

I was talking to some people on discord, and the main option appears to be redefining every base object that I don’t want to ‘none’.

---

<div class="post-metadata">

**Author:** ![pisskop](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/pisskop/32/1327_2.png) [@pisskop](https://discourse.cataclysmdda.org/u/pisskop)\
**Post date:** [March 26, 2017, 4:12pm UTC](https://discourse.cataclysmdda.org/t/the-minor-json-questions-thread/12858/84 "2017-03-26T16:12:40Z")

</div>

not take them out no. their ids will always exist.

To ‘take them out’ youd have to also override the item’s unique id and make them into … well, whatever. Be it turn them into bees or chunks of meat or single frozen tear drops lamenting their lose.

overwriting their ids will change their displayed name and properties so that while the item’s ids exist, its akin to taking the soul and personality out of one person and putting it into another’s body.

---

<div class="post-metadata">

**Author:** ![Coolthulhu](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/coolthulhu/32/2446_2.png) [@Coolthulhu](https://discourse.cataclysmdda.org/u/Coolthulhu)\
**Post date:** [March 26, 2017, 4:22pm UTC](https://discourse.cataclysmdda.org/t/the-minor-json-questions-thread/12858/85 "2017-03-26T16:22:27Z")

</div>

[quote=“wad67, post:83, topic:12858”]Is there a way for an item blacklist to remove items from the basegame?  
It seems to disable crafting, and spawns although items still start with various professions are are still visible in the wish menu.[/quote]

That sounds like a bug

---

<div class="post-metadata">

**Author:** ![wad67](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/wad67/32/7_2.png) [@wad67](https://discourse.cataclysmdda.org/u/wad67)\
**Post date:** [March 26, 2017, 4:59pm UTC](https://discourse.cataclysmdda.org/t/the-minor-json-questions-thread/12858/86 "2017-03-26T16:59:09Z")

</div>

[quote=“pisskop, post:84, topic:12858”]not take them out no. their ids will always exist.

To ‘take them out’ youd have to also override the item’s unique id and make them into … well, whatever. Be it turn them into bees or chunks of meat or single frozen tear drops lamenting their lose.

overwriting their ids will change their displayed name and properties so that while the item’s ids exist, its akin to taking the soul and personality out of one person and putting it into another’s body.[/quote]

I’m aware of this method, however it is a bit of a monumental task to replace every article of clothing in the game, putting together the blacklist was time consuming enough.  
I have been experimenting with makeshift vehicle parts, so far I have completed a makeshift alternator and I’m considering which other vehicle systems would be feasible to bodge.

[spoiler]

[code]  
[  
{  
“id”: “makeshift\_alternator”,  
“copy-from”: “vehicle\_alternator”,  
“type”: “vehicle\_part”,  
“name”: “makeshift alternator”,  
"//": “30A @12VDC ~ 1HP drain @ 48% effficiency”,  
“item”: “makeshift\_alternator”,  
“difficulty”: 1,  
“durability”: 120,  
“power”: -2,  
“epower”: 160,  
“damage\_modifier”: 80,  
“breaks\_into”: [  
{ “item”: “copper”, “count”: [2, 5] }  
],  
“extend”: { “flags”: [“FOLDABLE”, “TOOL\_SCREWDRIVER”] }  
},  
{  
“id”: “makeshift\_alternator”,  
“copy-from”: “vehicle\_alternator”,  
“type”: “GENERIC”,  
“name”: “makeshift alternator”,  
“description”: “A home made alternator that is little more than a spool of copper wire, that a magnet passes near.”,  
“weight”: 40,  
“volume”: 3,  
“price”: 90  
},  
{  
“type” : “recipe”,  
“result”: “makeshift\_alternator”,  
“category”: “CC\_OTHER”,  
“subcategory”: “CSC\_OTHER\_PARTS”,  
“skill\_used”: “fabrication”,  
“difficulty”: 3,  
“time”: 1000,  
“reversible”: true,  
“autolearn”: true,  
“qualities”:[  
{“id”:“CUT”,“level”:1}  
],  
“tools”: [

],  
“components”: [  
[  
[“rag”, 1],  
[“felt\_patch”, 1],  
[“duct\_tape”, 50],  
[“string\_6”, 2],  
[“sinew”, 50],  
[“thread”, 50],  
[“yarn”, 50],  
[“plant\_fibre”, 50],  
[“withered”, 1]  
],  
[  
[“copper”, 20]  
]  
]  
}  
][/code][/spoiler]

Pastebin with the blacklist if anyone would like it: [http://pastebin.com/sLvbKTTM](http://pastebin.com/sLvbKTTM)

I’m also trying to define a new type of vehicle part, hint: It involves tinder as a fuel type  
But that’s another headache for another day

Additionally, is there an output log for json errors? Game stopped showing errors during load for some reason.  
Seems to be an [issue](https://github.com/CleverRaven/Cataclysm-DDA/issues/20678)

---

<div class="post-metadata">

**Author:** ![Zhilkin](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/zhilkin/32/3749_2.png) [@Zhilkin](https://discourse.cataclysmdda.org/u/Zhilkin)\
**Post date:** [March 29, 2017, 9:20am UTC](https://discourse.cataclysmdda.org/t/the-minor-json-questions-thread/12858/87 "2017-03-29T09:20:25Z")

</div>

[quote=“wad67, post:83, topic:12858”]Is there a way for an item blacklist to remove items from the basegame?  
It seems to disable crafting, and spawns although items still start with various professions are are still visible in the wish menu.

I was talking to some people on discord, and the main option appears to be redefining every base object that I don’t want to ‘none’.[/quote]  
I beleive you can just create new core mod and start new game without dda.

---

<div class="post-metadata">

**Author:** ![wad67](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/wad67/32/7_2.png) [@wad67](https://discourse.cataclysmdda.org/u/wad67)\
**Post date:** [March 30, 2017, 6:48pm UTC](https://discourse.cataclysmdda.org/t/the-minor-json-questions-thread/12858/88 "2017-03-30T18:48:19Z")

</div>

[quote=“Zhilkin, post:87, topic:12858”][quote=“wad67, post:83, topic:12858”]Is there a way for an item blacklist to remove items from the basegame?  
It seems to disable crafting, and spawns although items still start with various professions are are still visible in the wish menu.

I was talking to some people on discord, and the main option appears to be redefining every base object that I don’t want to ‘none’.[/quote]  
I beleive you can just create new core mod and start new game without dda.[/quote]

This made my life a couple of thousand times easier, thanks!  
Made a new core mod, removed all the clothing. Started a new game, skipped a couple thousand error messages and then lo and behold. No clothing!  
Now all I have to do is come up with a set of material & bodypart based generic clothing, then redefine everything that referred to the old clothing list.

 ![](https://image.ibb.co/jC2L5a/progress.png)

I don’t really want to have overlapping items, articles of clothing with multi materials might be considered. Might use some functionality similar to the MBR vest.

---

<div class="post-metadata">

**Author:** ![GrapeSquid](https://avatars.discourse-cdn.com/v4/letter/g/c67d28/32.png) [@GrapeSquid](https://discourse.cataclysmdda.org/u/GrapeSquid)\
**Post date:** [April 1, 2017, 6:47am UTC](https://discourse.cataclysmdda.org/t/the-minor-json-questions-thread/12858/89 "2017-04-01T06:47:40Z")

</div>

where can i find the code for the kilns and fermentation vats that tells them to store materials in them and then convert it into another item after some time. Also i can’t seem to find the recipe for tinder anywhere, not that it matters really I can use other recipes.

---

<div class="post-metadata">

**Author:** ![Coolthulhu](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/coolthulhu/32/2446_2.png) [@Coolthulhu](https://discourse.cataclysmdda.org/u/Coolthulhu)\
**Post date:** [April 1, 2017, 1:46pm UTC](https://discourse.cataclysmdda.org/t/the-minor-json-questions-thread/12858/90 "2017-04-01T13:46:28Z")

</div>

> [@GrapeSquid](#):
>
> where can i find the code for the kilns and fermentation vats that tells them to store materials in them and then convert it into another item after some time.

iexamine.cpp

> Also i can't seem to find the recipe for tinder anywhere, not that it matters really I can use other recipes.

Survival tools mod

---

<div class="post-metadata">

**Author:** ![pisskop](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/pisskop/32/1327_2.png) [@pisskop](https://discourse.cataclysmdda.org/u/pisskop)\
**Post date:** [April 13, 2017, 9:06pm UTC](https://discourse.cataclysmdda.org/t/the-minor-json-questions-thread/12858/91 "2017-04-13T21:06:03Z")

</div>

Is it possible to confer a trait upon somebody using effects?

Lets say, for example, I gave human flesh a 1% chance of granting the cannibal mutation. Yes, no?

---

<div class="post-metadata">

**Author:** ![Coolthulhu](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/coolthulhu/32/2446_2.png) [@Coolthulhu](https://discourse.cataclysmdda.org/u/Coolthulhu)\
**Post date:** [April 13, 2017, 10:31pm UTC](https://discourse.cataclysmdda.org/t/the-minor-json-questions-thread/12858/92 "2017-04-13T22:31:49Z")

</div>

Currently no

---

<div class="post-metadata">

**Author:** ![pisskop](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/pisskop/32/1327_2.png) [@pisskop](https://discourse.cataclysmdda.org/u/pisskop)\
**Post date:** [April 20, 2017, 8:39pm UTC](https://discourse.cataclysmdda.org/t/the-minor-json-questions-thread/12858/93 "2017-04-20T20:39:59Z")

</div>

How do I add my own builtins?

I tried adding new caves; for instance it was a few minutes of work to make a ‘dusk horror’ cave. but the game wont read it or I dont know how to properly add it as a builtin.

The src mentions:  
mapgen\_functions\_big.cpp

but no such file exists?

---

<div class="post-metadata">

**Author:** ![Coolthulhu](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/coolthulhu/32/2446_2.png) [@Coolthulhu](https://discourse.cataclysmdda.org/u/Coolthulhu)\
**Post date:** [April 21, 2017, 8:35am UTC](https://discourse.cataclysmdda.org/t/the-minor-json-questions-thread/12858/94 "2017-04-21T08:35:46Z")

</div>

Nowadays it’s just mapgen\_functions.cpp

To add a builtin, you need to add a function in mapgen\_functions.cpp and bind it to a name in init\_mapgen\_builtin\_functions function in the same file.  
Then, of course, recompile the game.

---

<div class="post-metadata">

**Author:** ![MorCel\_374](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/morcel_374/32/1169_2.png) [@MorCel\_374](https://discourse.cataclysmdda.org/u/MorCel_374)\
**Post date:** [April 23, 2017, 4:10pm UTC](https://discourse.cataclysmdda.org/t/the-minor-json-questions-thread/12858/95 "2017-04-23T16:10:32Z")

</div>

I’m trying to add some new mutations and thresholds, and got some questions about the json’s and cpp’s.

What’s the matter with mutation\_ordering.json? It looks like it’s some sort of priority order for thresholds. And where could I get the source for the new experimental? The one on the main site ([http://en.cataclysmdda.com/](http://en.cataclysmdda.com/)) seems old.

---

<div class="post-metadata">

**Author:** ![Coolthulhu](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/coolthulhu/32/2446_2.png) [@Coolthulhu](https://discourse.cataclysmdda.org/u/Coolthulhu)\
**Post date:** [April 23, 2017, 5:08pm UTC](https://discourse.cataclysmdda.org/t/the-minor-json-questions-thread/12858/96 "2017-04-23T17:08:16Z")

</div>

[quote=“MorCel 374, post:95, topic:12858”]1. What’s the matter with mutation\_ordering.json? It looks like it’s some sort of priority order for thresholds.

1. And where could I get the source for the new experimental? The one on the main site ([http://en.cataclysmdda.com/](http://en.cataclysmdda.com/)) seems old.[/quote]

2. It’s draw order

3. [https://github.com/CleverRaven/Cataclysm-DDA](https://github.com/CleverRaven/Cataclysm-DDA)

---

<div class="post-metadata">

**Author:** ![MorCel\_374](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/morcel_374/32/1169_2.png) [@MorCel\_374](https://discourse.cataclysmdda.org/u/MorCel_374)\
**Post date:** [April 23, 2017, 5:29pm UTC](https://discourse.cataclysmdda.org/t/the-minor-json-questions-thread/12858/97 "2017-04-23T17:29:04Z")

</div>

Thanks!

---

<div class="post-metadata">

**Author:** ![Maddremor](https://avatars.discourse-cdn.com/v4/letter/m/85e7bf/32.png) [@Maddremor](https://discourse.cataclysmdda.org/u/Maddremor)\
**Post date:** [May 2, 2017, 6:00pm UTC](https://discourse.cataclysmdda.org/t/the-minor-json-questions-thread/12858/98 "2017-05-02T18:00:22Z")

</div>

How do you replace the terrain tiles that make up bridges? Trying to make bridges generate as a variant of shallow water to allow boats to pass bridges.

---

<div class="post-metadata">

**Author:** ![pisskop](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/pisskop/32/1327_2.png) [@pisskop](https://discourse.cataclysmdda.org/u/pisskop)\
**Post date:** [May 2, 2017, 6:55pm UTC](https://discourse.cataclysmdda.org/t/the-minor-json-questions-thread/12858/99 "2017-05-02T18:55:01Z")

</div>

Gotta change what they are made of.

'Unfortunately, I dont think they are made of anything but pavement. so changing them would involve altering what pavement is. Bridges are hardcoded, so you cant replace their constituent IDs, only change their properties.

---

<div class="post-metadata">

**Author:** ![Zhilkin](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/zhilkin/32/3749_2.png) [@Zhilkin](https://discourse.cataclysmdda.org/u/Zhilkin)\
**Post date:** [May 13, 2017, 8:14am UTC](https://discourse.cataclysmdda.org/t/the-minor-json-questions-thread/12858/100 "2017-05-13T08:14:44Z")

</div>

> [@Maddremor](#):
>
> How do you replace the terrain tiles that make up bridges? Trying to make bridges generate as a variant of shallow water to allow boats to pass bridges.

Changing JSON won’t be enough.

[Previous page](https://discourse.cataclysmdda.org/t/the-minor-json-questions-thread/12858.md?page=4)

[Next page](https://discourse.cataclysmdda.org/t/the-minor-json-questions-thread/12858.md?page=6)
