If Behavior scripts are still Greek to you, you might want to check out our first-ever Scripted Wednesday – hit up the link at the end of this post to get there!
Author: StS73
Description
A universal logistics bot script. Get your stuff from A to B, no matter what.
- Coordinated pick-up: When several bots are queuing for pick-up, the bot with the least free slots picks up first.
- Coordinated drop-off: When several bots are queuing for drop-off, the bot with the most free slots drops off first.
- Avoiding enemies along the route: The bot will run around enemies or glitches.
- Announcing seen enemies: Any enemy seen will be announced via the signal slot.
- No crowding: The bot will be waiting at a humble distance from the drop-off or pick-up point.
- No interference: Several drop-off or pick-up points next to each other can be served. You can also use the same building or robot as a drop-off or pick-up point simultaneously.
Usage
- P1: Pick-up point
- P2: Drop-off point
Behavior Script:
Author: Wat
Description
It controls components to only produce items until a target inventory level in the whole faction is reached. This is to avoid overproducing items when available storage space is higher than the target level. It borrows ideas from the Limited Build script and extends upon them.
The script has been fine tuned to keep production requests smooth. It avoids aborting production requests, which would release reserved ingredients and make faction item amount spike, causing a domino effect in the production requests of other factories.
The script also monitors missing ingredient signals coming from other buildings/constructions. If the combined total of missing ingredients in signals is higher than the P1 field, the missing ingredient total is used as a target instead.
Also, when producing items, the request size can be configured so the amount of reserved ingredients can be fine tuned. Lower amount reduces footprint. Higher amount reduces delivery traffic overhead.
Instructions
There are 5 parameters:
P1 - Production (Input) - If the number is left as zero, it defaults to 1 stack size
P2 - Component/Index (Input)
P3 - Request Size (Input) - If left blank, it defaults to 2
P4 - Divisor (Input) - If left blank, it defaults to 1
P5 - Rounding (Input) - If left blank, it defaults to rounding up
- Set the item to be produced in the P1 parameter.
- Drag-and-drop the producer component to the P2 parameter.
- Point (drag-and-drop) the P3 parameter to the producing component parameter.
- (Optional) Point (drag-and-drop) the Producing field to the Visual field.
- (Optional) Point (drag-and-drop) the Missing ingredient field to the Signal field.
Component will produce until faction item amount reaches 1 stack size in all buildings/bots combined. And if there are too many missing ingredient signals, production will increase accordindly.
Also, requests will reserve ingredients for 2 items at a time.
You can fine tune both numbers to your liking.
Optionally, if multiple components/buildings are producing the same item, the P4 and P5 fields can be used to increase accuracy in reaching the target inventory level. These 2 fields are used to spread the load among multiple components. P4 field should be equal to the number of components/buildings producing the same item. P5 field should be set in incremental order in each building, starting at 0 in the first building, then 1, then 2 and so on.
Example: 20 items are to be produced by 3 components/buildings. To produce the exact number, production load should be spread as 7, 7, 6 among them. To achive this, set P1 to 20. Then, set P4 to 3 (20 ÷ 3 = 6 modulo 2) and set P5 to 0, 1 and 2 in each building (rounding up to 7, rounding up to 7 and rounding down to 6).
Limitation: Due to how the "Get from Component" and "Set to Component" commands work, only 1 producing component per building is currently supported.
Behavior Script:
***
Got queries or thoughts? Don't hesitate to light up the comments section! And let's not forget a big round of applause for the tutorial creators – you rock for sharing your genius with us!
https://store.steampowered.com/news/app/1450900/view/3955916441764875207
https://store.steampowered.com/news/app/1450900/view/7217647935765867440
https://store.steampowered.com/news/app/1450900/view/3871471412481250750
https://store.steampowered.com/news/app/1450900/view/3889485345748521475
https://store.steampowered.com/news/app/1450900/view/3888358641555101802
https://store.steampowered.com/news/app/1450900/view/3888358641540447700
https://store.steampowered.com/news/app/1450900/view/3855706911137657433
https://store.steampowered.com/news/app/1450900/view/3855706911119612650
https://store.steampowered.com/news/app/1450900/view/3855706185309757803
https://store.steampowered.com/news/app/1450900/view/3855706185299872234
https://store.steampowered.com/news/app/1450900/view/3808417211633108188
https://store.steampowered.com/news/app/1450900/view/3794905774846967399
https://store.steampowered.com/app/1450900/Desynced_Autonomous_Colony_Simulator/