Lumina Posted June 15, 2015 Share Posted June 15, 2015 Hello, I would like to make a "easy" version of the recipe giving 2 item instead of 1. I find how to configure (and have so the "easy" and "normal" choice), but don't know how to have the "2 item" part. How could i make this ? I try a search or looking for a mod doing this but can't found it. Thank you Link to comment Share on other sites More sharing options...
CremeLover Posted June 15, 2015 Share Posted June 15, 2015 (edited) Change the last number to customize the amount. local your_item = GLOBAL.Recipe("item_name", {Ingredient("ingredient_name", amount)},RECIPETABS.Your_tab, TECH.Your_tech, nil, nil, nil, 2) Edited June 15, 2015 by CremeLover Link to comment Share on other sites More sharing options...
Lumina Posted June 15, 2015 Author Share Posted June 15, 2015 Thanks again It seems to work fine. Link to comment Share on other sites More sharing options...
Kzisor Posted June 15, 2015 Share Posted June 15, 2015 @Lumina, do not use that method, otherwise it won't be compatible on clients. Use the AddRecipe method which accepts the same parameters and is compatible with clients. Link to comment Share on other sites More sharing options...
Lumina Posted June 15, 2015 Author Share Posted June 15, 2015 Like how ? This ? local STRINGS = GLOBAL.STRINGSlocal RECIPETABS = GLOBAL.RECIPETABSlocal Ingredient = GLOBAL.Ingredientlocal TECH = GLOBAL.TECHSTRINGS.RECIPE_DESC.GEARS = "A complex mechanism." local easy = (GetModConfigData("gearsrecipe")=="easy")local normal = (GetModConfigData("gearsrecipe")=="normal")if easy thenlocal gearsrecipe = AddRecipe( "gears", {Ingredient("steelwool", 1), Ingredient("transistor", 1), Ingredient("purplegem", 1) }, RECIPETABS.SCIENCE, TECH.SCIENCE_TWO, nil, nil, nil, 2)else if normal thenlocal gearsrecipe = AddRecipe( "gears", {Ingredient("steelwool", 1), Ingredient("transistor", 1), Ingredient("purplegem", 1) }, RECIPETABS.SCIENCE, TECH.SCIENCE_TWO)elselocal gearsrecipe = AddRecipe( "gears", {Ingredient("steelwool", 2), Ingredient("transistor", 2), Ingredient("purplegem", 1) }, RECIPETABS.SCIENCE, TECH.SCIENCE_TWO) endend Link to comment Share on other sites More sharing options...
Kzisor Posted June 15, 2015 Share Posted June 15, 2015 (edited) @Lumina, the following is an exampel:local example = AddRecipe("example_item", {Ingredient("example_ingredient", 2)},RECIPETABS.TOWN, TECH.NONE, nil, nil, nil, 4, -- amount to return to buildernil, -- builder tag"images/inventoryimages/example.xml", --atlas file"example.tex" -- image file) Edited June 15, 2015 by Kzisor Link to comment Share on other sites More sharing options...
Lumina Posted June 16, 2015 Author Share Posted June 16, 2015 Ok, thanks, i'll try it. 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