Don't Starve Together

Don't Starve Together

Not enough ratings
How to Create Custom Crafting Recipes!
By Junipyrr
This is something that I had an issue with, so I decided to make a guide on how to do it yourself with some easy copy paste code!
   
Award
Favorite
Favorited
Unfavorite
Introduction
To begin, this is going to be for creating custom crafting recipes for custom characters, you can probably use this elsewhere but I haven't tested it. If you're not using this on making a modded character, then be aware that I have not tried that.

If you're having trouble modding your character or don't quite yet have a base to use it, here's a video that might make it easier for you.

Here's a link to the character they use in that video:
https://steamproxy.net/sharedfiles/filedetails/?id=361202313&searchtext=extended+character
Finding the files you need to edit
So first, you'll probably want a text editing software like Notepad++ for example, notepad works, but I recommend Notepad++!
(Here's a link to Notepad++ https://notepad-plus-plus.org/downloads/v8/ )

Go to your Steam library and click on Don't Starve Together, after you do that, right click it and click "Properties" after that menu opens, click "Local Files" and then "Browse Local Files"

Afterwards, it should bring up the Don't Starve files, go to your character's mod file and go to C:\Program Files (x86)\Steam\steamapps\common\Don't Starve Together\mods\YOURMOD and C:\Program Files (x86)\Steam\steamapps\common\Don't Starve Together\mods\YOURMOD\scripts\prefabs. The important files here are modmain.lua and CHARACTERNAME.lua.


charactername.lua
charactername.lua is just the file named after your character, so let's say my character's name is my username, tsusifec, it'd be tsusifec.lua.

Open up tsusifec.lua and go to local common_postinit = function(inst). [you can just press ctrl + f and then search it up] This is where we'll be setting the tag for your character, to make the crafting recipe exclusive to your character. This way, let's say Wilson for example, won't have your recipe.

So go to there and put your tag like this:

local common_postinit = function(inst)
inst:AddTag("yourtagname")

This tag can be anything, so for example once again, if it were my username, it'd be

local common_postinit = function(inst)
inst:AddTag("tsusifec")

(Here's a screenshot of my notepad plus plus using my tag, tsu)
modmain.lua
In modmain.lua, we go to the very bottom and copy paste this:

local Ingredient = GLOBAL.Ingredient -- please dont change any of these, they're necessary
local RECIPETABS = GLOBAL.RECIPETABS
local TECH = GLOBAL.TECH
local STRINGS = GLOBAL.STRINGS

Ingredient = GLOBAL.Ingredient
TECH = GLOBAL.TECH

GLOBAL.Recipe("name", {Ingredient("ingredient name",number of ingredients), Ingredient("ingredient name",number of ingredients)}, RECIPETABS.your recipe tab, TECH.(ex. TECH.SCIENCE_TWO) TECH LEVEL, nil, nil, nil, nil, "the tag you gave yourself") -- replace the words here with what you want! you can google the item names and stuff that you need. for example, glow berries are wormlight_lesser

An example of me wanting to craft glow berries is this:

GLOBAL.Recipe("wormlight_lesser", {Ingredient("berries",1), Ingredient("lightbulb",1)}, RECIPETABS.REFINE, TECH.SCIENCE_TWO, nil, nil, nil, nil, "tsusifec")

I know this might be a bit confusing, so here's how it looks in my Notepad++ so you can use it as a reference. (IGNORE THE TOP LINE, I JUST PUT IT THERE TO MAKE IT CLEAR THAT IT'S AT THE BOTTOM OF THE MODMAIN FOLDER!)


Outro
Sorry if this wasn't the most helpful, I don't write guides often. Anyways, I hope this helps someone out there who struggled with the poor modding documentation this game has had so far. Thanks for reading!


The only issue I have is that I don't know if all the tabs just go by the name that you see in-game or how to add stuff to character specific tabs such as winona's machines or wes' balloons.

If you know how to do this, or I made any mistakes, please comment it!
4 Comments
Fuga 8 May @ 10:53pm 
Russhin
Привет ребята если вы давно хотеле что бы у вас было в профили в комментах +rep (и тд)
То тебя к нам в группу которая у меня есть в профиле где мы помогаем друг другу
https://steamproxy.net/groups/repvzaim
Eng
Hi guys, if you have been wanting for a long time, what would you have in the profiles in the comments +rep (and so on)
Then you can join us in the group that I have in my profile where we help each other https://steamproxy.net/groups/repvzaim
Fuga 5 May @ 6:06pm 
RUS: Выберите что то одно из этого списка и напишите в моём профиле, отвечу тем же!
ENG: Choose the one that's on the list and write in my profile, I will answer the same!

💜+Rep Clutch King 👑
💜+Rep 300 iq 🧠
💜+Rep ak 47 god👻
💜+Rep SECOND S1MPLE😎
💜+Rep relax teammate🤤
💜+Rep Killing Machine 😈
💜+Rep AWP GOD 💢
💜+Rep kind person💯
💜+Rep ONE TAP MACHINE 💢
💜+Rep nice profile 💜
💜+Rep add me pls😇
💜+Rep very nice and non-toxic player😈
💜+Rep AYYYY LMAO
💜+Rep nice flicks👽
💜+Rep king deagle💥
💜+Rep best👹
💜+Rep killer👺
💜+Rep Good player 💜
💜+Rep Amazing Tactics 👌
💜+Rep Top Player 🔝
Junipyrr  [author] 22 Jun, 2021 @ 12:57pm 
im glad it helps!
GauravnW 22 Jun, 2021 @ 12:34am 
GOOD