Reminder: Internet Explorer 6 or below are NOT supported.

 There are currently 39 users playing Freelancer on 44 servers. July. 6, 2020

# MDB:shiparch.ini

From The Starport

Main Page | Recent changes | Edit this page | Page history | Switch to MediaWiki mode

Printable version | Disclaimers | Privacy policy

## shiparch.ini

This file describes ships and their destructible parts.

### Syntax

There is no particular order for the parameters inside the sections. However each parameter should only be used once per section, since only the last value will be used by Freelancer.

Collision groups should be placed immediately after the ship they are designed for. Place the needed simples after them, before you add the next ship, or it will not work.

### Ship Section

This section describes a ship.

 

 [Ship] ids_name = INT ids_info = INT ids_info1 = INT ids_info2 = INT ids_info3 = INT ship_class = INT nickname = STRING LODranges = INT, INT, ... ;optional msg_id_prefix = STRING mission_property = STRING ;repeatable type = STRING mass = FLOAT hold_size = INT linear_drag = FLOAT fuse = STRING, FLOAT, INT ;repeatable max_bank_angle = INT? camera_offset = FLOAT_Y, FLOAT_Z, FLOAT_X ;positive values move up/back/right camera_angular_acceleration = FLOAT camera_horizontal_turn_angle = INT camera_vertical_turn_up_angle = INT camera_vertical_turn_down_angle = INT camera_turn_look_ahead_slerp_amount = FLOAT nanobot_limit = INT shield_battery_limit = INT hit_pts = INT DA_archetype = PATH material_library = PATH ;repeatable envmap_material = STRING ;optional cockpit = PATH pilot_mesh = STRING explosion_arch = STRING surface_hit_effects = 0, STRING, STRING, ... ; repeatable steering_torque = FLOAT_X, FLOAT_Y, FLOAT_Z angular_drag = FLOAT_X, FLOAT_Y, FLOAT_Z rotation_inertia = FLOAT_X, FLOAT_Y, FLOAT_Z nudge_force = FLOAT strafe_force = INT? strafe_power_usage = INT? bay_door_anim = STRING ;optional bay_doors_open_snd = STRING ;optional bay_doors_close_snd = STRING ;optional HP_bay_surface = STRING ;optional HP_bay_external = STRING ;optional num_exhaust_nozzles = INT HP_tractor_source = STRING shield_link = STRING, STRING, ... hp_type = STRING, STRING, ... ;repeatable 

Parameter Information
ids_name See the ids_name page for more information.
ids_info Combination of the ships attributes (e.g. Hitpoints) and their values. This is what you see below ids_info1 when you scan a ship or open your inventory.
ids_info1 See the ids_info page for more information.
ids_info2 List of the ships attributes. This is used at the ship dealer.
ids_info3 List of the values of the ships attributes. This is used at the ship dealer.
ship_class Range: 0 to 3

0 = Light Fighter 1 = Heavy Fighter 2 = Freighter 3 = Very Heavy Fighter

This entry is used at the ship dealer.

nickname See the nickname page for more information.
LODranges See the LODranges page for more information.
msg_id_prefix This parameter sets how NPCs will refer to the ship when they communicate.
mission_property This parameter sets where the ship may dock. Possible options: can_use_berths, can_use_med_moors, can_use_large_moors. Berths are the small docks, moors are in space and are disabled in vanilla. You can enable them with adoxas moors plugin. See dacom.ini and dacomsrv.ini for info on how to add the dll.
type This parameter sets the ship type. Possible options are: FIGHTER, FREIGHTER, GUNBOAT, CRUISER, CAPITAL, TRANSPORT, MINING. You should always use FIGHTER or FREIGHTER for player ships, as the other types look odd/the flight controls are bugged.
mass See the mass page for more information.
hold_size Range: 0 to Infinity?

This parameter sets how much cargo may be fit in the ship.

linear_drag Deceleration parameter, see ship handling for details.
fuse Range: 0 to Infinity?

Nickname of the fuse, time delay before the is activated?, HP threshold that triggers the fuse. So if you put 1000 in the INT, the fuse will activate once your HP reach 1000.

max_bank_angle Range: 0 to Infinity?

The maximum angle in degrees the ship will roll on the Z-axis when you turn. Increase this value to get a more jetplane like feeling.

camera_offset Range: 0 to Infinity?

Sets the point of the camera in third person view. The coordinate origin is at HpCockpit. The camera looks from the specified point at HpCockpit, so you can influence the camera angle with this.

camera_angular_acceleration Range: 0 to Infinity?

Sets how fast the camera angle changes when you fly a turn.(in Radians?)

camera_horizontal_turn_angle Range: 0 to Infinity?

Sets how many degees the camera position rotates around HpCockpit when you turn horizontally.

camera_vertical_turn_up_angle Range: 0 to Infinity?

Sets how many degees the camera position rotates around HpCockpit when you turn up.

camera_vertical_turn_down_angle Range: 0 to Infinity?

Sets how many degees the camera position rotates around HpCockpit when you turn down.

camera_turn_look_ahead_slerp_amount Range: 0 to Infinity?

Sets how many radians the camera rotates when you turn.

nanobot_limit Range: 0 to Infinity?

How many nanobots the ship may carry.

shield_battery_limit Range: 0 to Infinity?

How many shield batteries the ship may carry.

hit_pts See the hit_pts page for more information.
DA_archetype See the DA_archetype page for more information.
material_library See the material_library page for more information.
envmap_material Unknown.
cockpit Sets the path to the ini for the cockpit of the ship. This file determines the mesh that is displayed in cockpit view. Apart from that you can change the rear view and turret view in this ini.
pilot_mesh Sets the path to the mesh of the pilot. This mesh will be placed at HpPilot.
explosion_arch See the explosion_arch page for more information.
surface_hit_effects Range: 0 to Infinity?

Above INT damage to the shiphull one of the listed effects is displayed.

steering_torque Range: 0 to Infinity?

How much force is available for a turn in any axis. See ship handling for details.

angular_drag Range: 0 to Infinity?

How much force works against the torque in any axis. See ship handling for details.

rotation_inertia Range: 0 to Infinity?

How much inertia the ship has. Think of mass that is applied on rotations.

nudge_force Range: 0 to Infinity?

Sets how much/fast the autopilot may shift your position. This parameter is used when you dock or when you use goto and the autopilot needs to evade.

strafe_force Range: 0 to Infinity?

Sets how fast the ship can strafe when you press A or D. See ship handling for details.

strafe_power_usage Range: 0 to Infinity?

Sets how much thrust power is used when you strafe. See misc_equip.ini for details.

bay_door_anim Tells Freelancer how the animation for the bay doors is called in the ships CMP.
bay_doors_open_snd References a sound from AUDIO\sounds.ini, that is played when the bay doors open.
bay_doors_close_snd References a sound that is played when the bay doors close.
HP_bay_surface The Hardpoint at which the jettisoned cargo is spawned?
HP_bay_external The shield comes online after the cargo has passed this hardpoint?
num_exhaust_nozzles Range: 0 to Infinity?

Tells Freelancer at how many hardpoints it shall generates engine effects. These effects are generated at HpEngine0X. If you need more than nine exhausts, you will need to add another leading zero the Hps in the model, e. g. HpEngine0XX.

HP_tractor_source The name of the Hardpoint that is the origin of the tractor beam.
shield_link The first string is the name of the Shield_bubble defined in DATA\select_equip.ini, the second is the hardpoint at which SpConnect of the bubble will be placed and the following strings are the names of the shield hardpoints.
hp_type The first string is the hp_type that may be mounted on the following hardpoints.

### Ship handling Section

In the following I have renamed linear_drag to avoid confusion. ship_drag can be found above, and engine_drag can be found in EQUIPMENT\engine_equip.ini.

The mass of the ship attenuates any change in speed and influences the behavior when you collide with another object. Rotation inertia works the same way but for rotations. The mass should therefore be the first parameter you decide.

Second up is angular_drag. You should use simlar values from vanilla for you new ship, so if you are creating a new freighter, look at vanilla freighers. As a rule of thumb, if you change the mass you should change angular_drag proportionally.

Some formulas to help you balance your ships:

$strafe_speed=\frac{strafe\_force}{engine\_drag+ship\_drag}\frac{m}{s}$

$rotation_speed=\frac{steering\_torque\_x}{angular\_drag\_x}\frac{rad}{s}$

$steering\_torque\_x = angular\_drag\_x * \frac{radians}{s}$

Rotation_inertia should be between 10-20% of angular_drag or the autopilot will misbehave.

-To convert degrees to radians and back you can use these formulas:

$radian = angle * \frac{\Pi}{180}$

$angle = radian * \frac{180}{\Pi}$

If you think that the ship accelerates too fast you can divide the force and (ship_drag+engine_drag) parameters by the same factor to slow it down. For rotations you divide torque, angular_drag and intertia by the same factor. If you think it is too slow you multipy them with the same factor. Be careful though, as the autopilot is really dumb.

### CollisionGroup Section

This section defines a collision group. You will need this, if you want to have breakable parts on your ship.

If the hitpoints of the collision group reach zero it is usually separated from the hull and replaced with a damged simple mesh specifically designed for this. See below for information on simples.

Another use is to destroy the whole ship if the collision group is destroyed.

If you want this to work, you will need a ship CMP with multiple parts and a sur designed for this. Use Schmackbolzens objtosurconv and export the destructible parts either as static or movable.

 

 [CollisionGroup] obj = STRING separable = BOOL parent_impulse = FLOAT child_impulse = FLOAT debris_type = STRING dmg_hp = STRING dmg_obj = STRING separation_explosion = STRING mass = FLOAT type = STRING hit_pts = FLOAT root_health_proxy = BOOL 

Parameter Information
obj The name of the cmp group that is destructible. Do not forget the lod1 at the end, else it will not work.
separable Is the part separated when it's HP reach zero
parent_impulse Range: 0 to Infinity?

Push against the Parent (ship in which it is attached) when the item is destroyed. Set higher to see exaggerated effect.

child_impulse Range: 0 to Infinity?

Push against the Child (thruster which is attached) when the item is destroyed. Set higher to see exaggerated effect.

debris_type Refers to a Debris to be used if the part is destroyed.
dmg_hp The Hardpoint at which the deformed mesh is attached.
dmg_obj The nickname of the simple that is attached to dmg_hp.
separation_explosion Refers to the Explosion section to be used when the collision group is destroyed.
mass See the mass page for more information.
type Vanilla always uses the same types, but you should be able to call the groups how you want. The only use for this that I know of is the names that are displayed in the repair ship window.
hit_pts See the hit_pts page for more information.
root_health_proxy If true the hitpoints of the ship are reduced by the same amount if the group is damaged.

### Simple Section

This section defines a simple mesh/3DB. You will need this, if you want to have breakable parts on your ship.

 

 [Simple] nickname = string DA_archetype = PATH material_library = PATH mass = FLOAT LODranges = INT, INT, ... 

Parameter Information
nickname See the nickname page for more information.
DA_archetype See the DA_archetype page for more information.
material_library See the material_library page for more information.
mass See the mass page for more information.
LODranges See the LODranges page for more information.

Retrieved from "http://the-starport.net/freelancer/wiki/index.php/MDB:shiparch.ini"

This page has been accessed 1,920 times. This page was last modified 14:48, 6 July 2017. Content is available under The Starport.