How engines and thrusters work

In this short guide I will explain how engines and thrusters work. I want to say a big thanks to j.harshaw for helping me understand how most of this stuff works (and being an awesome guy). You may of seen a ship's xml and wondered how it works. Lets take a look at the Elite Vanguard (or \X4\01\assets\units\size_s\macros\ship_arg_s_fighter_02_a_macro);

<macros>
<macro name="ship_arg_s_fighter_02_a_macro" class="ship_s">
<component ref="ship_arg_s_fighter_02" />
<properties>
<identification name="{20101,11902}" basename="{20101,11901}" description="{20101,11912}" variation="{20111,1101}" shortvariation="{20111,1103}" icon="ship_s_fight_01" />
<software>
<software ware="software_dockmk2" compatible="1" />
<software ware="software_flightassistmk1" default="1" />
<software ware="software_scannerlongrangemk1" default="1" />
<software ware="software_scannerlongrangemk2" compatible="1" />
<software ware="software_scannerobjectmk1" default="1" />
<software ware="software_scannerobjectmk2" compatible="1" />
<software ware="software_targetmk1" default="1" />
<software ware="software_trademk1" compatible="1" />
</software>
<storage missile="20" />
<hull max="1800" />
<secrecy level="2" />
<purpose primary="fight" />
<people capacity="1" />
<sounds>
<shipdetail ref="shipdetail_ship_02" />
</sounds>
<physics mass="3.772">
<inertia pitch="0.451" yaw="0.451" roll="0.361" />
<drag forward="2.193" reverse="8.772" horizontal="3.381" vertical="3.381" pitch="2.585" yaw="2.585" roll="2.585" />
</physics>
<thruster tags="small" />
<ship type="interceptor" />
<sound_occlusion inside="0.5" />
</properties>
<connections>
<connection ref="con_cockpit">
<macro ref="cockpit_gen_virtual_01_macro" connection="ship" />
</connection>
<connection ref="con_dock_xs">
<macro ref="dock_gen_xs_ship_01_macro" connection="Connection_component" />
</connection>
<connection ref="con_storage01">
<macro ref="storage_arg_s_fighter_02_a_macro" connection="ShipConnection" />
</connection>
</connections>
</macro>
</macros>

So as you can see there is no engine or thruster speeds, but instead we have physics, inertia and drag. In X4 the player can change the engine and/or thrusters which effects the physics of the ship. This is because each engine and thuster have different amounts of thrust. So if you look at the above, you will see under thruster, the parameter tags is set to small. This tells us that only small thrusters can be used, as for engine I think its to-do with the macro name (will update this in time).

So in this example we will take a the Argon S All-round Mk1 thruster (\X4\01\assets\props\Engines\macros\engine_arg_s_allround_01_mk1_macro.xml), and Argon S Travel thrusters Mk1 ((\X4\01\assets\props\Engines\macros\engine_arg_s_travel_01_mk1_macro). So if we short-list the important stats, we get the following:

Ship: ship_arg_s_fighter_02_a_macro
Mass: 3.772 t
Pitch/Yaw Inertia: 0.451
Roll Inertia: 0.361
Forward Drag: 2.193
Reverse Drag: 8.772
Vertical/Horzontal Drag: 3.381
Pitch/Yaw/Roll Drag: 2.585

Engine: engine_arg_s_travel_01_mk1_macro
Forward Thrust: 396
Reverse Thrust: 396

Thrusters: thruster_gen_s_allround_01_mk1_macro
Vertical Thrust: 199
Horizontal Thrust: 199
Yaw Thrust: 184
Pitch Thrust: 171
Roll Thrust: 236

So to calculate the various stats, check the formulas below:

Forward acceleration = (Engine forward thrust * Number of engines) / Hull mass
= (396 * 1) / 3.772
= 105 m/s^2

Maximum forward speed = (Engine forward thrust * Number of engines) / Hull forward drag
= (396 * 1) / 2.193
= 181 m/s

Time to max speed = Max forward speed / Forward acceleration
= 181 / 105
= 1.7 s

Yaw accel = Thruster yaw thrust / Hull yaw inertia
= 184 / 0.451
= 407

Max yaw speed = Thruster yaw thrust / Hull yaw drag
= 184 / 2.585
= 71

Yaw sluggishness = Max yaw speed / Yaw accel
= 71 / 407
= 0.04 (lower is better)

Pitch accel = Thruster pitch thrust / Hull pitch inertia
= 171 / 0.451
= 379

Max pitch speed = Thruster pitch thrust / Hull pitch drag
= 171 / 2.585
= 66

Roll accel = Thruster roll thrust / Hull roll inertia
= 236 / 0.361
= 654
Max roll speed = Thruster roll thrust / Hull roll drag
= 236 / 2.585
= 91

Vertical strafe accel = Thruster vertical thrust / Hull mass
= 199 / 3.772
= 53

Max vertical strafe speed = Thruster vertical thrust / Hull vertical drag
= 199 / 3.381
= 59


« Back to technical help section