Guide: Basic Spaceship Circuitry: Difference between revisions
imported>Wiwiweb No edit summary |
imported>Wiwiweb No edit summary |
||
| Line 1: | Line 1: | ||
WORK IN PROGRESS | WORK IN PROGRESS | ||
<small>by Wiwiweb | <small>by Wiwiweb, last verified valid for 0.6.120</small> | ||
Automating spaceships can seem daunting at first because of their flexibility. But for the common use cases, the circuitry can be pretty simple once you know how things work. The secret is to do as much of the spaceship logic ''outside'' of the spaceship. | Automating spaceships can seem daunting at first because of their flexibility. But for the common use cases, the circuitry can be pretty simple once you know how things work. The secret is to do as much of the spaceship logic ''outside'' of the spaceship. | ||
| Line 14: | Line 14: | ||
We need to: | We need to: | ||
# At each location, | # At each location, set the next destination. | ||
# At each location, | # At each location, launch the spaceship when it is full or empty. | ||
# After launching, engage engines to start moving. | # After launching, engage engines to start moving. | ||
# When arrived at the destination, | # When arrived at the destination, anchor the spaceship using the proper clamps. | ||
For learning purposes, we'll take this one step at a time, but once you understand you can of course build the fully-functioning spaceship right away. | For learning purposes, we'll take this one step at a time, but once you understand you can of course build the fully-functioning spaceship right away. | ||
| Line 23: | Line 23: | ||
== Setting the destination == | == Setting the destination == | ||
[[File:Clamp passthrough.jpg|thumb|The wire | [[File:Clamp passthrough.jpg|thumb|The wire pass-through connection of a spaceship clamp]] | ||
When at Nauvis, we need to set the ship's destination to Nauvis Orbit, and when at the Orbit, we need to set the ship's destination to Nauvis. | When at Nauvis, we need to set the ship's destination to Nauvis Orbit, and when at the Orbit, we need to set the ship's destination to Nauvis. | ||
| Line 30: | Line 30: | ||
[[File:Spaceship guide destination.jpg|border]] | [[File:Spaceship guide destination.jpg|border]] | ||
As you can see | As you can see, the spaceship automatically changed its destination. | ||
When connecting the wires to the clamp, make sure you connect them to the pass-through connection of the clamp, and not the clamp itself (as seen in the picture on the right). | |||
The destination signal you need to use can be found in the Universe Explorer. Look for the "Automation Signal" value for the zone. | The destination signal you need to use can be found in the Universe Explorer. Look for the "Automation Signal" value for the zone. | ||
We will need to build the same thing at Nauvis Orbit later. | We will need to build the same thing at Nauvis Orbit later. | ||
== | == Creating a launch checklist == | ||
In this example, we want to launch only when: | |||
* The accumulators are full | |||
* The fuel tanks are full (or 99% full, to avoid fluid transfer speed issues) | |||
* The cargo is full of iron plates | |||
Your own checklist might be different! But the idea stays the same: | |||
[[File:Spaceship guide launch conditions.jpg|border]] | |||
We wired up everything in the spaceship related to our conditions: Fuel tanks, accumulators, and the cargo. Then we sent those signals through the clamp, where a series of constant combinators will check if each launch condition is fulfilled. When all conditions are fulfilled (3 checkmark signals), the last combinator will send the "launch" signal back to the spaceship, and the spaceship will launch. | |||
By habit, I tend to use red wire for everything coming into the ship, and green wire for everything coming out of the spaceship. This isn't mandatory but it avoids accidentally wiring them together. | |||
The ship's console also has an output connection in the top right that gives out additional status signals about the spaceship (e.g. current destination, current speed, ship console ID...). We're not using it in this example but it might be useful to you at some point. | |||
== Engaging the engines == | |||
Our ship has launched and is now in space! But it's not moving. | |||
To get engines started, we simply need to pass a "speed" signal to the console. This is simply done with a constant combinator in the ship. If you don't want to have any speed limit, simply set the signal to a very high value. | |||
[[File:Spaceship guide speed signal.jpg|border]] | |||
We could not pass the speed signal in advance from outside the ship, because the ship only checks for this signal after launching. (If you happen to try this you might find this can still work inconsistently, depending on launch timing synchronizing with signal check timing. This is often the cause of spaceships "randomly" not working.) | |||
== Destination and launch checklist at the other location == | |||
It's the same as step 1 and 2, but | |||
Revision as of 06:09, 14 December 2023
WORK IN PROGRESS
by Wiwiweb, last verified valid for 0.6.120
Automating spaceships can seem daunting at first because of their flexibility. But for the common use cases, the circuitry can be pretty simple once you know how things work. The secret is to do as much of the spaceship logic outside of the spaceship.
Unlike my cannon and rocket guides, this guide assumes you know the basics of Factorio circuitry.
Steps to spaceship automation

Let's take as an example an A-to-B route, the most basic spaceship route possible: It goes back and forth between Nauvis and Nauvis Orbit, loading up items at Nauvis and unloading them at the Orbit.
We need to:
- At each location, set the next destination.
- At each location, launch the spaceship when it is full or empty.
- After launching, engage engines to start moving.
- When arrived at the destination, anchor the spaceship using the proper clamps.
For learning purposes, we'll take this one step at a time, but once you understand you can of course build the fully-functioning spaceship right away.
Setting the destination

When at Nauvis, we need to set the ship's destination to Nauvis Orbit, and when at the Orbit, we need to set the ship's destination to Nauvis. The simplest way to do this, and avoid any sort of complicated conditional circuitry, is to simply send the destination signal from the location itself, outside the spaceship, passing through the spaceship clamp, like this:
As you can see, the spaceship automatically changed its destination.
When connecting the wires to the clamp, make sure you connect them to the pass-through connection of the clamp, and not the clamp itself (as seen in the picture on the right).
The destination signal you need to use can be found in the Universe Explorer. Look for the "Automation Signal" value for the zone.
We will need to build the same thing at Nauvis Orbit later.
Creating a launch checklist
In this example, we want to launch only when:
- The accumulators are full
- The fuel tanks are full (or 99% full, to avoid fluid transfer speed issues)
- The cargo is full of iron plates
Your own checklist might be different! But the idea stays the same:
We wired up everything in the spaceship related to our conditions: Fuel tanks, accumulators, and the cargo. Then we sent those signals through the clamp, where a series of constant combinators will check if each launch condition is fulfilled. When all conditions are fulfilled (3 checkmark signals), the last combinator will send the "launch" signal back to the spaceship, and the spaceship will launch.
By habit, I tend to use red wire for everything coming into the ship, and green wire for everything coming out of the spaceship. This isn't mandatory but it avoids accidentally wiring them together.
The ship's console also has an output connection in the top right that gives out additional status signals about the spaceship (e.g. current destination, current speed, ship console ID...). We're not using it in this example but it might be useful to you at some point.
Engaging the engines
Our ship has launched and is now in space! But it's not moving.
To get engines started, we simply need to pass a "speed" signal to the console. This is simply done with a constant combinator in the ship. If you don't want to have any speed limit, simply set the signal to a very high value.
We could not pass the speed signal in advance from outside the ship, because the ship only checks for this signal after launching. (If you happen to try this you might find this can still work inconsistently, depending on launch timing synchronizing with signal check timing. This is often the cause of spaceships "randomly" not working.)
Destination and launch checklist at the other location
It's the same as step 1 and 2, but


