Improved AI Control of Resource/Crafting/Storage

The place to request or suggest new ideas and features.
Post Reply
Pyracles
Posts: 63
Joined: Fri Aug 18, 2017 2:49 pm

Wed Jul 31, 2019 1:40 pm

There is a huge problem with settlements where characters eventually stop doing what they are supposed to be doing, because either their inventory is full of some junk they picked up but were unable to use or a machine in their job list is full and they won't look beyond that machine. The former is a flaw in the basic game design, the latter looks like a bug.

I'd like to see changes in how this works, so I don't have to regular search through all my characters to manually work out which one's job list is blocking production.

1) Fix it so any machine that cannot produce because its output is full, is skipped when a character is looking for a job to do. This is a very noticeable problem when you are not using a storage box for the output or no one is assigned to move the item. I most often encounter it with cooking stoves, but I suspect all machines do this to some degree.

2) The AI needs to be using some sort of token system that gives better control of resources. By this I mean if a machine or storage box needs something, a token is created that reserves the space in the machine's input box or storage space. If a character looking for work, can see an item in one of the machines in their job list, that matches an unclaimed token, they first move to the machine that has that item. If the item is still there and the token is still unclaimed when they arrive, they pick up the item and claim the token for it. While they still have the item, they move to the machine that owns the token, and when they arrive they deposit the item and free the token. If they lose the item, they release the token so it is available for a different character. If their job list no longer allows them to deliver the item, they also release the token. If their "Job" toggle is turned off they release all tokens. if they get into a fight, they should probably also release all their claimed tokens. If they release a token and still have the item for it, they should just drop the item on the ground so someone else can pick it up and deliver it. This token system also needs to be used for constructing buildings, machines, fixtures etc.

3) The AI needs to stop picking up more items than they can use, but always pick up as much as they can carry and find unclaimed tokens for. The picking up more than they need and never as much as they could use, is currently very annoying for Engineer jobs. You try to build say a storage box that needs one item, but the stupid engineer always picks up two of them if he has space in inventory for it, even though there is no outstanding construction that could use the spare.

4) Add an AI options to control if equipped weapons are dumped when moving crafted weapons to a storage box and how many food items, bandages and splint kits a character will keep in inventorty without automatically dumping them into whatever storage box they happen to be passing. If they have less items than the "dump limit" they will look for and pick them up until they reach that limit.

swillo
Posts: 1236
Joined: Tue May 12, 2015 2:00 pm

Sat Aug 03, 2019 2:01 pm

Interesting,
I think it would be easier to split the engineering job into two. Building and adding resources. When you assign it you would get both like with baking bread. but you could remove one of the tasks to have people focus on the other. So you could have someone running about adding resources and others coming along behind them and building.

The adding resources job would also need to add all the resources they have on them if the job can hold them. Just adding 2 when you have 10 in your pack and the job needs 40 is very frustrating.

If they could move the ditch resources check box to the character screen so that it was toggleable by character it would be nice as well.

spacefiddle
Posts: 78
Joined: Fri Jun 22, 2018 8:30 am

Mon Aug 12, 2019 6:39 pm

The issue seems to be a bumper-cars pile-up of race conditions. Sometimes literally, as the characters are zooming around to the storage containers.... xD

The token example above is hyper-specific, but I think any method that makes a job "aware" of others with the same job would do it. If a wall segment needs 2 Mats, and I have three engineers, they all each go get two mats, and they all go try to add them, and the first one to get there wins while the other two each have 2 Mats in their inventory. Meanwhile, production has filled the container, so they can't ditch them.

A master "shopping list" for constructed items shared across characters, rather than each character independently getting "what's the next thing that building needs," might also work. If ANY character with the job gets an item, it's satisfied on the list. So if there's an engineer with 2 mats racing towards that wall, the other engineers will not go pick up more mats.

Beyond that, i think crafting stations having the "wrong" objects are the only place where the AI gets stuck, that isn't logistics like "full containers." Crossbows are the best example: you need to make sub-parts to make the parts to make the crossbow. But if you tell the crafter to make them in order, it gets confused when it needs to transition to the next ingredient list, and stops.

Possibly similar to "Ditch Resources," characters could "Clear Inputs" when they reach a station that has the wrong items - just take whatever's there - and then, the AI will take over as it currently does, and they'll probably go ditch them into their container.

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 8 guests