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

Flak problems

The general place to discuss MOD''ing Freelancer!

Post Mon Jan 23, 2006 5:04 pm

Flak problems

Im trying to get the flak effect for a new turrent im making but this line of code doesnt seen to work:

detonation_dist = 25

Is this the right code to use, becuase i put in this line of code, but it still reqires me to accually hit the hull of the enemy ship.

I want it to detinate when it gets close to the ship, not right on it.

Also is there a accuracy setting, cause i want my turrent to be less accurate, so all the shot dont fall in exactly the same place. And is there an auto aim in FL if so how do i turn it off. ATM all i have to do i point the gun i the genral direction and AutoAim seems to snap onto enemys. I dont want this.

Godzero

Post Tue Jan 24, 2006 3:26 am

well, for one thing 25 FL units is a big detonation distance - to give you an idea of how big, one fighter is typically a few units wide/long, the radius from the explosion will have to be at least as large as the detonation distance.Also, the seeker_fov_deg and seeker_range may play an important role in detonation.You don't have to give your missiles any ability to turn or even motors with any more acceleration than absolutely necessary(dunno if you can use 0),but the missile will have to be a seeker type imo.

for accuracy, insert this in the {gun} section:
dispersion_angle = 0.5 to 5(a few degrees makes a big difference)

for removing 'autoaim' its simple:
auto_turret = false

Post Tue Jan 24, 2006 3:57 am

Thx for your help, but my auto aim is still on, and my gun is set to auto turrent = false. Also i thought that was just so specify if the turrent could be used by the AI?

Post Tue Jan 24, 2006 4:44 am

also still no luck with the detination distance or the accuratcy. Do i need a seeker or and eninge?
I didnt think i did cause its a gun no a missile.

Also is there a comand to tell it to detinate after traveling for a period of time?

Post Tue Jan 24, 2006 10:45 am

one more for dispersion_angle(i know dispersion_angle doesn't appear in any INI files,i found it in the exe or a dll i think,i guarantee that it does work and several people including Argh can confirm this):
force_gun_ori = true

auto_turret seems to control the way turrets respond in/out of turret mode afaik, but i've also heard you need it for NPC turret commands(meh)

post your entire gun code please and i will see what i can do - again,afaik you can't proximity-detonate a projectile it must be a missile - and of course,missiles have a lag issue if you fire lots of them very fast(even with no tracking)

Post Tue Jan 24, 2006 3:15 pm

Ahh so that why the flak effect wasnt working. God damm it.

and doesnt force gun oritaion = false, mean that the turrent can only look forward.

heres the code:

[Explosion
nickname = flakMgun_explosion
effect = flakMgun_impact
lifetime = 5, 5
process = disappear
strength = 10
radius = 50
hull_damage = 100
energy_damage = 0
impulse = 50

[Munition
nickname = flakMgun_ammo
explosion_arch = flakMgun_explosion
loot_appearance = ammo_crate
units_per_container = 100
hp_type = hp_gun
requires_ammo = True
hit_pts = 2
hull_damage = 100
energy_damage = 0
weapon_type = W_Laser01
one_shot_sound = fire_laser1
detonation_dist = 5
munition_hit_effect = flakMgun_impact
const_effect = flakMgun_proj
lifetime = 1
force_gun_ori = false
mass = 1
volume = 0.000100
ids_name = 265174
ids_info = 266174

[Gun
nickname = flakMgun
ids_name = 263358
ids_info = 264358
DA_archetype = equipment\models\weapons\li_auto_cannon.cmp
material_library = equipment\models\li_equip.mat
HP_child = HPConnect
hit_pts = 500
explosion_resistance = 1.000000
debris_type = debris_normal
parent_impulse = 20
child_impulse = 80
volume = 0.000000
mass = 10
hp_gun_type = hp_turret_special_1
damage_per_fire = 0
power_usage = 10
refire_delay = 0.10
muzzle_velocity = 750
use_animation = Sc_fire
toughness = 1.600000
flash_particle_name = pi_photon_01_flash
flash_radius = 10
light_anim = l_gun01_flash
projectile_archetype = flakMgun_ammo
separation_explosion = sever_debris
dispersion_angle = 0 to 10
auto_turret = flase
turn_rate = 60
lootable = true
LODranges = 0, 20, 40, 80, 100

Post Tue Jan 24, 2006 7:30 pm

Heh, I've managed to get flak to work by making a turret fire a mine. Here's the code:

[Explosion
nickname = flak_explosion
effect = explosion_flak
lifetime = 0.000000, 0.000000
process = disappear
strength = 100
radius = 22.5
hull_damage = 75
energy_damage = 0
impulse = 20

[Mine
nickname = flak_ammo
explosion_arch = flak_explosion
loot_appearance = ammo_crate
units_per_container = 1
hp_type = hp_gun
requires_ammo = true
hit_pts = 4
two_shot_sound = fire_flechette
detonation_dist = 20
lifetime = 0.75
force_gun_ori = false
const_effect = hiigaran_04_proj
HP_trail_parent = HPExhaust
seeker = LOCK
time_to_lock = 0
seeker_range = 750
seeker_fov_deg = 180
max_angular_velocity = 5.000000
DA_archetype = equipment\models\mines\br_plasma_mine.3db
material_library = equipment\models\br_equip.mat
ids_name = 1
ids_info = 1
mass = 1
volume = 0.000000
linear_drag = 0
top_speed = 3000
acceleration = 3000

[Gun
nickname = flak
ids_name = 1
ids_info = 1
;DA_archetype = equipment\models\weapons\li_cm_dropper01.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_turret_special_8
damage_per_fire = 0
power_usage = 0
refire_delay = 6
muzzle_velocity = 3000
toughness = 3.300000
projectile_archetype = flak_ammo
dry_fire_sound = fire_dry
separation_explosion = sever_debris
auto_turret = false
turn_rate = 0
lootable = true
LODranges = 0, 20, 60, 100


Just be sure to replace the effects and sounds to the ones you are using.

Post Tue Jan 24, 2006 8:19 pm

very nice work Arvis - of course the real test is firing a dozen of them rapidly in multiplayer.

GZ:
sorry heh,i see its not force_gun_ori that's messing up the dispersion - you'll notice that force_gun_ori is in the {Munition} section, by toggling this we disable the autoaim(which is fine tuned by MUZZLE_CONE_ANGLE in constants.ini) - to make a fixed gun turn_rate must be 0 and autoturret false

now,for whats obviously wrong:

dispersion_angle = 0 to 10 <-i meant a range of 0.1 - 5 is ideal,not put in "0 to 5"
auto_turret = flase<-typo

try arvis's solution,it certainly looks more promising than a missile type - but i have my reservations about mines and lag - if you want to continue with a regular munition/gun setup you'll have to rewrite it as a missile

Edited by - Cold_Void on 1/24/2006 8:23:13 PM

Post Wed Jan 25, 2006 11:59 am

The mine won't lag the game because it only exists for 0.73 seconds. That is definitely not long enough to cause lag in any measurable way.

Return to Freelancer General Editing Forum