Search the Community
Showing results for tags 'recipe'.
-
Hi everyone ! I have came across something really annoying and I don't know how to fix it. I think that I tried everything in this case, but if I am wrong and I just overlooked something...well...execute me at the dawn. So, in my mod I created item that is ingredient for other custom items. Generally it's fine, I can see this item (star) on the ground and in my inventory and containers, but one main issue is that I can't see it in crafting tab. All what I see is just name of it (when I move my mouse there) on a empty icon field. If someone here knows the solution or met something like this before let me know. Info: - modmain.lua --STAR Data GLOBAL.STRINGS.NAMES.STAR = "Star" GLOBAL.STRINGS.CHARACTERS.GENERIC.DESCRIBE.STAR = "A reward for my patience!" GLOBAL.STRINGS.RECIPE_DESC.STAR = "A reward for my sacrifice!" local star = Ingredient( "star", 1 ) star.atlas = "images/inventoryimages/star.xml" local star = AddRecipe("star", { Ingredient(GLOBAL.CHARACTER_INGREDIENT.HEALTH, 200)}, namwar, TECH.NONE, nil, nil, nil, nil, "usmccaptain", "images/inventoryimages/star.xml") Assets Its prefab file is included in PrefabFiles section. Speak of the devil, so here it is. local Assets = { Asset("ANIM", "anim/star.zip"), Asset("ATLAS", "images/inventoryimages/star.xml"), Asset("IMAGE", "images/inventoryimages/star.tex") } local prefabs = { } local function fn(Sim) local inst = CreateEntity() inst.entity:AddTransform() inst.entity:AddAnimState() inst.entity:AddNetwork() MakeInventoryPhysics(inst) inst.AnimState:SetBank("star") inst.AnimState:SetBuild("star") inst.AnimState:PlayAnimation("idle", true) inst:AddComponent("inventoryitem") inst.components.inventoryitem.imagename = "star" inst.components.inventoryitem.atlasname = "images/inventoryimages/star.xml" inst:AddComponent("inspectable") inst:AddComponent("stackable") inst.components.stackable.maxsize = 40 MakeHauntableLaunch(inst) return inst end return Prefab( "common/inventory/star", fn, Assets) Thank you for your time and have a nice day/night !
- 3 replies
-
- recipe
- ingredient
- (and 4 more)
-
Hello everyone. I know there are some tutorials that cover this topic, but in my opinion it might seem to be too hard to follow by fresh members of this amazing forum. In fact I have learnt a lot from those ancient manuscripts, so don't get me wrong. I will try to explain you how to create custom crafting tab and custom items (on head, body, hand slots). Template is ready to download in attachment section. I think you will spot differences between original ESCTemplate and my version with items, so it's self explanatory. I have described some stuff inside .lua files, but if something will cause you trouble just let me know in the comments and I will explain it further. I have used already existing armor and hat graphisc, because I am too lazy, but you can do whatever you want. In order to decompile anim from game you can use ktools: ktools: Cross-platform modding tools for Don't Starve 4.4.0 and if you don't understand it yet, check this out: [TUTORIAL] How to use Krane from Ktools Sources Work of the Old Masters -------------------------------- [Tutorial] Using Extended Sample Character Template [Tutorial] Creating a "handslot-equippable-item" from scratch Hat Example 1.0 I hope you will find it useful my dear Newcomers. Of course I forgot to attach template. There you go. Custom items and item tab [tutorial].rar UPDATED VERSION - Custom items and item tab [template] - updated 21.04.2021.rar What to do if your game doesn't crash but your custom item is invisible? 1. Make sure that you placed location of .zip file (inside of anim folder) under local assets={} function. 2. Make sure that you saved Spriter project (.scml) as [name_of_your_custom_item].scml and marked .scml file format.
-
I know this sounds strange but, i added a recipe, for my character only, that gives me the possibility to craft butterflies; The problem here is that when i kill butterflies now they drop the item's recipe; The recipe require 3 nightmare fuel and 1 petal to craft a butterfly, but when i kill one it drops 2 nightmare fuel, 1 petal and 1 butterfly wings; so i was wondering, how do i fix butterflies and make them not dropping nightmare fuel nor petals? Here's my code, this is inside modmain:
-
I have a custom character with some custom crockpot recipes, but if I have her mod enabled anyone is able to cook them. How do I make it so only she can cook them? (I think it has to do with tags, but I don't know how to apply that to a crockpot recipe like you can to a regular crafting recipe). I've looked at Warly and his exclusive recipes. They all have the tag "masterfood", and he has three tags, one of which is "masterchef", but I don't see where the two are connected. Like, I don't see any code that says "masterfood" can only be cooked by "masterchef".
-
Edit: Solution found! Hey friends I'm making a mod which involves some custom food and recipes. I've got mostly everything worked out, but I have the problem that the cooked food isn't displaying in the cookpot when ready to be harvested. I've seen there are other topics regarding this, from Lumina, the tutorial from Squeek, and a tutorial mod from Kuloslav. Also saw the text about when modded food animation was first enabled in the game, eliminating the need for a manual code fix. I've tried reusing the resources in the above examples and tutorials to make Lumina's chocolate, tried reusing assets from the PickleIt mod, and tried reusing assets from DST's included cook_pot_food animation build. I must be completely oblivious to some small thing. In every case the inventory item displays correctly, and the proper animation is used as an idle animation when dropping the item on the ground. But in a total of zero cases have I gotten the food to show in the cookpot when finished cooking. I even extracted the game's scripts.zip so they would be loaded and modified cookpot.lua's ShowProduct function to give me debug statements to ensure the correct food name was being passed to inst.AnimState:OverrideSymbol. The relevant code in my Prefab: inst.AnimState:SetBank("food") inst.AnimState:SetBuild("applesauce") inst.AnimState:PlayAnimation("applesauce") The animation root in the .scml is called "food", it has an animation timeline within this root called "applesauce", and the resulting anim .zip is called "applesauce.zip". The animation plays correctly in Spriter, and a proper centered pivot point is set. I've decompiled Klei's cook_pot_food .bins using nsimplex's Krane from ktools to generate an .scml and ensured my .scml's underlying XML matched where necessary. Does anybody have any further tips on what I could try or double check to maybe find out what I've missed? Thanks for the help
-
When I create recipes in my local master_postinit = function(inst) I use the following code Recipe("redlantern", {Ingredient("rope", 1 ), Ingredient("twigs", 2 ), Ingredient("red_cap", 1), Ingredient("lightbulb", 1) }, RECIPETABS.SURVIVAL, {SCIENCE = 0}) STRINGS.RECIPE_DESC.REDLANTERN = "Linterna Improvisada" Recipe("bugnet", {Ingredient("rope", 1 ), Ingredient("twigs", 2 ), Ingredient("Silk", 1) }, RECIPETABS.SURVIVAL, {SCIENCE = 0}) STRINGS.RECIPE_DESC.BUGNET = "Un Red Para Insectos Simple!" Recipe("honey", {Ingredient("petals_evil", 1 ), Ingredient("petals", 2 )}, RECIPETABS.FARM, {SCIENCE = 2}) STRINGS.RECIPE_DESC.HONEY = "Sucedanio de miel!" When I start my server, I choose my character and enter my recipes, they are working fine, but if I put caverns in my server configuration, I don't see any recipes created, does anyone know what I can do? I just want to modify the creation of recipes for my character of those elements.
-
Version 1.0.0
158 downloads
Now you can craft Killer Bee Hive and place it anywhere you want! Compatible with base game and RoG, SW and Hamlet DLCs! Recipes: Easy killerbee 1 honeycomb 1 Normal killerbee 4 boards 2 honeycomb 1 Hard killerbee 6 boards 4 honeycomb 2 Sebakool's suggestion killerbee 4 honey 10 honeycomb 3 Special thanks to Sebakool who inspired me to make this mod! It began with simple attempt to help and I ended up with making the whole mod. -
I am adding recipes for certain objects, and I have come across a problem. When I add a new recipe for a touch stone, or a merm house the game changes the usual loot that drops to match the recipe. I do not want this to happen as it makes the items drop way better loot than they should. I think it has something to do with lootdropper.lua, but I have no idea how to fix this. Can someone please help me?
-
Hello everyone, lately I've been fiddling around with secondary recipes and stuff (a second recipe to an existing item and recipe while keeping the original recipe intact) according to the thread here: After some messing around and a few frustrating hours I figured out why it wasn't working for me whatsoever: This only works for skinless/unskinned items. To be more precise: This works for: 1. Items that don't support skins. 2. Items that support skins, but are crafted with the default skin. This doesn't work for: 1. Items that are crafted with a skin. (Official skin that you own on the official item.) In my case I'm trying to add a second recipe to the football helmet like this: local AllRecipes = GLOBAL.AllRecipes local RECIPETABS = GLOBAL.RECIPETABS local STRINGS = GLOBAL.STRINGS local TECH = GLOBAL.TECH -----BOOSTER SHOT----- local footballhat_sortkey = AllRecipes["footballhat"]["sortkey"] local footballhatr = AddRecipe("footballhatr", {Ingredient("rope", 1), Ingredient("footballhat", 1)}, RECIPETABS.WAR, TECH.SCIENCE_ONE) footballhatr.product = "footballhat" footballhatr.image = "footballhat.tex" footballhatr.sortkey = footballhat_sortkey + 0.1 footballhatr.numtogive = 1 STRINGS.NAMES.FOOTBALLHATR = "Protects your Braincase" STRINGS.RECIPE_DESC.FOOTBALLHATR = "Protects your Braincase." (Kinda a repair recipe for now, but is pretty much just a proof of concept.) Client crashes, dedicated server keeps running perfectly fine. (I'm always testing on a dedicated server, cause that's usually what I'm running, and where usually the most issues arise if any.) I assume it's crashing due to having a second dummy item used in the recipe itself, which isn't configured to have a skin, and therefore fails. Does anyone have any ideas how I can fix this. (Or tell me what's wrong ofc., if I'm totally mistaken on what happened.) Thanks for reading, and thanks for any help in advance!
-
Hello fellow modders and DST players, I'm wondering how I would look through the recipe list from the file, Recipes.lua Instructions: Read recipes file. Read through recipe list for entries with science/magic level 1. Return a list of the recipe names for each entry. Step 4 I can do on my own, but I'll explain for context. I need to return all the recipes that use a certain station level so I can add the recipe to my character's knowledge. Why am i doing this in such a specific way? I want to make it so my character has the equivalent of Wickerbottom's knowledge of first level of crafting (Plus for magic), except requires the respective second station for further recipes. inst:DoTaskInTime(0, function(inst) inst.components.builder:AddRecipe("shovel") inst:PushEvent("unlockrecipe", { recipe = "shovel" }) end) If you can help with this, I'd be extremely grateful.
-
Hello there! I've been trying to make a custom crockpot burger food recipe for my character mod, by following this item sample: https://forums.kleientertainment.com/files/file/202-sample-mods/ Following this and even going to check out mods that succeeded the same doesn't quite work for me? The item DOES exist it the game, as I can spawn it in my inventory (using c_give, as c_spawn doesn't work for it), but it is impossible to put on the ground (it disappears instantly and doesn't exist at all anymore) And it also does not cook in the crockpot with the recipe I made. I assume it has to probably do with the way I get the anim.zip to work. I didn't really find a tutorial that shows how to proceed once the art is done to make the zips and all, so I made a spriter in the exported folder to get it to compile the anim automatically. I don't really know if I do it properly, so any help would be amazing! I have attached my whole mod folder as a zip to this topic, (below the gif) if anyone is willing to help me! Thanks for reading! Here's a gif of the issue in-game:
-
Hey! After a long time and trying to figure out, I couldn't find a solution to my problem, so my last hope is this forum. I tried to edit a recipe and add an option to it, in this example I want to change the recipe of the beefalo hat so you need 2 horns to craft it! My code: modmain.lua STRINGS = GLOBAL.STRINGS RECIPETABS = GLOBAL.RECIPETABS Recipe = GLOBAL.Recipe Ingredient = GLOBAL.Ingredient TECH = GLOBAL.TECH local updateRecipe = GetModConfigData("BEEFALOHATRECIPE") AddRecipe("beefalohat", {Ingredient("beefalowool", 8),Ingredient("horn", updateRecipe)}, RECIPETABS.DRESS, TECH.SCIENCE_ONE) modinfo.lua name = "Beefalo Hat Testing" description = "..." author = "NAVY" version = "1.0" api_version = 10 dst_compatible = true restart_required = false icon = "modiconbeefalo.tex" icon_atlas = "modiconbeefalo.xml" priority = -1 configuration_options = { { name = "BEEFALOHATRECIPE", label = "Beefalo Hat Recipe", hover = "Change how many horns you need to craft a beefalo hat.", options = { {description = "1 Horn", data = 1, hover = "You need 1 horn to craft a beefalo hat. (Default)"}, {description = "2 Horns", data = 2, hover = "You need 2 horns to craft a beefalo hat."}, }, default = 1, }, } Then in the modinfo you have option to change "BEEFALOHATRECIPE" to 1 or 2. It works all fine in a normal world! However in a world with caves enabled it doesn't work at all. I tried to change the recipe or twist around, but it simpy doesn't want to impelent the optional feature. It works only if I set the number by myself to 2 in the Addrecipe(), but since I want to make this optional, I want to handle this feature through the settings. Any ideas what I am missing? Really confused why this works on a normal world, but has no effect on a world with caves enabled. :/
-
Right so the current state: I have a character that has a different ingredient requirement for items that are already in the game, this is actually done and it works...kind of, the icons on the recipe tab are messed up, but hey it works! The issue: One of those items is the Telltale Heart, so called 'reviver' in the prefab. What happens is that, that item has skins, and once i made the duplicate recipe, well, skins don't want to follow along so can't seem to use skins on the duplicate recipe. This is the code I'm using at the moment. local function GenerateFuelbuilderRecipe(prefab, count) local fuelbuilder_prefab = prefab.."_kingofscience" local fuelbuilder_recipe = AddRecipe( fuelbuilder_prefab, { Ingredient(CHARACTER_INGREDIENT.HEALTH, count) }, sciencemaster_tab, TECH.NONE, nil, nil, nil, 1, "fuelbuilder", "images/inventoryimages.xml", prefab) fuelbuilder_recipe.product = prefab fuelbuilder_recipe.sortkey = GLOBAL.AllRecipes[prefab].sortkey + 0.5 local upper_fuelbuilder_prefab = string.upper(fuelbuilder_prefab) local upper_prefab = string.upper(prefab) local STRINGS = GLOBAL.STRINGS STRINGS.NAMES[upper_fuelbuilder_prefab] = STRINGS.NAMES[upper_prefab] STRINGS.RECIPE_DESC[upper_fuelbuilder_prefab] = STRINGS.RECIPE_DESC[upper_prefab] end GenerateFuelbuilderRecipe("reviver", 100) GenerateFuelbuilderRecipe("nightmarefuel", 40) Is there anyway that I can implement the skins on this duplicate recipe? of course, if not, it ain't a grave issue, its just kind of a, mini compromise if not possible. Ay, I appreciate any help!
-
I always make the same base layout, and I'm sick of always having to redo it every time I start a new game. I'm trying to figure out how to combine the idea of a set piece and a blueprint (not a Don't Starve blueprint, a real blueprint). I want to create my base, in-game, then somehow copy it all and create a blueprint out of it, or like a set piece. Then in another save, I'd like to collect all the materials necessary and have the base layout as a recipe and be able to place it like an item. I've been trying to figure this out for a while, but none of the other posts really explain how to do this.
-
Hi guys, sorry if this isn't modding related... but does anyone have any ideas on how to disable crafting recipes? I mostly want to disable the science machine as I want to create an adventure map but I don't want people to build things unless I reward them with blue prints. I've searched everywhere and it seems odd that I'm the only one who would want something like this... Anyone have any success so far?
-
I've made a new recipe for the game and it's almost done but I just can't seem to overcome this last problem. It displays fine in the inventory, I can give it using console commands, and the cookpot cooks it up just fine. The problem is if the item is dropped it is invisible, and doesn't appear in the crockpot wither. As far as I can tell I've done everything right, I just can't seem to resolve it though. My process for making the mod was to take an existing Don't Starve Together/anim .zip file, in this case "butter", and decompile it using ktools-4.4.4, specifically krane, to get a SCML file. I then altered the details in the SCML file to match my image's height and width, and change all name references to match my folders and images. Then I used the compiler provided in the Don't Stave mod tools, specifically scml.exe to output a zip file. I've extracted the zip file and examined it with HexEditor and it only mentions the correct files, and the tex file, viewed through TexTools seems fine too. I just can't understand it. I've included a link to a folder with all the files I've used in it. If you could take a look and maybe shed some light on it I would be grateful. Link to files here EDIT: After some testing it now appears in the crockpot, but it vanishes if put onto the ground. I don't understand why that would happen, I thought that the same files would be used in both cases. Has anyone encountered similar problems?
-
From rummaging around in the relevant game files, I don't know how to do this or if it's possible (seems it may be hardcoded territory?). Can I check whether a player has a specific crafting recipe unlocked (by means of having prototyped it already, or having read a blueprint of it already)? local recipe = GLOBAL.AllRecipes["backpack"] local player = GLOBAL.AllPlayers[1] -- example parameters... if player:RecipeIsUnlocked(recipe) then -- hypothetical function -- do stuff end
-
Heyo, I added a bunch of custom prefabs with recipes in a mod which also includes a bunch of structures. I can craft and place the structures just fine, but the item's recipes dont show up in the recipe tab. I've tried using a few different recipe formats but none of them seem to work. So how do I get the recipes to work? Also I was kinda wondering how to add a crafting tab, I can get this to work in DS but not DST.
-
Hi everyone! I am creating a new character. I have already done a lot of work on him . I just need some help finishing up a few things that are somewhat over my head. Doing research around the forums, I managed to make a new crafting tab for him, and using the sample files here I have managed to finally make a new tech tree in combination with the SAMPLE: A Custom Structure found here for a base for my prototyper. What I'm trying to do is -remove the ability to learn custom recipes/ forget the recipes when leaving the prototyper, so that they always need the new prototyper to craft the items. -get the prototyper to play the right animations and loop while in the proximity of it. -additionally I would like to give it all of the characteristics of a firepit if possible I'm including the file for the character, ignore the icons from my previous mod (Christoph) that I used as a template. Alvor.zip Thank you!
- 1 reply
-
- Tech
- prototyper
- (and 7 more)
-
So, I am attempting to add a custom recipe tab to DST, and 2 things I've noticed. 1. It never seems to work. 2. It is a HELL of a lot harder than DS Here's the exact coding I have. --Shitton of recipe stuff beginning local resolvefilepath = GLOBAL.resolvefilepathlocal TECH = GLOBAL.TECHlocal CUSTOM_RECIPETABS = GLOBAL.CUSTOM_RECIPETABSCUSTOM_RECIPETABS.GEMS = { str = "GEMS", sort = 998, icon = "book.tex", icon_atlas = resolvefilepath("images/shadow.tex") }STRINGS.TABS.GEMS = "Gems" local rakkyboomerang_recipe = Recipe("redgem", { Ingredient("houndstooth", 2), Ingredient("log", 3) }, CUSTOM_RECIPETABS.GEMS, TECH.NONE, nil, nil, nil, nil, true) -- Add new tabAddClassPostConstruct("widgets/crafttabs", function(class) if class.owner:HasTag("gembuilder") then local v = CUSTOM_RECIPETABS.GEMS local k = #class.tab_order + 1 local tab_bg = { normal = "tab_normal.tex", selected = "tab_selected.tex", highlight = "tab_highlight.tex", bufferedhighlight = "tab_place.tex", overlay = "tab_researchable.tex", } class.tabs.spacing = 750/k local tab = class.tabs:AddTab(STRINGS.TABS[v.str], resolvefilepath("images/hud/redgem.xml"), v.icon_atlas or resolvefilepath("images/hud/redgem.xml"), v.icon, tab_bg.normal, tab_bg.selected, tab_bg.highlight, tab_bg.bufferedhighlight, tab_bg.overlay, function() --select fn if not class.controllercraftingopen then if class.craft_idx_by_tab[k] then class.crafting.idx = class.craft_idx_by_tab[k] end class.crafting:SetFilter( function(recipe) local rec = GLOBAL.AllRecipes[recipe] return rec and rec.tab == v end) class.crafting:Open() end end, function() --deselect fn class.craft_idx_by_tab[k] = class.crafting.idx class.crafting:Close() end) tab.filter = v tab.icon = v.icon tab.icon_atlas = v.icon_atlas or resolvefilepath("images/hud/redgem.xml") tab.tabname = STRINGS.TABS[v.str] class.tabbyfilter[v] = tab table.insert(class.tab_order, tab) endend)---Shitton of recipe stuff endingAnybody know how to help?
-
For example, recipe of "yellow umbrella" is gold nugget + umbrella. How make durability of new crafted yellow umbrella the same as one of the ingredient (red umbrella)?
- 1 reply
-
- recipe
- durability
-
(and 1 more)
Tagged with:
-
For Don't Starve Together, I have a recipe, as a part of character mod. It's placed in modmain.lua. looks like this: local someitem_recipe = Recipe("someitem", {Ingredient("rocks", 10), Ingredient("log", 25), Ingredient("twigs", 8)}, RECIPETABS.TOWN, TECH.NONE)someitem_recipe.sortkey = 1someitem_recipe.atlas = resolvefilepath("images/inventoryimages/someitem.xml")STRINGS.RECIPE_DESC.SOMEITEM = "bla blablabla blah!"Like this, if mod is enabled, everyone on the server can make it. And the deal is - to make it ONLY the character the recipe comes from specific.So no other characters can craft it. I guess it's very simple, so sorry for stupid question -.-
-
Here is the error I encountered today. Note that YESTERDAY (!?) everything was working just fine. None of the files or codes have been changed. Just... suddenly an error came. Seems to be about these in the modmain: if not GLOBAL.TheNet:IsDedicated() then local OldIsRecipeValid = GLOBAL.IsRecipeValid local function IsRecipeValid(recipe) return OldIsRecipeValid(recipe) and ((GLOBAL.ThePlayer and GLOBAL.ThePlayer:HasTag(recipe.name.."_builder")) or not recipe.tagneeded) end GLOBAL.IsRecipeValid = IsRecipeValidend Error from the log: [string "../mods/workshop-389385830/modmain.lua"]:75: variable 'IsRecipeValid' is not declaredLUA ERROR stack traceback: In character I have tag of "something_builder". So the purpouse is to not let other people obtain this recipe (unless thet play the same character of course). So... Question is:Why it just stopped working if it was working just fine?How to fix it and how to avoid it in future?