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** Adding new targets to random missions

Here you find the different tutorials on editing and MODing Freelancer

Post Mon Jan 10, 2005 9:21 am

**TUTORIAL** Adding new targets to random missions

I`ve been asked to go through a tutorial on how to add new things to destroy in the random missions. I am new to writing tutarials so please bear with me, if there`s anything that i`ve left out please post back here and i`ll sort it out for you.
Right, ok.
I`m going to assume that this tutorial is for the more experienced modder and therefore you know how to add names to things and have at least a fair idea of which files fo what. If you aren`t too sure you will most likely have to read up the other tutorials..
The mission targets are chosen in \RandomMissions\KillableSolars.ini
Here is a typical entry, taken from SDK.
[KillableSolar
nickname = rm_r_battleship_rh_D23-D23
solar_type = Big_Solar <------ Just means its the main target
string_id = 6 <------ Linked to the name that you see
faction = rh_n_grp <------ The faction who you attack
archetype = rm_r_battleship <------ The details found in solararch.ini
loadout = rm_r_battleship_rh_01 <----- The loadout in loadout_special for ships
hitpoints = 50607, 50607 <------ This is how much of it has been built yet
difficulty = 18.458324, 18.458324 <----- The difficulty for the mission
pilot_choices = 1

[KillableSolar
nickname = rm_miningbase_small_rock_pi_D10
solar_type = Big_Solar
string_id = 10
faction = fc_c_grp, fc_ou_grp, fc_rh_grp, fc_bd_grp, fc_j_grp, fc_h_grp, fc_m_grp, fc_x_grp, fc_b_grp, fc_g_grp, fc_lh_grp, fc_u_grp, fc_gc_grp, fc_lwb_grp, fc_fa_grp, fc_lr_grp, fc_or_grp

Post Mon Jan 10, 2005 9:22 am

I have found that by modifying the difficulty and hit points setting you make it much more likely to see the targets. So its better to have..
hitpoints = 25607, 50607 <------ so it`ll be about half made to full
difficulty = 3.458324, 18.458324 <------The difficulty gets added to with weapon platforms to fit the mission.
So if you go through the file and get used to the typical entries, the only bit that isn`t too clear is the string_0 value which means these
string_id = 0 = weapon platform
string_id = 1 = weapon platforms
string_id = 2 = depot
string_id = 3 = Bretonia_Battleship
string_id = 4 = Kusari_Battleship
string_id = 5 = Liberty_Battleship
string_id = 6 = Rheinland_Battleship
string_id = 7 = Asteroid_Miner
string_id = 8 = space_mining arch/outpost
string_id = 9 = freeport arch/large spacestation
string_id = 10 = battle station
string_id = 11 = space police arch/observation post
To add new targets its similar to adding new faction`s names to the random missions. There`s a tutorial for that sround here too, but carrying on.
The entries that need to be made are in Offerbriberesources.dll, if you do a search in the lower right box for weapon platform some numbers should come up.
These ones, 329680,329780, 329880. There are some similar ones too as they have two entries for weapon platforms instead, this is an exception to rule and is just because weapon platforms need to be singular and plural.
The differences between them are weapon platforms are classed as defensive_solar wheras the other targets are Big_Solar. Its usually the big solar in the middle with an array of defensive ones around it.
Sorry i`m waffling a bit, i didn`t want to say "simply" and then not tell you why things work..
Ok, heres the list
329681,329781,329881 - string_0 - weapon platform
329682,329782,329882 - string_1 - weapon weapon platforms
329683,329783,329883 - string_2 - weapon depot
329684,329784,329884 - string_3 - weapon Bretonia_Battleship
329685,329785,329885 - string_4 - weapon Kusari_Battleship
329686,329786,329886 - string_5 - weapon Liberty_Battleship
329687,329787,329887 - string_6 - weapon Rheinland_Battleship
329688,329788,329888 - string_7 - weapon Asteroid_Miner
329689,329789,329889 - string_8 - weapon outpost
329690,329790,329890 - string_9 - weapon large spacestation
329691,329791,329891 - string_10 - weapon battle station
329692,329792,329892 - string_11 - weapon observation post
Notice the pattern, if you were to add a new entry it would be
329693,329793,329893 - string_12 - "whatever"
The actual entries fit into the diaogue thats given when you are doing a destroy the base type mission.
They are -
329680 = weapon platform, 329780 = a weapon platform, 329880 = the weapon platform
So you know how to add to the names in thats the main bit. Its best if you back up any files that you haven`t for a while.

Post Mon Jan 10, 2005 9:22 am

So lets add a liberty cruiser taken form a mod i`m working on,
[KillableSolar
nickname = rm_Liberty_cruiser
solar_type = Big_Solar
string_id = 12
faction = li_n_grp
archetype = rm_l_cruiser <--------- got to add an entry in solar arch for this
loadout = rm_Liberty_Cruiser_Loadout <------- Needs to be a loadout_special
hitpoints = 18300, 39300
difficulty = 0.008324, 30.458324
pilot_choices = 1
I`m not entirely sure why, but the loadouts work for ships(although they are just solars) if you put them in the solar\loadouts.ini they might work too. I didn`t see the point in changing them as they worked, the loadouts for the other ones do need to be in solar\loadouts.ini.
Next step is to add the string. I`ve given it string_12
the entries will be
329693 = Liberty cruiser ,329793 = a Liberty cruiser,329893 = the liberty cruiser
In solar arch you have a look at the simar entries, namely the liberty dreadnaught.
[Solar
nickname=rm_l_dreadnought
ids_name=329685
ids_info=329685
type=MISSION_SATELLITE
DA_archetype=ships\liberty\li_dreadnought\li_dreadnought.cmp
material_library=ships\liberty\li_capships.mat
material_library=fx\envmapbasic.mat
envmap_material=envmapbasic
LODranges=0, 600, 800, 1000, 1500, 2000, 3000, 20000
surface_hit_effects=0, small_hull_hit
mass=100000
hold_size = 100000 <-------I`ve added this so i can add cargo to the loadouts
solar_radius=4000
shape_name=NAV_smallstation
hit_pts=63607 <-------The hit points in killablesolars is how much of this is made.
fuse=l_dreadnought_fuse, 0.5, 1
explosion_arch=explosion_rh_battleship
destructible=true

[CollisionGroup
obj=Leaf01_d1_lod1
separable=
parent_impulse=60
child_impulse=10
debris_type=cap_ship_piece
mass=10
fuse=l_dreadnought_fuse, 1, 500
hit_pts=50607
root_health_proxy=true <-------There are more than just one but you get the idea
So you need to copy the entry for the liberty cruiser from shiparch.ini to solar arch. We don`t need all of it, its not going to be moving so we need to take away the clutter.
[Solar
ids_name = 237031
ids_info = 66565
nickname = rm_l_cruiser
LODranges = 0, 200, 400, 600, 1000, 6000
type = MISSION_SATELLITE
DA_archetype = ships\liberty\li_cruiser\li_cruiser.cmp
material_library = ships\liberty\li_capships.mat
material_library = fx\envmapbasic.mat
envmap_material = envmapbasic
mass = 3500.000000
hold_size = 10000
hit_pts = 43300
surface_hit_effects=0, small_hull_hit
explosion_arch = explosion_instant
fuse = li_cruiser_body_fuse, 0.000000, 1
fuse = li_cruiser_burning_fuse01, 0.000000, 10825
fuse = li_cruiser_burning_fuse02, 0.000000, 5413

[CollisionGroup
obj = Li_cruiser_cntrltwr_lod1
separable = true
debris_type = debris_vanish
fuse = li_cruiser_body_fuse, 0.500000, 1
dmg_obj = l_cruiser_tower_cap
dmg_hp = DpCntrltwr
mass = 100.000000
parent_impulse = 10.000000
child_impulse = 10.000000
hit_pts = 43300
root_health_proxy = true

[CollisionGroup
obj = Li_cruiser_nose_lod1
separable = true
debris_type = cap_ship_piece <------ And all the other objects under the liberty cruiser entry for bits that blow up at the end. I`ve cut them of here..

Post Mon Jan 10, 2005 9:23 am

Ok, well thats most of it thankfully, you just need to check the loadout. Its probably best to make a spearate one to the one used in the game as it gives you more control. You can even add several entries for the same target like this.
[KillableSolar
nickname = rm_D1-D9_Liberty_cruiser
solar_type = Big_Solar
string_id = 12
faction = li_n_grp
archetype = rm_l_cruiser
loadout = rm_Liberty_Cruiser_Loadout01
hitpoints = 12300, 18300
difficulty = 0.008324, 4.458324
pilot_choices = 1

[KillableSolar
nickname = rm_D10-D14_Liberty_cruiser
solar_type = Big_Solar
string_id = 12
faction = li_n_grp
archetype = rm_l_cruiser
loadout = rm_Liberty_Cruiser_Loadout02
hitpoints = 19300, 29300
difficulty = 0.008324, 30.458324
pilot_choices = 1

[KillableSolar
nickname = rm_D15-D19_Liberty_cruiser
solar_type = Big_Solar
string_id = 12
faction = li_n_grp
archetype = rm_l_cruiser
loadout = rm_Liberty_Cruiser_Loadout03
hitpoints = 32300, 39300
difficulty = 31.008324, 50.458324
pilot_choices = 1
In the case of the liberty cruiser it would be pretty pointless with the original game as liberty is very low difficulty so you would never see the higher loadouts. But this is how you would do it.

Next loadouts_special.ini

[Loadout
nickname = li_n_li_cruiser
archetype = li_cruiser
equip = infinite_power
equip = ge_s_scanner_02
equip = ge_s_tractor_01
equip = ge_lc_engine_01
equip = sfx_rumble_cruiser
equip = li_cruiser_forward_gun01, HpWeapon01
equip = li_cruiser_turret01, HpTurret_L5_01
equip = li_cruiser_turret01, HpTurret_L5_02
equip = li_cruiser_missile_turret01, HpTurret_L5_03
equip = li_cruiser_missile_turret01, HpTurret_L5_04
equip = li_cruiser_turret01, HpTurret_L5_05
equip = li_cruiser_turret01, HpTurret_L5_06
equip = li_cruiser_turret01, HpTurret_L5_07
equip = armor_scale_0
equip = LargeWhiteSpecial, HpHeadLight01
equip = LargeWhiteSpecial, HpHeadLight02
equip = SlowLargeBlue, HpRunningLight03
equip = SlowLargeBlue, HpRunningLight06
equip = SlowLargeBlue, HpRunningLight08
equip = SlowLargeBlue, HpRunningLight09
[Loadout
nickname = rm_Liberty_Cruiser_Loadout01
archetype = li_cruiser
equip = infinite_power
equip = ge_s_scanner_02
equip = ge_s_tractor_01
equip = ge_lc_engine_01
equip = sfx_rumble_cruiser
equip = li_cruiser_forward_gun01, HpWeapon01
equip = li_cruiser_turret01, HpTurret_L5_01
equip = li_cruiser_turret01, HpTurret_L5_02
equip = li_cruiser_missile_turret01, HpTurret_L5_03
equip = li_cruiser_missile_turret01, HpTurret_L5_04
equip = li_cruiser_turret01, HpTurret_L5_05
equip = li_cruiser_turret01, HpTurret_L5_06
equip = li_cruiser_turret01, HpTurret_L5_07
equip = armor_scale_0
cargo = commodity_H_fuel, 50
equip = LargeWhiteSpecial, HpHeadLight01
equip = LargeWhiteSpecial, HpHeadLight02
equip = SlowLargeBlue, HpRunningLight03
equip = SlowLargeBlue, HpRunningLight06
equip = SlowLargeBlue, HpRunningLight08
equip = SlowLargeBlue, HpRunningLight09
Well, thats it. All done. You may want to go through some of the weapons on the capitals as they are very low. But thats entiretly up to you.
I think thats everything, I could go through a station if you would like but it is exactly the same as for the liberty cruiser. Except for where the loadout goes to.
I did find one quirk when i tried adding gunboats as defensive solrs so they would guard the base. It seemed to affect the rest of the string numbers, so that string 12 would come up as string 13. I`m not too sure why so consider this a work in progress and if anyone gets it perfect then just post on to here.
Well, if you do need any more input i regluarly check the TLR formuns and would be happy to help. Post here if you need anything. C ya.

Post Mon Jan 10, 2005 10:16 am

Nice tutorial, often gets overlooked that although many know how to do these things, that there are still plenty of people who do not know how! Outstanding effort

Actually, you should find the loadouts work regardless of which loadout file they are put into - be it solars, ships or anything else. The different names of the loadouts files was probabily to enable different devs to work on them, or to stop people getting confused during the construction etc. Therefore - plonk em anywhere you like afaik...

I have all my wrecks loadouts in the solars loadouts.ini file.......

Edited by - Chips on 1/10/2005 10:17:13 AM

Return to Freelancer Editing Tutorial Forum