Jump to content

Regular Cargo Rocket Automation


Recommended Posts

Here's an automation setup that enables multiple regular cargo rockets without needing a space scanner network. It will open the bunkers doors just in time when a rocket returns for the shortest possible duration, by using an automation stopwatch to measure elapsed time. The setup waits until the rocket has refueled and unloaded cargo then launches it again with no player intervention, aligned to 0.1 cycle intervals.

ImvgQ46.png

Video of it in action.

Features:

  • Space scanner network not needed (a single 0% scanner prevents launching during a meteor storm as a minor optimization)
  • Handles pilots with Rocket Navigation skill
  • Handles missions of any length from 10K to Temporal Tear
  • Counters look neatly integrated to rocket engine scaffolding base (OK, that last one is subjective :smile:)

Overview

The setup consists of 3 major components:

mwOzJJt.png

  1. An automation clock that can run over tens of cycle without drifting.
    (see this topic for some of the difficulties around using automation for timing longer periods.
  2. A stopwatch that counts to a specific target, emits a single automation pulse when reached, then resets itself.
  3. Launch/return logic that combines the various launch and return signals to open the bunker doors
    (based on the logic in this topic, thanks to @ExEvolution )

Each silo shares the clock but is otherwise independent. The automation is 7 tiles at its widest point, so will always fit no matter how you stack your rockets.

Clock

jB7TuXP.png

The 5 cycles sensor are wired together to provide a square wave with a period of 0.2 cycles. The XOR gate and ribbon writer function as an edge detector transforming the rising and falling edges of this wave into a pulse every 0.1 cycles. Although the cycle sensor output may jitter when the game is under heavy load, as far as I can tell the result is independent each time so that errors don't accumulate (unlike a buffer/filter/not loop for example), resulting in a clock that can be used over tens of cycles.

Stopwatch

DJDBzmf.png

This 3 counter stopwatch can count from 11 to 110. Each increment from the clock is 0.1 of a cycle, so this provides a 1.1 to 11 cycles duration range. This allows rockets up to 30K with normal pilots (9 cycles) or 40K with pilots with Rocket Navigation (10.9 cycles). Full details (and the longer range stopwatch) in the spoiler:

Spoiler

The stopwatch works as follows:

  • Counter increment once per tick. When it reaches 10, it resets and emits a green pulse causing the target tens counter to increment.
  • Once the target tens counter has reached its target value, then it enables the target ones counter via the AND gate (before the target is reached the value from the clock has been masked).
  • Once the target ones counter reaches the desired value then it set the memory toggle.
  • The memory toggle output resets all the counter at once, causing the set output to return to red and the counter to remain paused in the ready state until a reset pulse is received.

Here's the 5 counter version for longer range missions:

SyO3A9u.png

and the underlying automation wires for clarity:

BfsCPjO.png

Z4tANUi.png

The stopwatch works by setting the target counters in order from most significant to least significant digit. One interesting quirk: To specify a target that end in zero (for example 20, 30) set the "tens" counter to one less and the "ones" counter to 10. For example 100 would be specified as 9 (tens) and 10 (ones).

Launch/Return Logic
Upper logic section. The Manual override and Rocket Ready signals are ANDed together and sent to the lower section. A 40 second filter from the bunker door signal prevents an edge case of a rocket launching too soon if it can be refueled before the doors have finished closing after returning. The 20 second buffer keeps the launch signal green for a few seconds after the bunker doors have completely opened to let any accumulated regolith fall down.

P3xcpim.png

Lower logic section
Launch is triggered when 4 conditions ANDed together are true:

  1. Manual Override is green
  2. Rocket is ready
  3. Gated Signal pulse (to align rocket launches to 0.1 cycle intervals)
  4. Stopwatch is NOT running (signal is green when stopwatch is paused). Rocket launches take longer than 1 minute, so this prevents the bunker door opening longer than necessary (a second gated clock signal pulse would arrive during launch, causing the buffer to trigger a second time)

Return is triggered when the stopwatch reached its target value. See the next section for how to calculate the correct values.

xlY0t4u.png

Timing Table
For rockets with regular pilots the counter value is always 3 * (distance in 10k increment), the buffer is always 90 seconds and the filter is always 45 seconds.For example, a 20K mission would set the tens target counter to 5 and the target ones counter to 10.

For pilots with the Rocket Navigation skill, the mission duration is divided by 1.1. This results in durations that are not neat tenths of a cycle. To account for this, adjust the buffer and filter values by the offset amount. This below table gives the values (rounded to the nearest 5 seconds).

For example a mission to 150k would set the hundreds target counter to 3, the tens target counter to 10 and the ones target counter to 9 (giving 40.9 cycles).
Set the buffer to 95 seconds and the filter to 50 seconds to open the bunkers doors for the minimum amount of time.

1hWS4zg.png
 

Testing:
Testing automation setups in debug mode with nice high frame rates can sometimes mask issues caused when the game lags and it prioritizes physical simulation over automation, causing "jitter". This setup has been tested under realistic conditions, by running 6 rockets regularly to 10k, 20k, 30k, 50k, 100k and 150k over 200+ hundred cycles in a survival mode game without incident. The test map is a late game base, with 13 dups, 200+ Pacu and plenty of other contraptions running causing janky 20 FPS (at least on my computer). Save file link.

 

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...