Nikkofix Posted December 20, 2024 Share Posted December 20, 2024 Hello! Im new at modding and want to add second recipe to the item ( Basically its WX-71 fixing modules with gears mod ) Here what i tried : local require = GLOBAL.require local STRINGS = GLOBAL.STRINGS local Ingredient = GLOBAL.Ingredient local Recipe = GLOBAL.Recipe local TECH = GLOBAL.TECH local Angaraty = GLOBAL.Gargoga1 local SCIENCE_TWO = { SCIENCE = 2} local SCIENCE_ONE = { SCIENCE = 1} local NONE = TechThe.Create() AddRecipe2("Wxpr1", {Ingredient("wx78module_movespeed", 1), Ingredient("gears", 1)}, TECH.SCIENCE_ONE, {product = "wx78module_movespeed"}) AddRecipe2("Wxpr2", {Ingredient("wx78module_movespeed2", 1), Ingredient("gears", 3)}, TECH.SCIENCE_TWO, {product = "wx78module_movespeed2"}) basically my code didn`t work Game says "Failed to start dedicated server" When i turn off My mod this sstart to works Link to comment https://forums.kleientertainment.com/forums/topic/162695-custom-craft-to-existing-item/ Share on other sites More sharing options...
Nikkofix Posted December 28, 2024 Author Share Posted December 28, 2024 no one can help? Link to comment https://forums.kleientertainment.com/forums/topic/162695-custom-craft-to-existing-item/#findComment-1782752 Share on other sites More sharing options...
Baguettes Posted December 29, 2024 Share Posted December 29, 2024 Attach your world’s crash log, that will help us figure it out a bit more. Also, what is Gargoga…? Link to comment https://forums.kleientertainment.com/forums/topic/162695-custom-craft-to-existing-item/#findComment-1782810 Share on other sites More sharing options...
Mr.CrazyPotato Posted December 29, 2024 Share Posted December 29, 2024 (edited) Game won't launch if there's THIS code, I don't really understand your code, it looks strange somehow but if I would want to replace it with something I would use something like that: local function RemoveOriginalRecipe() local old_recipe = _G.AllRecipes["wx78module_movespeed"] if old_recipe then _G.AllRecipes["wx78module_movespeed"] = nil end end local function AddNewRecipe() Recipe2( "wx78module_movespeed", { Ingredient("scandata", 2), Ingredient("rabbit", 1) }, TECH.ROBOTMODULECRAFT_ONE, { builder_tag = "upgrademoduleowner", atlas = "images/inventoryimages/wx78module_movespeed.xml", image = "wx78module_movespeed.tex", }, {"MODULES"} ) end AddPrefabPostInit("world", function(inst) RemoveOriginalRecipe() AddNewRecipe() end) STRINGS.RECIPE_DESC.WX78MODULE_MOVESPEED = "Does she know how to make grilled cheese?" Edited December 29, 2024 by Mr.CrazyPotato Link to comment https://forums.kleientertainment.com/forums/topic/162695-custom-craft-to-existing-item/#findComment-1782854 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