# 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:** 1

<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:** [November 3, 2016, 1:29am UTC](https://discourse.cataclysmdda.org/t/the-minor-json-questions-thread/12858/1 "2016-11-03T01:29:38Z")

</div>

Because having a new thread for every small question is unreasonable.

I hope this sticks.

---

<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:** [November 3, 2016, 1:31am UTC](https://discourse.cataclysmdda.org/t/the-minor-json-questions-thread/12858/2 "2016-11-03T01:31:13Z")

</div>

```
{
    "type": "effect_type",
    "id": "poisoned",
    "name": ["Poisoned"],
    "apply_message": "You feel poisoned!",
    "desc": ["You have been poisoned!"],
    "miss_messages": [["You feel bad inside.", 2]],
  "int_add_val": 1,
  "max_intensity": 3,
  "int_decay_step": -1,
  "int_decay_tick": 4000,
  "decay_messages": [["You feel a little better.", "neutral"], ["You don't feel poisoned any longer", "good"]],
    "rating": "bad",
    "resist_traits": ["POISRESIST"],
    "pain_sizing": true,
    "hurt_sizing": true,
    "main_parts_only": true,
    "base_mods": {
        "per_mod": [-2, -1],
        "dex_mod": [-1, -1],
        "str_mod": [-2, 0],
        "speed_mod": [-5],
        "pain_min": [1],
        "pain_chance": [150, 900],
        "hurt_min": [1],
        "hurt_chance": [450, 2700]
    },
    "scaling_mods": {
        "per_mod": [-1, -0.5],
        "dex_mod": [-1, -1],
        "str_mod": [-2, -1],
        "speed_mod": [-5],
        "pain_min": [0.5],
        "pain_chance": [-25, -200],
        "hurt_min": [1],
        "hurt_chance": [-25, -900]
    }
},
{
    "type": "effect_type",
    "id": "badpoisoned",
    "name": ["Badly Poisoned"],
    "apply_message": "You feel badly poisoned!",
    "desc": ["You have been badly poisoned!"],
    "miss_messages": [["You feel awful inside.", 4]],
  "int_add_val": 1,
  "max_intensity": 3,
  "int_decay_step": -1,
  "int_decay_tick": 9000,
  "decay_messages": [["You feel a little better.", "neutral"], ["You don't feel poisoned any longer", "good"]],
    "rating": "bad",
    "resist_traits": ["POISRESIST"],
    "pain_sizing": true,
    "hurt_sizing": true,
    "main_parts_only": true,
    "base_mods": {
        "per_mod": [-2],
        "dex_mod": [-1],
        "str_mod": [-2, -1],
        "speed_mod": [-10],
        "pain_min": [2],
        "pain_chance": [100, 500],
        "hurt_min": [1],
        "hurt_max": [2],
        "hurt_chance": [300, 1800]
    },
    "scaling_mods": {
        "per_mod": [-1],
        "dex_mod": [-1.5],
        "str_mod": [-1.5, -1],
        "speed_mod": [-5],
        "pain_min": [2],
        "pain_chance": [-20, -100],
        "hurt_min": [1],
        "hurt_max": [2],
        "hurt_chance": [-25, -500]
    }

```

}

^^

I have 2 poison replacements here. I mean to use this in conjunction with the venom tags in order to make a linger-term poison attack from monsters.

The issue Im having is getting it to affect the PC for more than 1 turn. It does apply. It does not stick for longer than 1 turn.

Im hoping somebody will know what I have done wrong here …  
It should work by all my accounts.

---

<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:** [November 3, 2016, 6:33am UTC](https://discourse.cataclysmdda.org/t/the-minor-json-questions-thread/12858/3 "2016-11-03T06:33:29Z")

</div>

> [@pisskop](#):
>
> The issue Im having is getting it to affect the PC for more than 1 turn. It does apply. It does not stick for longer than 1 turn.

Are you setting the duration to something higher than 1 at start?  
Setting intensity to 3 but leaving duration default on application will not cause a 3\*int\_decay\_tick duration, just the default duration of 1.  
The only case you can skip setting duration is if you set max duration - then it will start at max duration by default.

---

<div class="post-metadata">

**Author:** ![xironfistx](https://avatars.discourse-cdn.com/v4/letter/x/b9e5f3/32.png) [@xironfistx](https://discourse.cataclysmdda.org/u/xironfistx)\
**Post date:** [November 18, 2016, 4:35pm UTC](https://discourse.cataclysmdda.org/t/the-minor-json-questions-thread/12858/4 "2016-11-18T16:35:17Z")

</div>

would it be possible to have a sort of bandoleer for ammo that also have a holster function?  
i haven’t attempted to do that yet but i am rather interested in that

---

<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:** [November 18, 2016, 5:07pm UTC](https://discourse.cataclysmdda.org/t/the-minor-json-questions-thread/12858/5 "2016-11-18T17:07:45Z")

</div>

if items have multiple use\_actions a menu will promt you as to what action every time you use it

---

<div class="post-metadata">

**Author:** ![egomassive](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/egomassive/32/381_2.png) [@egomassive](https://discourse.cataclysmdda.org/u/egomassive)\
**Post date:** [November 18, 2016, 8:20pm UTC](https://discourse.cataclysmdda.org/t/the-minor-json-questions-thread/12858/6 "2016-11-18T20:20:14Z")

</div>

I have a question about terrain with vertical and horizontal elements, e.g. t\_chainfence\_v and t\_chainfence\_h. Does it matter if I use them both? In ASCII the AUTO\_WALL\_SYMBOL is used. In tiles they could be treated differently, but usually aren’t. I’ve also noticed there are legacy versions of t\_wall with h and v. I get the feeling this is an old format that’s been deprecated but not updated.

---

<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:** [November 18, 2016, 8:34pm UTC](https://discourse.cataclysmdda.org/t/the-minor-json-questions-thread/12858/7 "2016-11-18T20:34:06Z")

</div>

Yup. You could use all vertical fencing and with auto-connect they would auto-configure themselves.

You could use them, conversely. But no reason to.

---

<div class="post-metadata">

**Author:** ![egomassive](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/egomassive/32/381_2.png) [@egomassive](https://discourse.cataclysmdda.org/u/egomassive)\
**Post date:** [November 18, 2016, 9:56pm UTC](https://discourse.cataclysmdda.org/t/the-minor-json-questions-thread/12858/8 "2016-11-18T21:56:46Z")

</div>

@pisskop: Thanks for the quick response. 🙂

---

<div class="post-metadata">

**Author:** ![egomassive](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/egomassive/32/381_2.png) [@egomassive](https://discourse.cataclysmdda.org/u/egomassive)\
**Post date:** [November 21, 2016, 1:54am UTC](https://discourse.cataclysmdda.org/t/the-minor-json-questions-thread/12858/9 "2016-11-21T01:54:17Z")

</div>

Is there a way to have a chance of furniture or items? I have some crate spots designated in my ASCII map. I want to randomly fill those spaces with closed crates, open crates, or smashed crates. Since crates are furniture and splintered wood and nails are items I can’t find a way to do it. Alternatively, is there a way to randomly smash the map from json?

---

<div class="post-metadata">

**Author:** ![acidia](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/acidia/32/2347_2.png) [@acidia](https://discourse.cataclysmdda.org/u/acidia)\
**Post date:** [November 21, 2016, 2:03am UTC](https://discourse.cataclysmdda.org/t/the-minor-json-questions-thread/12858/10 "2016-11-21T02:03:53Z")

</div>

This is the only way I know of in JSON.

```auto
        "furniture": {
            "X": ["f_crate_c", "f_crate_c", "f_crate_o", "f_floor"],      
        },
        "items": {
             "X": { "item": "trash", "chance": 60 }
        },
```

So 50% for a closed crate, 25% for open, and 25% for floor… but the trash items will spawn even in the crates.

---

<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:** [November 21, 2016, 8:46pm UTC](https://discourse.cataclysmdda.org/t/the-minor-json-questions-thread/12858/11 "2016-11-21T20:46:59Z")

</div>

“f\_null” is what you want. “f\_floor” doesnt exist. Its terrain, “t\_floor”, and goes in terrain definitions.

What you do is:

terrain [  
“X”: “[t\_floor”, “t\_dirt”, “t\_dirt”]  
],  
furniture [  
“X”: [f\_null", “f\_null”, “f\_null”, “f\_chair”]  
]

^^ The above, properly coded, would make a terrain of [66% dirt] and [33% floor] and then have a 25% chance of placing a chair on that terrain regardless of what terrain is there.

---

<div class="post-metadata">

**Author:** ![egomassive](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/egomassive/32/381_2.png) [@egomassive](https://discourse.cataclysmdda.org/u/egomassive)\
**Post date:** [November 22, 2016, 8:28am UTC](https://discourse.cataclysmdda.org/t/the-minor-json-questions-thread/12858/12 "2016-11-22T08:28:01Z")

</div>

Thanks acidia and pisskop. I didn’t know about f\_null. With that I can have open, closed, or missing crates; and then spread debris items over an area. That’s probably more realistic than neat piles of debris only where the crates were supposed to be.

---

<div class="post-metadata">

**Author:** ![Greiger](https://avatars.discourse-cdn.com/v4/letter/g/8797f3/32.png) [@Greiger](https://discourse.cataclysmdda.org/u/Greiger)\
**Post date:** [November 23, 2016, 2:04am UTC](https://discourse.cataclysmdda.org/t/the-minor-json-questions-thread/12858/13 "2016-11-23T02:04:34Z")

</div>

Alrighty just the kind of thread I needed.

So I was working on a mod focusing on small cars. Microcars and such. If I understand correctly gas prices were through the roof before the cataclysm, and I figured I’d make some small 1 person clowncars commuter cars to reflect the car industry adapting.

I had them functioning great. The gas one would get excellent gas milage while still being small enough to push and pull by hand just like real microcars! I had plans to add a couple more cars, and some lore fliers and such later.

Now I come back, download the newest experimental like usual and it seems there are some massive car overhauls. Now the microcar goes roughly 10 steps before running out of gas entirely (excellent coasting distance though) And from what I can gather on the github engines have changed drastically. The microcar’s engine has changed to a 2L gas engine, from an I4 increasing it’s speed but a 2L engine on a 10L tank ain’t getting far.

So I’ll change the engine to another one simple enough, but I can’t find any of these new engines. I still only see the old ones. Am I missing a file somewhere? Is the overhaul only partially implemented? Where would I get information on these new engines to use an appropriate one?

Also anything else I’ll need to know about the overhaul?

EDIT: Ok update! I found the new engines I think. Kinda confused why there are 2 different engine lists, but I’m sure there’s a reason. There’s a lot more info about gear ratios and such so I can only assume these are them. But when I try to replace the current engine with a v2\_combustion the game throws an error saying that engine does not exist.

EDIT2: Think I figured that out. Also figured out that the fuel problem was due to another mod that I had originally built my own mod to build off of but had since removed the dependencies to. But my test world still had it loaded so fuel was draining at an insane rate.

I’d like to be able to build my own engines for the mod. Sadly I do not know real life mechanics. Can anyone give me an overview of what idle, optimim, redline, and gears are and how to parse the numbers on the new engines? I assume efficiency has something to do with how well it conserves fuel, and I 'm guessing idle optimum and redline are the power of the engine, but gears is complete Greek to me.

---

<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:** [November 26, 2016, 7:07am UTC](https://discourse.cataclysmdda.org/t/the-minor-json-questions-thread/12858/14 "2016-11-26T07:07:23Z")

</div>

> [@Greiger](#):
>
> I’d like to be able to build my own engines for the mod. Sadly I do not know real life mechanics. Can anyone give me an overview of what idle, optimim, redline, and gears are and how to parse the numbers on the new engines? I assume efficiency has something to do with how well it conserves fuel, and I 'm guessing idle optimum and redline are the power of the engine, but gears is complete Greek to me.

Engine operates at some RPM - higher when strained more.  
Idle is the minimum RPM - if the engine is active, it won’t go below this.  
Optimum is the RPM at which the efficiency is the best possible. The further you go from optimum, the worse the efficiency gets.  
Redline is the RPM at which damage starts. Anything below it is safe.  
Gears can allow different RPM to power ratios, which means more “chances” to get better efficiency and avoid redlining. Higher ratios allow more velocity, lower ones allow small engines to pull bigger vehicles without dying.

Efficiency is the multiplier on fuel energy. Efficiency 1.0 means all fuel energy is used, efficiency 0.1 means 90% of fuel is wasted and only 10% is turned into power. This is before the penalty from sub-optimal RPM.

I may be wrong about some of those.

---

<div class="post-metadata">

**Author:** ![Greiger](https://avatars.discourse-cdn.com/v4/letter/g/8797f3/32.png) [@Greiger](https://discourse.cataclysmdda.org/u/Greiger)\
**Post date:** [November 26, 2016, 4:18pm UTC](https://discourse.cataclysmdda.org/t/the-minor-json-questions-thread/12858/15 "2016-11-26T16:18:02Z")

</div>

Sweet awesome. So if I want a custom engine that is high efficiency but low velocity for a very small car. it sounds like I would want an engine with low rpms in and gears with high numbers since it does not have to haul any real weight.

Thank you for the info!

---

<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:** [November 27, 2016, 2:12pm UTC](https://discourse.cataclysmdda.org/t/the-minor-json-questions-thread/12858/16 "2016-11-27T14:12:17Z")

</div>

I would also be interested in modding engines, now that they have been exported in json.

Primarily steam engines, having difficulties with fuel types though.  
I need to flesh out some kind of ‘boiler’ object, which accepts any type of flammable fuel & water.  
I have the object ingame, but I am having a great deal of trouble defining the fuel/ammo type.  
This boiler in turn, needs to create steam. Something that might not be able to do with json.

Managed to implement steam fueltype, but it does not behave like steam at all.

I sorta have boilers, that don’t work. And I have steam, that does not work either.

Defining the actual steam engines should be relatively simple, even just a clone of a typical gasoline engine with the fueltype set to steam.

The intention of this is to add some simple, low power steam engines that the player may craft, out of various scrap components.  
See : [https://www.youtube.com/watch?v=9VX-93HDrAE](https://www.youtube.com/watch?v=9VX-93HDrAE)  
Along with boilers, that the player may craft, and a very low tech, inefficient alternator.

I had planned to add steam engines a long time ago, but I couldn’t really wrap my head around the C++ side of things.

This is mainly to do with a total conversion mod I had in mind, but it could have some potential within the basegame.

---

<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:** [November 27, 2016, 2:23pm UTC](https://discourse.cataclysmdda.org/t/the-minor-json-questions-thread/12858/17 "2016-11-27T14:23:26Z")

</div>

idk if we can specify water as a fuel -yet.

---

<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:** [November 28, 2016, 5:41am UTC](https://discourse.cataclysmdda.org/t/the-minor-json-questions-thread/12858/18 "2016-11-28T05:41:09Z")

</div>

Once a general provision for some simple things come into place, I think it would be quite easy to accomplish.  
If there was a way to specify a type of part, that has inputs, outputs and some rate of conversion, you could virtually accomplish any type of mechanical system.  
A few ideas:

[spoiler]Fuel Cell:  
Water + Electricity = Hydrogen

Boiler:  
Water + Burnable Material = Steam

Electric Boiler:  
Water + Electricity = Steam

Condenser:  
Steam + Time = Clean Water

Steam Engine (Various sizes, types of gearbox):  
Steam = Rotational Energy

Improvised Generator/ Alternator:  
Recipe would obviously require a great deal of copper,  
some mechanical components.  
Rotational Energy = Electricity

Improvised Battery:  
Lead, plastic, Acid

[/spoiler]

---

<div class="post-metadata">

**Author:** ![xironfistx](https://avatars.discourse-cdn.com/v4/letter/x/b9e5f3/32.png) [@xironfistx](https://discourse.cataclysmdda.org/u/xironfistx)\
**Post date:** [December 1, 2016, 1:50am UTC](https://discourse.cataclysmdda.org/t/the-minor-json-questions-thread/12858/19 "2016-12-01T01:50:26Z")

</div>

could be something like power armor,but powered by gasoline be a thing?  
i dont know how is the jsons of the power armor set up.  
it is possible to add stat effects to clothing or armor?  
i would love to make a makeshift power armor that burns you at random intervals and does not require you to be naked to use it.

---

<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:** [December 1, 2016, 8:15am UTC](https://discourse.cataclysmdda.org/t/the-minor-json-questions-thread/12858/20 "2016-12-01T08:15:38Z")

</div>

You could copy the RM13 combat armor and change it to have gasoline ammo instead of plutonium.  
Though it doesn’t count as power armor.

All power armor is hardcoded to require being naked.

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