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

Help! problem w/my custom cap ship not working as NPC for my

The general place to discuss MOD''ing Freelancer!

Post Thu Oct 11, 2007 8:49 am

Help! problem w/my custom cap ship not working as NPC for my

i've been working on a mod for the past month and a half. So far due to the very well written tutorials i've been able to figure out most of the problems i've experienced thus far. However, I am stumped on this one. I have created a custom CAPITAL ship for my mod and a faction to use it. The faction i created will only use ships already in existance (fighters only) ie "defender", "startracker". I will include a bit of code for each of my files and possibly some pics.

This is the zone and encounters from my system INI.

[EncounterParameters;--removed bracket
nickname = area_federation
filename = missions\encounters\area_federation.ini

[Zone
nickname = Zone_2
shape = SPHERE
pos = 280000, 0, -280000
size = 15000
music = music_Fd_Starbase
comment = Starbase1
sort = 1
toughness = 1
density = 12
repop_time = 10
max_battle_size = 8
pop_type = Fd_z_grp, base_cluster_law
relief_time = 10
faction_weight = Fd_z_grp, 19
density_restriction = 4, unlawfuls
encounter = area_federation, 19, 1.000000
faction = Fd_z_grp, 1.000000

This is the code from my npcships.ini file

[NPCShipArch
nickname = NPC_Sovreign_19
loadout = NPC_Sovreign_loadout01
level = d19
ship_archetype = EnterprizeE
pilot = battleship_default
state_graph = CRUISER
npc_class = lawful, class_battleship, d19

This is the code from faction_prop.ini

[FactionProps
affiliation = Fd_z_grp
legality = lawful
nickname_plurality = singular
msg_id_prefix = gcs_refer_faction_li_n
jump_preference = jumpgate
npc_ship = li_n_li_elite_d1-3
npc_ship = li_n_li_elite_d4
npc_ship = li_n_li_elite_d5
npc_ship = li_n_li_elite_d6
npc_ship = li_n_li_elite_d7
npc_ship = li_n_li_elite_d8
npc_ship = li_n_li_elite_d9
npc_ship = li_n_li_elite_d10
npc_ship = li_n_li_elite_d11-19
npc_ship = li_n_cruiser_d22
npc_ship = Liberty_Cruiser
npc_ship = Liberty_Battleship
npc_ship = NPC_Sovreign_19
voice = pilot_f_mil_m01
voice = pilot_f_mil_m02
voice = pilot_f_leg_f01
voice = pilot_f_leg_f01a
mc_costume = mc_li
space_costume = li_captain_head, li_male_elite_body, comm_ge_generic2
space_costume = li_rockford_head, li_male_elite_body, comm_li_hatcher
space_costume = li_sales_head_hat, li_male_elite_body, comm_ge_generic2
space_costume = ge_male4_head, li_male_elite_body, comm_li_hatcher
space_costume = pl_male2_head, li_male_elite_body, comm_ge_generic2
space_costume = ge_male3_head, li_male_elite_body, comm_li_hatcher
space_costume = li_newscaster_head_gen_hat, li_female_elite_body, comm_ge_generic2_female
space_costume = li_newscaster_head_gen_hat, li_female_elite_body, comm_li_hatcher_female
space_costume = br_newscaster_head_gen_hat, li_female_elite_body, comm_ge_generic2_female
space_costume = br_newscaster_head_gen_hat, li_female_elite_body, comm_li_hatcher_female
space_costume = pl_female2_head, li_female_elite_body, comm_ge_generic2_female
space_costume = pl_female2_head, li_female_elite_body, comm_li_hatcher_female
firstname_male = 226608, 226741
firstname_female = 226808, 226952
lastname = 227008, 227307
rank_desig = 197002, 197003, 197004, 6, 9
formation_desig = 197808, 197820
large_ship_desig = 196976
large_ship_names = 202608, 202647
formation = fighters, fighter_li_n
formation = freighters, freighter_guild
formation = freighters2, freighter2_guild
formation = cruisers, cruiser_wall
formation = battleships, battleship_wall

loadouts_special.ini

[Loadout
nickname = NPC_Sovreign_loadout01
archetype = EnterprizeE
equip = EnterprizeE_engine_01
equip = npc_shield03_mark10, HpShield01
equip = infinite_power
equip = ge_s_scanner_02,
equip = ge_s_tractor_01,
equip = ge_s_thruster_01, HpThruster01
equip = ge_s_thruster_01, HpThruster02
equip = Fd_Phaser, Hpturret01
equip = Fd_Phaser, Hpturret02
equip = Fd_Phaser, Hpturret03
equip = Fd_Phaser, Hpturret04
equip = Fd_Phaser, Hpturret05
equip = Fd_Phaser, Hpturret06
equip = LargeWhiteSpecial, HpHeadlight01
equip = SlowSmallBlue, HpRunningLight01
equip = SlowSmallBlue, HpRunningLight02
equip = SlowSmallBlue, HpRunningLight03
equip = SlowSmallBlue, HpRunningLight04
equip = contrail01, HpContrail01
equip = contrail01, HpContrail02
equip = DockingLightRedSmall, HpDockLight01
equip = DockingLightRedSmall, HpDockLight02

shiparch.ini, this one works because i fly it. Explosions look pretty decent too.

[Ship
ids_name = 122937
ids_info = 254008
ids_info1 = 254009
ids_info2 = 66608
ids_info3 = 254010
ship_class = 10
nickname = EnterprizeE
msg_id_prefix = gcs_refer_shiparch_Libhf
mission_property = can_use_berths
LODranges = 200, 750, 1500, 13000
type = CAPITAL
DA_archetype = ships\Federation\Enterprize\Enterprize-E.cmp
material_library = ships\Federation\Enterprize\Enterprize-E.mat
material_library = fx\envmapbasic.mat
envmap_material = envmapbasic
cockpit = cockpits\Federation\Sovriegn.ini
pilot_mesh = generic_pilot
nanobot_limit = 100
shield_battery_limit = 100
mass = 150.000000
hold_size = 100000
linear_drag = 1.000000
fuse = l_dreadnought_fuse, 0.500000, 1
fuse = li_dreadnought_burning_fuse03, 0.000000, 17325
max_bank_angle = 30
camera_offset = 15, 235
camera_angular_acceleration = 0.050000
camera_horizontal_turn_angle = 17
camera_vertical_turn_up_angle = 5
camera_vertical_turn_down_angle = 25
camera_turn_look_ahead_slerp_amount = 1.000000
hit_pts = 500000
explosion_arch = explosion_Fd_Starship
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 = 250000000.000000, 250000000.000000, 250000000.000000
rotation_inertia = 2540999936.000000, 25806999552.000000, 638700032.000000
angular_drag = 4000000000.000000, 4000000000.000000, 4000000000.000000
nudge_force = 2500000.000000
strafe_force = 3000000
bay_door_anim = Sc_open baydoor
bay_doors_open_snd = cargo_doors_open
bay_doors_close_snd = cargo_doors_close
HP_bay_surface = HpBayDoor01
HP_bay_external = HpBayDoor02
HP_tractor_source = HpTractor_Source
num_exhaust_nozzles = 2
shield_link = l_elite_shield01, HpMount01, HpShield01
hp_type = hp_elite_shield_special_10, HpShield01
hp_type = hp_elite_shield_special_9, HpShield01
hp_type = hp_elite_shield_special_8, HpShield01
hp_type = hp_elite_shield_special_7, HpShield01
hp_type = hp_elite_shield_special_6, HpShield01
hp_type = hp_elite_shield_special_5, HpShield01
hp_type = hp_elite_shield_special_4, HpShield01
hp_type = hp_elite_shield_special_3, HpShield01
hp_type = hp_elite_shield_special_2, HpShield01
hp_type = hp_elite_shield_special_1, HpShield01
hp_type = hp_thruster, HpThruster01, HpThruster02
hp_type = hp_turret_special_10, HpTurret01, HpTurret02, HpTurret03, HpTurret04, HpTurret05, HpTurret06
hp_type = hp_turret_special_9, HpTurret01, HpTurret02, HpTurret03, HpTurret04, HpTurret05, HpTurret06
hp_type = hp_turret_special_8, HpTurret01, HpTurret02, HpTurret03, HpTurret04, HpTurret05, HpTurret06
hp_type = hp_turret_special_7, HpTurret01, HpTurret02, HpTurret03, HpTurret04, HpTurret05, HpTurret06
hp_type = hp_turret_special_6, HpTurret01, HpTurret02, HpTurret03, HpTurret04, HpTurret05, HpTurret06
hp_type = hp_turret_special_5, HpTurret01, HpTurret02, HpTurret03, HpTurret04, HpTurret05, HpTurret06
hp_type = hp_turret_special_4, HpTu

Post Thu Oct 11, 2007 9:52 am

My guess would be that the problem is in the encounter file, missions\encounters\area_federation.ini (by the way, those slashes look backwards, but I don’t have the Freelancer files in front of my so I can’t confirm).

Anyway, in the encounter file the most likely error is probably using the wrong ship class value. If you’re not already aware, the value used in NPCships.ini is different from the one used in the encounter file. You can look in shipclasses.ini to find the equivalent value, something like "sc_battleship."

Hope that helps.

Post Thu Oct 11, 2007 10:05 am

Sorry part of my last message got cut off here is the rest.

[Ship
ids_name = 122937
ids_info = 254008
ids_info1 = 254009
ids_info2 = 66608
ids_info3 = 254010
ship_class = 10
nickname = EnterprizeE
msg_id_prefix = gcs_refer_shiparch_Libhf
mission_property = can_use_berths
LODranges = 200, 750, 1500, 13000
type = CAPITAL
DA_archetype = ships\Federation\Enterprize\Enterprize-E.cmp
material_library = ships\Federation\Enterprize\Enterprize-E.mat
material_library = fx\envmapbasic.mat
envmap_material = envmapbasic
cockpit = cockpits\Federation\Sovriegn.ini
pilot_mesh = generic_pilot
nanobot_limit = 100
shield_battery_limit = 100
mass = 150.000000
hold_size = 100000
linear_drag = 1.000000
fuse = l_dreadnought_fuse, 0.500000, 1
fuse = li_dreadnought_burning_fuse03, 0.000000, 17325
max_bank_angle = 30
camera_offset = 15, 235
camera_angular_acceleration = 0.050000
camera_horizontal_turn_angle = 17
camera_vertical_turn_up_angle = 5
camera_vertical_turn_down_angle = 25
camera_turn_look_ahead_slerp_amount = 1.000000
hit_pts = 500000
explosion_arch = explosion_Fd_Starship
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 = 250000000.000000, 250000000.000000, 250000000.000000
rotation_inertia = 2540999936.000000, 25806999552.000000, 638700032.000000
angular_drag = 4000000000.000000, 4000000000.000000, 4000000000.000000
nudge_force = 2500000.000000
strafe_force = 3000000
bay_door_anim = Sc_open baydoor
bay_doors_open_snd = cargo_doors_open
bay_doors_close_snd = cargo_doors_close
HP_bay_surface = HpBayDoor01
HP_bay_external = HpBayDoor02
HP_tractor_source = HpTractor_Source
num_exhaust_nozzles = 2
shield_link = l_elite_shield01, HpMount01, HpShield01
hp_type = hp_elite_shield_special_10, HpShield01
hp_type = hp_elite_shield_special_9, HpShield01
hp_type = hp_elite_shield_special_8, HpShield01
hp_type = hp_elite_shield_special_7, HpShield01
hp_type = hp_elite_shield_special_6, HpShield01
hp_type = hp_elite_shield_special_5, HpShield01
hp_type = hp_elite_shield_special_4, HpShield01
hp_type = hp_elite_shield_special_3, HpShield01
hp_type = hp_elite_shield_special_2, HpShield01
hp_type = hp_elite_shield_special_1, HpShield01
hp_type = hp_thruster, HpThruster01, HpThruster02
hp_type = hp_turret_special_10, HpTurret01, HpTurret02, HpTurret03, HpTurret04, HpTurret05, HpTurret06
hp_type = hp_turret_special_9, HpTurret01, HpTurret02, HpTurret03, HpTurret04, HpTurret05, HpTurret06
hp_type = hp_turret_special_8, HpTurret01, HpTurret02, HpTurret03, HpTurret04, HpTurret05, HpTurret06
hp_type = hp_turret_special_7, HpTurret01, HpTurret02, HpTurret03, HpTurret04, HpTurret05, HpTurret06
hp_type = hp_turret_special_6, HpTurret01, HpTurret02, HpTurret03, HpTurret04, HpTurret05, HpTurret06
hp_type = hp_turret_special_5, HpTurret01, HpTurret02, HpTurret03, HpTurret04, HpTurret05, HpTurret06
hp_type = hp_turret_special_4, HpTurret01, HpTurret02, HpTurret03, HpTurret04, HpTurret05, HpTurret06
hp_type = hp_turret_special_3, HpTurret01, HpTurret02, HpTurret03, HpTurret04, HpTurret05, HpTurret06
hp_type = hp_turret_special_2, HpTurret01, HpTurret02, HpTurret03, HpTurret04, HpTurret05, HpTurret06
hp_type = hp_turret_special_1, HpTurret01, HpTurret02, HpTurret03, HpTurret04, HpTurret05, HpTurret06
hp_type = hp_torpedo_special_1, HpTorpedo01, HpTorpedo02, HpTorpedo03
hp_type = hp_torpedo_special_2, HpTorpedo01, HpTorpedo02, HpTorpedo03

area_federation.ini, This is the encounter formation

[EncounterFormation
ship_by_class = 1, 1, sc_battleships
pilot_job = assault_leader_job
make_class = wanderer
ship_by_class = 2, 2, sc_destroyers
pilot_job = assault_job
make_class = wanderer
ship_by_class = 3, 3, sc_gunboats
pilot_job = assault_job
make_class = wanderer
formation_by_class = battleships
behavior = wander
arrival = cruise
allow_simultaneous_creation = yes
zone_creation_distance = 0
times_to_create = infinite

[Creation
permutation = 0, 3

shipclasses.ini

[ShipClass
nickname = sc_battleships
member = class_battleship

This is the code for formations.ini

[Formation
nickname = battleship_wall
pos = 0, 0, 0
pos = 400, 0, 0
pos = -400, 0, 0
pos = 0, 200, 0
pos = 400, 200, 0
pos = -400, 200, 0
pos = 400, 0, 0
pos = 400, 200, 0
pos = 0, -200, 0
pos = 400, -200, 0
pos = -400, -200, 0
pos = 400, -200, 0
pl_pos = 0, 0, 500

Any help at all that gets my faction to use the custom cap ship I will be very thankful. all who helped and will help will be put in the credits including the tutorial authors!

Post Thu Oct 11, 2007 11:48 am

Which slashes are backwards?

Post Thu Oct 11, 2007 12:08 pm

The file path “missions\encounters\area_federation.ini” uses backslashes. I though forward slashes were used to denote file paths, but as I said I don’t have a system.ini file to refer to right now.

Looking at the rest of the files you posted, I don’t see anything obviously wrong. I do see that your formation uses sc_gunboats and sc_destroyers though. If your faction doesn’t have ships of those classes might that be the problem? I believe that can cause the formation to not appear; however, I can’t say I know that for sure.


Edited by - YongeDevil on 10/11/2007 1:10:10 PM

Post Thu Oct 11, 2007 1:30 pm

i've tried doing it without them as well with no sucess. are there any other files i need to look into?

Do you think this could work?

[EncounterFormation
ship_by_class = 1, 1, sc_battleships
pilot_job = assault_leader_job
make_class = wanderer
formation_by_class = battleships
behavior = wander
arrival = cruise
allow_simultaneous_creation = yes
zone_creation_distance = 0
times_to_create = infinite

[Creation
permutation = 0, 3

Edited by - aching head on 10/11/2007 2:33:59 PM

Post Fri Oct 12, 2007 1:40 pm

Well I figured it out finally. I simply uninstalled Freelancer, restarted and reinstalled Freelancer, then copied all the SDK back to freelancer. I activated the mod then presto They are using my cap ship. BTW: I found out that the explosion is sort of corny when an NPC is destroyed. All ship components just rotate around a central axis until i dock or leave the zone. he he funny looking.
Edited by - aching head on 10/12/2007 2:47:18 PM

Post Fri Oct 12, 2007 1:49 pm

he he

Its kind of funny how i work 50 hours a week and still find the time to do this.
I'm just a little tired And I have a little headache

Return to Freelancer General Editing Forum