Closed EpicNomz closed 5 years ago
I might have solved my problem here. I've set the guest zone to include a table to eat on, and they consumed the food set in the guest zone. I guess they didn't like to eat food without a table assigned in their zone.
Will follow up to see if that solves their food dropping problem as well.
Update 1: So, this is quite odd. I expanded the guest area where the beds are, added a table and seats but they refused to eat. Curiously, when I add the zone where my colonist is sleeping in, the visitors then decided to eat. At this point, I have not disabled any of the mods yet.
That's pretty odd. Others have had this problem too, though, and brought it down l to a conflict with Pick Up And Haul.
It's something that has to be fixed in that mod, too.
Alrighty, after some extensive testing, it's definitely a conflict with the hauling mod. When I disabled the haul mod, all is normal. At least on my end, here's what I've determined.
1.) With just the haul mod and hospitality mod active, the following happens: a.) Visitors will drop the food if there is not a table and enough chairs for all of them to eat on the designated visitor zone. b.) Visitors that join my area but are not assigned a "guest" zone, will be fine as long as there is room in my colonists' eating area, chair for chair. In this case, 5 visitors with 5 vacant chairs on a table = no food drop when no guest zone is assigned. c.) Visitors that join my area, are assigned a guest zone, but do not have enough chairs to eat simultaneously, will drop their food. Even if I add chairs during their visit.
My conclusion (if I want both mods to work) as long as I have the room to accommodate for all the visitors to eat simultaneously before I assigned them the guest zone, they will not drop their food. If the capacity to simultaneously allow visitors to eat is null, then the food dropping glitch occurs until the next visitor wave commences.
Good testing! Now we just gotta get the Pick Up And Haul author to chime in. I'll post him a link.
Acknowledged and brow thoroughly furrowed. Will investigate - thanks for the Steam ping.
I'll upload some more supporting documents if you need them. It was kinda hard to recreate certain settings when this happened on a permadeath save file.
If you could upload that savefile or something else that reproduces the issue reliably, that would really help me with testing and allow me to fix it so much quicker. I would really appreciate that!
Yeah I can do that. I'll recreate it on a better file here. Should see something within the hour.
I love it when a fix comes together.
Alright,
This is quite odd. I've started a new file thats not permdeath to make things easier, however my first three visitors have just been one person.... Which doesn't can trigger the bug, but makes it harder to do.
Below is the original file where the bug was occurring, but I'll keep at it on the new file so it'll be easier to isolate. I promise I will make this happen again!
https://1drv.ms/u/s!AunhmgDg-JBiglnqU50ZFiNP9HuF
In case the first link didn't work.
Got it!!!!! Holy cow that took forever. The bug happened exactly as mentioned above. I was only running two mods to help confirm the conflict. Here's what happened to trigger this.
1.) Visitor shows up (not assigned to guest zone) No bug
2.)Guest assigned zone without allocated table/chair to eat food drop bug (I'd like to mention in this instance, the chairs were occupied by my colonists just like the first game. Even if they have their own space, if some one is sitting in a chair and there isn't another one free to sit and eat, the bug triggers.)
3.) Also, if you load this save file and let it play out, you will notice the bug will continue. The moment you add the table with the chair into the area, this visitor will then proceed to pick up the food and act as if the bug didn't happen.
Linking the save file below:
https://1drv.ms/u/s!AunhmgDg-JBiglrI17a465bpvEap
Steam snapshot
Additional files: https://git.io/fhbaz
Hmm. I have received reports of issues like this one from people who are not using Pick Up And Haul. They use other hauling mods, though. This save game might be useful for reproducing those as well. Good job!
My findings:
https://i.imgur.com/P1GIGrg.jpg
That is a screenshot taken at the exact tick Lily decides where she wants to eat. It is outside of her area. As soon as she tries to walk there, her job stops with an ErroredPather.
The nitty-gritty: RimWorld.JobGiver_GetFood.TryGiveJob gives the pawn a new Job(JobDefOf.Ingest, foodSource);
, where the foodSource is something appropriate. So far, so good. The Ingest job basically points to JobDriver_Ingest. With Job logging toggled, I can see the job fails in here. More specifically, it's 2580754 Lily: EndCurrentJob Ingest (Job_843770) A=Thing_MealSimple126895 condition=ErroredPather curToil=11
. The 11th Toil fails with an ErroredPather. Now, there's a bit of branching logic in that JobDriver depending on a variety of factors, but you'll have to take my word for it that Lilly here takes the PrepareToIngestToils_ToolUser
branch on account of not being an animal.
The exact toil her job fails on is:
yield return Toils_Ingest.CarryIngestibleToChewSpot(pawn, TargetIndex.A).FailOnDestroyedOrNull(TargetIndex.A);
And that's a pretty big Toil, with a validator on finding a chair. Without being intimately familiar with Hospitality, I'm guessing either her area restriction isn't taken into account or if (t.IsForbidden(pawn)) { return false; }
isn't doing what it oughta. Again, forgive my unfamiliarity with Hospitality, but that is basically a check on whether or not a guest is allowed to pick that spot. Of note here is that the check in this toil that sets the chair to eat at doesn't check CanReach(), this toil mostly checks if it's reachable. It's a small but important distinction because the pather that gets started in this toil does care about CanReach.
The provided savefile (thanks again @EpicNomz!) can reproduce this issue purely with Hospitality, so without hauling mods. The real bug here is "Guests successfully reserve a chair to eat at in an area where they aren't allowed to be, then promptly fail to path there."
Used dev tools: DoSingleTick (there's a hotkey somewhere for that), Draw Pawn Debug (view settings), Toggle Job Logging (debug actions).
Hope that helps. Lemme know if you need assistance in further debugging, your bugs are far more fun than mine :V.
Oh wow, sorry for the false alarm, @Mehni. Should have tried the save game with only Hospitality to be sure.
I wonder if this is something that has always been there (only got reports about it since recently) or if it's due to a change in vanilla code.
I can't remember the last fun bug I've had, so I assume yours must be awful. Thanks for shedding light on how you debugged it!
Thanks, @EpicNomz for the good reproduction savegame for the bug and @Mehni for the clear analysis of the issue. I fixed it and the update should be live in a few minutes.
Glad I could help.
New game as of 23FEB19, very first set of visitors dropped their entire food supply and wont pick up any food to eat.
https://steamcommunity.com/sharedfiles/filedetails/?id=1664588912
https://git.io/fhbkB
Current Mods-
HugsLib Hospitality Selling prisoners with no guilt Pick Up And Haul) Prison Labor Door Mat R1.0 Expanded Prosthetics and Organ Engineering More Planning