goldfish911 Posted June 23, 2014 Share Posted June 23, 2014 Alrighty, So after some messing around, I finally got my mod to a prototype stage. It no longer crashes when I start the game OR start a world. The problem? The game stops working. Like, I'll spawn in a newly generated world, but I have no HUD whatsoever, no keys or the mouse work except the console key(in-game only, of course). It seems the game crashes, but no crash screen shows up. Here is what the log says though:######### Generating Normal Mode Default Level######## scripts/map/forest_map.lua(221,1) Creating story... scripts/map/storygen.lua(414,1) LinkNodesByKeys scripts/map/forest_map.lua(259,1) Baking map... 350 scripts/map/forest_map.lua(284,1) Map Baked! scripts/map/forest_map.lua(315,1) Encoding... scripts/map/forest_map.lua(319,1) Encoding... DONE scripts/map/forest_map.lua(374,1) Checking Tags scripts/map/forest_map.lua(487,1) Populating voronoi... scripts/map/forest_map.lua(622,1) Done forest map gen! scripts/worldgen_main.lua(246,1) Checking map... scripts/worldgen_main.lua(600,1) Generation complete WorldSim::SimThread::Main() completescripts/gamelogic.lua(148,1) Unload FE scripts/gamelogic.lua(150,1) Unload FE done scripts/mods.lua(269,1) Mod: prototype (Creepy Compendium-Fleshy Stuff) Registering prefabs scripts/mods.lua(275,1) Mod: prototype (Creepy Compendium-Fleshy Stuff) Registering prefab file: prefabs/fleshhelmet scripts/mods.lua(17,1) error calling LoadPrefabFile in mod prototype (Creepy Compendium-Fleshy Stuff):scripts/util.lua:276: Could not find an asset matching anim/fleshhelmet.zip in any of the search paths.LUA ERROR stack traceback: =[C] in function 'assert' scripts/util.lua(276,1) in function 'resolvefilepath' scripts/mainfunctions.lua(51,1) in function 'RegisterPrefabs' scripts/mainfunctions.lua(78,1) =(tail call) ? =[C] in function 'xpcall' scripts/mods.lua(15,1) scripts/mods.lua(276,1) in function 'RegisterPrefabs' scripts/gamelogic.lua(160,1) in function 'LoadAssets' scripts/gamelogic.lua(1021,1) in function 'cb' scripts/saveindex.lua(709,1) =[C] in function 'SetPersistentString' scripts/saveindex.lua(85,1) in function 'Save' scripts/saveindex.lua(737,1) =[C] in function 'SetPersistentString' scripts/saveindex.lua(740,1) in function 'OnGenerateNewWorld' scripts/gamelogic.lua(1031,1) in function 'cb' scripts/screens/worldgenscreen.lua(168,1) in function 'cb' scripts/frontend.lua(409,1) in function 'DoFadingUpdate' scripts/frontend.lua(461,1) in function 'Update' scripts/update.lua(46,1) scripts/mods.lua(226,1) Disabling prototype (Creepy Compendium-Fleshy Stuff) because it had an error. scripts/frontend.lua(723,1) SCRIPT ERROR! Showing error screen scripts/mods.lua(275,1) Mod: prototype (Creepy Compendium-Fleshy Stuff) Registering prefab file: prefabs/fleshgaunt scripts/mods.lua(279,1) Mod: prototype (Creepy Compendium-Fleshy Stuff) fleshgaunt scripts/mods.lua(292,1) Mod: prototype (Creepy Compendium-Fleshy Stuff) Registering default mod prefab scripts/mods.lua(269,1) Mod: workshop-196046828 (Manual Workshop Update) Registering prefabs scripts/mods.lua(292,1) Mod: workshop-196046828 (Manual Workshop Update) Registering default mod prefab scripts/gamelogic.lua(164,1) LOAD BE Could not preload undefined prefab 0x350a87f2 (note)Could not preload undefined prefab 0x350a87f2 (note)Could not preload undefined prefab 0x350a87f2 (note)Could not preload undefined prefab 0x4e6fbbc3 (fleshgauntrec)Could not preload undefined prefab 0xe2424861 (fleshhelmet)scripts/gamelogic.lua(172,1) LOAD BE: done MiniMapComponent::AddAtlas( minimap/minimap_data.xml )scripts/gamelogic.lua(493,1) Loading Nav Grid focus lostfocus gainedfocus lostfocus gainedfocus lost I realized some animations were missing as it says in the log, but still...What confuses me is why it didn't crash when a new world was generated and instead caused a broken HUD?here is the modmain.lua: TUNING.FLESHHELMET = 150*5TUNING.FLESHHELMET_ABSORPTION = .85TUNING.FLESHGAUNT_USES = 200TUNING.FLESHGAUNT_DAMAGE = 40STRINGS = GLOBAL.STRINGSACTIONS = GLOBAL.ACTIONSRECIPETABS = GLOBAL.RECIPETABSRecipe = GLOBAL.RecipeIngredient = GLOBAL.IngredientTECH = GLOBAL.TECHTUNING = GLOBAL.TUNINGPrefabFiles = { "fleshhelmet", "fleshgaunt",}GLOBAL.STRINGS.NAMES.FLESHHELMET = "Flesh Helmet"GLOBAL.STRINGS.CHARACTERS.GENERIC.DESCRIBE.FLESHHELMET = "It feels like it's drooling."STRINGS.RECIPE_DESC.FLESHHELMET = "Protect your heat with another head."function fleshhelmetrec() local fleshhelmet = Recipe("fleshhelmet", {Ingredient("cutgrass", 1)}, RECIPETABS.SCIENCE, TECH.SCIENCE_ONE)fleshhelmet.atlas = GLOBAL.resolvefilepath("images/inventoryimages/fleshhelmet.xml")fleshhelmet.image = "fleshhelmet.tex"endAddGamePostInit(fleshhelmetrec)GLOBAL.STRINGS.NAMES.FLESHGAUNT = "Flesh Gauntlet"GLOBAL.STRINGS.CHARACTERS.GENERIC.DESCRIBE.FLESHGAUNT = "It dirties my hand with its juices."STRINGS.RECIPE_DESC.FLESHGAUNT = "Because Hambats are for newbs."function fleshgauntrec()local fleshgaunt = Recipe("fleshgauntrec", {Ingredient("cutgrass", 1)}, RECIPETABS.SCIENCE, TECH.SCIENCE_ONE)fleshgaunt.atlas = GLOBAL.resolvefilepath("images/inventoryimages/fleshgaunt.xml")fleshgaunt.image = "fleshgaunt.tex"endAddGamePostInit(fleshgauntrec) Is it the fact that I should have done this on the line for the "fleshgaunt" recipe:local fleshgaunt = Recipe("fleshgaunt", etc... end I could use some help as I can't test this mod otherwise at all. Link to comment https://forums.kleientertainment.com/forums/topic/37772-i-broke-the-game-with-my-mod-and-i-dont-know-whats-the-problem/ Share on other sites More sharing options...
chromiumboy Posted June 23, 2014 Share Posted June 23, 2014 (edited) I noticed that you define 'local strings = global.strings' at the start of the script by then use 'global.strings' later, instead of 'strings'. Can't see anything else that stands out to me atm. Missing files could also cause the problem. Edited June 23, 2014 by chromiumboy Link to comment https://forums.kleientertainment.com/forums/topic/37772-i-broke-the-game-with-my-mod-and-i-dont-know-whats-the-problem/#findComment-503995 Share on other sites More sharing options...
DeathDisciple Posted June 23, 2014 Share Posted June 23, 2014 (edited) scripts/util.lua:276: Could not find an asset matching anim/fleshhelmet.zip in any of the search paths.Means exactly what it says, you are trying to load an asset that isn't in the mod anim/ folder. As for your confusion, worldgen screen does not load mod assets at all (or did not last time I checked, forcing me to LoadPrefab manually to get the worldgen screen custom assets in) so it doesn't figure out the missing asset at that time. And if you wonder why empty hud, welcome to DS modding. Get used to finding the errors in log files instead of error screens. I'm not being sarcastic, even tho it might seem so, it is as honest statement as it gets. Edited June 24, 2014 by DeathDisciple Link to comment https://forums.kleientertainment.com/forums/topic/37772-i-broke-the-game-with-my-mod-and-i-dont-know-whats-the-problem/#findComment-504002 Share on other sites More sharing options...
chromiumboy Posted June 24, 2014 Share Posted June 24, 2014 Huh, I missed the missing anim error somehow, I don't how. But yes, if any files are missing the HUD generally doesn't pop up and the game and there is no crash screen. Link to comment https://forums.kleientertainment.com/forums/topic/37772-i-broke-the-game-with-my-mod-and-i-dont-know-whats-the-problem/#findComment-504057 Share on other sites More sharing options...
goldfish911 Posted June 24, 2014 Author Share Posted June 24, 2014 scripts/util.lua:276: Could not find an asset matching anim/fleshhelmet.zip in any of the search paths.Means exactly what it says, you are trying to load an asset that isn't in the mod anim/ folder. As for your confusion, worldgen screen does not load mod assets at all (or did not last time I checked, forcing me to LoadPrefab manually to get the worldgen screen custom assets in) so it doesn't figure out the missing asset at that time. And if you wonder why empty hud, welcome to DS modding. Get used to finding the errors in log files instead of error screens. I'm not being sarcastic, even tho it might seem so, it is as honest statement as it gets. So if an asset is missing the game just crashes that way? Huh, I wasn't expecting it to crash that way, because it did crash with a message when I tried testing without an inventory image. Link to comment https://forums.kleientertainment.com/forums/topic/37772-i-broke-the-game-with-my-mod-and-i-dont-know-whats-the-problem/#findComment-504184 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