. . . Posted September 6, 2016 Share Posted September 6, 2016 (edited) Hello, I need help ... So, I was wondering is it possible to make alternate crafting recipes for a mod character which only they can craft? Like for example I want my character be able to craft wood walls with 3 gold nuggets, stone walls with 6 gold nuggets & moonrock walls with 12 gold nuggets. And each of the craftings would give 6 walls & only characters with the "amazon" tag can access these wall recipes.. Would this be possible or not? Because I have no idea how I would even do this ... And thanks so, so, so much for reading my problem! I wish you have a splendid day/night !!! Edited September 6, 2016 by SuperDavid Link to comment https://forums.kleientertainment.com/forums/topic/70003-solved-how-to-add-alternate-crafting-recipe-for-specific-mod-character/ Share on other sites More sharing options...
CarlZalph Posted September 6, 2016 Share Posted September 6, 2016 AddRecipe(self, name, ingredients, tab, level, placer, min_spacing, nounlock, numtogive, builder_tag, atlas, image) An example with your amazon, though untested: local function GenerateWallRecipe(prefab, count) AddRecipe( prefab, { Ingredient("goldnugget", count) }, RECIPETABS.TOWN, TECH.SCIENCE_ONE, nil, nil, nil, 6, "amazon" ) end GenerateWallRecipe("wall_wood_item", 3) GenerateWallRecipe("wall_stone_item", 6) GenerateWallRecipe("wall_moonrock_item", 12) Link to comment https://forums.kleientertainment.com/forums/topic/70003-solved-how-to-add-alternate-crafting-recipe-for-specific-mod-character/#findComment-810932 Share on other sites More sharing options...
. . . Posted September 6, 2016 Author Share Posted September 6, 2016 (edited) Thank you so much CarlZalph !! If I can just ask 1 more thing is there a way she can have still have the original recipes & these ones too? So she can craft it with gold or the normal way or is that not possible? Again, thank you so much! EDIT. Nvm I found out you can't have 2 recipes for same prefab Edited September 6, 2016 by SuperDavid Link to comment https://forums.kleientertainment.com/forums/topic/70003-solved-how-to-add-alternate-crafting-recipe-for-specific-mod-character/#findComment-811007 Share on other sites More sharing options...
DarkXero Posted September 6, 2016 Share Posted September 6, 2016 You need different names for recipes. local function GenerateAmazonWallRecipe(prefab, count) local amazon_prefab = prefab.."_amazon" local amazon_recipe = AddRecipe( amazon_prefab, { Ingredient("goldnugget", count) }, GLOBAL.RECIPETABS.TOWN, GLOBAL.TECH.SCIENCE_ONE, nil, nil, nil, 6, "amazon" ) amazon_recipe.product = prefab amazon_recipe.sortkey = GLOBAL.AllRecipes[prefab].sortkey + 0.5 local upper_amazon_prefab = string.upper(amazon_prefab) local upper_prefab = string.upper(prefab) local STRINGS = GLOBAL.STRINGS STRINGS.NAMES[upper_amazon_prefab] = STRINGS.NAMES[upper_prefab] STRINGS.RECIPE_DESC[upper_amazon_prefab] = STRINGS.RECIPE_DESC[upper_prefab] end GenerateAmazonWallRecipe("wall_wood_item", 3) GenerateAmazonWallRecipe("wall_stone_item", 6) GenerateAmazonWallRecipe("wall_moonrock_item", 12) Link to comment https://forums.kleientertainment.com/forums/topic/70003-solved-how-to-add-alternate-crafting-recipe-for-specific-mod-character/#findComment-811029 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