From The Depths

From The Depths

Nicht genug Bewertungen
Making a Carrier
Von budisourdog
How to make an aircraft carrier: designing the hull, aircraft, hooks, ACBs and breadboard for automated repairs.
2
   
Preis verleihen
Favorisieren
Favorisiert
Entfernen
The Aircraft
Naturally, an Aircraft Carrier need aircraft to launch. From the Depths offers Helicopters, Propeller and Jet Planes, Airships, Balloons, Missiles, and Spacecraft. Any existing design can be used as a drone, but if you don't have anything prepared grab the prefab propeller plane. Add the frontal propeller, a small engine, and an AI - one radar off the bottom and an inter vehicle transmitter for your fleet to share detection is enough to start. Add weapons, and finally place the wing blocks such that the center of lift is equal to the center of mass for a stable plane. Setup the AI and save the design.


Carrier demo plane.
The Hull
Choose a hull for your carrier. A bigger hull can fit planes more easily than a smaller ship can. If you don't have one ready I recommend using the prefab dreadnought pieces and an elongated central flight deck. Add some basic engines, cargo, and an AI. Armor your systems and add enough wood or alloy to keep the ship afloat without pumps or power, thus very resilient.
"The Hooks"
For the Carrier to actually have units attached, it will need docking stations (tractor beams) to hold them and sub-vehicle spawners to save the drone units into the main carrier blueprint. The easiest way of managing this is to create an elevator (or two axis) turret sub-object and attach both to it, plus a repair tentacle to fix your drones. By placing everything on a turret you can copy and paste it wherever, onto anything, and when you need to tweak where the drones are kept you can just adjust the idle angle of the turret. When the hook is in its final position, you should use the renaming tool to name the docking station of each hook so they can be referenced individually by the control systems. Standardize the names to simplify it, like "FDL1" for Flight Deck Left Spot 1



The carrier I built for this guide has 5 hooks, evenly spaced apart in the center of the hull.
Creating Drones
To convert your units to carrier drones, spawn ONE AT A TIME near the carrier and merge the two into a fleet.



Then go to the hook, assign it to the tractor beam, activate it. Find the distance you want to hold the unit at and then copy this into the sub vehicle spawner's spawning distance, and finally assign it to the sub vehicle spawner. This will save it to the carrier (but unfortunately not the sub object, and you can't just copy paste the hook with drones already attached).

Fitting the carrier.
While you may be tempted to place and rotate your planes to look all nice on the flight deck, you won't be able to fit many, and certainly not in an efficient manner. The two planes below were placed on hooks 16 meters apart, and they clipped (and would have been destroyed if not in godmode).


The reason why we have carrier hooks, is to store planes efficiently by keeping them at an angle: they're relatively short when stood up and can be a bit above one another in a row. The example here is 45 degrees, 16 meters apart between hooks. The quickest way to adjust their position is by changing the hook's idle elevation angle.


You can also suspend fighters from the sides of your carrier with outward facing hooks, like seen here.
Carrier Controls.
For the carrier to actually work and release units in battle, it needs ACBs or a breadboard controlling its operations. Further complications are involved for any repair or reconstruction processes. As of 3/1/24 I now recommend you use a singular AI breadboard and follow the [AI BREAD] instructions, but I'm going to also leave old legacy simple breadboard and quad ACB system under the title [LEGACY] if you wish to use it instead.
AI Breadboard controls.
An AI Breadboard can control every carrier operation in just a single block. I know they're not beginner friendly, and to that end, a fully operational and commentary inclusive breadboard has been installed on the Tutorial Carrier if you wish to prefab it for use or pick it apart. This breadboard automatically launches units, repairs them, and builds replacements if they die. If you'd prefer to write your own breadboard script, the instructions will be split into 2 segments for automatic launches / repairs, and a second section on automatic reconstruction.

If you are using AI breadboard controls, you still need the full fighter hook setup. Each unit needs its' own tractor beam with a unique name, subvehicle spawner to be saved into the carrier blueprint, and ideally a repair tentacle for every unit. If you want automatic construction of new units, you still need a vehicle blueprint spawner.
[AI Bread] Making your own launch and repair protocols.
1 To begin, place an AI breadboard.
2 Enter its interface with q.
3 Create a "Primary Target Info" input from the top right, inputs section.
4 Create three "Math Evaluator" components from the bottom right, components section. Place them to the right of your Primary Target Info.
5 Click on them to change their expressions to A=0, A=1, and A>X. Change X to the range at which you want to launch your drones at, like 4000 for 4km.
6 Connect A=0 and A=1 to the top output of your Primary Target Info reader.
7 Connect A>X to the second output of your Primary Target Info reader.
8 Create a Generic Block Info Getter from the top right, inputs section. Place it below your Primary Target Info reader.
9 Click on the Info Getter. Change the target block type to Docking Station 1 or 2 m depending on the one you used.
10 Add a name filter for the hook you are going to control, like FDL1 for flight deck left 1. Note the name filters ARE case sensitive.
11 Change the data type to docked unit health
12 Exit the info getter.
13 Create a new Math Evaluator component from the bottom right, components section. Place it to the right of your info getter.
14 Change the Math Evaluator's expression to 1-A.
15 Connect the Third output of your info getter to the input of the Math Evaluator.
16 Create a Switch component from the bottom right, components section. Place it to the right of your math evaluator.
17 Click the Switch, and change its threshold value to how much damage your fighters are allowed to take. .1 meaning 90% health, 10% damaged. Too high a value may fail to repair a unit if the AI is dead or the engine just exploded, as the health of those components is very low compared to armor.
18 Create a constant component with the value of 1. Place it above your switch.
19 Connect constant 1 as the top input on the switch, and math evaluator 1-A as the second input.
20 Create a Logic gate component from the bottom right, components section. Place it to the right of the switch.
21 Change the Logic gate type to NOT
22 Wire in the switch as its input
23 Create another Logic gate, place it to the right of the NOT Gate. Change this logic gate to AND and create a third input.
24 Connect the NOT Gate + the A=1 and A>X math evaluators from your Primary Target info reader as its inputs. Order is irrelevant.
25 Create a Delay Pulse to the right of the AND gate. Change it to not reset if the input is 1. 0 seconds of delay is fine for the first unit, but remember to stagger it for subsequent launches to prevent any crashes.
26 Create a Generic Block Setter component from the bottom right, components section.
27 Click the Block Setter. Change the Target Block Type to Docking Station 1 or 2m, change the name filter to match the name of the hook, ie FDL1 for Flight Deck Left 1.
28 Change the Block Setter's operation to ON/OFF Boolean.
29. Connect the Delay Pulse to the Trigger connection on the block setter. This connection is orange.
30. Create Constant 0 and connect it to the real input of the Block Setter.
31 Go down to below the Triple AND gate.
32 Create a new OR logic gate below the AND gate.
33 Wire in your unit health Switch and the A=0 math evaluator by the Primary Target info reader.
34 Create a Delay Pulse to the right of this OR gate. Change it to not reset if the input is 1. Remember to add a delay if this is not the first unit in your launch sequence.
35 Create a Generic Block Setter component from the bottom right, components section.
36 Click the Block Setter. Change the Target Block Type to Docking Station 1 or 2m, change the name filter to match the name of the hook, ie FDL1 for Flight Deck Left 1.
37 Change the Block Setter's operation to ON/OFF Boolean.
38 Connect the Delay pulse to the Trigger connection on the block setter. This connection is orange.
39 Create Constant 1 above your Block Setter, and wire it into the real input.

Congragulations! The Breadboard should now automatically launch fighters when there is an enemy under X distance, and recall them whenever they are damaged or the target is dead.
[AI Bread] Construction protocols.
Automatic reconstruction protocols go in the same breadboard.
****At this point, there are options. IF you only want to have a single vehicle blueprint spawner produce different types of units, you can do that. But it is easier to dedicate it to a single type****

1 Go a bit below everything. Create a Generic Block Info Getter from the top right, inputs section.
2 Click it and change the target block to a valid cargo block, your fuel boxes or ammo boxes. Any of these that appear in the menu will work.
3 Change the data type to Materials Fraction 0 to 1.
4 Create a Math Evaluator component. Place it to the right of the Info Getter.
5 Change the Math Evaluator's expression to A>Y, Y being the fraction of materials the carrier should always keep in reserve for itself, like .20 for 20%
6 Wire the second output of the materials reader to the input of your Math Evaluator.
7 Create a new Generic Block Info Getter. Place it below the Materials reader.
8 Change the target block type to Vehicle Blueprint Spawner. Change the Data to "Is holding a Force 0/1". IF you have a single vehicle blueprint spawner, you can leave the name field blank. IF your blueprint spawners only produce 1 type of unit, Change the Name to match the right vehicle blueprint spawner for your hook, ie "HelicopterSpawner" for building Helicopters.
9 Create a Math Evaluator with the expression A=0 to the right of the Spawner reader.
10 Wire the second output of the spawner reader as the Math Evaluator's input.
11 Create an AND gate with three inputs to the right of your two readers.
12. Connect both math evaluators as the inputs to this AND gate. Order is irrelevant.
13 Create two math evaluators below the AND gate, with the expressions A=0 & 0>A.
14 Connect the inputs of these two math evaluators to your Drone Health Switch in the control protocol area.
15 Create an OR logic gate, and connect both math evaluators as the inputs.
16 Connect this OR gate to the Triple AND gate.
17 Create a Delay Pulse component to the right of the AND gate. Set it to not reset if the input is 1.
18 Connect the Delay Pulse to the AND gate.
19 Create a Generic Block Setter.
20A: IF your vehicle blueprint spawners are dedicated to their unit types or only produce 1 type of drone, skip to step 21 IF you are sharing a single vehicle spawner for multiple unit types, create a second Generic Block Setter below the first.
20B: Click this secondary setter. Change the Block Type to Vehicle Blueprint Spawner, change the data type to ACB spawning name.
20C: Create a constant component. Change the data type to Text, and type the exact name of the unit you want to spawn (case sensitive).
20D: Connect the name of your unit as the input to the secondary setter, and connect the Delay Pulse as the Trigger input, this connection is orange.
21 Click the first Generic Block Setter. Change the Target Block Type to Vehicle Blueprint Spawner, change the data type to Spawn Trigger, and change the name parameters to match the specific spawner you are controlling, ie HelicopterSpawner.
22 Connect the Delay Pulse as the Trigger input, this connection is orange.
23 Create Constant 1, connect it as the real input to the block setter.

This now automatically constructs new units if you have spare materials, nothing is currently being built, and one of your drones has died. However, there is a fault with this system due to how the game loads things in, your construction protocols may trigger a false positive upon spawning the carrier into the world. To prevent this, some more code is added:

1 Below everything, create an Event Input component from the top right.
2 Change the event input to "Spawn" and tick the button that says "Read without resetting to 0".
3 Create a Math Evaluator, with the expression A>0. Connect it to the event input.
4 Create a delay pulse. Change it to not reset if the input is 1. Give it about 2 seconds of delay.
5 Create a NOT gate. Connect it to this delay pulse.
6 Create an AND gate. Connect it to the NOT gate and the Math Evaluator.
7 Create a Generic Block setter, change target block type to Vehicle Blueprint spawner.
8 Change the Block Setter's argument to "ACB spawning name"
9 Create a constant, text component. Either leave it blank or input some gibberish you know is not actually a blueprint.
10 Connect the fake constant into the input of the Block Setter.
11 Connect the AND gate as the trigger pulse, orange connection.
12 IF your vehicle spawner is shared and is given the name of the blueprint it needs to spawn in the previous code, you are done. IF You have dedicated vehicle blueprint spawners, you need to create an additional Generic Block Setter for every unique type of unit, ie 2 for helicopters and jets.
12B Change the argument to "ACB blueprint spawning name"
12C: Create a constant for each block setter, change the data type to text, and input the exact name of the units you are going to spawn ie "Helicopter" and "Jet".
12D: Connect the constants as the inputs to the generic block setters.
12E: Connect the Delay Pulse as the trigger pulse orange connection to each block setter.

You are finished. Prefab this sucker and use it forever, just rename the inputs and change the delays as needed.
[LEGACY] Step 1, The ACBs
At this point, you should use the renaming tool to name the docking station of each hook so they can be referenced individually by the ACBs. Standardize the names to simplify it, like "FDL1" for Flight Deck Left Spot 1

Each hook will need four ACBs to control it effectively. I chose to place them all near their respective hooks rather than the AI core because if the hook is broken flipping the switch doesn't matter, also easier to rename and check that they all work.

ACB 1 should be set to "if enemy within X range, docking station release all sub vehicles"
Range of 3km is fine. Remember to filter target blocks by the name of the docking station, and add a delay effect appropriate for the hook's place in the line (1st = instant, 2nd 2 seconds delay, third 4 seconds...). Also name your ACB something like FDL1GO as it is the one that releases the fighter and must later be disabled to recall and repair the craft mid fight.


ACB 2 is much easier and doesn't require a unique name. "if no enemy within range, docking station RECALL all sub vehicles" Again staggering the 2nd, 3rd, 4th and so on by 2 seconds is a good idea to avoid fighter collisions.


ACB 3 is a special case. If you do not want automated repairs, ignore it and the following breadboard section (but really why not, its cooler and more efficient)
Disable this ACB. Set its priority above ACB 1's. Set it on a 1 second timer, to recall all sub vehicles and target the correct fighter hook. Name it something like FDL1HEALER for breadboard control.


ACB 4 is another special case, for automated construction of additional fighters if the original one is destroyed completely: if you're not automating repairs or construction feel free to skip it.
Disable this ACB. Set it on a 1 second timer, targeting vehicle blueprint spawners to spawn their default craft. Target the correct vehicle blueprint spawner for the hook, ie "HelicopterSpawner", and rename this ACB to the hook + BUILDER, ie FDL1BUILDER.
[LEGACY] Step 2, Breadboard Repair System
If you know what you are doing , there is a screenshot of the finished breadboard explaining the bits. If you don't, follow the steps below carefully:



1 Select "Block Info Getter" on the upper right. This component reads a block's data and outputs it as variables for use in the breadboard. These are pretty much the base component.
2 Place it in the board
3 Select it
4 Change the target block type to Docking Station 1 (or 2m depending on the one you used)
5 Enter the name of your target hook, ie FDL1 Flight Deck Left 1
6 Change data type to Unit Health (crucially, this works when undocked too)
7 Deselect the Block Info Getter
8 Create a "Math Evaluator" from the bottom right. These do the math.
9 Place it on the board, then select it
10 Change the expression to 1-A.
11 Exit the math evaluator
12 Click the third output of your block info getter
13 Click the input for your math evaluator: this will link them. 1 or 100% represents the drone's max total health, the third signal you wired in will be the live feed of current drone health.
14 Create a Switch component from the right. Place it on the board
15 Create a Constant component from the right, place it above your switch.
16 Set the constant to 1
17 Connect constant 1 to the top input of the switch
18 Connect the Math Evaluator as the second input on the switch
19 Click on the switch
20 Ensure its open value is 0
21 Set a Threshold value of how much damage is unacceptable to your fighters. A value of .1 means the drone is at 90% health and 10% damaged. You don't want it very high because key components like the AI might be only 1% of the total, but no ai = broken.
22 Exit the switch
23 Create a Generic Block Setter from the bottom right. Setters are the operators, letting a breadboard alter variables and settings of blocks.
24 In this setter, target ACB 3 "FDL1HEALER" or whatever name it has
25 Change the setter's operation to ON/OFF Boolean.
26 Plug the switch in as the input.

With this completed, your fighter will be recalled when its health is low -- however ACB1 'FDL1GO" still wants to send it to fight the enemies and must be shut off.

27 Create a constant, value of 1, somewhere below the setter
28 Create a math evaluator near the constant
29 Set the Math Evaluator's expression to A-B
30 Set constant 1 as the top input
31 Take the switch from step 26 as the second input
32 Create another Generic Block Setter
33 Target ACB1 "FDL1GO" or the name you used.
34 Change the operation to ON/OFF Boolean.
35 Set the math evaluator as the input.

Congratulations. The breadboard will control the recall ACB and disable the releaser when it needs to, and when the craft is healed it will disable the recall status and let it fly off.
[LEGACY] Step 3, Replacing destroyed fighters
Even with a repair system in place, fighters may be destroyed completely in battle. To replace lost units there are two potential methods. The first, manual and out-of-combat, way of doing this is simply to retrofit your carrier to itself in the fleet screen, because the blueprint for the carrier should contain its full compliment, thus the missing ones will be rebuilt. (Courtesy of Gmodism for pointing this out with the latest instant tutorial). *You may have to pull your carrier out of play and scrap all existing fighters before retrofitting.*

Now, there is a way to automatically rebuild new fighters. To accomplish this, you will need one more ACB per hook, a vehicle blueprint spawner or multiple if you have multiple types of craft you wish to replace, and finally one extra ACB. This ACB should go in your armored AI compartment, and be set to read vehicle materials; when materials are between a minimum of say 20% and 100%, activate complex control G. Next, preferably in another armored compartment place your vehicle spawner(s), and name them according to the type of vehicle they will build, ie "HelicopterSpawner", "BomberSpawner". Change their settings to something appropriate, like hold at 100m for 30 seconds or until vehicle is built to 100%, and input the name of the blueprint you want them to spawn, ie "Helicopter 4". Then at each of your hooks place an ACB named to the hook + BUILDER, ie FLD1BUILDER. These should be disabled before you input their data to prevent spawner mishaps. Set them on a 1 second loop, triggering vehicle blueprint spawners to spawn their default vehicle. If you have multiple vehicle types remember to target the correct spawner. And finally, the breadboarding again... I promise you it makes sense.



1 Open the breadboard for your hook.
2 Go below the repair protocols area.
3 Create two math evaluators, with the expressions A=0 and A<0
4 Connect the math evaluators to the block info getter reading drone health
5 Create a logic gate component, place it to the right of your math evaluators
6 Click the logic gate and change the type to OR
7 Connect both math evaluators to the inputs. This gate now opens when the drone is either dead or missing.
8 Create a Complex Control input
9 Place it below your math evaluators
10 Click it, and tell it to read complex control G
11 Create a math evaluator with the expression A=1
12 Wire the complex control reader to the math evaluator
13 Create a generic block getter
14 Place it below the complex control reader
15 Click the info getter, change the block type to constructable spawner
16 Change the data type to "is holding a force"
17 Change the name filter to the correct vehicle spawner for the hook, ie "HelicopterSpawner"
18 Create a math evaluator with the expression A=0
19 Place it to the right of the block info getter
19 Connect the block info getter to the math evaluator, I used the second output but it doesn't matter here.
20 Create a logic gate component
21 Place it somewhere to the right
22 Click it, make sure it's an AND gate.
23 Add a third input
24 Connect the OR gate, and both math evaluators as the inputs, order is irrelevant.
25*** Create a delay pulse to the right of your AND gate.
26 Click it. Change the reset dataline to not reset if the input is 1. This is to prevent an infinite loop of building new units.
*****
ALTERNATE LOOP INHIBITOR, possibly better?
I Instead of a delay pulse, create a one shot component to the right of your AND gate.
II Click it. Alter the minimum and maximum reset times to your liking
III Add an event input below the AND gate.
IV Click it. Select "Target Spotted" as the event
V Connect it to the bottom of your one shot. Now it automatically resets when new enemies are engaged.
*****
27 Create a generic block setter to the right or below the delay pulse.
28 Click it, change target block type to ACB.
29 Change the operation to "Is Enabled"
30 Target the BuilderACB for your hook, ie FLD1BUILDER
31 Connect this block setter to your delay pulse. IT IS DONE.

This system will now automatically construct one new drone when the original one is destroyed. Unfortunately there is no way to automatically reassign newly constructed drones to your hooks, but they will stay in the fleet with your carrier and can be manually reassigned to the sub vehicle spawners and tractor beams, or simply scrapped when combat ends and then the carrier retrofitted to itself to reload its hooks.
Troubleshooting
When dealing with something as complicated as a carrier, a lot of things can go wrong. Test, Test, Test. It might work vs Marauders, but What happens vs submarines? What happens vs Airships? Super far away annoying space pests? Does your carrier have enough repair tentacles and materials to fix all the fighters or do they end up all back on the ship not fighting because a little flak gun keeps denting them a bit too much.

What I can say is
If your fighters crash into each other, increase the stagger between launches and / or increase the distance between units where they are held.

If your fighters do not launch or fail to be recalled, you may have made a typo in the naming of one of the blocks, typo in the target paths of the ACB or breadboard, the breadboard may have been done incorrectly, or your ship might have been damaged and the computer cannot function because it is currently a heap of slag off starboard.

If your fighters come back for repairs too often or stay too long on the carrier, increase number of repair tentacles, consider increasing acceptable damage taken (but also remember that 5% hp lost could be the AI getting shot out, or the propeller, or the engines).

If your fighters crash into your carrier, increase the height and distance at which they are held.
Example Carriers
The one from this guide.
Completed the decking over the dreadnaught hull, added 40mm AA guns.
Decided on a broadside routine and added additional cannons and armor on the left side.
Added a 500mm APHE cannon to compensate for the fighter's missiles always doing surface damage.
Added 3 Torpedo Helicopters with sonar bouys to improve anti submarine capabilities.
https://steamcommunity.com/sharedfiles/filedetails/?id=3034753548
7 Kommentare
budisourdog  [Autor] 1. März 2024 um 13:42 
AI breadboard update is out.
Jolo_ 12. Okt. 2023 um 11:37 
fixed it one of the best tutorials out there for sure was an issue on my end
budisourdog  [Autor] 12. Okt. 2023 um 10:48 
Yeah if they are returning every couple of seconds it sounds like the healer recall ACB is running when it shouldn't be.
Jolo_ 12. Okt. 2023 um 10:31 
like it works like a charm but they get sucked in every 1-2 seconds or so and it might just be a simple fix
Jolo_ 12. Okt. 2023 um 10:30 
thanks also by any chance my planes keep getting moved back into the docking station is there any way to fix that?
also not sure what the [''1''] and [''-1'']
budisourdog  [Autor] 12. Okt. 2023 um 9:48 
Renaming tool. Hit z outside of build mode, assign it to your quickbar and do it from there, unfortunately it doesn't seem to be available in build mode with your vehicle perfectly frozen.
Jolo_ 12. Okt. 2023 um 9:23 
how do u name the vehicle blueprint spawners?