[Mod Request] Idle Joy (jobless)

Started by PreDiabetic, September 15, 2017, 03:55:40 AM

Previous topic - Next topic

PreDiabetic

When a colonist don't have job to do they actively search for job which causes lag especially in modded game. Is there way to make jobless people focus on job objects, play games, sleep but not wander. Of course priority should be lowest as possible to not preventing them doing other jobs.

AngleWyrm

#1
Start with the space of everything that a pawn could do at any given moment. It's so big that going through the entire list for each pawn isn't possible in real time. So there has to be a better way. And that better way is sort of like what happens when a human being uses a telephone book.

Divide and Conquer
Arrange what can be done into groups. Perhaps there are a whole lot of things the pawn can do that would satisfy a need for food; so the need for food is a category in which there's a bunch of things a pawn can do.

Then when it comes time for the pawn to think, they can split off all the things that concern eating with one check against the need for food.

The above grouping forms something like a folder tree, with the example being a folder for hunger satisfaction tasks. Maybe another category is pawn need for health, where there's a bunch of tasks that they could perform towards that goal. That would be another folder.

Together the two example category-folders, hunger and health form a group that could be called pawn needs. So they can both be put into a folder called pawn needs, with a check to see if the pawn has needs or if all of that stuff can be ignored.

Note that for this tree system to work the example check to see if the pawn needs anything cannot be a list of checks against each sub-thing they could need. It has to be a summary check, a boolean flag altered when a pawn develops a need. A single check at every level of the tree is what makes the tree faster than going through every phone number in a phone book.
My 5-point rating system: Yay, Kay, Meh, Erm, Bleh