With regard to AI performance

-I noticed you have hearthlings with individual thoughts. Maybe cut that out a bit, at least while they work. Say you have a Foreman hearthling for each type of job for up to 5 hearthlings. That way there would be one basic call for up to 6 hearthlings to go get brick, pick up brick and go build with brick in a particular job.

-Say you have to build a road, the foreman would say, you 3 dig, you 3 lay these particular bricks down, go pick from this stockpile. Not, everyone just give’r. That one job is given to that one foreman and his crew. The foreman makes the decision on the stockpile to pick from and over all route* and only collaborates with other foremen. If a stockpile is emptied and 5 hearthlings call out to ask for the next available stockpile that could be 5 calls to 30 (150 calls or more) other hearthlings for the next stock pile. But if you have 5 hearthlings say “empty” to their foreman, then the forman only talks to 5 (could be as few as 10 calls) other foreman who know what they’re going to use. That’s a lot less calls being made.

-As for hunger, call a lunch break.

-As how foremen could work, you could do it in the background or simply the first hearthling to be given a job or highest stats is made foremen.

-Why this would help, my thinking is designating tasks to groups would alleviate the need for every hearthling to ask “what’s being done? Should I go do that?”

-What if the job only needs one hearthling, the foreman would still select that one hearthlings route and other tasks, the foreman could direct each hearthling to 5 different tasks but I still see it being cheaper than 5 hearthlings going WTF DO I DO NOW!?!?!

-*overall route, each task is a job site, have the foreman path(direct) the hearthlings from their stockpile to their task then have the hearthlings path within the job site. This way the hearthlings arn’t finding long random paths each time they move. They only have to find a short path to the path selected by the foreman which the foreman could change if needed.

-after work, when the work shift is over or however you want that done, most decisions can be put on the back burner. Who would mind if a hearthling sat for 10 extra seconds by a pond on his time off.

Not knowing how you’ve coded it, this is probably worthless, but thought I’d chime in.

1 Like

hmm how about a selectable area with highest priority? Imagine you ordered several tasks, like collect these berries, chop those trees, collect the loot dropped by goblins and build this house, your workers will try to do all tasks at the same time and often lot of wood is left lying around, some berries are are already rotten and the loot isn’t even touched, while all hearthlings are building the new House. So it would help to enforce someone to grab the loot or to collect all the berries before they keep building the house.
Also group priorizatioon function would be neat, so we can stick up several workers into a group and allocate them to special task, so this group will fullfill the task before they do anything else.
These to function would be easier to implement without affecting the whole ai.
Additionaly a visiual target indicator and a colored pathway would be nice, if you select a hearthling his target will be marked and colored walking line will show his route.

The suggestion wasn’t on how to make the ai work more efficiently in given task but to work more efficiently by having less AI calls to do a given task.
If the current AI has each hearthling calling every other hearthling or making new walking routes constantly the computer would quickly get bogged down.