[1.3] [KV] Change Dresser [ModSync RW]

Started by Kiame, May 14, 2018, 01:52:16 AM

Previous topic - Next topic

Kiame

Update:
Works again with the newest version of Mending

Kiame

Update:
Fixed issues with destroyed apparel causing problems for reparing and custom outfits.

Kiame

Update:
Dressers will now collect all apparel around them on a save - no matter the filter settings. Any apparel collected this way will be put back onto the floor a few seconds after the save is complete / the save is loaded.

This is to fix a case where there is a pile of apparel in front of a dresser than will no longer hold them due to filter changes. When a save was loaded the apparel would be strewn around destroying anything the apparel landed on

crusader2010

After opening the mod settings window for ChangeDresser I cannot close it anymore (the Close button and the X don't do anything). Any ideas?
My mod pack: {A13} Mod Mega Pack

Kiame

Anything in the console? Hit the ~ button to open it if it doesnt open

crusader2010

Quote from: Kiame on December 17, 2018, 10:17:16 PM
Anything in the console? Hit the ~ button to open it if it doesnt open

I've deleted the "Mod_ChangeDresser_SettingsController.xml" file from Appdata\...\Rimworld\Config and reloaded the game. The issue is now gone. Probably the newer version of the mod conflicted somehow with the already stored settings (of the older version).

My mod pack: {A13} Mod Mega Pack

2.71828

Is it possible that some (recent-ish) update introduced an incompatibility with 'Pick Up and Haul' or maybe 'Outfitted' (notfood's successor to 'Outfitter')? I got the following kind of error message, whenever one of my pawns tried to store something in a change dresser, after which the item of clothing vanished completely:

JobDriver threw exception in initAction for pawn Cookie driver=JobDriver_UnloadYourHauledInventory (toilIndex=6) driver.job=(UnloadYourH
auledInventory (Job_227975) A=Thing_MedTimes_Socks_Tailored126863 B=(107, 0, 159)) lastJobGiver=Verse.AI.ThinkNode_QueuedJob
System.NullReferenceException: Object reference not set to an instance of an object
at Outfitted.OutfittedMod.ApparelScoreRaw (Verse.Pawn,RimWorld.Apparel,RimWorld.NeededWarmth) <0x0001d>
at Outfitted.JobGiver_OptimizeApparel_ApparelScoreRaw_Patch.Prefix (Verse.Pawn,RimWorld.Apparel,single&,RimWorld.NeededWarmth) <0x0002d>
at (wrapper dynamic-method) RimWorld.JobGiver_OptimizeApparel.ApparelScoreRaw_Patch1 (Verse.Pawn,RimWorld.Apparel) <0x00057>
at ChangeDresser.StoredApparel.AddApparelToLinkedList (RimWorld.Apparel,System.Collections.Generic.LinkedList`1<RimWorld.Apparel>) <0x00
048>
at ChangeDresser.StoredApparel.AddApparel (RimWorld.Apparel) <0x000b5>
at ChangeDresser.Building_Dresser.Notify_ReceivedThing (Verse.Thing) <0x00116>
at Verse.Thing.SpawnSetup (Verse.Map,bool) <0x00c64>
at Verse.ThingWithComps.SpawnSetup (Verse.Map,bool) <0x0002c>
at (wrapper dynamic-method) Verse.GenSpawn.Spawn_Patch2 (Verse.Thing,Verse.IntVec3,Verse.Map,Verse.Rot4,Verse.WipeMode,bool) <0x00a54>
at Verse.GenSpawn.Spawn (Verse.Thing,Verse.IntVec3,Verse.Map,Verse.WipeMode) <0x00059>
at Verse.GenPlace.TryPlaceDirect (Verse.Thing,Verse.IntVec3,Verse.Map,Verse.Thing&,System.Action`2<Verse.Thing, int>) <0x001e3>
at Verse.GenPlace.TryPlaceThing (Verse.Thing,Verse.IntVec3,Verse.Map,Verse.ThingPlaceMode,Verse.Thing&,System.Action`2<Verse.Thing, int>,System.Predicate`1<Verse.IntVec3>) <0x000c2>
at Verse.GenDrop.TryDropSpawn (Verse.Thing,Verse.IntVec3,Verse.Map,Verse.ThingPlaceMode,Verse.Thing&,System.Action`2<Verse.Thing, int>,System.Predicate`1<Verse.IntVec3>) <0x00379>
at Verse.ThingOwner.TryDrop (Verse.Thing,Verse.IntVec3,Verse.Map,Verse.ThingPlaceMode,Verse.Thing&,System.Action`2<Verse.Thing, int>,System.Predicate`1<Verse.IntVec3>) <0x000f2>
at Verse.ThingOwner`1<Verse.Thing>.TryDrop (Verse.Thing,Verse.IntVec3,Verse.Map,Verse.ThingPlaceMode,Verse.Thing&,System.Action`2<Verse.Thing, int>,System.Predicate`1<Verse.IntVec3>) <0x0011d>
at Verse.Pawn_CarryTracker.TryDropCarriedThing (Verse.IntVec3,Verse.ThingPlaceMode,Verse.Thing&,System.Action`2<Verse.Thing, int>) <0x00097>
at Verse.AI.Toils_Haul/<PlaceHauledThingInCell>c__AnonStorey6.<>m__0 () <0x002e5>
at AllowTool.Patches.ToilsHaul_PlaceInCell_Patch/<>c__DisplayClass0_0.<ClearHaulUrgently>b__0 () <0x0009c>
at Verse.AI.JobDriver.TryActuallyStartNextToil () <0x0060e>


Should I redirect this 'bug report' to someone else, since I'm pretty sure that your mod worked with 'Pick Up and Haul' and 'Outfitter' before in B18, or is this a problem on your end? I'm sorry if I'm barking up the wrong tree.

Kiame

Reading the stack trace, change dresser is calling the base game's JobGiver_OptimizeApparel which is being patched by Outfitter mod where the exception is being thrown

2.71828

Quote from: Kiame on December 30, 2018, 03:40:01 PM
Reading the stack trace, change dresser is calling the base game's JobGiver_OptimizeApparel which is being patched by Outfitter mod where the exception is being thrown

Thanks for looking into it that quickly! I just posted my bug report to 'Outfitted''s Workshop page, since Charlotte/notfood doesn't seem to have a Ludeon thread for her mod, yet.

notfood

#159
https://github.com/KiameV/rimworld-changedresser/blob/master/Source/StoredApparel.cs#L61

Interesting, vanilla never calls this function with a null but it has null checks for pawn.

I don't see it possible to have the extended functionality of Outfitted without the pawn's outfit so I'll just test for null and revert to vanilla if pawn is null.

Seems undesirable though.

2.71828

Wow, that was also incredibly fast! I guess I'll thank you in advance for fixing this, because it seems like you already have it covered.  ;D



Kiame

Thanks for fixing for this case notfood.


Marcus

@notfood,

Thanks for a link to non-steam download for your version of 'outfitted' mod, that commit for prioritising the tempereature need over the functionality of clothing fixes the issue when colonists were running naked because of negative numbers of brand new apparel available.

The mod itself makes a fantastic synergy with 'infused' mod and probably other mods that alter gear stats.

Cheers man.