Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Caravan's "Fill Cargo" action fails when partial stacks are present in Caravan inventory. #670

Closed
1 of 8 tasks
AFranticTypist opened this issue Nov 4, 2024 · 5 comments
Closed
1 of 8 tasks
Labels
triage This issue needs to be labeled

Comments

@AFranticTypist
Copy link

AFranticTypist commented Nov 4, 2024

Mod source

Factorio Mod Portal

Operating system

=Windows 10

What kind of issue is this?

  • Compatibility
  • Locale (names, descriptions, unknown keys)
  • Graphical
  • Crash
  • Progression
  • Balance
  • Pypostprocessing failure
  • Other

What is the problem?

If a caravan has a partial stack in its inventory when it executes a Fill Cargo operation, the Fill Cargo operation will never complete regardless of how much material is present in the caravan or in the caravan outpost.

Partial stacks can be added to the caravan inventory artificially, but they are occasionally produced by normal caravan operation.

Steps to reproduce

(1) Drop a caravan and feed it.
(2) Open its inventory, toss in a partial stack of anything.
(3) Drop an Outpost, fill it with anything but the same item type as in (2)
(4) Order the caravan to go to the Outpost and Fill Cargo.
(5) Fill Cargo never completes because the partial stack prevents the caravan from knowing its inventory is full.
(6) Caravan stands forever, sad.

Additional context

No response

Log file

No response

@AFranticTypist AFranticTypist added the triage This issue needs to be labeled label Nov 4, 2024
@protocol-1903
Copy link

Does the partial stack have to be of the same item type as the items in the depot?

@AFranticTypist
Copy link
Author

Does the partial stack have to be of the same item type as the items in the depot?

If the partial stack is of the same item type as the items in the outpost no problems occur. The partial stack will be filled up with items from the outpost and the logic executes successfully.

It is only when the partial stack is different from the item type(s) in the outpost that problems occur.

@protocol-1903
Copy link

In this case, it appears to be a misunderstanding of functionality. The caravan's "Fill Cargo" parameter operates in the same vein as a train's "Cargo Full" parameter. It will wait if a partial stack is preventing it from fully loading, which is intended.

@AFranticTypist
Copy link
Author

AFranticTypist commented Nov 5, 2024

In this case, it appears to be a misunderstanding of functionality. The caravan's "Fill Cargo" parameter operates in the same vein as a train's "Cargo Full" parameter. It will wait if a partial stack is preventing it from fully loading, which is intended.

This is unfortunate, as it seems to preclude otherwise normal Caravan operation.

I have a caravan that run a route involving ItemA, which stacks to 200, and ItemB, whose stack limit is not important. The route is as follows:

(1) Go Get Food

(2) Go to OutpostA, get 400 of ItemA <---- 2 stacks

(3) Go to OutpostB, Fill Cargo with ItemB

(4) Go to OutpostC
(a) Deliver 400 of Item A
(b) Deliver all your ItemB

This loop will occasionally fail because I would expect ItemA to always be in two full stacks of 200. However, if partial deliveries are made at OutpostC, it will occasionally split into three or more stacks. So, for example, I would expect in inventory:

[200 ItemA] [200 ItemA]

but instead it occasionally becomes:

[127 ItemA] [200 ItemA] [73 ItemA]

I have also seen it grow to 4 partial slots. The existence of even one partial slot makes step (3) above fail, which seems to invalidate an otherwise normal caravan route.

I could work around this by entering exact values which leaves some room on the caravan for inefficient loading, but this is a lot more work and unintuitive.

@protocol-1903
Copy link

Interesting. Perhaps the inventory needs to be sorted after a delivery, there is a generic function for it but it will increase overhead. Thoughts, someone on the dev team?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage This issue needs to be labeled
Projects
None yet
Development

No branches or pull requests

2 participants