Coffgirl Posted March 17, 2014 Share Posted March 17, 2014 My mod this one http://steamcommunity.com/sharedfiles/filedetails/?id=172627262I finally reach the ancient ruin but when I click on a broken clockwork, it just crash...here's a log file log.txt Please help. ;A; Link to comment https://forums.kleientertainment.com/forums/topic/33101-my-character-mod-crash-in-ancient-ruin/ Share on other sites More sharing options...
iWitch Posted March 17, 2014 Share Posted March 17, 2014 i can only guess that custom character "Coffgirl" havent describe string for this clockwork. since it crashed on GetDescription but maybe more expirienced guys like squeek say something Link to comment https://forums.kleientertainment.com/forums/topic/33101-my-character-mod-crash-in-ancient-ruin/#findComment-433550 Share on other sites More sharing options...
squeek Posted March 17, 2014 Share Posted March 17, 2014 (edited) It's a game bug.From the The Big List Of Mod-Related Code SuggestionsFix repairable item describe strings (multiple bugs exist; one can cause crashes)Detailed here. Example fix here (the function is in stringutil.lua)To fix it, you can add the below spoilered code to a file like <modfolder>/scripts/repairabledescriptionfix.lua and then put GLOBAL.require "repairabledescriptionfix" in your modmain.lua.local function getcharacterstring(tab, item, modifier) if modifier then modifier = string.upper(modifier) end if tab then local topic_tab = tab[item] if topic_tab then if type(topic_tab) == "string" then return topic_tab elseif type(topic_tab) == "table" then if modifier and topic_tab[modifier] then return topic_tab[modifier] end if topic_tab['GENERIC'] then return topic_tab['GENERIC'] end if #topic_tab > 0 then return topic_tab[math.random(#topic_tab)] end end end endendfunction GetDescription(character, item, modifier) character = character and string.upper(character) local itemname = item.components.inspectable.nameoverride or item.prefab itemname = itemname and string.upper(itemname) modifier = modifier and string.upper(modifier) local ret = GetSpecialCharacterString(character) if not ret then if STRINGS.CHARACTERS[character] then ret = getcharacterstring(STRINGS.CHARACTERS[character].DESCRIBE, itemname, modifier) end if not ret and STRINGS.CHARACTERS.GENERIC then ret = getcharacterstring(STRINGS.CHARACTERS.GENERIC.DESCRIBE, itemname, modifier) end if not ret and STRINGS.CHARACTERS.GENERIC then ret = STRINGS.CHARACTERS.GENERIC.DESCRIBE_GENERIC end if ret and item and item.components.repairable and item.components.repairable:NeedsRepairs() and item.components.repairable.announcecanfix then local repairstring = nil if STRINGS.CHARACTERS[character] and STRINGS.CHARACTERS[character].DESCRIBE then repairstring = getcharacterstring(STRINGS.CHARACTERS[character], "ANNOUNCE_CANFIX", modifier) end if not repairstring and STRINGS.CHARACTERS.GENERIC then repairstring = getcharacterstring(STRINGS.CHARACTERS.GENERIC, "ANNOUNCE_CANFIX", modifier) end if repairstring then ret = ret..repairstring end end end return retendEDIT: Updated with a better fix. Edited March 17, 2014 by squeek Link to comment https://forums.kleientertainment.com/forums/topic/33101-my-character-mod-crash-in-ancient-ruin/#findComment-433566 Share on other sites More sharing options...
Coffgirl Posted March 17, 2014 Author Share Posted March 17, 2014 Seems like it's not crash after I fix it with your code.But I died by accident cause of clockwork. D:so I didn't try to test that is it work or not.But thank you very much! Link to comment https://forums.kleientertainment.com/forums/topic/33101-my-character-mod-crash-in-ancient-ruin/#findComment-433593 Share on other sites More sharing options...
Coffgirl Posted March 19, 2014 Author Share Posted March 19, 2014 It's fixed!! Thank you very much, Squeek! ;w; Link to comment https://forums.kleientertainment.com/forums/topic/33101-my-character-mod-crash-in-ancient-ruin/#findComment-434325 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