[TUTORIAL] Capital Ship Engines

This tutorial explains how to set up the engine for a capital ship. Firstly we will look at the engine glow and secondly we will look at the “innate” subsystem (the part that flashes green when selected). Innate subsystems are also used for resource drop-offs, which use exactly the same format. We will be adding an engine glow and an innate subsystem to the example ship Turanic carrier, which does not have them by default. This tutorial builds on my previous tutorial getting a simple ship in game.

Tools used in this tutorial:

  1. 3ds Max 2014 (some other versions work, Blender is also a possibility)
  2. HODOR
  3. tools to decrypt/extract .big files, not covered here
  4. Notepad++ (or another text editor)
1 Like

+++ STEP 1 - CREATE THE ENGINE GLOW MODELS +++

Import the example ship DAE file into 3ds Max. At the point where you want the engine glow to be (i.e. just behind the engine) create three models of glow-like shapes. I have used three boxes, but you will want something more exhaust-like in shape for a proper ship. Judging by the example ships, there is no need to worry about keeping the poly count down on the engine glow models. The models should increase in size and be named as follows:

  • Smallest: GLOW[EngineGlow1]_LOD[0]
  • Middle: GLOW[EngineGlow2]_LOD[0]
  • Biggest: GLOW[EngineGlow3]_LOD[0]

The pivot points must all be in the same location, at the engine itself, withthe z-axis facing backwards, as shown here:

image

+++ STEP 2 - MATERIAL FOR THE ENGINE GLOW MODELS +++

The engine glow models will not be textured, but they need to have a material with a special name that tells HODOR that they are glowing. So open the Slate Material Editor (in the Rendering menu) and create a new “standard” material. Name it MATGLOW[HODOR_Glow] and apply it to all three engine glow models.

image

+++ STEP 3 - CREATE THE ENGINE GLOW DUMMIES +++

We now need to create two new dummies for the engine glow. Create the dummies and position them in exactly the same location as the pivots for the engine glow models created in step 1. Name them and orientate them as follows:

I think that the JNT orientates the glows and the AXIS tells the game which direction to flicker the glow, but I could be wrong…

Arrange the hierarchy under ROOT_LOD[0] as shown here:

image

You can test the engine glow by exporting a DAE file and using HODOR to create a HOD at C:\Program Files (x86)\Steam\steamapps\common\Homeworld\HomeworldRM\Data\ship\tur_p1mothership\tur_p1mothership.HOD (how to set up HODOR and command line arguments is dealt with in detail in the “getting a simple ship in game” tutorial). Launch the game and watch a Turanic carrier moving. You should see the engine glowing nicely:

+++ STEP 4 - CREATE THE ENGINE HARDPOINT DUMMIES +++

Now we will add the innate subsystem. Before we create the subsystem itself, we will have to add some dummies to the Turanic carrier to tell the game where the subsystem will be located. We need three dummies, named, orientated and positioned as shown here:

image

The hierarchy must be set up as shown in the inset, with JNT[Hardpoint_Engine_Position] being a child of ROOT_LOD[0].

+++ STEP 5 - CREATE THE ENGINE SUBSYSTEM +++

Save and export your ship to DAE before continuing. To make things easier we will now create the subsystem model on top of the ship, delete the ship itself and save the file as the subsystem. Create a model of the innate subsystem. It should cover the engine area, but it doesn’t need to look too fancy - it will only show as a green box after all! I have made a new model, but you could use the existing LOD[0] model and chop off the rest of the ship, to ensure the engine shape matched exactly. Place the pivot of the engine subsystem in exactly the same position as the JNT[Hardpoint_Engine_Position] dummy.

+++ STEP 6 - ISOLATE THE SUBSYSTEM +++

Now we need to delete the rest of the ship (including the collision mesh and other LODs) from the scene. However we will still need some of the dummies, so delete things carefully until you are left with:

image

Where MULT[Tur_CarrierEngine]_LOD[0] is your subsystem model. Position the engine subsystem as follows and ensure that the pivot of the subsystem and the pivots of all the dummies are orientated in exactly the same way. Position the subsystem on top of the ROOT_LOD[0] dummy so that everything is in the same location. Note that for ships the z-axis is forward, but for subsystems the z-axis is up:

image

In the same way as the engine glow, we need to create a dummy material for the subsystem. It needs to be called MAT[Tur_CarrierEngine]_SHD[InnateSS] Note that the Tur_CarrierEngine can be anything, but it needs to match the string in the model name (my subsystem model is called MULT[Tur_CarrierEngine]_LOD[0]). Apply the material to the subsystem model.

image

Now save and export the DAE file of the subsystem. Use HODOR (in the same way as for ships) to create a HOD here:

'C:\Program Files (x86)\Steam\steamapps\common\Homeworld\HomeworldRM\Data\subsystem\tur_carrierengine\tur_carrierengine.HOD

HODOR might give you the warning message DAE->HOD: Unable to locate SHADER.MAP entry for InnateSS - MAT[Tur_CarrierEngine]_SHD[InnateSS] - using generic! but don’t worry, it still seems to know what it’s doing…

Create the HOD of the ship itself here:

C:\Program Files (x86)\Steam\steamapps\common\Homeworld\HomeworldRM\Data\ship\tur_p1mothership\tur_p1mothership.HOD
1 Like

+++ STEP 7 - A BIT OF SCRIPTING +++

I have not dealt with scripting in my previous tutorials and I do not intend to go into detail on it here. However it is necessary to do a bit of scripting to get our innate subsystem to work. We will need to create two files in the same directory as the HOD file:

  • tur_carrierengine.subs
  • tur_carrierengine.events

They can both be copies of one of the other innate subsystems, because they do not contain anything special. To do this, the following steps are required (I assume that you know how to do this - if not, reply here and someone will help you).

  1. decrypt big file HW2Ships.big
  2. extract the above files (I used hgn_des_engine but any engine subsystem will probably do)
  3. copy them and rename as shown above

The final thing we need to do is to add a line of code to the tur_p1mothership.ship file. Again, follow the steps above to get the file from Homeworld2.big and place it with tur_p1mothership.HOD in C:\Program Files (x86)\Steam\steamapps\common\Homeworld\HomeworldRM\Data\ship\tur_p1mothership\

Now open tur_p1mothership.ship with Notepad++ and insert the following line after the “Weapon_Gun11” line:

StartShipHardPointConfig(NewShipType,"Engine","Hardpoint_Engine","System","Innate","Damageable","Tur_CarrierEngine","","","","","","","","");

This tells the game that the ship has a hardpoint called “Hardpoint_Engine” (which picks up the name of the dummies in the ship HOD) and that the hardpoint itself is “Tur_CarrierEngine” (which points to the files we just created).

Now launch the game and click on the Turanic carrier to see the hardpoint in action:

3 Likes

The shader assignment would explain why I was hit and miss with exporting engine glows!

I wonder if the AXIS determines how far out the glows stretch as the ship engines come to full power, I haven’t moved it far out and in some cases I had it right on top of the nozzle joint

Judging from the examples, the AXIS should be in the same position as the JNT…

Nice tutorial, I knew all of this already, but this will help many people I think.
And by the way, you can have multiple EngineNozzle joints. This is helpful for ships with several engines that are far apart from each other, because the engine effect is scaled up from that joint.

1 Like

I should have mentioned, the engine glows look much better with a bit of transparency: