Newbiespud Posted December 10, 2020 Share Posted December 10, 2020 I made the severe mistake of creating and testing flourishes for a custom character... with the "All Unlocks" mod on. Without really understanding what manages whether a flourish is locked or unlocked. Without All Unlocks, pressing the Flourish button causes a crash. What do I need to do in GameProfile to make sure the game knows which flourishes are currently locked and unlocked? Link to comment https://forums.kleientertainment.com/forums/topic/124725-managing-flourish-unlocks/ Share on other sites More sharing options...
RageLeague Posted December 11, 2020 Share Posted December 11, 2020 I don't think the devs did a proper nil check on the game profile, and that may be the issue. Here's the code that may be the issue: local all_flourishes = shallowcopy(self:GetSetting( "unlocked_flourishes" )) return all_flourishes[character_id][game_type] As you can see, the character_id isn't nil checked, and it causes issues when there are additional characters. Link to comment https://forums.kleientertainment.com/forums/topic/124725-managing-flourish-unlocks/#findComment-1404264 Share on other sites More sharing options...
Newbiespud Posted December 11, 2020 Author Share Posted December 11, 2020 Solved with this in the modinit OnLoad: if not TheGame:GetGameProfile().values["unlocked_flourishes"]["PC_ARINT_DEMO"] then TheGame:GetGameProfile().values["unlocked_flourishes"]["PC_ARINT_DEMO"] = {BATTLE = {},NEGOTIATION = {},} end Replace "PC_ARINT_DEMO" with whatever your character's ID is. The problem was indeed a nil value. This makes it function normally. Credit where credit's due: Thanks @codyfun123 for the extra pair of eyes and pointing me in the right direction. Link to comment https://forums.kleientertainment.com/forums/topic/124725-managing-flourish-unlocks/#findComment-1404298 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.