# The Toolbox

**URL:** https://discourse.cataclysmdda.org/c/game-talk/the-toolbox/21.md?page=20

[Latest](https://discourse.cataclysmdda.org/latest.md) · [Categories](https://discourse.cataclysmdda.org/categories.md) · [Tags](https://discourse.cataclysmdda.org/tags.md)

**Page:** 21

---

## [Activating items (i.e. MP3 (on) and MP3 (off))](https://discourse.cataclysmdda.org/t/activating-items-i-e-mp3-on-and-mp3-off/7814)

<div class="topic-metadata">

**Author:** [@RADIALTHRONE1](https://discourse.cataclysmdda.org/u/RADIALTHRONE1)\
**Replies:** 8\
**Last updated:** [November 10, 2014, 10:45pm UTC](https://discourse.cataclysmdda.org/t/activating-items-i-e-mp3-on-and-mp3-off/7814 "2014-11-10T22:45:16Z")

</div>

I’m trying to create a new tool/weapon with the ability to turn on and off, similar to the tactical(shock) tonfa or the chainsaw. Problem is, I have no idea how to make it so activating it turns it on/off. I have the res…

---

## [Checking vehicle part power usage/production (spec. in veh\_interact::cant\_do)](https://discourse.cataclysmdda.org/t/checking-vehicle-part-power-usage-production-spec-in-veh-interact-cant-do/7808)

<div class="topic-metadata">

**Author:** [@ThinkInvisible](https://discourse.cataclysmdda.org/u/ThinkInvisible)\
**Replies:** 0\
**Last updated:** [November 8, 2014, 3:32pm UTC](https://discourse.cataclysmdda.org/t/checking-vehicle-part-power-usage-production-spec-in-veh-interact-cant-do/7808 "2014-11-08T15:32:14Z")

</div>

I’m trying to make a multimeter item that measures power consumption, power production and possibly charge levels (could replace magically knowing how much charge an item has left with a rough guess, requiring this item …

---

## [Help finding code for rags/leather patches (never mind, done)](https://discourse.cataclysmdda.org/t/help-finding-code-for-rags-leather-patches-never-mind-done/7747)

<div class="topic-metadata">

**Author:** [@TheFlame52](https://discourse.cataclysmdda.org/u/TheFlame52)\
**Replies:** 11\
**Last updated:** [November 7, 2014, 12:41am UTC](https://discourse.cataclysmdda.org/t/help-finding-code-for-rags-leather-patches-never-mind-done/7747 "2014-11-07T00:41:37Z")

</div>

I’m trying to make wool items cuttable into wool patches. These can be disassembled into wool thread, which can be used as thread or with knitting needles to make other wool clothing. I want to find the code for leather …

---

## [Error: line 1:1: expected object or array but found ' '](https://discourse.cataclysmdda.org/t/error-line-1-1-expected-object-or-array-but-found/7762)

<div class="topic-metadata">

**Author:** [@Lanceo90](https://discourse.cataclysmdda.org/u/Lanceo90)\
**Replies:** 22\
**Last updated:** [November 4, 2014, 10:20pm UTC](https://discourse.cataclysmdda.org/t/error-line-1-1-expected-object-or-array-but-found/7762 "2014-11-04T22:20:49Z")

</div>

Thought I had things down, but after making my item file for my broken anamatronics I the debug: error loading data from json: data/mods//anamatronics/melee.json line 1:1: expected object or array but found ’ ’ Mod fol…

---

## [Planning to code out a camel bag/hydration pack](https://discourse.cataclysmdda.org/t/planning-to-code-out-a-camel-bag-hydration-pack/7701)

<div class="topic-metadata">

**Author:** [@jokermatt999](https://discourse.cataclysmdda.org/u/jokermatt999)\
**Replies:** 1\
**Last updated:** [October 29, 2014, 9:03pm UTC](https://discourse.cataclysmdda.org/t/planning-to-code-out-a-camel-bag-hydration-pack/7701 "2014-10-29T21:03:52Z")

</div>

So I was planning to add a hydration bag too the game (commonly known as CamelBak), and I’ve got it mostly planned out. It’ll be a CONTAINER, able to sheath in a runner or survivor pack, which can be drank from once shea…

---

## [Code for butchering](https://discourse.cataclysmdda.org/t/code-for-butchering/7692)

<div class="topic-metadata">

**Author:** [@Snaaty](https://discourse.cataclysmdda.org/u/Snaaty)\
**Replies:** 2\
**Last updated:** [October 28, 2014, 10:27pm UTC](https://discourse.cataclysmdda.org/t/code-for-butchering/7692 "2014-10-28T22:27:09Z")

</div>

Hi, so, I am trying to figure out the butchering code in order to eventually add more butchering products. if (fats \> 0) { if (corpse-\>has\_flag(MF\_FAT)) { m.spawn\_item(u.posx, u.posy, "fat", fats, 0…

---

## [Using Lua to change tool of arbitrary number of recipes](https://discourse.cataclysmdda.org/t/using-lua-to-change-tool-of-arbitrary-number-of-recipes/7444)

<div class="topic-metadata">

**Author:** [@Barhandar](https://discourse.cataclysmdda.org/u/Barhandar)\
**Replies:** 4\
**Last updated:** [October 7, 2014, 4:34pm UTC](https://discourse.cataclysmdda.org/t/using-lua-to-change-tool-of-arbitrary-number-of-recipes/7444 "2014-10-07T16:34:30Z")

</div>

Is it possible? Let’s say I want to take all recipes that require tailoring, difficulty more than 3, check if they have needles/sewing kit, remove needles/sewing kit tools entry, add sewing machine entry with the same a…

---

## [SDL Compiling](https://discourse.cataclysmdda.org/t/sdl-compiling/7445)

<div class="topic-metadata">

**Author:** [@Xynon](https://discourse.cataclysmdda.org/u/Xynon)\
**Replies:** 8\
**Last updated:** [October 4, 2014, 11:21pm UTC](https://discourse.cataclysmdda.org/t/sdl-compiling/7445 "2014-10-04T23:21:57Z")

</div>

I am currently using Code::Blocks to make my own large conversion mod of this game, but after compiling I realized it was not SDL. My question is how do I get the SDL version compiled?

---

## [Fast learner trait](https://discourse.cataclysmdda.org/t/fast-learner-trait/7482)

<div class="topic-metadata">

**Author:** [@jokaro](https://discourse.cataclysmdda.org/u/jokaro)\
**Replies:** 1\
**Last updated:** [September 29, 2014, 3:07pm UTC](https://discourse.cataclysmdda.org/t/fast-learner-trait/7482 "2014-09-29T15:07:20Z")

</div>

I was interesting in looking up how fast learner is implemented in code. But I have searched for a lot of things and still can only find a reference to the trait in the mutations.json file. Nothing in code. Where should …

---

## [.json editing](https://discourse.cataclysmdda.org/t/json-editing/5583)

<div class="topic-metadata">

**Author:** [@secretfire](https://discourse.cataclysmdda.org/u/secretfire)\
**Replies:** 14\
**Last updated:** [September 27, 2014, 3:26am UTC](https://discourse.cataclysmdda.org/t/json-editing/5583 "2014-09-27T03:26:05Z")

</div>

Query! I’ve been poking around the .json files. Most of them seem…amazingly self-explanatory. Like Dwarf Fortress Raw files before the tissues all went in. However…I keep seeing squares pop up in notepad, and they are a…

---

## [Single bodyparts jsonized?](https://discourse.cataclysmdda.org/t/single-bodyparts-jsonized/7295)

<div class="topic-metadata">

**Author:** [@Snaaty](https://discourse.cataclysmdda.org/u/Snaaty)\
**Replies:** 4\
**Last updated:** [September 9, 2014, 7:41am UTC](https://discourse.cataclysmdda.org/t/single-bodyparts-jsonized/7295 "2014-09-09T07:41:28Z")

</div>

Hello, this is actually just two questions and potentially a request. Are single body part flags available in json yet? Also, is it intended to eventually split up “pairs” of things like gloves and shoes into single p…

---

## [Different colours](https://discourse.cataclysmdda.org/t/different-colours/7296)

<div class="topic-metadata">

**Author:** [@Snaaty](https://discourse.cataclysmdda.org/u/Snaaty)\
**Replies:** 3\
**Last updated:** [September 9, 2014, 7:33am UTC](https://discourse.cataclysmdda.org/t/different-colours/7296 "2014-09-09T07:33:24Z")

</div>

Hello, I have a fairly silly question: How are colours handled in this wonderful game? In order to use a certain colour in json do we have to add some code to “translate” it from the rgb first? I have really no idea wha…

---

## [Trying to add some fruit trees. facing errors and in need of some help](https://discourse.cataclysmdda.org/t/trying-to-add-some-fruit-trees-facing-errors-and-in-need-of-some-help/7261)

<div class="topic-metadata">

**Author:** [@jcd](https://discourse.cataclysmdda.org/u/jcd)\
**Replies:** 6\
**Last updated:** [September 8, 2014, 10:49am UTC](https://discourse.cataclysmdda.org/t/trying-to-add-some-fruit-trees-facing-errors-and-in-need-of-some-help/7261 "2014-09-08T10:49:41Z")

</div>

well, title is the subject. specifically i am trying to add pear, cherry, peach apricot and plum trees, to have some variety over just apples. my internet searches convey that just these fruit trees (and apples ofc) ex…

---

## [Change a terrain feature after some period of time?](https://discourse.cataclysmdda.org/t/change-a-terrain-feature-after-some-period-of-time/7267)

<div class="topic-metadata">

**Author:** [@jcd](https://discourse.cataclysmdda.org/u/jcd)\
**Replies:** 2\
**Last updated:** [September 7, 2014, 7:40pm UTC](https://discourse.cataclysmdda.org/t/change-a-terrain-feature-after-some-period-of-time/7267 "2014-09-07T19:40:03Z")

</div>

i would like to make trees re-harvestable year after year… (maybe subsequently implementing planting new trees, having trees growing to full size and later trees growing old and stop producing fruits) but… in order to …

---

## [Possible to define recipe output amounts?](https://discourse.cataclysmdda.org/t/possible-to-define-recipe-output-amounts/7155)

<div class="topic-metadata">

**Author:** [@Enepttastic](https://discourse.cataclysmdda.org/u/Enepttastic)\
**Replies:** 1\
**Last updated:** [September 5, 2014, 6:26am UTC](https://discourse.cataclysmdda.org/t/possible-to-define-recipe-output-amounts/7155 "2014-09-05T06:26:07Z")

</div>

I’m trying to make a recipe that replicates deconstructing rags to thread in order to reduce the button presses for mass thread harvesting. I made the recipe itself fine but due to how thread is defined in the ammo.json,…

---

## [Equiped Enemies](https://discourse.cataclysmdda.org/t/equiped-enemies/6067)

<div class="topic-metadata">

**Author:** [@Vherid](https://discourse.cataclysmdda.org/u/Vherid)\
**Replies:** 8\
**Last updated:** [August 27, 2014, 10:47pm UTC](https://discourse.cataclysmdda.org/t/equiped-enemies/6067 "2014-08-27T22:47:03Z")

</div>

I wonder if some general questions thread should be made I just feel like I’m thread spamming with silly simple questions so I am sorry about that. So looking through the documentation and the code a bit, it is my under…

---

## [What IDE do you use to code Cataclysm?](https://discourse.cataclysmdda.org/t/what-ide-do-you-use-to-code-cataclysm/6985)

<div class="topic-metadata">

**Author:** [@Turtlicious](https://discourse.cataclysmdda.org/u/Turtlicious)\
**Replies:** 13\
**Last updated:** [August 20, 2014, 11:54am UTC](https://discourse.cataclysmdda.org/t/what-ide-do-you-use-to-code-cataclysm/6985 "2014-08-20T11:54:09Z")

</div>

I’m looking for one to stick with, I hear VS is pretty great, but I’m running Windows 7 still. Not to mention I think netbeans and eclipse have git support. I’m curious about your opinions.

---

## [What compiler is used to create the windows executable?](https://discourse.cataclysmdda.org/t/what-compiler-is-used-to-create-the-windows-executable/7126)

<div class="topic-metadata">

**Author:** [@Paquito](https://discourse.cataclysmdda.org/u/Paquito)\
**Replies:** 3\
**Last updated:** [August 19, 2014, 11:46pm UTC](https://discourse.cataclysmdda.org/t/what-compiler-is-used-to-create-the-windows-executable/7126 "2014-08-19T23:46:11Z")

</div>

What compiler is used to create the windows executable that people are meant to use to play the game?

---

## [Location of fire code](https://discourse.cataclysmdda.org/t/location-of-fire-code/7118)

<div class="topic-metadata">

**Author:** [@HavingPhun](https://discourse.cataclysmdda.org/u/HavingPhun)\
**Replies:** 4\
**Last updated:** [August 19, 2014, 2:45am UTC](https://discourse.cataclysmdda.org/t/location-of-fire-code/7118 "2014-08-19T02:45:11Z")

</div>

Hi, I am new to these forums, but have been playing Cataclysm DDA since around version 0.5. I have searched the code and the doxygen documentation for it, but cannot find the location for the code for fires. I want to ma…

---

## [Overmap mongroup rework](https://discourse.cataclysmdda.org/t/overmap-mongroup-rework/7072)

<div class="topic-metadata">

**Author:** [@Reaper](https://discourse.cataclysmdda.org/u/Reaper)\
**Replies:** 7\
**Last updated:** [August 14, 2014, 7:52am UTC](https://discourse.cataclysmdda.org/t/overmap-mongroup-rework/7072 "2014-08-14T07:52:51Z")

</div>

Say me for what you change from Vector to multimap\<tripoint, mongroup\>? You want better performance? Where? In overmap::draw? Cache result for hordes and you get better performance. You run around vector ONCE - in spawn,…

---

## [Dispresion](https://discourse.cataclysmdda.org/t/dispresion/7078)

<div class="topic-metadata">

**Author:** [@Arek\_PL](https://discourse.cataclysmdda.org/u/Arek_PL)\
**Replies:** 2\
**Last updated:** [August 13, 2014, 11:00am UTC](https://discourse.cataclysmdda.org/t/dispresion/7078 "2014-08-13T11:00:46Z")

</div>

high dispresion = high accuracy or high dispresion = low accuracy?

---

## [Why double spaces in .json?](https://discourse.cataclysmdda.org/t/why-double-spaces-in-json/6884)

<div class="topic-metadata">

**Author:** [@LazyCat-rus](https://discourse.cataclysmdda.org/u/LazyCat-rus)\
**Replies:** 3\
**Last updated:** [July 28, 2014, 9:03pm UTC](https://discourse.cataclysmdda.org/t/why-double-spaces-in-json/6884 "2014-07-28T21:03:36Z")

</div>

subj

---

## [Adding NPCs to your json building map](https://discourse.cataclysmdda.org/t/adding-npcs-to-your-json-building-map/6904)

<div class="topic-metadata">

**Author:** [@acidia](https://discourse.cataclysmdda.org/u/acidia)\
**Replies:** 1\
**Last updated:** [July 27, 2014, 6:05am UTC](https://discourse.cataclysmdda.org/t/adding-npcs-to-your-json-building-map/6904 "2014-07-27T06:05:31Z")

</div>

We are currently in the process of porting parts of NPCs to jsons… it doesn’t seem very exciting but I’m going to walk you through the things you should be familiar with before adding an NPC to your building in the new s…

---

## [Where to start?](https://discourse.cataclysmdda.org/t/where-to-start/6037)

<div class="topic-metadata">

**Author:** [@mercylost](https://discourse.cataclysmdda.org/u/mercylost)\
**Replies:** 3\
**Last updated:** [July 25, 2014, 6:55pm UTC](https://discourse.cataclysmdda.org/t/where-to-start/6037 "2014-07-25T18:55:52Z")

</div>

I’d like to touch down on programming. I’ll be keeping it light. I’d like to program a couple of diseases. I’m doing this as my proactive way to gear up for medical microbiology next semester. However, I’ve never actuall…

---

## [How to use debug log?](https://discourse.cataclysmdda.org/t/how-to-use-debug-log/6642)

<div class="topic-metadata">

**Author:** [@Reaper](https://discourse.cataclysmdda.org/u/Reaper)\
**Replies:** 6\
**Last updated:** [July 18, 2014, 4:40pm UTC](https://discourse.cataclysmdda.org/t/how-to-use-debug-log/6642 "2014-07-18T16:40:51Z")

</div>

subj. DebugLog() \<\< "Debug msg"; // NOT work dbg(D\_INFO) \<\< "Debug msg"; // also. Where is debug.log file? I not fount them in config/

---

## [NPC Items \[How to...\]](https://discourse.cataclysmdda.org/t/npc-items-how-to/6798)

<div class="topic-metadata">

**Author:** [@acidia](https://discourse.cataclysmdda.org/u/acidia)\
**Replies:** 0\
**Last updated:** [July 16, 2014, 12:48am UTC](https://discourse.cataclysmdda.org/t/npc-items-how-to/6798 "2014-07-16T00:48:39Z")

</div>

So here is how the new NPC inventory system works. Regardless of the NPC class, all NPCs draw what items they should be carrying from Cataclysm-DDA/data/json/npcs/items\_generic.json when they do not have a unique file (…

---

## [Compiling in MinGW](https://discourse.cataclysmdda.org/t/compiling-in-mingw/6666)

<div class="topic-metadata">

**Author:** [@Anxiety](https://discourse.cataclysmdda.org/u/Anxiety)\
**Replies:** 12\
**Last updated:** [July 6, 2014, 6:32am UTC](https://discourse.cataclysmdda.org/t/compiling-in-mingw/6666 "2014-07-06T06:32:33Z")

</div>

I’m trying to set up the source (experimental build) to compile in MinGW on Win 7. Here come the questions: It looks like there’s a NATIVE=win64 build option in the makefile, but it’s not mentioned in the comments at…

---

## [Can't get Microsoft Visual C++ 2010 to compile](https://discourse.cataclysmdda.org/t/cant-get-microsoft-visual-c-2010-to-compile/6267)

<div class="topic-metadata">

**Author:** [@Funk](https://discourse.cataclysmdda.org/u/Funk)\
**Replies:** 9\
**Last updated:** [June 29, 2014, 7:09am UTC](https://discourse.cataclysmdda.org/t/cant-get-microsoft-visual-c-2010-to-compile/6267 "2014-06-29T07:09:51Z")

</div>

It give me and error message \[spoiler=message spoilered\] 1\>------ Build started: Project: Cataclysm, Configuration: Debug Win32 ------ 1\>Project file contains ToolsVersion=“12.0”, which is not supported by this versio…

---

## [How to check why a save file crashes the game?](https://discourse.cataclysmdda.org/t/how-to-check-why-a-save-file-crashes-the-game/6308)

<div class="topic-metadata">

**Author:** [@Ice-o-metric](https://discourse.cataclysmdda.org/u/Ice-o-metric)\
**Replies:** 2\
**Last updated:** [May 29, 2014, 6:33am UTC](https://discourse.cataclysmdda.org/t/how-to-check-why-a-save-file-crashes-the-game/6308 "2014-05-29T06:33:58Z")

</div>

A game i saved maybe the day before yesterday, has spontaneously developed the superpower to crash Cataclysm everytime i try to open it (and only that save game)… Which might make some sense to me had i downloaded an exp…

---

## [Furniture active cycle](https://discourse.cataclysmdda.org/t/furniture-active-cycle/6224)

<div class="topic-metadata">

**Author:** [@muse](https://discourse.cataclysmdda.org/u/muse)\
**Replies:** 2\
**Last updated:** [May 23, 2014, 3:15pm UTC](https://discourse.cataclysmdda.org/t/furniture-active-cycle/6224 "2014-05-23T15:15:48Z")

</div>

I need to implement a turn cycle for a piece of furniture to have it consume liquid over time. Is there an existing way to do this or do I read the code correctly and I’ll need to break out a cpp/h furniture file and giv…

[Previous page](https://discourse.cataclysmdda.org/c/game-talk/the-toolbox/21.md?page=19)

[Next page](https://discourse.cataclysmdda.org/c/game-talk/the-toolbox/21.md?page=21)
