Enderia Posted April 10, 2022 Share Posted April 10, 2022 (edited) I never could figure out how to add crafting recipe with custom tab to this game, before or after the update that changed the crafting menu. I'm trying to add two food items that are crafted under custom tab, that you can craft depending on what tag the character has on currently (sundrops for sunform & moondrops for moonform). This is from my last try to add the candies: --------Custom Crafting Tab --local mytab = AddRecipeTab("Daycare", 998, "images/customs/daycaretab.xml", "daycaretab.tex", "babysitter") AddRecipe("sundrops", { Ingredient("berries", 5), Ingredient("papyrus", 2), Ingredient("honey", 2)}, RECIPETABS.SURVIVAL, TECH.NONE, nil, nil, nil, nil, "sunform") AddRecipe("moondrops", { Ingredient("ice", 2), Ingredient("papyrus", 2), Ingredient("blue_cap", 2)}, RECIPETABS.SURVIVAL, TECH.NONE, nil, nil, nil, nil, "moonform") GLOBAL.STRINGS.NAMES.SUNDROPS = "Sundrops" GLOBAL.STRINGS.RECIPE_DESC.SUNDROPS = "Energizing candy" GLOBAL.STRINGS.CHARACTERS.GENERIC.DESCRIBE.SUNDROPS = "Smells like citrus." GLOBAL.STRINGS.NAMES.MOONDROPS = "Moondrops" GLOBAL.STRINGS.RECIPE_DESC.MOONDROPS = "Sleepy-time candy" GLOBAL.STRINGS.CHARACTERS.GENERIC.DESCRIBE.MOONDROPS = "Smells like berries." Also side ask about how to set sprites for the items, because I can't find a good tutorial for this. DA FINISHED.rar Edited April 10, 2022 by Enderia Link to comment https://forums.kleientertainment.com/forums/topic/138981-crafting-help/ Share on other sites More sharing options...
-LukaS- Posted April 10, 2022 Share Posted April 10, 2022 (edited) I don't think it's possible to create a custom crafting tab at the moment without heavily diving into the new UI code. Keeping your character specific recipes in the character tab should be enough though. As for adding a new recipe, after the UI update AddRecipe has become deprecated. AddRecipe2 should be used now. So if you want to add your recipe you need something like this: AddRecipe2("sundrops", { Ingredient("berries", 5), Ingredient("papyrus", 2), Ingredient("honey", 2) }, TECH.NONE, { atlas = "your_item_atlas", image = "your_item_image", builder_tag = "sunform" }, { "CHARACTER" } ) AddRecipe2("moondrops", { Ingredient("ice", 2), Ingredient("papyrus", 2), Ingredient("blue_cap", 2) }, TECH.NONE, { atlas = "your_item_atlas", image = "your_item_image", builder_tag = "moonform" }, { "CHARACTER" } ) GLOBAL.STRINGS.NAMES.SUNDROPS = "Sundrops" GLOBAL.STRINGS.RECIPE_DESC.SUNDROPS = "Energizing candy" GLOBAL.STRINGS.CHARACTERS.GENERIC.DESCRIBE.SUNDROPS = "Smells like citrus." GLOBAL.STRINGS.NAMES.MOONDROPS = "Moondrops" GLOBAL.STRINGS.RECIPE_DESC.MOONDROPS = "Sleepy-time candy" GLOBAL.STRINGS.CHARACTERS.GENERIC.DESCRIBE.MOONDROPS = "Smells like berries." Just make sure to change the "your_item_atlas" and "your_item_image" with your items textures. Edited April 10, 2022 by -t- 1 Link to comment https://forums.kleientertainment.com/forums/topic/138981-crafting-help/#findComment-1556634 Share on other sites More sharing options...
GodIess Posted April 17, 2022 Share Posted April 17, 2022 I kind of saw in one of the updates that now you can easily add your own filters Link to comment https://forums.kleientertainment.com/forums/topic/138981-crafting-help/#findComment-1559471 Share on other sites More sharing options...
Enderia Posted April 23, 2022 Author Share Posted April 23, 2022 (edited) On 4/10/2022 at 9:56 PM, -t- said: I don't think it's possible to create a custom crafting tab at the moment without heavily diving into the new UI code. Keeping your character specific recipes in the character tab should be enough though. As for adding a new recipe, after the UI update AddRecipe has become deprecated. AddRecipe2 should be used now. So if you want to add your recipe you need something like this: AddRecipe2("sundrops", { Ingredient("berries", 5), Ingredient("papyrus", 2), Ingredient("honey", 2) }, TECH.NONE, { atlas = "your_item_atlas", image = "your_item_image", builder_tag = "sunform" }, { "CHARACTER" } ) AddRecipe2("moondrops", { Ingredient("ice", 2), Ingredient("papyrus", 2), Ingredient("blue_cap", 2) }, TECH.NONE, { atlas = "your_item_atlas", image = "your_item_image", builder_tag = "moonform" }, { "CHARACTER" } ) GLOBAL.STRINGS.NAMES.SUNDROPS = "Sundrops" GLOBAL.STRINGS.RECIPE_DESC.SUNDROPS = "Energizing candy" GLOBAL.STRINGS.CHARACTERS.GENERIC.DESCRIBE.SUNDROPS = "Smells like citrus." GLOBAL.STRINGS.NAMES.MOONDROPS = "Moondrops" GLOBAL.STRINGS.RECIPE_DESC.MOONDROPS = "Sleepy-time candy" GLOBAL.STRINGS.CHARACTERS.GENERIC.DESCRIBE.MOONDROPS = "Smells like berries." Just make sure to change the "your_item_atlas" and "your_item_image" with your items textures. When I tried to use this it the game crashed with "attempt to index global 'TECH' (a nil value)" Probably im just dumb DA FINISHED.rar Edited April 23, 2022 by Enderia Link to comment https://forums.kleientertainment.com/forums/topic/138981-crafting-help/#findComment-1562503 Share on other sites More sharing options...
-LukaS- Posted April 24, 2022 Share Posted April 24, 2022 local TECH = GLOBAL.TECH Put this before adding the recipes, that should fix it. Link to comment https://forums.kleientertainment.com/forums/topic/138981-crafting-help/#findComment-1562782 Share on other sites More sharing options...
Enderia Posted April 25, 2022 Author Share Posted April 25, 2022 On 4/24/2022 at 10:54 AM, -t- said: local TECH = GLOBAL.TECH Put this before adding the recipes, that should fix it. It fixed the issue. Thanks for help. Link to comment https://forums.kleientertainment.com/forums/topic/138981-crafting-help/#findComment-1563138 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now