The Minor JSON Questions Thread

(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?

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.

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’.

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=“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

[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

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

[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=“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.

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.

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.

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

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?

Currently no

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?

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.

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/) seems old.

[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/) seems old.[/quote]

  2. It’s draw order

  3. https://github.com/CleverRaven/Cataclysm-DDA

Thanks!

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.

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.

Changing JSON won’t be enough.