icantevenname Posted April 30, 2017 Share Posted April 30, 2017 I want to add a craftable healing turret for my Sunflower mod. I bet I can figure it out using the eyeturret lua as a reference point, but I have no idea how to make an item caftable and craftable by a specific character. Link to comment Share on other sites More sharing options...
Lumina Posted April 30, 2017 Share Posted April 30, 2017 local myprefab = AddRecipe("myprefab", {Ingredient("log", 1), Ingredient("boards", 2), Ingredient("rocks", 1) }, RECIPETABS.TOWN, TECH.SCIENCE_TWO, "myprefab_placer", nil, nil, nil, nil, "images/inventoryimages/myprefab.xml", "myprefab.tex" ) Example. For the specific character, you need to tive your character a tag, like "sunnycharacter" and add this tag in the recipe at the right place. As far as i remember it should be something like local myprefab = AddRecipe("myprefab", {Ingredient("log", 1), Ingredient("boards", 2), Ingredient("rocks", 1) }, RECIPETABS.TOWN, TECH.SCIENCE_TWO, "myprefab_placer", nil, nil, nil, "sunnycharacter", "images/inventoryimages/myprefab.xml", "myprefab.tex" ) But you should verify with the game files, in script/recipes.lua there are examples. Link to comment Share on other sites More sharing options...
icantevenname Posted April 30, 2017 Author Share Posted April 30, 2017 8 hours ago, Lumina said: local myprefab = AddRecipe("myprefab", {Ingredient("log", 1), Ingredient("boards", 2), Ingredient("rocks", 1) }, RECIPETABS.TOWN, TECH.SCIENCE_TWO, "myprefab_placer", nil, nil, nil, nil, "images/inventoryimages/myprefab.xml", "myprefab.tex" ) Example. For the specific character, you need to tive your character a tag, like "sunnycharacter" and add this tag in the recipe at the right place. As far as i remember it should be something like local myprefab = AddRecipe("myprefab", {Ingredient("log", 1), Ingredient("boards", 2), Ingredient("rocks", 1) }, RECIPETABS.TOWN, TECH.SCIENCE_TWO, "myprefab_placer", nil, nil, nil, "sunnycharacter", "images/inventoryimages/myprefab.xml", "myprefab.tex" ) But you should verify with the game files, in script/recipes.lua there are examples. So to make it not require a science tier, do I leave out the TECH? And is the TOWN tab the Survival tab? Link to comment Share on other sites More sharing options...
Lumina Posted April 30, 2017 Share Posted April 30, 2017 Did you look at the script/recipes.lua file ? Because i'm pretty sure there are answer in it. Link to comment Share on other sites More sharing options...
icantevenname Posted April 30, 2017 Author Share Posted April 30, 2017 2 hours ago, Lumina said: Did you look at the script/recipes.lua file ? Because i'm pretty sure there are answer in it. Thanks for the tip. 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