[1.0] Don't Shave Your Head! - v1.0.0

Started by Dark_Inquisitor, November 03, 2017, 10:39:20 AM

Previous topic - Next topic

Harry_Dicks

#30
Hi, I'm not sure if this is your mod or not, but I recently started getting this weird bug where upon rolling the dice enough times at character creation, I would get a non stop ticking red error to pop up, something about pawn generation, and it would not allow me to proceed further with "embarking" from the pawn screen. However, today after trimming about 90 mods off my list, I had this one pop while at the character creation screen as well, and was curious as to if you knew if this was related to your mod, or not. I will post the first error that popped in red as well followed immediately by another one. Any help I could get would be greatly appreciated, thanks! BTW I also just re downloaded these mods yesterday, Spoon's, and Neckblad's, as those are the only 3 I use for anything related to hair and they shouldn't be out of date (as much as I can remember and tell! ::) )

RandomElementByWeight with totalWeight=0 - use TryRandomElementByWeight.
Verse.Log:Error(String)
Verse.GenCollection:RandomElementByWeight(IEnumerable`1, Func`2)
RimWorld.PawnHairChooser:RandomHairDefFor_Patch1(Pawn, FactionDef)
Verse.PawnGenerator:TryGenerateNewNakedPawn(PawnGenerationRequest&, String&, Boolean)
Verse.PawnGenerator:GenerateNewNakedPawn_Patch1(PawnGenerationRequest&)
Verse.PawnGenerator:GeneratePawnInternal(PawnGenerationRequest)
Verse.PawnGenerator:GeneratePawn_Patch1(PawnGenerationRequest)
Psychology.Harmony.PawnRelationWorker_Sibling_GenerateParentPatch:KinseyException(Pawn&, Pawn, Pawn, Gender, PawnGenerationRequest, Boolean)
RimWorld.PawnRelationWorker_Sibling:GenerateParent_Patch1(Pawn, Pawn, Gender, PawnGenerationRequest, Boolean)
RimWorld.PawnRelationWorker_Sibling:CreateRelation(Pawn, Pawn, PawnGenerationRequest&)
Verse.PawnGenerator:GeneratePawnRelations_Patch1(Pawn, PawnGenerationRequest&)
Verse.PawnGenerator:TryGenerateNewNakedPawn(PawnGenerationRequest&, String&, Boolean)
Verse.PawnGenerator:GenerateNewNakedPawn_Patch1(PawnGenerationRequest&)
Verse.PawnGenerator:GeneratePawnInternal(PawnGenerationRequest)
Verse.PawnGenerator:GeneratePawn_Patch1(PawnGenerationRequest)
Verse.StartingPawnUtility:NewGeneratedStartingPawn_Patch1()
Verse.StartingPawnUtility:RegenerateStartingPawnInPlace(Int32)
Verse.StartingPawnUtility:RandomizeInPlace(Pawn)
RimWorld.Page_ConfigureStartingPawns:RandomizeCurPawn()
RimWorld.CharacterCardUtility:DrawCharacterCard_Patch1(Rect, Pawn, Action, Rect)
RimWorld.Page_ConfigureStartingPawns:DrawPortraitArea(Rect)
RimWorld.Page_ConfigureStartingPawns:DoWindowContents_Patch1(Object, Rect)
Verse.<WindowOnGUI>c__AnonStorey0:<>m__0(Int32)
UnityEngine.GUI:CallWindowDelegate(WindowFunction, Int32, Int32, GUISkin, Int32, Single, Single, GUIStyle)


Could not execute post-long-event action. Exception: System.NullReferenceException: Object reference not set to an instance of an object
at DontShaveYourHead.Harmony_PawnGraphicSet_ResolveApparelGraphics.Postfix (Verse.PawnGraphicSet) <0x0018e>
at (wrapper dynamic-method) Verse.PawnGraphicSet.ResolveApparelGraphics_Patch3 (object) <0x000fd>
at RimWorld.Pawn_ApparelTracker.<ApparelChanged>m__1 () <0x0002a>
at Verse.LongEventHandler.ExecuteToExecuteWhenFinished () <0x00069>

Verse.Log:Error(String)
Verse.LongEventHandler:ExecuteToExecuteWhenFinished()
Verse.LongEventHandler:ExecuteWhenFinished(Action)
RimWorld.Pawn_ApparelTracker:ApparelChanged()
RimWorld.Pawn_ApparelTracker:Notify_ApparelAdded_Patch2(Object, Apparel)
Verse.ThingOwner:NotifyAdded(Thing)
Verse.ThingOwner`1:TryAdd(Thing, Boolean)
RimWorld.Pawn_ApparelTracker:Wear(Apparel, Boolean)
RimWorld.PossibleApparelSet:GiveToPawn(Pawn)
RimWorld.PawnApparelGenerator:GenerateStartingApparelFor_Patch2(Pawn, PawnGenerationRequest)
Verse.PawnGenerator:GenerateGearFor_Patch1(Pawn, PawnGenerationRequest)
Verse.PawnGenerator:GeneratePawnInternal(PawnGenerationRequest)
Verse.PawnGenerator:GeneratePawn_Patch1(PawnGenerationRequest)
Psychology.Harmony.PawnRelationWorker_Sibling_GenerateParentPatch:KinseyException(Pawn&, Pawn, Pawn, Gender, PawnGenerationRequest, Boolean)
RimWorld.PawnRelationWorker_Sibling:GenerateParent_Patch1(Pawn, Pawn, Gender, PawnGenerationRequest, Boolean)
RimWorld.PawnRelationWorker_Sibling:CreateRelation(Pawn, Pawn, PawnGenerationRequest&)
Verse.PawnGenerator:GeneratePawnRelations_Patch1(Pawn, PawnGenerationRequest&)
Verse.PawnGenerator:TryGenerateNewNakedPawn(PawnGenerationRequest&, String&, Boolean)
Verse.PawnGenerator:GenerateNewNakedPawn_Patch1(PawnGenerationRequest&)
Verse.PawnGenerator:GeneratePawnInternal(PawnGenerationRequest)
Verse.PawnGenerator:GeneratePawn_Patch1(PawnGenerationRequest)
Verse.StartingPawnUtility:NewGeneratedStartingPawn_Patch1()
Verse.StartingPawnUtility:RegenerateStartingPawnInPlace(Int32)
Verse.StartingPawnUtility:RandomizeInPlace(Pawn)
RimWorld.Page_ConfigureStartingPawns:RandomizeCurPawn()
RimWorld.CharacterCardUtility:DrawCharacterCard_Patch1(Rect, Pawn, Action, Rect)
RimWorld.Page_ConfigureStartingPawns:DrawPortraitArea(Rect)
RimWorld.Page_ConfigureStartingPawns:DoWindowContents_Patch1(Object, Rect)
Verse.<WindowOnGUI>c__AnonStorey0:<>m__0(Int32)
UnityEngine.GUI:CallWindowDelegate(WindowFunction, Int32, Int32, GUISkin, Int32, Single, Single, GUIStyle)


EDIT: I got the error to pop that happens while generating pawns, about the weird addiction or something. I guess I'll just post that here too in case they are connected? This had 2 errors, the first one was only 1 tick, the second keeps ticking up until I can manage to press escape fast enough to back out of the menu.

Exception filling window for RimWorld.Page_ConfigureStartingPawns: System.NullReferenceException: Object reference not set to an instance of an object
at Verse.HediffMaker.MakeHediff (Verse.HediffDef,Verse.Pawn,Verse.BodyPartRecord) <0x0003b>
at RimWorld.PawnAddictionHediffsGenerator.GenerateAddictionsAndTolerancesFor (Verse.Pawn) <0x00287>
at (wrapper dynamic-method) Verse.PawnGenerator.GenerateInitialHediffs_Patch1 (Verse.Pawn,Verse.PawnGenerationRequest) <0x0003d>
at Verse.PawnGenerator.TryGenerateNewNakedPawn (Verse.PawnGenerationRequest&,string&,bool) <0x004f9>
at (wrapper dynamic-method) Verse.PawnGenerator.GenerateNewNakedPawn_Patch1 (Verse.PawnGenerationRequest&) <0x001a4>
at Verse.PawnGenerator.GeneratePawnInternal (Verse.PawnGenerationRequest) <0x0054f>
at (wrapper dynamic-method) Verse.PawnGenerator.GeneratePawn_Patch1 (Verse.PawnGenerationRequest) <0x00048>
at (wrapper dynamic-method) Verse.StartingPawnUtility.NewGeneratedStartingPawn_Patch1 () <0x001e1>
at Verse.StartingPawnUtility.RegenerateStartingPawnInPlace (int) <0x000eb>
at Verse.StartingPawnUtility.RandomizeInPlace (Verse.Pawn) <0x00028>
at RimWorld.Page_ConfigureStartingPawns.RandomizeCurPawn () <0x00060>
at (wrapper dynamic-method) RimWorld.CharacterCardUtility.DrawCharacterCard_Patch1 (UnityEngine.Rect,Verse.Pawn,System.Action,UnityEngine.Rect) <0x00e65>
at RimWorld.Page_ConfigureStartingPawns.DrawPortraitArea (UnityEngine.Rect) <0x00444>
at (wrapper dynamic-method) RimWorld.Page_ConfigureStartingPawns.DoWindowContents_Patch1 (object,UnityEngine.Rect) <0x0049b>
at Verse.Window/<WindowOnGUI>c__AnonStorey0.<>m__0 (int) <0x00735>

Verse.Log:Error(String)
Verse.<WindowOnGUI>c__AnonStorey0:<>m__0(Int32)
UnityEngine.GUI:CallWindowDelegate(WindowFunction, Int32, Int32, GUISkin, Int32, Single, Single, GUIStyle)


Exception filling window for RimWorld.Page_ConfigureStartingPawns: System.ArgumentNullException: Argument cannot be null.
Parameter name: key
at System.Collections.Generic.Dictionary`2<Verse.Pawn, RimWorld.PortraitsCache/CachedPortrait>.TryGetValue (Verse.Pawn,RimWorld.PortraitsCache/CachedPortrait&) <0x001ab>
at RimWorld.PortraitsCache.Get (Verse.Pawn,UnityEngine.Vector2,UnityEngine.Vector3,single) <0x00085>
at RimWorld.Page_ConfigureStartingPawns.DrawPawnList (UnityEngine.Rect) <0x00795>
at (wrapper dynamic-method) RimWorld.Page_ConfigureStartingPawns.DoWindowContents_Patch1 (object,UnityEngine.Rect) <0x00248>
at Verse.Window/<WindowOnGUI>c__AnonStorey0.<>m__0 (int) <0x00735>

Verse.Log:Error(String)
Verse.<WindowOnGUI>c__AnonStorey0:<>m__0(Int32)
UnityEngine.GUI:CallWindowDelegate(WindowFunction, Int32, Int32, GUISkin, Int32, Single, Single, GUIStyle)

NoImageAvailable

Quote from: Harry_Dicks on January 15, 2018, 09:15:41 AM
Hi, I'm not sure if this is your mod or not, but I recently started getting this weird bug where upon rolling the dice enough times at character creation, I would get a non stop ticking red error to pop up, something about pawn generation, and it would not allow me to proceed further with "embarking" from the pawn screen. However, today after trimming about 90 mods off my list, I had this one pop while at the character creation screen as well, and was curious as to if you knew if this was related to your mod, or not. I will post the first error that popped in red as well followed immediately by another one. Any help I could get would be greatly appreciated, thanks! BTW I also just re downloaded these mods yesterday, Spoon's, and Neckblad's, as those are the only 3 I use for anything related to hair and they shouldn't be out of date (as much as I can remember and tell! ::) )

From the log it looks like something is messing with the code related to random hair generation. DSYH doesn't affect pawn generation in any way so this must be from something else.
"The power of friendship destroyed the jellyfish."

Harry_Dicks

Ok, thanks for the quick reply. I've tried moving the trio of mods to up towards the top, and I'll try other locations to see if it helps any. Do you have any recommendations as far as the location of any of those 3 mods (yours, neckblads, and spoons) in your mod list? Or the order among those 3?

NoImageAvailable

Quote from: Harry_Dicks on January 15, 2018, 11:12:13 AM
Ok, thanks for the quick reply. I've tried moving the trio of mods to up towards the top, and I'll try other locations to see if it helps any. Do you have any recommendations as far as the location of any of those 3 mods (yours, neckblads, and spoons) in your mod list? Or the order among those 3?

It doesn't really matter where you put those, there are pretty much no cases where DSYH could produce a load-order conflict. You should look at what mods of yours affect actual pawn generation, since that's where the log points. Either way though, I'm pretty certain your issue is not related to DSYH (and probably not to those hair mods either) in any way.
"The power of friendship destroyed the jellyfish."

Harry_Dicks

Quote from: NoImageAvailable on January 15, 2018, 11:28:53 AM
Quote from: Harry_Dicks on January 15, 2018, 11:12:13 AM
Ok, thanks for the quick reply. I've tried moving the trio of mods to up towards the top, and I'll try other locations to see if it helps any. Do you have any recommendations as far as the location of any of those 3 mods (yours, neckblads, and spoons) in your mod list? Or the order among those 3?

It doesn't really matter where you put those, there are pretty much no cases where DSYH could produce a load-order conflict. You should look at what mods of yours affect actual pawn generation, since that's where the log points. Either way though, I'm pretty certain your issue is not related to DSYH (and probably not to those hair mods either) in any way.

I'm beginning to think the same thing. Someone on discord mentioned if I was using a tech advancing mod. I did just swap from Tech Advancing to Modify Research Time. Sounds like it might make sense, because I think some hairstyles and other things are related to your tech level. Oh well, I'll give anything a shot at this point to see how it goes!

Kori

First of all, thank you for this mod! :)

I am playing with the three hair mods that are already supported and Xeva's Hair.
Now I wondered if it would be possible to use Kiame's Show Hair with Hats for Xeva's Hair, while DSYH manages all other, supported hairstyles?

Harry_Dicks

Quote from: Kori on February 10, 2018, 05:57:46 AM
First of all, thank you for this mod! :)

I am playing with the three hair mods that are already supported and Xeva's Hair.
Now I wondered if it would be possible to use Kiame's Show Hair with Hats for Xeva's Hair, while DSYH manages all other, supported hairstyles?

Funny, I am doing the same thing, except I also have Roppoi Hair Pack. Only a couple days ago I asked on the other DSYH thread if it would be possible to use DSYH for the hair models it supports, but the vanilla option of "only show hats on map" for hair styles not supported by it. I believe we are thinking too much alike! :P

Kiame

I'm taking a break from modding atm though i'm sure I'll be back at it sooner or later.

As for Show Hair with Hats, if the developers of this mod want to take any of my code and integrate it into this feel free. With the last version (a few months ago) for Show Hair, I made it so it could work with other mods that modify the pawn rendering method. I have not tried using both this and that mod together though.

The code for Show Hair is here: https://github.com/KiameV/rimworld-showhair

Harry_Dicks

Kiame, aren't there mod options for Show Hair with Hats that will allow you to choose which hairstyles are affected? If so, then we could use your mod and just select the hairstyles that DSYH doesn't support, and it will work for those hairstyles only, correct?

Kiame

#39
The settings allow the user to select which hair to hide when hats are worn



(This screenshot is for "Show Hair with Hats" mod)

Ruisuki

So i downloaded dont shave that hair without knowing that Killface's facial stuff also added the capability of hair with hats. Is it ok for me to uninstall DSYH mid game?

Harry_Dicks

Quote from: Ruisuki on February 17, 2018, 05:12:18 AM
So i downloaded dont shave that hair without knowing that Killface's facial stuff also added the capability of hair with hats. Is it ok for me to uninstall DSYH mid game?

I would think so, but always make a backup just in case! :)

Tapeshoe

Hey I downloaded the GitHub update but I still have the hair sticking through the tops of hats like previously mentioned, is there something I can do to fix this?

Kori

Quote from: Tapeshoe on February 20, 2018, 10:36:21 AM
Hey I downloaded the GitHub update but I still have the hair sticking through the tops of hats like previously mentioned, is there something I can do to fix this?

This happens to unsupported hairstyles. Do you use hairstyle mods that are not listed in the description?

Tapeshoe

Quote from: Kori on February 20, 2018, 10:42:39 AM
Quote from: Tapeshoe on February 20, 2018, 10:36:21 AM
Hey I downloaded the GitHub update but I still have the hair sticking through the tops of hats like previously mentioned, is there something I can do to fix this?

This happens to unsupported hairstyles. Do you use hairstyle mods that are not listed in the description?

The only hairstyle mod I have is Rimsenal, however it does this with the vanilla hairstyles as well.