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

How to make shots explode, without them being missiles?

The general place to discuss MOD''ing Freelancer!

Post Sat Jan 10, 2004 4:38 pm

How to make shots explode, without them being missiles?

Hi all,

I've been trying to make a weapon which fires an exploding shot. I don't want it to be firing a missile, rather a mega-energy weapon that fires an exploding ball of plasma. It's going to be hidden away on the Nansei Research Complex, and it's basically a mega-weapon for dealing with the bad guys in the hardest systems.


Now, I've managed to actually get it half working. I've mixed and matched elements from missile launchers and guns in the 'weapons_equip.ini' file, and I can get the shots to explode upon impact. However, and this is the BIG HOWEVER, the explosion doesn't actually do any damage. The shot itself does damage, but the explosion doesn't. (Incidentally, the mine explosions look really cool! It's worth adding them to weapons like the DIAMONDBACK, etc, just for the visual effect!)

Here's the section from my ini.file, I'd be very grateful if any of you Master Modders know where I'm going wrong.



[Explosion
nickname = kx_gun01_mark01_explosion
effect = pi_mine01_blast25
lifetime = 0.000000, 0.000000
process = disappear
strength = 100
radius = 1000
hull_damage = 2900.699997
energy_damage = 0
impulse = 0

[Munition
nickname = kx_gun01_mark01_ammo
explosion_arch = kx_gun01_mark01_explosion
hp_type = hp_gun
requires_ammo = false
hit_pts = 2000
hull_damage = 2901.40000
energy_damage = 0
weapon_type = W_Laser01
one_shot_sound = fire_photon5
detonation_dist = 1
const_effect = kx_laser_01_proj
lifetime = 2.4
force_gun_ori = false
mass = 1
volume = 0.000100

[Gun
nickname = kx_gun01_mark01
ids_name = 263914
ids_info = 264914
DA_archetype = equipment\models\weapons\li_laser_beam.cmp
material_library = equipment\models\li_equip.mat
HP_child = HPConnect
hit_pts = 2632
explosion_resistance = 1.000000
debris_type = debris_normal
parent_impulse = 20
child_impulse = 80
volume = 0.000000
mass = 10
hp_gun_type = hp_gun_special_5, hp_torpedo_special_1
damage_per_fire = 0
power_usage = 267.139999
refire_delay = 0.900000
muzzle_velocity = 1950
use_animation = Sc_fire
toughness = 6.700000
flash_particle_name = ku_photon_04_flash
flash_radius = 35
light_anim = l_gun01_flash
projectile_archetype = kx_gun01_mark01_ammo
separation_explosion = sever_debris
auto_turret = false
turn_rate = 90
lootable = true
LODranges = 0, 20, 60, 100

____________________________________________________________________


What I've already tried (and none of these worked):

- Removing the shot-damage lines, and just having explosion damage
- Messing with the 'Explosion' stats, such as strength, radius, and lifetime
- Looked for a tutorial on this in the Tutorial forum, there are none that cover this sadly

I HAVEN'T tried making it so the shot is just an unguided missile yet. Do you think it would be possible to substitute a 'weapon'_proj. for a missile model? Or will this cause mass crashes and other such horrors?

I appreciate any help you can give me,

Vype =)

Post Sat Jan 10, 2004 5:24 pm

Looks like you kind of mixed a missile launcher with a gun.
A Missile Launcher type weapon would have an entry for [Explosion where a gun don't.
Also if you were making a Missile type weapon you would need a entry for [Motor
So You don't need the [Explosion entry that you have in your example.

EXAMPLE
[Munition
nickname = special_gun10_ammo
hp_type = hp_gun
requires_ammo = false
hit_pts = 2
hull_damage = 1075.800049 ;use 6 digits after the . or none, in your example there is only 5...
energy_damage = 0 ; This is the amount of shield damage. If set to 0 it automatically deals approximately half the amount for whatever hull_damage = is set to.
one_shot_sound = fire_tachyon5
munition_hit_effect = sp_distortion_01_impact
const_effect = sp_distortion_01_proj
lifetime = 1.166000
force_gun_ori = false
mass = 1
volume = 0.000100

[Gun
nickname = special_gun10
ids_name = 263545
ids_info = 264545
DA_archetype = equipment\models\weapons\co_proton_cooker.cmp
material_library = equipment\models\ge_equip.mat
HP_child = HPConnect
hit_pts = 6752
explosion_resistance = 1.000000
debris_type = debris_normal
parent_impulse = 20
child_impulse = 80
volume = 0.000000
mass = 10
hp_gun_type = hp_gun_special_10
damage_per_fire = 0
power_usage = 0.000000
refire_delay = 0.050000
muzzle_velocity = 1000.000000
use_animation = Sc_fire
toughness = 21.500000
flash_particle_name = sp_distortion_01_flash
flash_radius = 15
light_anim = l_gun01_flash
projectile_archetype = special_gun10_ammo
separation_explosion = sever_debris
auto_turret = false
turn_rate = 90
lootable = true
LODranges = 0, 20, 60, 100

Your Example Should Look like This
[Munition
nickname = kx_gun01_mark01_ammo
hp_type = hp_gun
requires_ammo = false
hit_pts = 2000
hull_damage = 3000
energy_damage = 0
one_shot_sound = fire_photon5
munition_hit_effect = sp_distortion_01_impact
const_effect = kx_laser_01_proj
lifetime = 2.400000
force_gun_ori = false
mass = 1
volume = 0.000100

Your Example Should Look Like This
[Gun
nickname = kx_gun01_mark01
ids_name = 263914
ids_info = 264914
DA_archetype = equipment\models\weapons\li_laser_beam.cmp
material_library = equipment\models\li_equip.mat
HP_child = HPConnect
hit_pts = 2632
explosion_resistance = 1.000000
debris_type = debris_normal
parent_impulse = 20
child_impulse = 80
volume = 0.000000
mass = 10
hp_gun_type = hp_gun_special_10
damage_per_fire = 0
power_usage = 267.139999
refire_delay = 0.900000
muzzle_velocity = 1950
use_animation = Sc_fire
toughness = 6.700000
flash_particle_name = ku_photon_04_flash
flash_radius = 35
light_anim = l_gun01_flash
projectile_archetype = kx_gun01_mark01_ammo
separation_explosion = sever_debris
auto_turret = false
turn_rate = 90
lootable = true
LODranges = 0, 20, 60, 100


"The past has its own codes and customs."
Sócrates (470 - 399 BC); Greek philosopher.

Post Sat Jan 10, 2004 6:35 pm

Thanks for the reply - but you've misunderstood my problem. =) I know how to make normal weapons, that's easy. I know that a Gun doesn't need an Explosion, by what I've done is deliberately added in the Explosion to the Gun entry.I wanted to see what would happen if one was added. What I'm trying to make is a weapon with an exploding shot, but one that isn't a missile. A hybrid of sorts.

The problem is that the Explosion is generated in the game (i.e the graphical effects appear) but the explosion does no damage. Only the shot itself does the damage. Apart from that, the gun works fine.


Like I said, the Explosion doesn't intefere with the normal operation of the gun at all, and it's actually a nice graphical effect. A similar thing would look great for DIAMONDBACK, IRON HAMMER, etc, and I'll add them later. My only problem is getting the explosion to actually do any damage, and I can't figure out why it's not doing any.


Vype =)

Post Sun Jan 11, 2004 3:41 pm

Wouldn't the explosion be the graphical display of the beam hit and is dependent on the target that is hit. That what parts are designed to brake apart when hit? The "Flash" is showing both the hit and that there is damage?

Kind of like putting a bottle on a wall and shooting it. The bullet representing the beam in a short duration when it hits, the "Explosion" is the glass pieces flying apart.

Finalday

"Revenge is a dish best served cold...and it is very cold...in Space...

Edited by - Finalday on 1/11/2004 3:44:35 PM

Post Sun Jan 11, 2004 5:19 pm

Maybe - I'm guessing that it's possible to do that by assigning the Explosion a "Shatter" tag instead of a "Disappear" tag in the .ini file. Still leaves me with my original problem though, which is getting the explosion to do any damage.

Post Mon Jan 12, 2004 12:29 am

this is what you need to edit for your gun

munition_hit_effect = sp_distortion_01_impact

It is an entry in [Munitions

just change the "sp_distortion_01_impact" to any explosion type you want or have declared in explosions.ini

that might solve your problem.

Anyway i have already tried it using in my NEMESIS level 10 Gun. I used the li_explosion configuration. Now whenever i hit a ship it explodes with a following shockwave effect.

All I do for LOVE

Post Mon Jan 12, 2004 3:07 am

I think you wanted to make a weapon what fires unguided projectiles like guns but does explosion damage on impact.
I have made such a gun a long time ago, and i encountered the same problems you have.
simply having [Explosion , [Munition and [Gun entries didnt work - no explosion damage at all - it all looked ok in game but didnt do any damage.
Still not sure why it didnt work - i'm quite familiar with all kind of modding and should have found an error if i made one.

Then I changed the concept - made a "unguided" missile with an explosion, that worked 100%.

It had one negative efect though - your aiming crosshair will always be right onthe target - more difficult to aim.

The gun I made was a low-refire - very high speed torp-mounted sniper with ~3k range and a nice explosion on impact - a good alternative to torps
It had the brit capship fire effects and the starkiller torp explosion (at least from the look, not fom damage).
It also used energy charges (ammo) and ship energy to balace it.

Fjord

---------------------------------
Excelcia forever
www.excelcia.org

Post Mon Jan 12, 2004 6:13 am

LordFjord has hit the nail right on the head. Stop trying to make a gun into a missile, and just use a missile instead. Make non-guidable, no turn rate etc etc -and then your explosion will do damage. Mind you - at 600m/s - you will be hard pushed to hit a damned thing.

Post Mon Jan 12, 2004 2:58 pm

Yeah, I thought it might have to be that in the end. I'll try Firebase's method first, and then try making it a missile instead if that doesn't work.

What 3D models can I use for the missile? I still want the gun to appear to be an energy weapon in-game. Is it possible to make a missile weapon use one of the 'WEAPON_PROJ's as a projectile instead of a missile model? If not, does Freelancer have any 3D models that look kinda like energy weapons that can be used in place of the missile models (e.g, could that 'spacial anomaly' model be used, or something similar)?

Post Mon Jan 12, 2004 5:43 pm

Check out my MOD... there is a file there called FBTWeaponPack.xml i have made two energy missiles and one torpedo there and look for the FBTEffects.xml too for my weapon effects effects.

All I do for LOVE

Post Mon Jan 12, 2004 5:46 pm

You can use any projectile u want. You can find a detailed list of all existing ones in the end of the weapon tutorial i made some time ago. (reminds me to update it and finally eliminate all ???s )
You can find it here.
http://klngarthur.com/forum/viewtopic.php?t=1549

---------------------------------
Excelcia forever
www.excelcia.org

Post Mon Jan 12, 2004 6:25 pm

Its been a long time since i've been here so i might be somewhat rusty but if memory serves, there is a radius setting within the explosion arch of missile types. Simply copy that radius setting and paste it into the munitions arch and change the parameters to whatever you wish.

Side note: I must remember to post the list of special weapons FX i've unearthed once i get back to my PC.

Edited by - Wanderer on 1/12/2004 6:36:28 PM

Post Mon Jan 12, 2004 6:33 pm

Cool, thanks a lot lads, that's helpful. So, I'm guessing that this would do the trick then:


[Motor
nickname = kx_gun01_mark01_motor
lifetime = 1.400000
accel = 1906.666702
delay = 0

[Explosion
nickname = kx_gun01_mark01_explosion
effect = pi_mine01_blast25
lifetime = 0.000000, 0.000000
process = disappear
strength = 100
radius = 750
hull_damage = 1109
energy_damage = 0
impulse = 0

[Munition
nickname = kx_gun01_mark01_ammo
explosion_arch = kx_gun01_mark01_explosion
loot_appearance = ammo_crate
units_per_container = 10
hp_type = hp_gun
requires_ammo = false
hit_pts = 2000
one_shot_sound = fire_photon5
detonation_dist = 4
lifetime = 6.250000
Motor = kx_gun01_mark01_motor
force_gun_ori = false
const_effect = kx_gun01_mark01_proj (Note: Weapon_Proj used instead of normal _drive effect )
HP_trail_parent = HPExhaust
seeker = LOCK
time_to_lock = 0
seeker_range = 1000
seeker_fov_deg = 35
max_angular_velocity = 2.903330
;DA_archetype = equipment\models\weapons\li_rad_missile.3db (see below )
;material_library = equipment\models\li_equip.mat
ids_name = 265146
ids_info = 266146
mass = 1
volume = 0.000000

[Gun
nickname = kx_gun01_mark01_rtc
ids_name = 263146
ids_info = 264146
DA_archetype = equipment\models\weapons\li_rad_launcher.cmp
material_library = equipment\models\li_equip.mat
HP_child = HPConnect
hit_pts = 400
explosion_resistance = 1.000000
debris_type = debris_normal
parent_impulse = 20
child_impulse = 80
volume = 0.000000
mass = 10
hp_gun_type = hp_gun_special_1
damage_per_fire = 0
power_usage = 0
refire_delay = 0.900000
muzzle_velocity = 1166.699997
toughness = 2.400000
projectile_archetype = kx_gun01_mark01_ammo
dry_fire_sound = fire_dry
separation_explosion = sever_debris
auto_turret = false
turn_rate = 90
lootable = true
LODranges = 0, 20, 60, 100





OK, I commented out these lines:

DA_archetype = equipment\models\weapons\li_rad_missile.3db
material_library = equipment\models\li_equip.mat


Can I do without these? I don't want to have the missile displayed. If this will cause the game to crash, it shouldn't be too much of a problem - I can probably make the BeamBolt head so big that it covers the missile anyway.

Post Mon Jan 12, 2004 6:38 pm

You really don't need that explosion arch either. You just need to move the radius into the munitions arch.

Post Mon Jan 12, 2004 8:48 pm

Will it work with the Explosion arch though? It might be 'clumsy', but if it works, it works. =)

Return to Freelancer General Editing Forum