.json editing

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.

MS Word or Notepad++.

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

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.

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. :stuck_out_tongue:

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?

Not without actual code editing at the moment, no.

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?

You want a cheerleader profession, sure, we can work with that. As you said, guys can be cheerleaders, and they certainly were. Women can be kickass football players: the Pittsburgh Passion 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.

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.

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.

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.

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

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

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