CrisChemical Posted January 12, 2023 Share Posted January 12, 2023 I've been making my first character mod recently and when i create a world with the mod enabled, it crashes. I think an item i added may be the one causing it, when i tried the mod without it, everything went as expected. Also, i want the character to only gain 50% of all food values (Just like wortox), but i don't really know how to add this, any ideas on how to do it? Here are the mods files and the crash log, thank you in advance. "Hungern" is the item i added and "Umbrellaren" is the character, just in case UmbrellaRenoirMod.rar Link to comment https://forums.kleientertainment.com/forums/topic/145540-my-character-mod-keeps-crashing-the-game-i-dont-know-what-is-causing-it/ Share on other sites More sharing options...
Goregonzola Posted January 12, 2023 Share Posted January 12, 2023 (edited) Hey-hey! Inside the client log, you can see the following error message: Quote [00:01:38]: [string "../mods/Umbrella/modmain.lua"]:65: attempt to index global 'RECIPETABS' (a nil value) This means that there's something wrong inside modmain.lua around line number 65. In your case, the problem is that you noted RECIPETABS.WAR and TECH.NONE inside the custom recipe without telling the game what you mean by these. Whenever you state something in all caps, you have to note them inside the modmain.lua. To be exact, you have to add these just below local STRINGS = GLOBAL.STRINGS: Quote local RECIPETABS = GLOBAL.RECIPETABS local TECH = GLOBAL.TECH I'm not 100% sure why it is necessary programming-wise, but it's a general rule in Don't Starve modding. It might be an overkill in this case, but I usually add all of these. They cover all the things I need: Quote local require = GLOBAL.require local STRINGS = GLOBAL.STRINGS local Ingredient = GLOBAL.Ingredient local RECIPETABS = GLOBAL.RECIPETABS local TECH = GLOBAL.TECH local AllRecipes = GLOBAL.AllRecipes local _G = GLOBAL local TUNING = _G.TUNING local CHARACTER_INGREDIENT = GLOBAL.CHARACTER_INGREDIENT local RECIPETABS = _G.RECIPETABS local Ingredient = _G.Ingredient local TECH = _G.TECH local CUSTOM_RECIPETABS = _G.CUSTOM_RECIPETABS This should make it work, but there's something wonky about the modicon as well: Copy and paste the modicon files from the images folder to the mod's general folder (so they are next to the modmain and the modinfo.lua). This will be a Skullgirls character, right? I'm really curious how it will turn out. Hope this helps. Happy modding! Edited January 12, 2023 by Goregonzola Link to comment https://forums.kleientertainment.com/forums/topic/145540-my-character-mod-keeps-crashing-the-game-i-dont-know-what-is-causing-it/#findComment-1617427 Share on other sites More sharing options...
CrisChemical Posted January 12, 2023 Author Share Posted January 12, 2023 4 hours ago, Goregonzola said: Hey-hey! Inside the client log, you can see the following error message: This means that there's something wrong inside modmain.lua around line number 65. In your case, the problem is that you noted RECIPETABS.WAR and TECH.NONE inside the custom recipe without telling the game what you mean by these. Whenever you state something in all caps, you have to note them inside the modmain.lua. To be exact, you have to add these just below local STRINGS = GLOBAL.STRINGS: I'm not 100% sure why it is necessary programming-wise, but it's a general rule in Don't Starve modding. It might be an overkill in this case, but I usually add all of these. They cover all the things I need: This should make it work, but there's something wonky about the modicon as well: Copy and paste the modicon files from the images folder to the mod's general folder (so they are next to the modmain and the modinfo.lua). This will be a Skullgirls character, right? I'm really curious how it will turn out. Hope this helps. Happy modding! This helped a lot, thank you so much!! 1 Link to comment https://forums.kleientertainment.com/forums/topic/145540-my-character-mod-keeps-crashing-the-game-i-dont-know-what-is-causing-it/#findComment-1617457 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