Flak Turrets implementation
-
I originally had that exact same issue you are describing robocop. But after much tweaking and unexpected side effects, the flak code that I posted works flawlessly for me. I have not had a single stuck flak bullet in a very, very long time.
-
Yeah, I’m using your code and finding the problems fixed. Thanks much.
Do you remember the formula offhand on how to figure out range of missiles? I know the muzzle velocity, lifetime of the motor, and the lifetime of the munition all factor in, but I don’t remember the details.
R
-
Well, classical physics should work fine normally
RANGE = MUZZLE_VELOCITY * LIFETIME + (ACCELERATION * MOTOR_LIFETIME ^ 2) / 2 + (MUZZLE_VELOCITY + ACCELERATION * MOTOR_LIFETIME) * (LIFETIME - MOTOR_LIFETIME)
That should work, although it may be possible to simplify it a bit ;D
-
I don’t know why, but i don’t get this effect to work. I wanted to modify the Battleship Flaks already implemented in the discovery mod, because they aren’t realy flakguns in my eyes. So i placed the gf_explosion_super_flak.ale in the fx/explosions folder and modified the entry in weapon_equip:
[Motor] nickname = li_battleship_flak_turret01_motor lifetime = 1 accel = 500 delay = 0 [Explosion] nickname = li_battleship_flak_turret01_explosion effect = li_flakcannon01_impact lifetime = 0.000000, 0.000000 process = disappear strength = 0 radius = 250 hull_damage = 750 energy_damage = 0 impulse = 50 [Munition] nickname = li_battleship_flak_turret01_ammo ids_name = 263383 explosion_arch = li_battleship_flak_turret01_explosion hp_type = hp_gun requires_ammo = false hit_pts = 1000000 one_shot_sound = null detonation_dist = 75 lifetime = 1 Motor = li_battleship_flak_turret01_motor force_gun_ori = false const_effect = li_flakcannon01_proj HP_trail_parent = HPExhaust seeker = DUMB time_to_lock = 0 DA_archetype = equipment\models\torpedoes\ge_torpedo.3db material_library = equipment\models\ge_equip.mat mass = 200 volume = 0.000100 [Gun] nickname = li_battleship_flak_turret01 ids_name = 263383 ids_info = 264383 DA_archetype = equipment\models\turret\li_turret04.cmp material_library = equipment\models\li_turret.mat HP_child = HPConnect hit_pts = 25000 explosion_resistance = 0.1 debris_type = debris_turret_small parent_impulse = 0 child_impulse = 0 volume = 16.000000 mass = 10 hp_gun_type = hp_turret_special_10 damage_per_fire = 0 power_usage = 170 refire_delay = 0.5 muzzle_velocity = 500 toughness = 10 light_anim = l_gun01_flash projectile_archetype = li_battleship_flak_turret01_ammo separation_explosion = sever_debris auto_turret = true turn_rate = 1000 lootable = true dispersion_angle = 18
the effects_explosion:
[Effect] nickname = li_flakcannon01_impact effect_type = EFT_EXPLOSION_SHIP vis_effect = gf_explosion_super_flak ;snd_effect = med_explosion1 snd_effect = flak_explosion_sound lgt_effect = elite_flash_to_red lgt_range_scale = 30 lgt_radius = 30
and the explosions_ale
[VisEffect] nickname = gf_explosion_super_flak alchemy = fx\explosions\gf_explosion_super_flak.ale effect_crc = 290209852 textures = fx\sarma.txm textures = fx\lightbeam.txm textures = fx\standardeffects.txm textures = fx\kioncannon.txm
The weapon has the new values, but the effect is just one small explosion, like it was before.
-
the effect is only one explosion, so there is nothing wrong there
use disperison_angle (or similar, cannot remember right now) and multiple fire hps to get a decent looking flak-explosion-screen
-
Might want to try
dispersion_angle = ……
and maybe
DA_archetype = equipment\models\weapons\br_auto_shotgun.cmp
material_library = equipment\models\br_equip.matwhich will give you a gun with 5 HpFire.
-
I have used dispersion_angel (last line in weapon_equip). But i can’t use another archetyp, because it is a optional modification. Or am i wrong, that the archetyp have to be the same for the people without the mod and those, which have the mod?
-
…… i suppose both (archetype + dispersion) have 2 be on the client
and should be on the server 2.Hit detection is usually done on the client (w0dk4 is the man 2 ask
)
and dispersion effects that.It’s a funny thing 4 ‘2nd hand weapons’ ;D
and 2.5 make it hard 2 hit anything. -
The mod will be on the server, but it must be an optional mod for the client, so i can’t use different archetyps. Robocop said on the last page, that he got it to work with Why485’s code, so i used it, too.
-
hit detection is done on client AND on the server side
it simply depends on which kind of hit detection you mean coz there are different kinds
-
I don’t mean any hit detection. I am wondering, why i see just one explosion, while i used the same code as Why485. This is, what i asked for.
-
I don’t mean any hit detection ……
… so dispersion and the numbers of HpFire effect that,
that was just an argument,
if you might need those changes client and/or server side.