LTN Combat outpost resupply?

Looking for a mod? Have a review on a mod you'd like to share?
Post Reply
zOldBulldog
Smart Inserter
Smart Inserter
Posts: 1161
Joined: Sat Mar 17, 2018 1:20 pm
Contact:

LTN Combat outpost resupply?

Post by zOldBulldog »

Complex issue, don't bother reading unless you have time :)

None of the designs I found on factorioprints, youtube or google quite do what I'm looking for. The closest I found is by Nilaus but it uses vanilla train stops. I would really like to do it with LTN.

I am not worried about the trains to "build the outpost", recycle materials once I deconstruct the outpost to push the biters further out, or turning the artillery on/off depending on supplies availability. I am certain I can figure those out.

The resupply problem:

- Certain resources (like artillery rounds, bots, replacement walls, laser turrets, flamethrower turrets, repair kits, etc) are consumed randomly.
- Besides the initial supply, a small reserve is needed, with a minimum and a maximum level.
- When the reserve drops below a certain level for even one item, a resupply train is called and it tops off all of the items. Individual trains per material might be possible, but it is inefficient and it would cause a lot of unnecessary rail traffic. A single train with all of the resupply materials is best.
- It would be ideal if the train could come out of the Depot empty, load exactly what it needs, deliver it and leave the outpost empty... heading back to the depot. QUESTION: Is this even possible? If yes, how? (keeping in mind that there might be multiple such outposts at one time)

This is the only solution I could think of, but it feels dirty:

- Use a dedicated LTN network ID for combat outpost resupplies.
- The dedicated trains/wagons might use stack assignments to avoid excess quantities of each material.
- Provider loads a train with enough materials to go from zero to maximum level of each resupply material. Provider "material" is something unique, like an artillery wagon, quantity 1, once the train is fully loaded by the use of logic.
- When any material at the outpost goes below the minimum level, logic enables the request for the request "material".
- Filters and logic are used to unload near the exact amount needed to reach the max level of each resource. (probably only one is below the minimum, but the others might have dropped from the max and can use replenishing)
- At inactivity... the train returns to the specific network ID depot. It likely still contains a lot of resources.

- At this point one of two approaches is possible: (A) Recycle the unused materials back to the Provider station. Concern... loading after new request *might* be slow. On the other hand, this would eliminate the need for a special LTN Network ID. (B) Let the train sit with its materials, and it will just get replenished to the right level at the provider when the next request is made.

FINAL QUESTION: Is there a cleaner approach? Or am stuck with solution A or B as described?

1WheelDude
Inserter
Inserter
Posts: 36
Joined: Mon Oct 24, 2022 8:01 pm
Contact:

Re: LTN Combat outpost resupply?

Post by 1WheelDude »

Could you just do a decider combinator to send the signal to the LTN combinator of the required items once that item is below a certain level?

User avatar
Nosferatu
Fast Inserter
Fast Inserter
Posts: 228
Joined: Fri Jan 20, 2017 4:48 pm
Contact:

Re: LTN Combat outpost resupply?

Post by Nosferatu »

C) Use a provider station that fills the train exactly as ordered.
D) Use a provider station that fills the train nearly as ordered and make sure your outposts can handle the excess materials

It sounds like you have dedicated trains and a dedicated provider station.
Why do you want to use ltn for this task?

zOldBulldog
Smart Inserter
Smart Inserter
Posts: 1161
Joined: Sat Mar 17, 2018 1:20 pm
Contact:

Re: LTN Combat outpost resupply?

Post by zOldBulldog »

Nosferatu wrote:
Wed Mar 08, 2023 3:43 pm
C) Use a provider station that fills the train exactly as ordered.
D) Use a provider station that fills the train nearly as ordered and make sure your outposts can handle the excess materials

It sounds like you have dedicated trains and a dedicated provider station.
Why do you want to use ltn for this task?
Exactly because I *don't* want to use a dedicated provider or receiver. I am looking for a better way.

robot256
Filter Inserter
Filter Inserter
Posts: 594
Joined: Sun Mar 17, 2019 1:52 am
Contact:

Re: LTN Combat outpost resupply?

Post by robot256 »

I was going to pile on the train of "don't use LTN for that", but then I tried it for myself. The "Merged Delivery" feature does in fact allow multiple items to be loaded into one train, if they are all requested by one station and provided by another.

A minimal amount of circuits is needed to have the loading inserters stop when each item hits its requested amount. They will always overfill by up to one inserter's worth, so the "Locked Slots Per Wagon" signal is needed so that LTN leaves enough empty space for the residual of each item. Or you can use other means to ensure you never request an exact number of stacks, and the residual will go in the almost-full final stack of the request.

At the requester, it can have as many items as you want with negative signals indicating a request. The Request Threshold signal will indicate when a train should be scheduled to deliver any one of them. By default, it appears that when one item reaches the Request Threshold, a train is scheduled for just that item. Other items, which are low but not yet at the Request Threshold, are not included even if available at the same provider. If no train is available immediately, and other items also reach the request threshold during the wait, then they are all included when the train is finally scheduled.

The circuit I used at the provider looked like this. Note the red wire from the train stop to the arithmetic combinator, the green wire from the yellow LTN terminal to the output of the arithmetic combinator and the inserters, and the red wire from the supply chests to the LTN Combinator (with settings) and the LTN lamp.
ltn_merged_supplier.png
ltn_merged_supplier.png (923.38 KiB) Viewed 1002 times
The requester was very simple, noting the request threshold:
ltn_merged_requester.png
ltn_merged_requester.png (1.34 MiB) Viewed 1002 times
To make it actually top-off all the items when one of them runs low, you would need to modify the Request Threshold signal using circuits. It could be normally very high, and then when any one item drops below a threshold you set, change the threshold to 10 items or something.

Post Reply

Return to “Questions, reviews and ratings”