Submarine Editor Tutorial

From Official Barotrauma Wiki
Jump to: navigation, search


Start

This tutorial will cover the basics of the submarine editor in Subsurface, and teach you how to make a box that players can breathe in.

When you launch the game, select Submarine Editor

You can zoom in and out with the mousewheel, and pan the camera around with WASD.

The first thing you want to do is to open the structures menu and find the walls and platforms. Place a wall by holding left mouse button on the point you want it to start, then dragging to where you want the wall to end. The wall can then be resized by clicking on it again, and dragging the white dot. You should also place doors and hatches before placing hulls.

Gap and hull

Once you're done adding walls, ceilings, floors and platforms, you will need to add "hull" objects and "gap" objects. These objects are used by the game to determine where air is, how to distribute water when the ship is flooding, etc. If you added any platform objects, you should split hulls that the platforms are in and use gaps between each hull:

1121x1121px

Note that gaps can be both horizontal and vertical (useful when making bilge pipes; such as the ones found on the Nehalinnia. Do not allow gaps to touch outside of the walls, this will cause the same gap as a hull breach.

There is no need to add gaps to doors as they are added automatically when you place them, you should not allow a hull to cross over a door however.

Spawnpoints

Now you will need to add waypoints, these are the players' spawnpoints. Each waypoint is for specific jobs, so you have a waypoint for the captain and waypoints for engineers or mechanics. Make sure you set the waypoint to spawn a Human. The assigned jobs for all classes are Captain, Security Officer, Engineer and Mechanic

The ID card tag for the captain is "com", and the ID card tag for engineers and mechanics is "eng". The second tag is PX, where X is the player number.

At this point the map should already be playable, so you should save it

Machines

However, there aren't any electrical devices in the submarine, so the players will eventually suffocate. You will need to add these electrical devices, which are located in the Items menu. The most important items are the Nuclear Reactor, Fuel Rod(s), Junction Box(es), Wires,Oxygen Generator(s) and Vents.

Some devices require a link to function correctly. The oxygen generator must have a link between itself and at least 1 vent to pump oxygen into the ship, however you can link as many vents as you like. Railguns must also be linked to a Railgun loader, you may link any amount of Railgun Loaders to any amount of Railguns.

To link an item; left click on the machine you want to link, hold space and left click the machines you want to link it to.

Wiring Mode

Now you need to rewire these electrical devices so they actually work. To do this, there is the new Wiring Mode.

In wiring mode, press E (or activate) on an electrical device, from here you can select a colored wire on the right side of the screen. Attach the wire to any input, press E (or activate) to deselect the GUI and select the next item you want to wire into.

Most subs will need Junction boxes to split the power across the entire sub. A single wire pin may only hold 5 attached wires. A junction box allows you to chain them together to allow you to power over 5 machines from a single power source. The power source most subs will use is the nuclear reactor, you must place a wire into the power_out pin and into a junction box, wiring two or more junction boxes into a reactor and in circuit will cause it to read a grid load (the amount of power needed to power every attached machine) higher than is actually needed. In most cases this will cause junction boxes to blow out and can even cause the nuclear reactor to overheat and explode, avoid doing so.

Note that the junction boxes has 4 signal inputs, these do not carry power and cannot be used to power machines, however they will come into use later. You do not need to wire Hatches, Doors and Railgun Loaders into the power grid.

You may also press left mouse button when dragging the wire to provide a point. The wire will lock in place and you can drag in a new direction. This allows you to make easier to follow, and nicer looking wiring on your submarine, it may be done any amount of times.

If you have done the previous correctly, you should now have a sub that can support life.

File:ReactorWire.png File:JunctionWire.png

Note that as of 0.1.4.5 lamps will be in an OFF state when placed. You can fix this by wiring it to a signal or clicking on it in the editor, and ticking the "Is On" checkbox.

Signals

Now that you can breathe, walk and survive in your sub; the next step is to be able to move. The two methods of moving are horizontal (Engines) and Vertical (Controlled Flooding; also known as a Ballast Tank). Whilst ballast tanks and engines can be controlled manually, there is a more sensible and easy option of the Navigation Terminal to move your submarine.

The navigation has two outputs you should be concerned with here; the X_axis output and the Y_axis output. The X_axis output should be used to provide signals to your engines, and Y_axis output should be used to provide signals to the ballast pumps. They can also be used to provide the sub with advanced detectors, but in your first submarine you should not be concerned with such.

There are 3 basic ways you can provide signals to the engine and ballast pumps; Junction boxes, Wifi-Components and Direct connections. Depending on the distance from the Navigation Terminal to the Engine or Pump, all 3 are viable options. This is als owhere the Signal pins on junction boxes come into play, you can wire them just as you would chain power. A signal will not split like power does however, and be a constant value throughout the entirety of its chain.

Ballast Tanks

A ballast tank works by filling a room with water to weigh a submarine down, and sink it. When the submarine is low enough the same pumps start to pump water outside the submarine providing buoyancy and allows the submarine to raise. A partially filled ballast tank will cause the submarine to have a neutral buoyancy and stay still underwater.

To allow a Navigation Terminal to control a ballast tank it must be eventually connected to the SetTargetLevel pin in the Pump wiring GUI. The pump must be activated to running in character mode or manually ingame for it to begin working. You will not be able to manually set the pumping level if it is connected. You may wire any number of pumps into the X_axis signal.

Engines

Engines are even easier to wire signals to, just be sure to not combine your X_axis signal and Y_axis signal when doing so. You will most likely encounter this problem when using the same Signal pin on a Junction Box, or using the same channel with a Wifi-Compontent. The signal must eventually set to the set_force pin in the engine GUI. Do not worry if your submarine runs out of power when you initially start the engines ingame, this is just the reactor struggling to keep up with the increased grid load they take. This can be partially avoided by wiring a battery into the engine power circuit, or setting the engine to use less power by left clicking it.

Doors and Hatches

Assuming you have doors or hatches aboard your first sub, these must also be wired to a signal to work. The most common way to wire doors is with a Button. Wire the signal_out pin from the button into the door Toggle pin. This will toggle the door open if it is closed, and closed if it is open when it recieves a 1 signal. The door also has a set_state pin, useful when wiring more than 1 door to a signal. For example; wiring an emergency close doors button to the sub, when wired to the toggle button would shut all open doors, but open the closed ones. Using set_state pin the door will close when given a 0 signal, and open when it recives a 1 signal. You can send a 0 signal by using a Not Gate.