RexySeven Posted December 7, 2023 Share Posted December 7, 2023 Hello While trying to make a skill tree for a modded character I ran some kind of error: [string "scripts/widgets/redux/skilltreebuilder.lua"]:592: attempt to index local 'panel' (a nil value) I thoroughly followed this skill tree guide by Lyraedan and checked other people's code to see if I missed something. I'm also made sure to decompile and compile skill tree background while renaming all png to corresponding names, but it didn't work. I haven't find any solution to that on the forums, most likely because it's a pretty recent addition to the game, and I also tried fixing it myself for couple of days, but now I have to ask for possible solutions straight away it seems. I'd be pretty grateful if someone help me out with this. I'm attaching skill tree related code from my modmain, crash log and skill tree file. -- Skilltree local SkillTreeDefs = require("prefabs/skilltree_defs") local OldGetSkilltreeBG = GLOBAL.GetSkilltreeBG function GLOBAL.GetSkilltreeBG(imagename, ...) if imagename == "whispy_background.tex" then return "images/skilltreeimages/whispy_skilltree.xml" else return OldGetSkilltreeBG(imagename, ...) end end --RegisterSkilltreeIconsAtlas("images/skilltreeimages/whispy_skilltree.xml", "whispy") local CreateSkillTree = function() print("Creating a skilltree for whispy") local BuildSkillsData = require("prefabs/skilltree_whispy") -- Load in the skilltree if BuildSkillsData then local data = BuildSkillsData(SkillTreeDefs.FN) if data then SkillTreeDefs.CreateSkillTreeFor("whispy", data.SKILLS) SkillTreeDefs.SKILLTREE_ORDERS["whispy"] = data.ORDERS print("Created whispy skilltree") end end end CreateSkillTree(); -- Skilltree end client_log.txt skilltree_whispy.lua Link to comment Share on other sites More sharing options...
Lyraedan Posted December 7, 2023 Share Posted December 7, 2023 (edited) Hi there! I'm the author of the tutorial. I'll be more then happy to assist you in fixing this issue. Your mod main setup looks spot on, your skilltree file looks correct. Looking at your client log, I would guess its your texture xml files. I know that sometimes those things don't compile properly and you have to fix it by opening it up the xml by hand Luke_Skilltree_Example.zipTo make things a little easier for you, I'm attaching a functional early version of my character mod that has a working skill tree. Its not finished yet but its something you can compare against. I'll also attach this example to the tutorial for anyone else should they run into issues Edited December 7, 2023 by Lyraedan 1 Link to comment Share on other sites More sharing options...
RexySeven Posted December 7, 2023 Author Share Posted December 7, 2023 1 hour ago, Lyraedan said: Hi there! I'm the author of the tutorial. I'll be more then happy to assist you in fixing this issue. Your mod main setup looks spot on, your skilltree file looks correct. Looking at your client log, I would guess its your texture xml files. I know that sometimes those things don't compile properly and you have to fix it by opening it up the xml by hand Luke_Skilltree_Example.zipTo make things a little easier for you, I'm attaching a functional early version of my character mod that has a working skill tree. Its not finished yet but its something you can compare against. I'll also attach this example to the tutorial for anyone else should they run into issues Hello! I checked luke_skilltree and it has identical code as I did in my file: <?xml version="1.0" encoding="utf-8"?> <Atlas> <Texture filename="whispy_skilltree.tex" /> <Elements> <Element name="background.tex" u1="0.001" u2="0.40964453125" v2="0.999" v1="0.27834375" variant="" /> <Element name="overlay_left.tex" u1="0.41164453125" u2="0.438453125" v2="0.999" v1="0.27834375" variant="" /> <Element name="overlay_right.tex" u1="0.440453125" u2="0.4667734375" v2="0.999" v1="0.27834375" variant="" /> <Element name="whispy_background.tex" u1="0.4687734375" u2="0.879859375" v2="0.999" v1="0.266625" variant="" /> </Elements> </Atlas> I decompiled the file you attached and then compiled it back with luke_background png changed to whispy_background png as a placeholder Also I'm so glad you willing to help resolve this problem! here's both of my xml and tex if you need them whispy_skilltree.xml whispy_skilltree.tex Link to comment Share on other sites More sharing options...
RexySeven Posted December 7, 2023 Author Share Posted December 7, 2023 (edited) Also attaching my entire character modmain maybe something is conflicting here modmain.luawhispy.zip Edited December 8, 2023 by RexySeven Link to comment Share on other sites More sharing options...
Lyraedan Posted December 9, 2023 Share Posted December 9, 2023 Sweet thanks, I'll take alook at them over the next couple days when I find a moment. I'll keep you updated 1 Link to comment Share on other sites More sharing options...
RexySeven Posted December 12, 2023 Author Share Posted December 12, 2023 On 12/10/2023 at 2:24 AM, Lyraedan said: Sweet thanks, I'll take alook at them over the next couple days when I find a moment. I'll keep you updated You don't have to! ADM helped me out, it all works smooth as butter now Thanks a lot! 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