AkaiNight Posted September 13, 2021 Share Posted September 13, 2021 Hello, me again. I am making a custom character and i need help about making a custom tech three. Is it enough to just add TUNING.PROTOTYPER_TREES.CUSTOM and how can i declare a level for it? Follower is in my character mod and it does not have any modmain for itself. And where should i put this? If its enough if its in tuning.lua i should just add PROTOTYPER_TREES = { CUSTOM = TechTree.Create ({ SCIENCE = x, MAGIC = z, })} Link to comment https://forums.kleientertainment.com/forums/topic/133594-making-a-custom-tech-tree-for-follower/ Share on other sites More sharing options...
Thomas_klei Posted September 13, 2021 Share Posted September 13, 2021 Ngl I think you might have to reconsider the coding, I'm pretty sure this is absurdely effort but I think DarkXero made code for this if it still works. I'm happily willing for someone to tell me otherwise tho. Link to comment https://forums.kleientertainment.com/forums/topic/133594-making-a-custom-tech-tree-for-follower/#findComment-1494399 Share on other sites More sharing options...
Monti18 Posted September 13, 2021 Share Posted September 13, 2021 Do you want to make a custom tech tree so that your follower can be crafted from this one or do you want your follower to be like a crafting station but just for your custom tech tree? I made a mod with a custom tech tree, I think I only used this to make it: --modmain local _G = GLOBAL local require = _G.require local TUNING = _G.TUNING local TechTree = require("techtree") table.insert(TechTree.AVAILABLE_TECH, "CUSTOM_TECH") _G.TECH.NONE.CUSTOM_TECH = 0 _G.TECH.CUSTOM_TECH_ONE = {CUSTOM_TECH = 1} for k, v in pairs(TUNING.PROTOTYPER_TREES) do v.CUSTOM_TECH = 0 end TUNING.PROTOTYPER_TREES.CUSTOM_TECH = TechTree.Create({CUSTOM_TECH = 1}) for i, v in pairs(_G.AllRecipes) do if v.level.CUSTOM_TECH == nil then v.level.CUSTOM_TECH = 0 end end STRINGS.TABS.CUSTOM_TECH = "Custom Tech Tree" I'm mot sure if all of it is needed, but it worked for me. Replace CUSTOM_TECH with the name of the your custom tech tree. You can then add it as a requirement for craftings and/or add the prototyper component to something to make you able to craft it. --recipe local test = AddRecipe("flint", { Ingredient("butterfly", 3 ), Ingredient("petals", 12), Ingredient("rope", 5)}, RECIPETABS.FARM, TECH.CUSTOM_TECH_ONE) --prefab file in the fn() inst:AddComponent("prototyper") inst.components.prototyper.trees = TUNING.PROTOTYPER_TREES.CUSTOM_TECH_ONE 1 1 Link to comment https://forums.kleientertainment.com/forums/topic/133594-making-a-custom-tech-tree-for-follower/#findComment-1494424 Share on other sites More sharing options...
AkaiNight Posted September 13, 2021 Author Share Posted September 13, 2021 3 hours ago, Monti18 said: Do you want to make a custom tech tree so that your follower can be crafted from this one or do you want your follower to be like a crafting station but just for your custom tech tree? yes i want to make it a crafting station just for my custom items. But my follower does not have any modmain for itself. Its in my character mod and im not sure if i can make a modmain for it? Is there any other way to do it? Or can i just add those in my characters modmain? Link to comment https://forums.kleientertainment.com/forums/topic/133594-making-a-custom-tech-tree-for-follower/#findComment-1494480 Share on other sites More sharing options...
Monti18 Posted September 13, 2021 Share Posted September 13, 2021 The modmain is for your entire mod, so as long your follower is in the same mod as your character, you can also use the modmain for him. 1 1 Link to comment https://forums.kleientertainment.com/forums/topic/133594-making-a-custom-tech-tree-for-follower/#findComment-1494481 Share on other sites More sharing options...
AkaiNight Posted September 16, 2021 Author Share Posted September 16, 2021 On 9/13/2021 at 5:31 PM, Monti18 said: TUNING.PROTOTYPER_TREES.CUSTOM_TECH = TechTree.Create({CUSTOM_TECH = 1}) If im not wrong this is the part that we add custom tech levels. And if i want to add more levels like 2,3... i just need to copy and paste this and change number? But im not sure about that since it will be all same name it will override itself or it will just not work or crush. So how i can add more levels for this part On 9/13/2021 at 5:31 PM, Monti18 said: _G.TECH.CUSTOM_TECH_ONE = {CUSTOM_TECH = 1} But we also have this part and this must be the defination of number like if it ask for TECH_one then the game will know it need CUSTOM_TECH to be higher than 1 and if i also want to add more levels i just need to add more and change "one" with numbers. Right? Link to comment https://forums.kleientertainment.com/forums/topic/133594-making-a-custom-tech-tree-for-follower/#findComment-1495326 Share on other sites More sharing options...
Monti18 Posted September 16, 2021 Share Posted September 16, 2021 Yes I think for adding more levels, you can do it like you wrote: TUNING.PROTOTYPER_TREES.CUSTOM_TECH = TechTree.Create({CUSTOM_TECH = 2}) --and _G.TECH.CUSTOM_TECH_TWO = {CUSTOM_TECH = 2} for example to have a second level in this tech tree. 1 1 Link to comment https://forums.kleientertainment.com/forums/topic/133594-making-a-custom-tech-tree-for-follower/#findComment-1495331 Share on other sites More sharing options...
AkaiNight Posted September 16, 2021 Author Share Posted September 16, 2021 6 minutes ago, Monti18 said: Yes I think for adding more levels, you can do it like you wrote: TUNING.PROTOTYPER_TREES.CUSTOM_TECH = TechTree.Create({CUSTOM_TECH = 2}) --and _G.TECH.CUSTOM_TECH_TWO = {CUSTOM_TECH = 2} for example to have a second level in this tech tree. thanks for everything 1 Link to comment https://forums.kleientertainment.com/forums/topic/133594-making-a-custom-tech-tree-for-follower/#findComment-1495338 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