Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disciplines list (for ghouls?) will sometimes become empty. #92

Open
Nyaa-rlathotep opened this issue Aug 11, 2020 · 0 comments
Open

Disciplines list (for ghouls?) will sometimes become empty. #92

Nyaa-rlathotep opened this issue Aug 11, 2020 · 0 comments

Comments

@Nyaa-rlathotep
Copy link

Nyaa-rlathotep commented Aug 11, 2020

I'm not sure what causes it, but occasionally one of the ghouls my vampire creates will end up having a blank disciplines list. I haven't had it happen to a vampire yet AFAIK, but I assume it might be possible.

I've attached what looks like the error message for it, and a save where "Powers", "Beatrice", "Pierce", and "Salinas" are all missing their discipline list.

With the inspector, I saw that instead of a list of disciplines, the effected ghouls had <disciplines />. This appears to be causing the null reference exception. Manually editing the save and giving them a list of disciplines copied from another ghoul (minus the assigned points the other ghoul had) made their disciplines show up properly again.

I don't know if the empty list is caused by this mod, or some unexpected interaction with other mods, but hopefully detecting the empty disciplines list and automatically adding the appropriate ones back is something that's relatively simple to add. It would still mean that any spent points are refunded, but that's better than a pawn with no disciplines.
It might also be a decent idea to either log something, or show the player a message, when the empty list is detected, so that people will be able to know when it happens exactly, and maybe help pinpoint what the actual cause is.

When the list is empty, the pawn's health status screen shows all the correct info under the "ghoul" health effect, and the bio screen does show a level and experience bar, but the ability to hover over the bar to see the actual EXP amount doesn't work, and their disciplines list is missing.

empty disciplines list

health screen

Exception filling tab RimWorld.ITab_Pawn_Character: System.NullReferenceException: Object reference not set to an instance of an object at Vampire.SkillSheet.InitializeDisciplines () [0x0001c] in <be885b18395548cdb5c0a44582d149f7>:0 at Vampire.VampireCardUtility.DrawVampCard (UnityEngine.Rect rect, Verse.Pawn pawn) [0x003dc] in <be885b18395548cdb5c0a44582d149f7>:0 at Vampire.HarmonyPatches.Vamp_FillTab (RimWorld.ITab_Pawn_Character __instance) [0x00068] in <be885b18395548cdb5c0a44582d149f7>:0 at (wrapper dynamic-method) RimWorld.ITab_Pawn_Character.RimWorld.ITab_Pawn_Character.FillTab_Patch1(RimWorld.ITab_Pawn_Character) at Verse.InspectTabBase+<>c__DisplayClass14_0.<DoTabGUI>b__0 () [0x00039] in <633e477701eb466abff25a76ef5ed35d>:0 Verse.Log:Error(String, Boolean) Verse.Log:ErrorOnce(String, Int32, Boolean) Verse.<>c__DisplayClass14_0:<DoTabGUI>b__0() Verse.ImmediateWindow:DoWindowContents(Rect) Verse.Window:InnerWindowOnGUI(Int32) UnityEngine.GUI:CallWindowDelegate(WindowFunction, Int32, Int32, GUISkin, Int32, Single, Single, GUIStyle)

ghoul missing disciplines-save.txt

Anyway, thanks for all the work everyone's done on the mod! I really enjoy it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant