A tweak in pawn logic needed.

Started by Kangoshi, September 26, 2018, 10:26:58 AM

Previous topic - Next topic

Jibbles

Think they're always trying to improve it when there's an obvious solution.  It's just not an easy task.
Here's an old video from tynan himself going over that kind of stuff.  I assume there has been many changes since then but still interesting to watch. https://www.youtube.com/watch?v=RMBQn_sg7DA

AileTheAlien

I thought pawns packed a single meal in their personal inventory, so that they could eat it if they were far away from the kitchen / freezer. Did this behaviour get removed? I've been playing with my modded food, which might be incompatible, but I know in the past my pawns would take a simple or fine meal with them, to eat when they were out mining across the map from my kitchen.

erdrik

Quote from: AileTheAlien on September 30, 2018, 11:29:23 AM
I thought pawns packed a single meal in their personal inventory, so that they could eat it if they were far away from the kitchen / freezer. Did this behaviour get removed? I've been playing with my modded food, which might be incompatible, but I know in the past my pawns would take a simple or fine meal with them, to eat when they were out mining across the map from my kitchen.

AFAIK, they still do. Though there are situations that can end up using that packed meal for something else. Like if a Doctor or Warden needs to feed a Patient or Prisoner. After feeding the patient/prisoner they won't always go back and resupply before doing other tasks. Training animals is another task that might have them use their packed meal if there isn't a preferable animal meal nearby.

vzoxz0

It might be beneficial if the current unstable functionality of "food policy" could also specify how many you take to inventory.

It'd be nice to tell animal trainers to take kibble to inventory while still telling them they can't eat it. I mean, doctors should naturally keep some food on them if they're feeding patients -- though I still feel like "Wardening" should also pitch in there.

Ruptga

Getting back to the original complaint, a partial fix could be that pawns with a work target outside the home zone will eat first if they're below, say, 35% of their food bar.  I don't know how the code is set up, but it seems like an if statement checking a map that has already been drawn shouldn't be too expensive.  That wouldn't do anything for farmers or with a couple constructor scenarios I can think of, but it would help with miners, hunters, and handlers. 

vzoxz0

That would be a reasonably efficient fix, since zoning is already integrated in how the logic works.