Chemistry Mod/Alcohol Container Spawning process


I’m a Chemistry major at my local state college. I’ve played a few games on and off, and I keep coming back to DDA - I love it. But as is commonly recognized, it seems, cataclysm has terrible chemistry. Now I understand, it wasn’t meant to be perfect. But I personally can’t enjoy the game when certain chemistry-related recipes make no sense. It pains me…

Joking aside, I’d like to give the chemistry crafting portion of this game an overhaul. I’ll do this in the form of a mod, I think. I’m not very good with github, and I don’t think that my changes will necessarily be for everyone (i.e. biodiesel will likely be even harder to make…), so I think a mod is the best way to go.

I can’t imagine this being a very quick process, but I’ve already begun looking into the structure of the JSON data for the game, and have a plan for changing some of the senseless recipes into more sensible ones. I might also add a few more food items and boozes - I’ll try to keep them all rare and not unbalanced, but I always find it fun when a game has an absurd amount of variety.

Along those lines, I have a quick question (since I haven’t ever gotten super-far in the game): Does booze ever spawn in kegs? I know kegs are a thing from looking in the containers data file, but from what I see in the comestibles file, things like wine_noir, beer, mead, etc. all spawn in really specific containers, and usually really small ones. If it doesn’t already happen, I’d like to make kegs of beer spawn (rarely) and made the entry below:

    "type" : "COMESTIBLE",
    "id" : "beer_keg",
    "name" : "keg beer",
    "name_plural": "keg beer",
    "weight" : 240,
    "color" : "brown",
    "addiction_type" : "alcohol",
    "use_action" : "ALCOHOL_WEAK",
    "stim" : -4,
    "container" : "keg",
    "comestible_type" : "DRINK",
    "symbol" : "~",
    "quench" : 18,
    "addiction_potential" : 3,
    "nutrition" : 3,
    "description" : "Bulk, cheap beer makes any party better. Too bad this isnt a party.",
    "price" : 90,
    "material" : ["alcohol", "water"],
    "volume" : 1,
    "phase" : "liquid",
    "flags" : ["EATEN_COLD"],
    "fun" : 11

I’m not sure if this already happens via some other mechanism besides the entries in the item json files or not, though, or if the above is even the best way to go about it.

I think that about covers it. I’m looking forward to fixing things like the explosives preps, biodiesel, etc. and adding some fun new items (and more uses for that chemistry kit…). And one small note, I see plenty of debate over the inclusion of chemistry into the cooking skill. I intend to keep it as part of cooking. In my personal opinion, a good cook can follow a recipe and know what changes he/she can/cannot make, and a good synthetic chemist (the kind of chemist in this game) is very similar. As long as preparations are learned from only books, I think the conjoined chemistry-cooking skill is reasonable. A good chemist is a good cook (and the opposite), but a knowledgeable cook isn’t a knowledgeable chemist.

Sorry, that’s a lot. Thanks for any help or guidance you have. I know I’m jumping into this without a lot of knowledge in the matter, but I really like the game and want to put in some work in something I know a bit about. Since this is my first post, if I need a little credibility, feel free to check my forum account at - I’m “The Volatile Chemist”.

Thanks, NJ


I’d be very interested in more reality-based recipes being the default, and if people want fantasy recipes, they can maintain a mod for that.
To spread the love around a bit though, I’m hoping you might be able to think of some additional substances the player could synthesize that would increase the usefulness of chemistry, and hopefully keep it useful at all skill levels.

Concerning the keg spawning thing, you can also specify the container for a substance in mapgen, like is done here:


While beer doesn’t spawn in kegs, there are a couple of locations where you can find barrels of wine or whiskey. Adding full beer kegs to the bars and liquor stores could be fun.

While realistic recipes would be really cool, it’s worth being careful you don’t make it too technical/overly complicated. As long as your descriptions give a good idea of what chemicals are made from and for, that should stop players from getting overwhelmed.


When I have messed around the game (when I found the game and wanted to see everything) I set the item spawn to max and if you go to the liquor store whit max item spawn there’s 2-3 eggs of full booze ready for drinkin’


I found my first keg in those man cave basement with the bar.


I believe all items are spawned in their default container if mapgen/item group doesn’t declare other container.


Thanks for everyone’s suggestions. I will most certainly add some more ‘substances’ to synthesize. In the cataclysm, someone’s got to be the mad scientist…

I think for my own ease of testing, I will begin with making a mod with the additions I’d like to make. If people like it, I can incorporate it into the necessary dda json files and put up a potential push on github (or however you do that) so that it could be incorporated into the game.

Regarding darktoes comment on complexity, I will try to keep things simple and obvious. Your character will learn chemistry so you don’t have to :slight_smile: For all new items, I will add to their description what you can make from them, and what they can be made from. I will also keep a list of the recipes I make/change and post it as I go along. And since I think most recipes I add will be learned from textbooks, they should all be fairly straightforward to use. I don’t think anything will be too complex, but I can always run some of the changes by people as things proceed.

Regarding the kegs, that is good to know. Perhaps part of the mod will include special keg-beers, or perhaps I will just add entries to some of the item-groups for each type of beer in the kegs. I like the beer/wine/booze types already present, and like I said I love a game with a ton of variety. I don’t think I’ll add too much to them, but (some more?) beer kegs (perhaps some other barreled wines, or a rare canteen filled with someone’s booze) will be a good addition, and since, surprisingly, there was no entry for hard cider, I made one (along with one for cyser - and soon a few more not-often-come-by drinks).

Again, thanks for the suggestions. I’ve been reading through the json files and seeing how everything interacts. I should have an initial mod up in a few days that just has the additional boozes, as a sort of practice-mod. I will then fix one or two of the chemistry-ignorant recipes, post that, and go from there.


(Edit): Side note, I forgot, I also added my favorite energy drink, NOS (under the name nitrous). I’m up for suggestions, is having more than the two already present energy drinks reasonable? I just figure the more the merrier.


Ok, so I said I would post up an initial mod in a few days, here it is:

It’s just to show I’m actually working on it - it has no chemistry, just a few new items and a profession to test them. The aluminum Beer Keg is awesome…

Next steps will be to rewrite the chemistry recipes already present in the game and add any extra chems to make them realistic recipes. After that, I’ll add more explosive preps, useful chems, pharmaceuticals, and foods.



Will you make mobile meth labs sometimes spawn kegs of methylamine?

(Breaking Bad reference)


That’s a great idea, I’ll definitely add it!