Dogmeat8990 Posted February 24, 2021 Share Posted February 24, 2021 I want to make a recipe like 1 flit and 1 log makes 3 twigs or make a cheaper gold axe how would I do that. I have this command will this help me? local Recipe = GLOBAL.Recipe local RECIPETABS = GLOBAL.RECIPETABS local Ingredient = GLOBAL.Ingredient local TECH = GLOBAL.TECH Link to comment Share on other sites More sharing options...
Wonderlarr Posted February 24, 2021 Share Posted February 24, 2021 @Dogmeat8990 Have you looked at the getting started post for modding yet? Link to comment Share on other sites More sharing options...
Dogmeat8990 Posted February 24, 2021 Author Share Posted February 24, 2021 (edited) Already have my mod on steam https://steamcommunity.com/sharedfiles/filedetails/?id=2376168872 Edited February 24, 2021 by Dogmeat8990 Added a link Link to comment Share on other sites More sharing options...
FurryEskimo Posted February 25, 2021 Share Posted February 25, 2021 @Dogmeat8990 I think you're looking for something like this: --AddRecipe(self, name, ingredients, tab, level, placer, min_spacing, nounlock, numtogive, builder_tag, atlas, image) AddRecipe("twigs", {Ingredient("flint", 1), Ingredient("log", 1), Ingredient(GLOBAL.CHARACTER_INGREDIENT.HEALTH, 50) }, RECIPETABS.SURVIVAL, TECH.SCIENCE_ONE, nil, nil, nil, 3, "YOURPLAYERSNAME") Link to comment Share on other sites More sharing options...
Dogmeat8990 Posted February 25, 2021 Author Share Posted February 25, 2021 So i put the command in and nothing happened Link to comment Share on other sites More sharing options...
FurryEskimo Posted February 27, 2021 Share Posted February 27, 2021 (edited) @Dogmeat8990 Try @ me so I'm notified. ^-^ The recipe I posted requires you to unlock the tech, and that requires you to be at a science station. You'll receive an intelligence bonus for doing so. You also need to enter the character's name at the end if only one character can make the item. This is what's in my modmain: local require = GLOBAL.require local STRINGS = GLOBAL.STRINGS local Recipe = GLOBAL.Recipe --(Test code) local RECIPETABS = GLOBAL.RECIPETABS local TECH = GLOBAL.TECH --AddRecipe(self, name, ingredients, tab, level, placer, min_spacing, nounlock, numtogive, builder_tag, atlas, image) local ice_den = AddRecipe("ice_den",{ Ingredient("twigs", 6), Ingredient("cutgrass", 8), Ingredient("ice", 12) }, RECIPETABS.SURVIVAL, TECH.SCIENCE_ONE, "ice_den_placer", nil, nil, nil, "furryeskimo") ice_den.atlas = "images/inventoryimages/ice_den.xml" local cheapbirdtrap = AddRecipe("cheapbirdtrap",{ Ingredient("twigs", 3), Ingredient("papyrus", 2) }, RECIPETABS.SURVIVAL, TECH.SCIENCE_ONE, nil, nil, nil, nil, "furryeskimo") --Cheap bird trap. cheapbirdtrap.atlas = "images/inventoryimages/cheapbirdtrap.xml" GLOBAL.STRINGS.NAMES.CHEAPBIRDTRAP = "Cheap Bird Trap" --Test code. STRINGS.RECIPE_DESC.CHEAPBIRDTRAP = "Easy to carry,\nbut very delicate." STRINGS.CHARACTERS.GENERIC.DESCRIBE.CHEAPBIRDTRAP= "If a trap goes off, and noone is around to hear it, do I still get dinner?" --Allows the cheap bird cages to be displayed correctly on the character select screen. TUNING.STARTING_ITEM_IMAGE_OVERRIDE["cheapbirdtrap"] = {atlas = "images/inventoryimages/cheapbirdtrap.xml", image = "cheapbirdtrap.tex"} --Hound whistle if GetModConfigData("whistlemaker") == 2 then AddRecipe("houndwhistle", {Ingredient("goldnugget", 4), Ingredient("nightmarefuel", 2), Ingredient(GLOBAL.CHARACTER_INGREDIENT.HEALTH, 50) }, RECIPETABS.MAGIC, TECH.MAGIC_TWO, nil, nil, nil, nil, "furryeskimo") end I've attached the Recipes file, which is how Klei adds all their recipes. recipes[1].lua Edited February 27, 2021 by FurryEskimo Link to comment 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