Pyanodon's Caravan Swarm


Automatic logistics for Pyanodon's caravans, in the spirit of LTN and Cybersyn. Give each outpost a role and a list of needs, and the swarm dispatches caravans, balances supply, buffers heavy items in Storage and reports bottlenecks. No schedules. Still needs a patched pyalienlife for now (pull request in progress).

Utilities
2 hours ago
2.1
0
Logistics

FAQ

Will it slow my game down?
It is built to stay light. The swarm works every 2 seconds, split into 4 steps, so it runs on one tick in 30 and reads only what it needs.

Does it learn or measure my factory?
No. Every rule is fixed: how full an outpost is, the amounts you set and distances. It only measures trip times, to size rate amounts safely, and the statistics shown in the window.

Is the patch safe?
It runs once when the game loads and does nothing unless an add-on is installed. On its own it changes nothing in your game.

Does it work in multiplayer?
Everything it decides with is saved with the game, so all players see the same thing. So far it has only been tested in single player.

What if caravans run out of food?
A caravan only takes a job if it has enough food for the whole trip. Hungry caravans walk to the nearest Food depot on their own.

Can I still drive caravans by hand?
Yes. Caravans with the Swarm switch off are never touched. Switch a swarm caravan off to use it yourself.

How many caravans do I need?
Enough that some are always free. The window shows free caravans at the top, and an outpost gets a "No free caravan" alert when none is available.

Will a caravan cross the map for a handful of items?
No. Requesters reorder once half their amount is gone and Storage once half empty, so every trip carries a worthwhile load.

Why do caravans wait outside a full outpost?
They count as part of its stock and unload as soon as there is room.

What happens if I remove an item from a Requester?
Caravans not yet loaded are cancelled. Loaded ones go to another outpost that wants the item, or wait with an alert if none does.

Does it work with caravan speed or hitbox mods?
Yes. It reads each caravan's real speed and measures real trip times.

Can it deliver between surfaces?
No. Each delivery stays on one surface.

What if I remove the mod?
Roles stay in the save. Caravans finish their current stops and then stand still. Add the mod back and it picks up where it left off.


Feedback and bug reports

Bug reports and ideas are welcome in the Discussion tab. With a bug report, please attach the file written by the /swarm-report command. It is a snapshot of your swarm and makes problems much easier to track down.

Credits

Pyanodon's Alien Life and its caravans are the work of the Pyanodon team. Caravan Swarm builds on their work and is not an official Pyanodon mod.

AI disclosure

Caravan Swarm was made with the help of AI. The code was written with Anthropic's Claude under my direction. I designed how it works, made every decision and tested it in my own Pyanodon game.