AI and "Empty" Containers that Aren't Really Empty

Post Reply
Recatek
Posts: 18
Joined: Fri Oct 06, 2017 1:23 am

Wed Oct 18, 2017 1:11 am

Apologies if this has already been reported.

It seems if a container has a single inventory grid square open, even if nothing can fit there, then the AI treats it as empty and keeps trying to put things in there. This manifests itself in various ways:

- AI getting stuck trying to drop off armor in an armor chest that can't accommodate that piece
- AI getting stuck trying to work on a workbench with "full" output (big issue when trying to craft the components for skeleton repair kits)

Most of the multi-item storage containers (medicrate, robotics crate, weapon/armor crate) are unreliable due to this problem. The problem is fixed if you mod it such that each crafting crate and bench output is scaled exactly to the size of the item being produced/stored. For example, removing the robotics crate and adding a 1x5 25-stack crate solely for skeleton muscles, a 2x4 25-stack crate solely for robotics components, etc. significantly improved the AI's reliability in crafting these items in a production chain since the items completely filled the space they were stored in. Similarly, replacing the single 5-job robotics bench (one big output inventory grid) with five 1-job robotics benches (each with its output inventory grid size tailored to the object being produced) makes things generally more reliable.

Obviously I don't have access to the code but it smells to me like the AI is asking "is there free space in the target inventory grid" and getting an answer of yes, where it really should be asking is "will the target inventory grid accommodate what I'd like to put in there right now" to which the answer should be no (and we should check the next available container to see if that one will work).

On a side note, it would be nice if when an AI can't drop off armor or weapons at a crate, than the AI would at least continue until his/her backpack is full, rather than giving up at the first item in their backpack and stalling. Maybe as a toggle in the AI menu.

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 8 guests