# .json editing

**URL:** https://discourse.cataclysmdda.org/t/json-editing/5583
**Category:** The Toolbox
**Created:** [March 24, 2014, 9:28pm UTC](https://discourse.cataclysmdda.org/t/json-editing/5583 "2014-03-24T21:28:14Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![secretfire](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/secretfire/32/2984_2.png) [@secretfire](https://discourse.cataclysmdda.org/u/secretfire)
#### Post date: [March 24, 2014, 9:28pm UTC](https://discourse.cataclysmdda.org/t/json-editing/5583/1 "2014-03-24T21:28:14Z")

</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 all one or two huuuuuuuuuuuge lines.  
Is there another program I’m supposed to use when peering at these, which will result in pretty formatting?

I just want to play with them enough to figure out, firstly, how to add in more clothes and items (I figure such basic work is always needed, and fun!), and after that…well, one thing at a time. But first, I’m pretty sure I’m not supposed to be using notepad to view these.

Thanks! Sorry for the dumb question.

---

<div class="post-metadata">

### Author: ![Zaweri\_Runewright](https://avatars.discourse-cdn.com/v4/letter/z/5e9695/32.png) [@Zaweri\_Runewright](https://discourse.cataclysmdda.org/u/Zaweri_Runewright)
#### Post date: [March 24, 2014, 9:32pm UTC](https://discourse.cataclysmdda.org/t/json-editing/5583/2 "2014-03-24T21:32:37Z")

</div>

MS Word or Notepad++.

---

<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: [March 24, 2014, 9:53pm UTC](https://discourse.cataclysmdda.org/t/json-editing/5583/3 "2014-03-24T21:53:38Z")

</div>

Yeah, I highly suggest you pick up Notepad++, it’s what I personally use and is way better then regular old notepad.

---

<div class="post-metadata">

### Author: ![secretfire](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/secretfire/32/2984_2.png) [@secretfire](https://discourse.cataclysmdda.org/u/secretfire)
#### Post date: [March 24, 2014, 10:05pm UTC](https://discourse.cataclysmdda.org/t/json-editing/5583/4 "2014-03-24T22:05:27Z")

</div>

Thanks guys!

Already made three items, woot woot. Kinda silly - but a start.

{  
“type” : “ARMOR”,  
“id” : “cheeruniform”,  
“name” : “Cheer uniform”,  
“weight” : 158,  
“color” : “yellow”,  
“covers” : [“TORSO”],  
“to\_hit” : 0,  
“storage” : 0,  
“symbol” : “[”,  
“description” : “A v-neck sleeveless cheer uniform, carrying the logo of a local team.”  
“price” : 30000,  
“material” : [“cotton”, “null”],  
“volume” : 0,  
“cutting” : 0,  
“warmth” : 10,  
“phase” : “solid”,  
“enviromental\_protection” : 0,  
“encumbrance” : 0,  
“bashing” : -5,  
“flags” : [“VARSIZE”, “FANCY”],  
“coverage” : 90,  
“material\_thickness” : 1  
{  
“type” : “ARMOR”,  
“id” : “cheerskirt”,  
“name” : “Cheerleader skirt”,  
“weight” : 74,  
“color” : “yellow”,  
“covers” : [“LEGS”],  
“to\_hit” : 0,  
“storage” : 1,  
“symbol” : “[”,  
“description” : “A short cheerleader’s skirt. Comes with built-in shorts.”,  
“price” : 12000,  
“material” : [“cotton”, “null”, “FANCY”],  
“volume” : 1,  
“cutting” : 0,  
“warmth” : 10,  
“phase” : “solid”,  
“enviromental\_protection” : 0,  
“encumbrance” : 0,  
“bashing” : -5,  
“flags” : [“VARSIZE”],  
“coverage” : 50,  
“material\_thickness” : 1  
},  
{  
“type” : “ARMOR”,  
“id” : “toesocks”,  
“name” : “Toe socks”,  
“weight” : 32,  
“color” : “pink”,  
“covers” : [“FEET”],  
“to\_hit” : 0,  
“storage” : 0,  
“symbol” : “[”,  
“description” : “Cute socks with individual little mini-socks for each toe.”,  
“price” : 10000,  
“material” : [“cotton”, “null”],  
“volume” : 1,  
“cutting” : 0,  
“warmth” : 30,  
“phase” : “solid”,  
“enviromental\_protection” : 0,  
“encumbrance” : 0,  
“bashing” : -5,  
“flags” : [“VARSIZE”, “SKINTIGHT”,“FANCY”],  
“coverage” : 100,  
“material\_thickness” : 1  
},

I was thinking of making a few new professions, some clothing to go with them, and so on, as a way to ‘break into’ modding, and then see what simple items in general might be useful to create.

---

<div class="post-metadata">

### Author: ![Chiko](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/chiko/32/3238_2.png) [@Chiko](https://discourse.cataclysmdda.org/u/Chiko)
#### Post date: [March 24, 2014, 10:12pm UTC](https://discourse.cataclysmdda.org/t/json-editing/5583/5 "2014-03-24T22:12:04Z")

</div>

Ah! Those are some nice additions.

And yeah Notepad++ is awesome. I used to use the old notepad for all my modding… like for years. ++ makes everything so easy.

I still use the old notepad for modding some other games, though. I’m like really slow to embrace new tools and technology in general. 😛

---

<div class="post-metadata">

### Author: ![secretfire](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/secretfire/32/2984_2.png) [@secretfire](https://discourse.cataclysmdda.org/u/secretfire)
#### Post date: [March 25, 2014, 12:16am UTC](https://discourse.cataclysmdda.org/t/json-editing/5583/6 "2014-03-25T00:16:44Z")

</div>

Thanks!

Quick question. Is there a way to make an item give a boost to a stat?

For example, lets say I’m adding in different types of footwear. How would I make a pair of roller skates that would give a speed boost in some circumstances, but a penalty in others? Is that possible?

---

<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: [March 25, 2014, 12:17am UTC](https://discourse.cataclysmdda.org/t/json-editing/5583/7 "2014-03-25T00:17:55Z")

</div>

Not without actual code editing at the moment, no.

---

<div class="post-metadata">

### Author: ![secretfire](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/secretfire/32/2984_2.png) [@secretfire](https://discourse.cataclysmdda.org/u/secretfire)
#### Post date: [March 25, 2014, 12:51am UTC](https://discourse.cataclysmdda.org/t/json-editing/5583/8 "2014-03-25T00:51:41Z")

</div>

Alright, thanks.

Well, this is what I’ve made. A variety of hats for men and women, mostly, and some clothing (mostly for women) so I could add in some professions:

New items:

```
{
    "type" : "ARMOR",
    "id" : "widebrimmedhat",
    "name" : "Wide-brimmed hat",
    "weight" : 213,
    "color" : "dark_gray",
    "covers" : ["HEAD"],
    "to_hit" : 0,
    "storage" : 0,
    "symbol" : "[",
    "description" : "A woman's wide-brimmed hat. Crushes easily and designed to keep the sun out of your eyes.",
    "price" : 5500,
    "material" : ["cotton", "null"],
    "volume" : 1,
    "cutting" : 0,
    "warmth" : 5,
    "phase" : "solid",
    "enviromental_protection" : 1,
    "encumbrance" : 0,
    "bashing" : -3,
    "coverage" : 100,
    "flags": ["FANCY", "VARSIZE", "SUN_GLASSES"],
    "material_thickness" : 1
},
    {
    "type" : "ARMOR",
    "id" : "clochehat",
    "name" : "Cloche hat",
    "weight" : 213,
    "color" : "dark_gray",
    "covers" : ["HEAD"],
    "to_hit" : 0,
    "storage" : 0,
    "symbol" : "[",
    "description" : "A woman's asymetrical cloche hat. Rimmed with velvet, with a cute button on the side.",
    "price" : 5500,
    "material" : ["cotton", "null"],
    "volume" : 5,
    "cutting" : 0,
    "warmth" : 5,
    "phase" : "solid",
    "enviromental_protection" : 1,
    "encumbrance" : 0,
    "bashing" : -3,
    "coverage" : 100,
    "flags": ["FANCY", "VARSIZE"],
    "material_thickness" : 1
},
	    {
    "type" : "ARMOR",
    "id" : "fedora",
    "name" : "fedora",
    "weight" : 213,
    "color" : "dark_gray",
    "covers" : ["HEAD"],
    "to_hit" : 0,
    "storage" : 0,
    "symbol" : "[",
    "description" : "A classic fedora. Rolls up easily, will keep the sun and rain out of your eyes. Stylish and practical.",
    "price" : 9500,
    "material" : ["cotton", "null"],
    "volume" : 1,
    "cutting" : 0,
    "warmth" : 5,
    "phase" : "solid",
    "enviromental_protection" : 2,
    "encumbrance" : 0,
    "bashing" : -3,
    "coverage" : 100,
    "flags": ["FANCY", "VARSIZE","WATERPROOF", "SUN_GLASSES"],
    "material_thickness" : 1
},

{
    "type" : "ARMOR",
    "id" : "littleblackdress",
    "name" : "Little black dress",
    "weight" : 160,
    "color" : "pink",
    "covers" : ["TORSO"],
    "to_hit" : -5,
    "storage" : 0,
    "symbol" : "[",
    "description" : "A classy and iconic little black dress. Every woman should have one.",
    "price" : 18000,
    "material" : ["cotton", "null"],
    "volume" : 10,
    "cutting" : 0,
    "warmth" : 15,
    "phase" : "solid",
    "enviromental_protection" : 0,
    "encumbrance" : 0,
    "bashing" : -5,
    "flags" : ["VARSIZE", "SUPER_FANCY"],
    "coverage" : 85,
    "material_thickness" : 2
},

```

{  
“type” : “ARMOR”,  
“id” : “balletslipper”,  
“name” : “Ballet slippers”,  
“weight” : 32,  
“color” : “light\_gray”,  
“covers” : [“FEET”],  
“to\_hit” : 0,  
“storage” : 0,  
“symbol” : “[”,  
“description” : “Guaranteed to make you run faster and jump higher!”,  
“price” : 10000,  
“material” : [“leather”],  
“volume” : 1,  
“cutting” : 0,  
“warmth” : 10,  
“phase” : “solid”,  
“enviromental\_protection” : 0,  
“encumbrance” : 0,  
“bashing” : -2,  
“flags” : [“VARSIZE”, “FANCY”],  
“coverage” : 90,  
“material\_thickness” : 3  
),  
{  
“type” : “ARMOR”,  
“id” : “leotard”,  
“name” : “Leotard”,  
“weight” : 114,  
“color” : “dark\_gray”,  
“covers” : [“TORSO”],  
“to\_hit” : 0,  
“storage” : 0,  
“symbol” : “[”,  
“description” : “A skintight one-piece outfit that covers the torso but leaves the legs free.”,  
“price” : 20000,  
“material” : [“cotton”, “null”],  
“volume” : 1,  
“cutting” : 0,  
“warmth” : 10,  
“phase” : “solid”,  
“enviromental\_protection” : 0,  
“encumbrance” : 0,  
“bashing” : -5,  
“flags” : [“VARSIZE”, “SKINTIGHT”, “FANCY”],  
“coverage” : 100,  
“material\_thickness” : 1  
},  
{  
“type” : “ARMOR”,  
“id” : “cheeruniform”,  
“name” : “Cheer uniform”,  
“weight” : 158,  
“color” : “yellow”,  
“covers” : [“TORSO”],  
“to\_hit” : 0,  
“storage” : 0,  
“symbol” : “[”,  
“description” : “A v-neck sleeveless cheer uniform, carrying the logo of a local team.”,  
“price” : 30000,  
“material” : [“cotton”, “null”],  
“volume” : 0,  
“cutting” : 0,  
“warmth” : 10,  
“phase” : “solid”,  
“enviromental\_protection” : 0,  
“encumbrance” : 0,  
“bashing” : -5,  
“flags” : [“VARSIZE”, “FANCY”],  
“coverage” : 90,  
“material\_thickness” : 1  
},  
{  
“type” : “ARMOR”,  
“id” : “cheerskirt”,  
“name” : “Cheerleader skirt”,  
“weight” : 74,  
“color” : “yellow”,  
“covers” : [“LEGS”],  
“to\_hit” : 0,  
“storage” : 1,  
“symbol” : “[”,  
“description” : “A short cheerleader’s skirt. Comes with built-in shorts.”,  
“price” : 12000,  
“material” : [“cotton”, “null”, “FANCY”],  
“volume” : 1,  
“cutting” : 0,  
“warmth” : 10,  
“phase” : “solid”,  
“enviromental\_protection” : 0,  
“encumbrance” : 0,  
“bashing” : -5,  
“flags” : [“VARSIZE”],  
“coverage” : 50,  
“material\_thickness” : 1  
},  
{  
“type” : “ARMOR”,  
“id” : “toesocks”,  
“name” : “Toe socks”,  
“weight” : 32,  
“color” : “pink”,  
“covers” : [“FEET”],  
“to\_hit” : 0,  
“storage” : 0,  
“symbol” : “[”,  
“description” : “Cute socks with individual little mini-socks for each toe.”,  
“price” : 10000,  
“material” : [“cotton”, “null”],  
“volume” : 1,  
“cutting” : 0,  
“warmth” : 30,  
“phase” : “solid”,  
“enviromental\_protection” : 0,  
“encumbrance” : 0,  
“bashing” : -5,  
“flags” : [“VARSIZE”, “SKINTIGHT”,“FANCY”],  
“coverage” : 100,  
“material\_thickness” : 1  
},

I also made one new profession. I like it better then the ballroom dancer, but I didn’t replace it:

{  
“type”: “profession”,  
“ident”: “dancer2”,  
“name”: “Ballet Dancer”,  
“description”: “You used to be a ballet dancer before the apocalypse. Now dancing saves your life.”,  
“points”: 0,  
“skills”: [  
{  
“level”: 2,  
“name”: “dodge”  
}  
],  
“items”: {  
“both”: [  
“socks”  
“leotard”,  
“balletslipper”,  
“tights”,

```
        ],
        "male": [
            "briefs",
        ],
        "female": [
            "bra",
            "panties",
			"leg_warmers"
        ]
    }
},

```

I also changed the football player profession. I essentially drastically redid it so the male version is a football player, the female version is a cheerleader, and the text is gender-neutral. I realize you can have female football players, male cheerleaders, and vice-versa, and have known both - but this works better, I think, for a way to add it in.

```
{
    "type": "profession",
    "ident": "linebacker",
       "name": "Jock",
        "male": "Football Player",
        "female": "Cheerleader"
    "description": "It was the middle of a football game at half-time when the apocalypse struck. Everyone used to admire you; now they just admire your brains.",
    "points": 0,
    "items": {
        "both": [
      
        ],
        "male": [
		    "football_armor",
            "tank_top",
            "helmet_football",
            "pants",
            "cleats",
            "mouthpiece",
            "football",
            "briefs"
        ],
        "female": [
            "sports_bra",
            "panties"
			"cheeruniform",
			"cheerskirt",
			"sneakers",
			"socks",
			"purse",
			"gum",
			"cell_phone"
        ]
    }
},

```

If anyone finds them worthwhile, feel free to use them for any purpose you want. Just let me know so I can be happy inside. Or ignore them if you find them annoying. I’m just putting them here so the work is out there. I might add them to a mod eventually if no-one uses them. Who knows. I’m still getting used to the code. I’m sure you all can code this stuff up easy yourselves if you want…but hey, now you don’t have to.

Thanks for the help guys!

EDIT:

Except apparently there’s a problem with my profession code, near the following:

```
			"leotard",
			"balletslipper",
			"tights",
			"
        ],
        "male": [
            "briefs",

```

'separator not strictly allowed at end of array"  
What did I do wrong?

---

<div class="post-metadata">

### Author: ![KA101](https://avatars.discourse-cdn.com/v4/letter/k/278dde/32.png) [@KA101](https://discourse.cataclysmdda.org/u/KA101)
#### Post date: [March 25, 2014, 2:22am UTC](https://discourse.cataclysmdda.org/t/json-editing/5583/9 "2014-03-25T02:22:51Z")

</div>

You want a cheerleader profession, sure, we can work with that. As you said, guys can be cheerleaders, [and they certainly were](http://cheerleading.isport.com/cheerleading-guides/history-of-cheerleading). Women can be kickass football players: the [Pittsburgh Passion](http://pittsburghpassion.com/) went undefeated back in 2007.

We don’t keep women off the field, and men off the sidelines, here. People get told that they can’t be X because they’re a $SEX/GENDER way too often IRL. DDA doesn’t do that.

---

<div class="post-metadata">

### Author: ![uzername](https://avatars.discourse-cdn.com/v4/letter/u/7cd45c/32.png) [@uzername](https://discourse.cataclysmdda.org/u/uzername)
#### Post date: [July 28, 2014, 8:07pm UTC](https://discourse.cataclysmdda.org/t/json-editing/5583/10 "2014-07-28T20:07:29Z")

</div>

> [@Zaweri Runewright](#):
>
> MS Word

It’s NOT adviced to edit plaintext files with MS Word. I had experience when Word added some junk symbols to the beginning and to the end of file, corrupting it. MS Notepad (for quick editing), (g)Vim, Emacs or Notepad++ are better.

---

<div class="post-metadata">

### Author: ![vultures](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/vultures/32/69_2.png) [@vultures](https://discourse.cataclysmdda.org/u/vultures)
#### Post date: [July 28, 2014, 8:56pm UTC](https://discourse.cataclysmdda.org/t/json-editing/5583/11 "2014-07-28T20:56:01Z")

</div>

I’m having some issues with powertext editors, too. Nothing I’ve not been able to bite on the angry end for sure. The thing is to make the txt file UTF-8 compliant and have backup copies.  
I guess there’s a need to mention this, since uzername brought it up, too - there are several opensource code editors out there, concerning solely on script-ish, lua-stuff, html and alike. They’re IDE solutions of sorts, that’s all I can write right now.

---

<div class="post-metadata">

### Author: ![Wayfarer](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/wayfarer/32/76_2.png) [@Wayfarer](https://discourse.cataclysmdda.org/u/Wayfarer)
#### Post date: [September 25, 2014, 11:25pm UTC](https://discourse.cataclysmdda.org/t/json-editing/5583/12 "2014-09-25T23:25:26Z")

</div>

Are the protection values of armor handled differently now? How do I set them? In the armor.json, I see there is material thickness, but all the other values (bashing, cutting etc) I’m guessing are to do with when the item is wielded.

---

<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 25, 2014, 11:34pm UTC](https://discourse.cataclysmdda.org/t/json-editing/5583/13 "2014-09-25T23:34:59Z")

</div>

AFAIK protection values of armor have always been determined based off of the material the armor is made out of and it’s thickness.

---

<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: [September 26, 2014, 1:52am UTC](https://discourse.cataclysmdda.org/t/json-editing/5583/14 "2014-09-26T01:52:32Z")

</div>

yea, check materials.json for the protection values, and multiply them by thickness.

---

<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 27, 2014, 3:26am UTC](https://discourse.cataclysmdda.org/t/json-editing/5583/15 "2014-09-27T03:26:05Z")

</div>

Also for things with multiple materials the weighting is 2/3 \* first material protection value + 1/3 \* second protection value IIRC.
