Editor: Fuel Flow Chain
Description
The fuel flow chain is the system responsible for transporting fuel around the spacecraft. The chain is automatically linked and set up with default values as long as there is a FuelSource
and FuelConsumer
. This guide demonstrates how the fuel flow chain works and how it can be configured in the software. For this guide, we’ll be going through the Demo_DVFunctionalChain
level and the BP_Spacecraft_DVFC_3U
spacecraft.
Configuring a Fuel Source
Open up the BP_Spacecraft_DVFC_3U
found in Content → Nominal → Demos → Blueprints → Spacecraft and select the Fuel Source
component. The Fuel Source
properties can be viewed in the details panel under Child Actor Component → Child Actor Template → Nominal Systems → Fuel Source. The key properties of the fuel flow chain are as follows:
- Amount: The amount of fuel in this Fuel Source. This is also the amount of fuel at the beginning of the simulation.
- Capacity: The maximum amount of fuel the Fuel Source can contain.
- Maximum Flow Rate: The maximum amount of fuel that the Fuel Source can provide at a time.
Configuring a Thruster
A thruster’s fuel properties are set through the AddFuelNodeModel
function which can be called on the level blueprint or an Actor’s begin play. In this guide, we’ll view the Demo_DVFunctionalChain
blueprint as it is done there.
Open up the Demo_DVFunctionalChain
level blueprint and view the Configure Spacecraft function. Here the Add Fuel Node Model
function is called on the Thruster and can configure the values here.
That’s all that is required to set up the fuel flow chain. Click Play and the thrusters will fire after some time and the fuel in the spacecraft decrease.
Creating a Valve using Blueprints
For more control of the flow system, a custom valve implementation can be achieved through blueprints. We’ll create a simple IsValveOpen
variable that’ll block the thrusters from firing. Head back to the Level Blueprint. Open up the Fire Thruster
function as that's where the ThrusterFireRequestMsg
is created.
Create a branch node before the Create Thruster Fire Request Message
node create a new boolean variable, named IsValveOpen
and connect that as its condition. Make sure to set the default value of IsValveOpen
to false.
Now the thrusters won’t fire anymore as the IsValveOpen
prevents the Create Thruster Fire Request Message
from being created. The IsValveOpen
variable doesn’t need to be stored on the level blueprint and can be stored on the Spacecraft and have more complex logic done through blueprints.