Electricity is used to power components. Electricity is stored in batteries and generated by generators or (extremely slowly) by solar cells. It is drained gradually by most components, though motors (including engine starters) can cause rapid drain, and radar can cause faster drain than most other components.
Note that if infinite electricity is turned on, any component that needs power will be powered even if no connection is present.
This article was last edited for V1.4.14 (29 Mar 2022).
There are three batteries available:
Each battery varies in size, capacity, price, weight, as well the ratio of size and weight to capacity.
A larger battery is better to use than multiple smaller batteries if you need a lot of power because it will cost less, weigh less and take up less space.
As with normal electrical connections, you can either connect batteries in parallel or in series to any component requiring current.
There are two ways to recharge the batteries on your creation: generators, and solar panels.
There are three generators:
- Small Generator
- Medium Generator
- Large Generator
All of these require an engine to convert fuel into power, so that the generator can convert the power into electricity.
You can recharge your creation with the power of the sun... however be ready to be immobile for a long time. Solar panels in Stormworks are very expensive ($400 each), somewhat heavy (mass 2 for a single block), and provide very little power.
- Lightning: A nearby lightning strike while in a vehicle above 120 m altitude will cause power to go out for about 10 seconds. It will also trip any circuit breakers, and has a reportedly small chance to damage any components not protected by a circuit breaker.
- EMP: Similar to lightning, a nearby EMP warhead being set off will cause vehicles to lose power. EMP range is approximately 500 meters. Engines will be shut down by this, even if they are already running, and even if their throttle is a constant value which doesn't depend on power. Circuit breakers will be tripped, and resetting them will not fix the issue. Power will start coming back on after 55 seconds, and will ramp back up to full power by 60 seconds.
- Damage: Vehicle damage can be caused by collisions, fire, or by attacks from various weapons. Damaged batteries will stop supplying power. Other components, even circuit breakers, will continue to relay power even if damaged.
- High drain: Suddenly draining large amounts of power can cause a decreased power supply to other components. For example, running a medium engine starter from a small battery while the engine is at full clutch can cause lights to flicker due to the large power draw, even though the battery may still have ample energy to run the lights normally after the engine has started.
- Motors: Motor speed decreases as power supply dwindles. Diesel-electric vehicles with insufficient power generation may slow down until they stop.
- Engine starters: Similar to motors, engine starters provide lower maximum RPS as power supply decreases. This can result in being stuck below the minimum RPS (3.0) required for the engine to actually start running. Note that a vehicle with an electrical cable anchor can be connected to another vehicle to draw power from its batteries, allowing one vehicle to jump-start another.
- Lights: Lights dim in low power and shut off without power. This can make a vehicle interior extremely dark and difficult to navigate, though flashlights can mitigate this problem.
- Powered doors: Powered doors and hatches will be open without power. This can cause flooding. Manually-operated doors and hatches can be used to reduce this risk.
- Controls: Controls cannot be operated without power, even to operate components which don't require power like parachutes, flare launchers, machine guns, etc. These can still be triggered by logic signals, however.
- Power drain with engine startup can be reduced by using a clutch; engine RPS on startup can be improved by this as well. Release the clutch (set to zero), then try to start the engine up, and only re-engage the clutch when the engine is above 3 RPS.
- To avoid crashing as a result of lightning or EMP, aircraft can be equipped with a vehicle parachute triggered to activate with a loss of power. For example, a laser distance sensor within the vehicle will report whatever distance is between it and some other point of the vehicle it is pointed towards; when the power goes out, it will report zero distance. A microcontroller or an equals and a delay logic block could be used to detect when the reported distance becomes zero and stays that way longer than 10 seconds (indicating EMP, not just lightning), and use that to trigger the parachute release without requiring power to do so.
- Gradual loss of power (which could prevent engine startup if you come back to a vehicle after a while) can be prevented by using a circuit breaker. Connect your batteries to one end of the breaker, then connect everything that draws power to the other end of it.
Electricity was once used only in "advanced mode" but has since become part of the regular game due to the removal of "simple mode".