RimWorld

RimWorld

Realistic Lighting and Shadows
Bug report
Creating a post to properly send the error text in one message and not 2-3 comments.

Sorry if it ain't this mod, but since it the error mention planet tilt, sun direction and colors, it MIGHT be this lol. The error appear right after arriving on the map when starting a new colony.

log:
https://gist.github.com/HugsLibRecordKeeper/ea71116983af823d66e3d8182d2a9bd1

Cannot use Graphic_Random.GetColoredVersion with a non-white colorTwo. UnityEngine.StackTraceUtility:ExtractStackTrace () (wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Log.Error_Patch3 (string) Verse.Log:ErrorOnce (string,int) (wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Graphic_Random.GetColoredVersion_Patch1 (Verse.Graphic_Random,UnityEngine.Shader,UnityEngine.Color,UnityEngine.Color) Verse.GraphicData:GraphicColoredFor (Verse.Thing) (wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Thing.get_DefaultGraphic_Patch1 (Verse.Thing) Verse.Thing:get_Graphic () Verse.Thing:Print (Verse.SectionLayer) Verse.ThingWithComps:Print (Verse.SectionLayer) (wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.SectionLayer_ThingsGeneral.TakePrintFrom_Patch1 (Verse.SectionLayer_ThingsGeneral,Verse.Thing) System.Reflection.RuntimeMethodInfo:Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) System.Reflection.MethodBase:Invoke (object,object[]) RealTiltMod.Patch_SectionLayerThings_Regenerate_On_Sun_Direction_Change:Prefix (object) (wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.SectionLayer_Things.Regenerate_Patch1 (Verse.SectionLayer_Things) Verse.Section:RegenerateAllLayers () Verse.MapDrawer:RegenerateEverythingNow () Verse.Map:<FinalizeInit>b__198_0 () Verse.LongEventHandler:ExecuteToExecuteWhenFinished () Verse.LongEventHandler:UpdateCurrentAsynchronousEvent () Verse.LongEventHandler:LongEventsUpdate (bool&) (wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Root.Update_Patch1 (Verse.Root) (wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Root_Play.Update_Patch1 (Verse.Root_Play)
Last edited by Maal; 17 Jul @ 5:54pm
< >
Showing 1-7 of 7 comments
Sjaandi  [developer] 17 Jul @ 9:40pm 
Thank you! I think I've narrowed down where this is coming from.
Other than this warning - is it interrupting your play at all?
Maal 17 Jul @ 9:57pm 
To be honest this is only 1 of several dozens red error my modlist currently gives (Mostly compatibility patches relying on changed code from other mods that weren't properly updated to 1.6 I'd guess). So I haven't played a real playthrought yet, and couldn't say if this mod was causing any actual any issue lol.
Sjaandi  [developer] 1 hour ago 
So after more investigation, this is caused because the vanilla game doesn't handle colorTwo being set to a non-white color. I'm not doing any coloring on objects in the game, so the error is being thrown due to one of your other mods. It's a benign error so you can safely ignore it. At best the other mod author IS doing things correctly and the game is logging a hard-coded warning anyway, and at worst the game is just ignoring the other mod author's color choices and using vanilla behavior.
If you are able to figure out which mod is causing it - you could tell the mod author the error is caused because they are setting colorTwo on a Graphic_Random object to a non-white color, and vanilla automatically checks for that exact condition and logs an error if its true.
I did a folder wide search of my mod list and found 760 instances of colortwo to a non-white color. in dozens of mods. So maybe there is a proper way to do this and that one instance did it wrong... In any case, thanks you for looking into this even if your mod wasn't at fault.
Sjaandi  [developer] 56 minutes ago 
The error is for Graphic_Random objects. Other types of objects are fine having their colorTwo set to a non-white color.
Maal 30 minutes ago 
Yeaah, after I checked colortwo I also checked that one and had a few thousands hit. But since you said it was benign I decided that I would save myself a few hours and headache and wait until I saw an actual in-game problem as I'm not sure I can filter these search efficiently to find any linked to colortwo and I ain't going to open each of these thousand of result by hand lol.
Sjaandi  [developer] 26 minutes ago 
No kidding. As long as the error doesn't keep popping up incessantly (annoying) you should be good. The reason my mod made it noticeable is because it forces a redraw every time the sun rotates 90 degrees (2D plane) in order to prevent shadows from overlapping incorrectly. So while that doesn't cause the error, it does make it more noticeable as it will repeat instead of just happening once on map load.
< >
Showing 1-7 of 7 comments
Per page: 1530 50