Lalalovecraft Posted September 28, 2021 Share Posted September 28, 2021 (edited) Hello! I'm trying to make my first ever mod and I've been running into a lot of trouble but finally managed to make him work with his own script and images, but now I got help from a friend to try and give him a custom character item, a locket that when worn restores sanity, and ever since then every time I try to load a world to test his mod I'm stuck in world gen forever. If anyone would be willing to take a look at my log and also mod files to see if they can find what was changed to cause this problem? I'm a real novice to all this coding stuff so I'm floundering a bit. Thank you to whoever takes the time to try! DST_Ley.zip client_log.txt Edited September 28, 2021 by Lalalovecraft Link to comment https://forums.kleientertainment.com/forums/topic/134024-mod-is-causing-sever-gen-to-go-on-forever/ Share on other sites More sharing options...
Monti18 Posted September 29, 2021 Share Posted September 29, 2021 So there were a few errrors in your mod. To start, you should have a look at the server log instead of the client for most things that you change, this is where most errors occur. You can find the errors there just by searching error in the log. Line 97 of your modmain should look like this: AddRecipe("locket", {Ingredient("goldnugget", 1)}, RECIPETABS.DRESS, TECH.NONE, nil, nil, nil, nil, "locketholder", "images/inventoryimages/locket.xml", "locket.tex") and line 54 of your character prefab ley should be this: inst:AddTag("locketholder") Link to comment https://forums.kleientertainment.com/forums/topic/134024-mod-is-causing-sever-gen-to-go-on-forever/#findComment-1499898 Share on other sites More sharing options...
Lalalovecraft Posted September 30, 2021 Author Share Posted September 30, 2021 (edited) @Monti18 First, thank you for taking a look over! From now on if I have a problem I'll add the server log. The fixes you pointed out got me to at least the select character screen, which is more then I could on my own, so thank you for pointing out those errors. Unfortunately when I select my mod character the game wont ever load the world, and I am stuck with a frozen background. This time I have the server log. If you would be kind enough to take a look it would be appreciated, but you also already got me farther then I was so you've already been a huge help regardless of if you do or not. Either way thank you for the corrections. client_log.txt DST LEY.zip server_log.txt Edited September 30, 2021 by Lalalovecraft Link to comment https://forums.kleientertainment.com/forums/topic/134024-mod-is-causing-sever-gen-to-go-on-forever/#findComment-1500290 Share on other sites More sharing options...
Monti18 Posted September 30, 2021 Share Posted September 30, 2021 You will need to learn how to debug your mods if you want to continue modding, as this is one of the most important skills to have. [00:01:19]: [string "scripts/entityscript.lua"]:514: attempt to index field 'entity' (a nil value) LUA ERROR stack traceback: scripts/entityscript.lua:514 in (field) AddTag (Lua) <513-515> self = locketholder tag = nil ../mods/DST LEY/scripts/prefabs/ley.lua:54 in (upvalue) common_postinit (Lua) <51-55> inst = 117773 - (valid:true) scripts/prefabs/player_common.lua:1698 in (field) fn (Lua) <1563-2017> inst = 117773 - (valid:true) scripts/mainfunctions.lua:300 in () ? (Lua) <289-331> name = ley prefab = Prefab ley - Just by searching error, you will find this in the log. You can see from the upvalue that it came from line 54 in the prefab of your character. inst.AddTag("locketholder") This is your line 54. If you compare it what I wrote, you see that I used a colon between inst and addtag. The colon makes it so that this function directly gets the inst argument as the first argument. As you didn't use it, lockerholder is now inst and the tag that should be added is nil. The quick fix is to add a colon in between. But most importantly, try to fix those errors by yourself, that's how you get better as you start to understand how this game is working Link to comment https://forums.kleientertainment.com/forums/topic/134024-mod-is-causing-sever-gen-to-go-on-forever/#findComment-1500312 Share on other sites More sharing options...
Lalalovecraft Posted October 1, 2021 Author Share Posted October 1, 2021 The only experience I have with coding and script language had been in MEL, which is the coding language I use for my animation work in Maya. I think the adjustments been pretty hard. But I feel more confident now going forward on my own. Thank you so much for the encouragement and help. I'm going to try and give the rest of the problems I find a try on my own using the error search and online information on the LUA language. I'm still finding errors but I'm going to close this thread for now and dive a little deeper. Have a good evening and thank you again. PS. your wormhole mod looks radical, im gonna have to give that a check! 1 Link to comment https://forums.kleientertainment.com/forums/topic/134024-mod-is-causing-sever-gen-to-go-on-forever/#findComment-1500627 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