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

Changing guns on a Largestation1

The general place to discuss MOD''ing Freelancer!

Post Sun Jul 17, 2005 9:57 pm

Changing guns on a Largestation1

Ok... I've been modding this game for a while now and thought I would go in and change the guns on one of my stations in one of my systems. I made some new entries into my weapons_equip.ini file using the type of gun already there for a template, just changing the projecile "look" and the refire rate etc. Then I went into the solars/loadouts.ini file and copied the loadout for "space_station" which is one of the loadouts suitable for a Largestation1, renamed it, put my modded guns in replacing the ones that were there, referenced the new station type in the sysytem's ini file, and went to play the game... As soon as an enemy came close to the station and the guns were about to fire I got a CTD. If I go back into the system's ini file and comment out the new loadout, then the station shoots (why I don't know, since there is no loadout in the code for it to shoot) at my enemies and there is no crash.

After that, I even went into the solars/solararch.ini file and created a reference to a whole new station type (copying the Largestation code etc...)featuring a reference to my new loadout and still got the same results... CDT when anyone came close enough for the station to fire at them. Did I miss some file? What do you have to do to change the guns on a Largestation1?

Post Mon Jul 18, 2005 4:23 am

Could you post the entry from both the system and weapon_equip? It sounds like you have two loadouts on the same thing.

Post Mon Jul 18, 2005 11:03 pm

Hi Mace...

Thank you for your interest and taking the time to take a look at my little problem. Here is the requested code from Solars/Loadouts.ini, my weapon_equip.ini, and the system ini file (JSG05.ini) I hope you can make sense of this:

;JSG Space station Loadout (used for Welcome Stations or other largestation1
;this causes a crash when enemies come close to my welcome station in JSG05, took out the
;loadout = reference in the station code and now no crash, but still shoots???

[Loadout
nickname = space_station_jsg ;was space_station code originally, changed jsg to last position because of crashes, was jsg_space_station but it didn't help.
equip = infinite_power
equip = sfx_rumble_station_large
equip = warlord_scanner ;ge_s_scanner_02
equip = jsg_Large_station_turret, HpTurret_S2_01
equip = jsg_Large_station_turret, HpTurret_S2_02
equip = jsg_Small_station_turret, HpTurret_S1_03
equip = jsg_Small_station_turret, HpTurret_S1_04
equip = jsg_Small_station_turret, HpTurret_S1_05
equip = jsg_Small_station_turret, HpTurret_S1_06
equip = jsg_Small_station_turret, HpTurret_S1_07
equip = jsg_Small_station_turret, HpTurret_S1_08
equip = jsg_Small_station_turret, HpTurret_S1_09
equip = jsg_Large_station_turret, HpTurret_S2_10
equip = jsg_Small_station_turret, HpTurret_S1_11
equip = jsg_Small_station_turret, HpTurret_S1_12
equip = jsg_Small_station_turret, HpTurret_S1_13
equip = jsg_Large_station_turret, HpTurret_S2_14
equip = jsg_Small_station_turret, HpTurret_S1_15
equip = jsg_Small_station_turret, HpTurret_S1_16
equip = jsg_Small_station_turret, HpTurret_S1_17
equip = jsg_Small_station_turret, HpTurret_S1_18
equip = SlowXLargeRed, Hp_RunningLight01
equip = SlowXLargeRed, Hp_RunningLight02
equip = SlowXLargeBlue, Hp_RunningLight03
equip = SlowXLargeBlue, Hp_RunningLight04
equip = SlowXLargeBlue, Hp_RunningLight05
equip = SlowXLargeBlue, Hp_RunningLight06
equip = SlowXLargeBlue, Hp_RunningLight07
equip = SlowXLargeBlue, Hp_RunningLight08
equip = SlowXLargeBlue, Hp_RunningLight09
equip = SlowXLargeBlue, Hp_RunningLight11
equip = SlowXLargeBlue, Hp_RunningLight12
equip = SlowXLargeBlue, Hp_RunningLight13
equip = SlowXLargeBlue, Hp_RunningLight14
equip = SlowXLargeBlue, Hp_RunningLight15
equip = SlowXLargeBlue, Hp_RunningLight16
equip = SlowXLargeBlue, Hp_RunningLight17
equip = SlowXLargeBlue, Hp_RunningLight20
equip = SlowXLargeRed, Hp_RunningLight21
equip = SlowXLargeRed, Hp_RunningLight22
equip = SlowXLargeRed, Hp_RunningLight33
equip = SlowXLargeRed, Hp_RunningLight34
equip = SlowXLargeRed, Hp_RunningLight35
equip = SlowXLargeRed, Hp_RunningLight36
equip = SlowXLargeRed, Hp_RunningLight37
equip = SlowXLargeRed, Hp_RunningLight38
equip = SlowXLargeRed, Hp_RunningLight39
equip = SlowXLargeRed, Hp_RunningLight40
equip = SlowXLargeRed, Hp_RunningLight42
equip = SlowXLargeRed, Hp_RunningLight43
equip = SlowXLargeRed, Hp_RunningLight44

;=======now the entryfrom my "myname"_weapon_equip.ini==========

;================JSG Largestation Turret=================

[Munition
nickname = jsg_large_station_turret_ammo
hp_type = hp_gun
requires_ammo = false
hit_pts = 2
hull_damage = 3000 ;300
energy_damage = 1500 ;150
weapon_type = W_Wonder01
one_shot_sound = fire_capship
const_effect = crusher_bolt03_proj ;experimental
munition_hit_effect = sp_destabilizer_03_impact ;experimental
;munition_hit_effect = br_mine02_blast25 ;li_capgun_01_impact
;const_effect = li_capgun_01_proj
lifetime = 2.000000 ;1.200000
force_gun_ori = false
mass = 1
volume = 0.000100

[Gun
nickname = jsg_large_station_turret
ids_name = 525184 ;263552
ids_info = 526184 ;264552
DA_archetype = equipment\models\turret\sp_turret02.cmp
material_library = equipment\models\sp_turret.mat
HP_child = HPConnect
hit_pts = 4800
explosion_resistance = 1.000000
debris_type = debris_turret_large
parent_impulse = 20
child_impulse = 80
volume = 50.000000
mass = 10
damage_per_fire = 0
power_usage = 0
refire_delay = 0.250000 ;0.500000
muzzle_velocity = 1000
toughness = 1.600000
flash_particle_name = li_capgun_01_flash
flash_radius = 15
light_anim = l_gun01_flash
projectile_archetype = jsg_large_station_turret_ammo
separation_explosion = sever_debris
auto_turret = true
turn_rate = 90
lootable = false

[LOD
obj = Root
LODranges = 0, 1700

[LOD
obj = barrel
LODranges = 0, 1200

;================JSGSmallstationTurret========================

[Munition
nickname = jsg_small_station_turret_ammo
hp_type = hp_gun
requires_ammo = false
hit_pts = 2
hull_damage = 3000 ;300
energy_damage = 1500 ;150
weapon_type = W_Wonder01
one_shot_sound = fire_capship
const_effect = crusher_bolt03_proj ;experimental
munition_hit_effect = sp_destabilizer_03_impact ;experimental
;munition_hit_effect = br_mine02_blast25 ;li_capgun_01_impact
;const_effect = li_capgun_01_proj
lifetime = 2.000000 ;1.200000
force_gun_ori = false
mass = 1
volume = 0.000100

[Gun
nickname = jsg_small_station_turret
ids_name = 525185 ;263551
ids_info = 526185 ;264551
DA_archetype = equipment\models\turret\sp_turret01.cmp
material_library = equipment\models\sp_turret.mat
HP_child = HPConnect
hit_pts = 4800
explosion_resistance = 1.000000
debris_type = debris_turret_large
parent_impulse = 20
child_impulse = 80
volume = 50.000000
mass = 10
damage_per_fire = 0
power_usage = 0
refire_delay = 0.500000
muzzle_velocity = 1000
toughness = 1.600000
flash_particle_name = li_capgun_01_flash
flash_radius = 15
light_anim = l_gun01_flash
projectile_archetype = jsg_small_station_turret_ammo
separation_explosion = sever_debris
auto_turret = true
turn_rate = 90
lootable = false

[LOD
obj = Root
LODranges = 0, 1700

[LOD
obj = barrel
LODranges = 0, 1200

;============JSG05 Welcome Station===============

[Object
nickname = JSG05_04 ;JSG05 Welcome Station
pos = 34714, 0, 15384
ids_name = 525169
ids_info = 526169 ;65713
behavior = NOTHING
pilot = pilot_solar_easy
dock_with = JSG05_04_Base
base = JSG05_04_Base
reputation = co_jsg_grp ;gd_z_grp
rotate = 0, 0, 0
archetype = largestation1 ;largestation_jsg
;loadout = space_station_jsg ;was space_station in data/solars/loadouts.ini use for largestation1 type stations
;added a new type to data/solar/solararch.ini (largestation_jsg)to see if this would solve crash with new loadout, but noooo!
difficulty_level = 1
space_costume = br_kaitlyn_head, br_kaitlyn_body
voice = pilot_f_leg_f01a
visit = 1

I left the comments in, but they do not affect the code. Presently, as you can see, I have the loadout commented out, yet the station shoots at enemies... Why?

Post Mon Jul 18, 2005 11:54 pm

... because the entries in the System have Loadouts referring to these things, one would think. The Loadouts in Solararch.ini do not seem to control anything- it's the Loadout called in the Systems that seems to actually specify what's being used. If nothing is specified, I think FL goes with the Loadout in Solararch.ini, but otherwise the System object's Loadout specifies this. Which would explain why the "impossible" is happening.

Now, as to the crashes...

Before deploying a custom weapon with custom FX, etc., which is confusing the issue somewhat (I'm not at home, so I can't look at the FL INIs and see what ALEs you're referring to there, so I'm going to assume that they're OK, even though that may be the problem here)... take all of that stuff out've your code, go back to the defaults... and use XML to put the name/description strings in (check out how this was done for Warriors of the Sky or Mephistopheles's mods if you need a template). For all we know, you have a bad DLL or a conflicting entry, etc., etc., etc.

In short... reduce the possible causes of this problem, and then... one piece at a time... put things back in by un-commenting them. I suspect that your Loadout's not being called right, or your custom weapon's referring to a bad FX, etc.- basically, you're having problems at one of these two areas. To get this sorted out, reduce your problem to just one issue, by taking out the customizations on the weapon - make the weapon identical to the original in all respects except for the name- and then check it. If it's still crashing, then it's a problem with how you're calling it.

I've done completely custom Stations before (again, go look at WOS, B1 in particular) and they work just fine... but you have to get all of the dependencies right (as with most things in FL) and I've found that calling ALEs is often not just a matter of getting their reference right, but also making sure that they're valid for a given task. Some ALEs need to be put in new FX "contexts" before they'll work, and some will not work for a given "context" no matter what you do with them

Post Tue Jul 19, 2005 5:00 am

Not sure if you have the warlord scanner added, as that wasn`t in the above post. I'd remove the modified guns and see what happens. Or, replace the new loadout with an existing one to help narrow down the problem.

Post Wed Jul 20, 2005 12:58 am

Hi you guys...

I don't think it's the effects, 'cause I use them on other guns without problems... same with the scanner. I will double check my DLL entries though, as I could always have failed to correct a number there or something equally boneheaded.

Good suggestion as to just using a stock loadout with my new name to check things out and then slowly add stuff. Strangely I did change the loadout for a trading post and the guns with no problems, so I must have blown something!

I'll get back to you...

Post Sun Jul 24, 2005 12:50 am

After several more days of futzing with it I still have the same problem. I tried taking the stock "space_station" loadout and renaming it and refrencing it and that worked, but as soon as I put cutom weapons in it, it crashes. I have gone over the weapon file many times and can see no anomalies that would cause this. Heck... I've been modding the weapons longer than anything else in Freelance (since 1 month after it first came out) so I am fairly confident that there is no error there to cause this.

Does anyone else have any ideas?

Post Sun Jul 24, 2005 12:57 am

What are these lines:

DA_archetype = equipment\models\turret\sp_turret01.cmp
material_library = equipment\models\sp_turret.mat

Are these a custom weapon CMP? It would appear so...

Post Mon Jul 25, 2005 1:31 am

Hi Argh...

That gun is the one originally referred to in the solars\loadouts.ini file for "space_station" when you look up the gun in the weapon_equip.ini file.

Why... did I err by using them? I'll double check.

Post Mon Jul 25, 2005 2:07 am

I was wondering because of the seperate MAT entry- most of the weapons are sharing common MATs. Might want to double-check that.

Post Tue Jul 26, 2005 11:36 pm

Hi again Argh...

Well, I went back over the mat files relative to the cmp files and they are ok. They are exactly the ones mentioned for several station types, though I think I could use others like Li_largestation_turret or Li_smallstation_turret with the accompanying mat and cmp files seeing as they appear to be the same size and all. I have tried renaming my loadout, making a new archtype, renaming the guns in the weapon file etc... all to no avail. It is still the same. If I comment out the loadout entirely in the system ini file, or make it say "space_station" then it doesn't crash and will shoot at my enemies. If I use mine, crashola!Again, I must mention I was successful with a modification of the guns on a trading post type station which worked well, uses similar guns, and which I may try to substitue into the ones for the Largestation1 when I get the time. Right now I am in nerdland trying to build out a new computer which is having its own series of small problems needing resolution.

Post Wed Jul 27, 2005 6:56 am

Whats with the W_Wonder01 weapon mod? Is that in the right place? It might have been left out..

Post Thu Jul 28, 2005 2:17 am

The W_wonder thing is a weapon type... You know instead of plasma or laser. This way I can use it on all my weapons and expect the same results... not that it matter much since the damage "multiplyer for different types of weapons are all over the lot... I just thought to make one type where it would be consistant against all types of shields. I have used it for a number of weapons, but since the original guns for a largestation1 did not have any weapon type, I took it out and tried it again... same results, CTD.

For instance, if you look at the weaponmoddb.ini the first one is a laser... it looks like this:

[WeaponType
nickname = W_Laser01
shield_mod = S_Graviton01, 0.800000
shield_mod = S_Graviton02, 0.800000
shield_mod = S_Graviton03, 0.800000
shield_mod = S_Molecular01, 1.000000
shield_mod = S_Molecular02, 1.000000
shield_mod = S_Molecular03, 1.000000
shield_mod = S_Positron01, 1.200000
shield_mod = S_Positron02, 1.200000
shield_mod = S_Positron03, 1.200000

This shows the "multiplyer" for the damage done to various types of shields. Note a laser is not very effective against graviton type shields, moreso against molecular shields, and most effective against positron shields. A .4 difference for worst to best effectiveness.

This is the one for my weapon type:

[WeaponType
nickname = W_Wonder01
shield_mod = S_Graviton01, 2.200000 ;1.200000 <==were previously set to this
shield_mod = S_Graviton02, 2.200000
shield_mod = S_Graviton03, 2.200000
shield_mod = S_Molecular01, 2.200000
shield_mod = S_Molecular02, 2.200000
shield_mod = S_Molecular03, 2.200000
shield_mod = S_Positron01, 2.200000
shield_mod = S_Positron02, 2.200000
shield_mod = S_Positron03, 2.200000

I recently upped the amount to see how much difference it would make, but you could make it anything you wanted withing reason I guess.

Return to Freelancer General Editing Forum