Important Message

You are browsing the archived Lancers Reactor forums. You cannot register or login.
The content may be outdated and links may not be functional.


To get the latest in Freelancer news, mods, modding and downloads, go to
The-Starport

**Tutorial** - Making NPC Ships Flyable

Here you find the different tutorials on editing and MODing Freelancer

Post Sat May 01, 2004 12:06 am

**Tutorial** - Making NPC Ships Flyable

Okay, there have been several requests over the weeks, and although this is a very basic one, it will give you a starting point. READ EVERYTHING CAREFULLY - and also BACK UP FILES.

Please note that where an open square bracket is, there SHOULD be a closed one at the end of the word - like [Ship SHOULD have a closing bracket at the end of the word - but the forums scripting method means its not there - so an example using CURLY brackets would look like this:

(Ship)

(Loadout)

(Good)

You get the idea huh? Where the closing bracket is should have a square bracket - you might be wondering what i am drivelling on about - but see here:
[Ship

[Loadout

[Good
That time is WITH square brackets - but the closing one disappears! So put em in

How to make a pilotable gunboat (generally speaking of course) This can be any NPC ship, as using the SAME method here will make ANY NPC ship flyable, including the nomads and so on

Firstly - find the gunboat of your choice in the shiparch.ini ( i will use the kusari one - its my fave!!!)

Now copy and paste the WHOLE of its entry so you see this!!


Edited by - Chips on 10/31/2004 8:09:32 AM

Post Sat May 01, 2004 12:06 am

[Ship
ids_name = 237030
ids_info = 66564
nickname = ku_gunboat
msg_id_prefix = gcs_refer_shiparch_Kusg
mission_property = can_use_large_moors
LODranges = 0, 100, 300, 500, 3000
type = GUNBOAT
DA_archetype = ships\kusari\ku_gunship\ku_gunship.cmp
material_library = ships\kusari\ku_capships.mat
material_library = fx\envmapbasic.mat
envmap_material = envmapbasic
linear_drag = 1.000000
mass = 1000.000000
hold_size = 1000000
hit_pts = 100000
explosion_arch = explosion_instant
fuse = ku_gunship_body_fuse, 0.000000, 1
fuse = ku_gunship_burning_fuse01, 0.000000, 2250
fuse = ku_gunship_burning_fuse01, 0.000000, 1125
surface_hit_effects = 0, small_hull_hit_light01, small_hull_hit_light02, small_hull_hit_light03
surface_hit_effects = 150, small_hull_hit_medium01, small_hull_hit_medium02, small_hull_hit_medium03
surface_hit_effects = 300, small_hull_hit_heavy01, small_hull_hit_heavy02, small_hull_hit_heavy03
steering_torque = 60000000.000000, 60000000.000000, 60000000.000000
angular_drag = 120000000.000000, 120000000.000000, 120000000.000000
rotation_inertia = 16800000.000000, 16800000.000000, 16800000.000000
nudge_force = 150000.000000
HP_bay_surface = HpBayDoor01
HP_bay_external = HpBayDoor02
HP_tractor_source = HpTractor_Source
num_exhaust_nozzles = 2

[CollisionGroup
obj = ku_star_spike_lod1
separable = parent_impulse = 60.000000
child_impulse = 500.000000
fuse = ku_gunship_body_fuse, 0.000000, 1
dmg_hp = DpSpkmnt_starboard
dmg_obj = ku_gunboat_dmg_star_spike_cap
debris_type = cap_ship_piece
mass = 20.000000
hit_pts = 9000
root_health_proxy = true

[CollisionGroup
obj = ku_port_spike_lod1
separable = parent_impulse = 60.000000
child_impulse = 300.000000
fuse = ku_gunship_body_fuse, 0.000000, 1
dmg_hp = DpSpkMnt_Port
dmg_obj = ku_gunboat_dmg_port_spike_cap
debris_type = cap_ship_piece
mass = 20.000000
hit_pts = 9000
root_health_proxy = true

[CollisionGroup
obj = ku_port_wing_lod1
separable = parent_impulse = 60.000000
child_impulse = 600.000000
fuse = ku_gunship_body_fuse, 0.000000, 1
dmg_hp = DpWing_port
dmg_obj = ku_gunboat_dmg_port_wing_cap
debris_type = cap_ship_piece
mass = 20.000000
hit_pts = 9000
root_health_proxy = true

[CollisionGroup
obj = ku_star_wing_lod1
separable = parent_impulse = 60.000000
child_impulse = 500.000000
fuse = ku_gunship_body_fuse, 0.000000, 1
dmg_hp = DpWing_starboard
dmg_obj = ku_gunboat_dmg_star_wing_cap
debris_type = cap_ship_piece
mass = 20.000000
hit_pts = 9000
root_health_proxy = true

[CollisionGroup
obj = ku_port_eng_lod1
separable = parent_impulse = 60.000000
child_impulse = 30.000000
fuse = ku_gunship_body_fuse, 0.000000, 1
dmg_hp = DpEng_port
dmg_obj = ku_gunboat_dmg_port_eng_cap
debris_type = debris_vanish
mass = 20.000000
hit_pts = 9000
root_health_proxy = true

[CollisionGroup
obj = ku_star_eng_lod1
separable = parent_impulse = 60.000000
child_impulse = 30.000000
fuse = ku_gunship_body_fuse, 0.000000, 1
dmg_hp = DpEng_starboard
dmg_obj = ku_gunboat_dmg_star_eng_cap
debris_type = debris_vanish
mass = 20.000000
hit_pts = 9000
root_health_proxy = true

[CollisionGroup
obj = ku_cntrltwr_lod1
separable = parent_impulse = 60.000000
child_impulse = 30.000000
debris_type = debris_vanish
fuse = ku_gunship_body_fuse, 0.000000, 1
dmg_hp = DpCntrltwr
dmg_obj = ku_gunboat_dmg_tower_cap
mass = 20.000000
hit_pts = 9000
root_health_proxy = true

[CollisionGroup
obj = ku_frnt_port_lod1
separable = parent_impulse = 10.000000
child_impulse = 3000.000000
debris_type = cap_ship_piece
fuse = ku_gunship_body_fuse, 0.000000, 1
group_dmg_hp = DpFrnt
group_dmg_obj = ku_gunboat_dmg_front_cap
mass = 200.000000
hit_pts = 9000
root_health_proxy = true

Now after this - you need to change some stuff.
First - change the nickname (mygunboat will do)

Then put in shipclass after that :
shipclass = 0

Then change the mision property like this:
mission_property = can_use_berths

Change the type:
type = FREIGHTER

add these two lines below the nudge force (otherwise it don't steer correctly!!)
strafe_force = 20000
strafe_power_usage = 2

Now you need a cockpit camera view!
cockpit = cockpits\kusari\mygunboat.ini
max_bank_angle = 15
camera_offset = 25, 85
camera_angular_acceleration = 0.050000
camera_horizontal_turn_angle = 23
camera_vertical_turn_up_angle = 5
camera_vertical_turn_down_angle = 30

(the cockpit = line (we will make our turret view later on!!)
Then you need some weapons - the best way is to look in the loadouts_special.ini and search for a kusari gunboat loadout.....oh - i found one for you!! Aint i nice!!

[Loadout
nickname = ku_gunboat
archetype = ku_gunboat
equip = ge_s_scanner_02
equip = infinite_power
equip = ge_s_tractor_01
equip = sfx_rumble_gunvessel
equip = ge_kg_engine_01
equip = ku_gunboat_turret01, HpTurret_K4_01 ;weapons mounts here!!
equip = ku_gunboat_turret01, HpTurret_K4_02
equip = ku_gunboat_turret01, HpTurret_K4_03
equip = ku_gunboat_forward_gun01, HpTurret_K5_01
equip = SlowMediumGreen, HpRunningLight01
equip = SlowMediumGreen, HpRunningLight02
equip = SlowMediumGreen, HpRunningLight03
equip = SlowMediumGreen, HpRunningLight04
equip = SlowMediumGreen, HpRunningLight05
equip = LargeWhiteSpecial, HpHeadLight01
cargo = commodity_H_fuel, 50

Now you notice it can take three turrets and 1 gun - so add those to your shiparch.ini for it - so you get the following!

hp_type = hp_turret_special_7, HpTurret_K4_01
hp_type = hp_turret_special_7, HpTurret_K4_02
hp_type = hp_turret_special_7, HpTurret_K4_03
hp_type = hp_gun_special_7, HpTurret_K5_01

You can copy and paste that in by the way....

That is your shiparch.ini sorted!! Save that off now and go to the goods.ini
There we will have to make a) a hull reference, and the package you get when you buy it (we will make it come with some guns!)
at the bottom of the goods.ini we make a package!

This is the hull forit

[Good
nickname = mygunboat
category = shiphull
ship = mygunboat
price = 1
ids_name = 237030
item_icon = Equipment\models\commodities\nn_icons\rh_freighter.3db
Then the package (what it has when you buy)

[Good
nickname = kugun_package
category = ship
hull = mygunboat
addon = ge_s_scanner_02, internal, 1
addon = infinite_power, internal, 1
addon = ge_s_tractor_01, internal, 1
addon = sfx_rumble_gunvessel
addon = ge_kg_engine_01, internal, 1
addon = te_gunboat_turret01, HpTurret_K4_01
addon = te_gunboat_turret01, HpTurret_K4_02
addon = te_gunboat_turret01, HpTurret_K4_03
addon = te_gunboat_turret01, HpTurret_K5_01
addon = SlowMediumGreen, HpRunningLight01, 1
addon = SlowMediumGreen, HpRunningLight02, 1
addon = SlowMediumGreen, HpRunningLight03, 1
addon = SlowMediumGreen, HpRunningLight04, 1
addon = SlowMediumGreen, HpRunningLight05, 1
addon = LargeWhiteSpecial, HpHeadLight01, 1

Notice that this is similar to the one in loadouts_special.ini?? We just make all things saying equip = to addon =
Make sure you also add the lines at the top there!
Oops - this is actually my own custom one - notice the gunturrets?? Use the same as the one from the package in loadouts_special.ini!! (see above and below!)

addon = ku_gunboat_turret01, HpTurret_K4_01
addon = ku_gunboat_forward_gun01, HpTurret_K5_01

Once you have your THREE turrets and one forward gun up in that package rather than my custom ones, then save it off again....


NOw open up your market_ships.ini and search for you base of choice (like manhatten) and then put in your ship (ie instead of lf for liberty fighter (patroit) make it say kugun_package

marketgood = lf_package, 1, -1, 1, 1, 0, 1, 1
will become
marketgood = kugun_package, 1, -1, 1, 1, 0, 1, 1
Notice that the package name and the ship name aren't the same!! this is important.......very important okay! Always make sure they are something_package.........hehe

Okay - now save that. What is left - oh yeah - our turret cam.

Okay - you saw the structure (directory structure) in your shiparch.ini? (look up again to see it)
cockpit = cockpits\kusari\mygunboat.ini
Well you need to create the mygunboat.ini in that folder (kusari folder)
Once you make the ini - put in the following spiel!

[Cockpit
mesh = cockpits\liberty\models\li_freighter_cockpit.cmp
int_brightness = 0.500000
head_turn = 30, 10

[CockpitCamera

[TurretCamera
tether = 0.000000, 20, 150 ;shows the camera dist from ship
yaw_rotate_speed = 2.000000
pitch_rotate_speed = 1.500000
accel_speed = 5


Notice my commented part there (don't add the comment!) that is cause if you make destroyers and battleships using the same method - you will have to change those values (can be as high as 200, 600!!!) The same applies for the line in the shiparch.ini saying camera_offset = 25, 85
The bigger your ships get - the bigger those values will need to be! (so you aint looking out from inside the damned ship!)
Okay - now you have got it all!! One gunship....
You can use the same method for making other capships flyable - but pay close attention to detail! Notice things like the names you use........basically follow the same method as above, but make sure you check correctly with the goods.ini (causes game to crash if wrong).

Now then.....
one last thing - the turret mounts you have there are specifying certain guns of the kusari navy - to change them - well, put in the names of the turrets from the weapons_equip.ini you wish for!

Enjoy flying the beastie - they are great fun!!

At the moment - it doesn't have a shield. To add a shield you need to add a shield link:
shield_link = bh_elite_shield01, HpMount, HpMount

Now this is on the HpMount that you will mount the shield - which is out infront of the ship. however, pick any hardpoint you like, a light mount of other such stuff will do for this part:
shield_link = bh_elite_shield01, HpMount, HpEngine02

Then add the type of shield and class of mount:
hp_type = hp_freighter_shield_special_9, HpEngine02
hp_type = hp_freighter_shield_special_8, HpEngine02
hp_type = hp_freighter_shield_special_7, HpEngine02
hp_type = hp_freighter_shield_special_6, HpEngine02
hp_type = hp_freighter_shield_special_5, HpEngine02
hp_type = hp_freighter_shield_special_4, HpEngine02
hp_type = hp_freighter_shield_special_3, HpEngine02
hp_type = hp_freighter_shield_special_2, HpEngine02
hp_type = hp_freighter_shield_special_1, HpEngine02

This will mean that it would mount up to class 9, but check that the hardpoint exists in the ships CMP file with UTF editor (I know that it does because it has 2 exhaust nozzles in shiparch.ini file - which means HpEngine01 and HpEngine02

Okay - the guns don't mount all classes at the moment
You could do that by doing this:
hp_type = hp_turret_special_10, HpTurret_K4_01, HpTurret_K4_02, HpTurret_K4_03, HpTurret_K5_01
hp_type = hp_turret_special_9, HpTurret_K4_01, HpTurret_K4_02, HpTurret_K4_03, HpTurret_K5_01
hp_type = hp_turret_special_8, HpTurret_K4_01, HpTurret_K4_02, HpTurret_K4_03, HpTurret_K5_01
hp_type = hp_turret_special_7, HpTurret_K4_01, HpTurret_K4_02, HpTurret_K4_03, HpTurret_K5_01
hp_type = hp_turret_special_6, HpTurret_K4_01, HpTurret_K4_02, HpTurret_K4_03, HpTurret_K5_01
hp_type = hp_turret_special_5, HpTurret_K4_01, HpTurret_K4_02, HpTurret_K4_03, HpTurret_K5_01
hp_type = hp_turret_special_4, HpTurret_K4_01, HpTurret_K4_02, HpTurret_K4_03, HpTurret_K5_01
hp_type = hp_turret_special_3, HpTurret_K4_01, HpTurret_K4_02, HpTurret_K4_03, HpTurret_K5_01
hp_type = hp_turret_special_2, HpTurret_K4_01, HpTurret_K4_02, HpTurret_K4_03, HpTurret_K5_01
hp_type = hp_turret_special_1, HpTurret_K4_01, HpTurret_K4_02, HpTurret_K4_03, HpTurret_K5_01

For nanobot and shield bat limits add this:
nanobot_limit = x
shield_battery_limit = x
Where x = whatever you like:
nanobot_limit = 73
shield_battery_limit = 73
or
nanobot_limit = 73000
shield_battery_limit = 73000

Have fun

Post Sat May 01, 2004 12:06 am

Reserved for possible future additions

Post Sat May 01, 2004 12:07 am

Ditto

Post Thu Apr 07, 2005 11:51 am

I kind of understand the cut and paste thing, but the **** i wana fly is the huge Freighters which are AI which are non fliable ( >>>DE0MO VERSON<<<< i have) to fliable the GATEWAY freighter , i dont know what the name of the freighter is but u see them always request to moor at the stations. Is there a way you could help me to do that for the DEMO verson?. thanks
-jason

Post Mon May 09, 2005 2:16 pm

I'm a genius, (IMHO) but i have the patience of de Flea
So if somebody could help me with the following ships, i'll post the names i want, in order of desperation:
nomad basic fighter, not found
junker csv (found one, can't get it to apply, will note it on the help)
The Donau ( that big ship that blows up first time off planet Manhattan) not found
maybe some others, but those for now

(beg to the billionth power)

somebody please devote some time to these and other ships available in the game,
that would totally rock. Exploding head out.


Blazer017:
cats land on feet, and toast buttered side down, so...strap toast butter up to a cats back and drop them.
They hover over the ground in a state of quatnum indecision. =D

Edited by - Blastocephalis on 5/10/2005 12:40:41 PM

Post Tue May 10, 2005 12:12 pm

The donau is simply a rhienland cruiser = rh_cruiser
Nomad Fighter = no_fighter

These might help you find the bits you are looking for!

Post Tue May 10, 2005 1:48 pm

ok, i've been tooling for another day, got the bugs and flmm junk worked out, found the csv and nomad and....can't find a rhineland cruiser...but thanks for telling me about the Donau, then again i shouldn't have expected it to be special

*condition reaches fatal stages*

................................................................................................
RIP
died of:blastocephalis
our poor poor boy

Blazer017:
cats land on feet, and toast buttered side down, so...strap toast butter up to a cats back and drop them.
They hover over the ground in a state of quatnum indecision. =D

Edited by - Blastocephalis on 5/10/2005 2:50:05 PM

Post Tue Mar 06, 2007 10:42 pm

Hi i have a question.I have many anti cheat protections on my server.When i try to fly a new ship it kicks me for cheating.How to allow ships i want?

Post Wed Mar 07, 2007 3:47 am

very likely the problem is not an anticheat but a wrong written hardpoint or a problem with some mounted equipment

Post Wed Mar 07, 2007 7:50 am

Well i tried to fly CSV with all the combinable equipment (Adv.Debilators).Then i launched to space.And it kicked me.I checked cheaters log and i was presented as a cheater.All the hardpoint are correct dont know the problem.

Post Wed Mar 07, 2007 9:33 am

Is your server hosted on the same PC as the client you are running? If not, you need to ensure that the same files you modified on the client side are the same as the server side.

Because if this is the case, the server side will show a ship as supposed to have certain hardpoints and equipment when the client side actually has something different. The server would pick this up as a cheat.

Requiem: A Total FL Conversion Mod .
http://mod.pff-clan.us

Post Wed Mar 07, 2007 11:14 am

My Server is hosted on my PC and my Mod was developed on my PC.I use that mod on my PC and on my server.I dont know how to fix this problem can anyone explain me in easy way ^^ .Thank you.

Post Thu Mar 08, 2007 4:32 am

without to know what exactly you did it will be very hard to find out whats wrong

Return to Freelancer Editing Tutorial Forum