Earthyburt Posted June 8, 2021 Share Posted June 8, 2021 For my character, she will be able to know how to craft an alchemy engine from the start of the world. How would I make this happen? I am fine with her already having the recipe unlocked or spawning with an alchemy engine blueprint. Link to comment Share on other sites More sharing options...
AkaiNight Posted June 8, 2021 Share Posted June 8, 2021 I don't know if its possible to make it but you can try to give her a special crafting tab. for that. Asset("ATLAS", "images/hud/crafttab.xml"), in modmain you will see assets put that there. you will need a folder in images named "hud" and in that you need a picture for your special craft tab. after assets put that in modmain.lua local Ingredient = GLOBAL.Ingredient local RECIPETABS = GLOBAL.RECIPETABS local Recipe = GLOBAL.Recipe local TECH = GLOBAL.TECH craftab = AddRecipeTab("charactername", 998, "images/hud/craftab.xml", "craftab.tex", "chractername_builder") after "local" after craftab local Special_Alch_mac_recipe = AddRecipe("Special_Alch_mac", {Ingredient("crafting_item1", amount), Ingredient("crafting_item2", amount),...} crafttab, TECH.NONE nil, nil, nil, 1, nil, Special_Alch_mac_recipe.tagneeded = false Special_Alch_mac_recipe.builder.tag = "charactername_builder" Special_Alch_mac_ recipe.atlas = resolvefilepath(alchemy machine file path) lemme know if it not work. Link to comment Share on other sites More sharing options...
Earthyburt Posted June 9, 2021 Author Share Posted June 9, 2021 13 hours ago, AkaiNight said: I don't know if its possible to make it but you can try to give her a special crafting tab. for that. Asset("ATLAS", "images/hud/crafttab.xml"), in modmain you will see assets put that there. you will need a folder in images named "hud" and in that you need a picture for your special craft tab. after assets put that in modmain.lua local Ingredient = GLOBAL.Ingredient local RECIPETABS = GLOBAL.RECIPETABS local Recipe = GLOBAL.Recipe local TECH = GLOBAL.TECH craftab = AddRecipeTab("charactername", 998, "images/hud/craftab.xml", "craftab.tex", "chractername_builder") after "local" after craftab local Special_Alch_mac_recipe = AddRecipe("Special_Alch_mac", {Ingredient("crafting_item1", amount), Ingredient("crafting_item2", amount),...} crafttab, TECH.NONE nil, nil, nil, 1, nil, Special_Alch_mac_recipe.tagneeded = false Special_Alch_mac_recipe.builder.tag = "charactername_builder" Special_Alch_mac_ recipe.atlas = resolvefilepath(alchemy machine file path) lemme know if it not work. I don't think I am willing to create an entirely new crafting recipe for an item that already has a recipe (especially since I have better plans for a custom crafting tab), however I could consider resorting to this of I need to, depending on if I decide not to scrap this feature. Link to comment Share on other sites More sharing options...
Monti18 Posted June 11, 2021 Share Posted June 11, 2021 If you want to have the blueprint, just add "researchlab2_blueprint" to the starting inventory. If you want the character to know the recipe, add inst.components.builder:AddRecipe("researchlab2") to your master postinit. If it doesn't work like this, you may need to do it with a delay with DoTaskInTime. 1 Link to comment Share on other sites More sharing options...
Earthyburt Posted October 25, 2021 Author Share Posted October 25, 2021 (edited) I have found the best solution for my case; posting it in case anyone from the future is looking for the solution. inst.components.builder:UnlockRecipe("itemprefabname") Edited October 25, 2021 by Earthyburt 1 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