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

Custom bullet (NOT missile!) projectiles ...

The general place to discuss MOD''ing Freelancer!

Post Sun May 15, 2005 4:00 pm

Custom bullet (NOT missile!) projectiles ...

I've been messing with this for about 25 hours now, and I am getting to the end of my patience rope here. Hopefully somebody is a little more seasoned than I with model files...

I am trying to make a few guns that use projectiles, like missiles do, but I cannot get them to work the way I want. I have made custom .3db files for a new torpedo, a howizter shell, and an autocannon shell; they all look fine as 3db's, sized appropriately, use textures, etc.
The torpedo .3db works great when I use it for a missile - it's going to be a fat anti-capship torp that is easily seen and hopefully not too hard to destroy (big and slow But watch out for impact!)
I can also get the heavy and light cannon shells to work with missile weapons - that is, weapons with motors and seekers - but then I try to make them work with regular ammo-based guns, and that is when my problem starts.

I have made about 20 different forms of this darn heavy blast cannon for the Hessians, using first a missile entry and removing some parts, adding others, and tweaking it.
Here's one that does everything I want it to -- except use the shell projectile :

[Explosion
nickname = fc_rh_gun02_mark01_explosion
effect = sp_doomsday_01_impact
lifetime = 0, 0
process = disappear
strength = 100
radius = 30
hull_damage = 1
energy_damage = 0
impulse = 133

[Munition
nickname = fc_rh_gun02_mark01_ammo
explosion_arch = fc_rh_gun02_mark01_explosion
hp_type = hp_gun
requires_ammo = true
hit_pts = 10
hull_damage = 1721
energy_damage = -1153
one_shot_sound = fire_mass_hvy01
munition_hit_effect = rh_plasma_02_impact
lifetime = 0.875
force_gun_ori = false
const_effect = rh_mine01
DA_archetype = equipment\models\sirex\Hvy_Shell.3db
material_library = equipment\models\ge_equip.mat
ids_name = 263946
ids_info = 264621
mass = 1
volume = 0.0833

[Gun
nickname = fc_rh_gun02_mark01
ids_name = 263943
ids_info = 264618
DA_archetype = equipment\models\weapons\li_cannon.cmp
material_library = equipment\models\li_equip.mat
HP_child = HPConnect
hit_pts = 3000
explosion_resistance = 1
debris_type = debris_normal
parent_impulse = 20
child_impulse = 80
volume = 0
mass = 10
hp_gun_type = hp_gun_special_6
damage_per_fire = 0
power_usage = 33
refire_delay = 1.5
muzzle_velocity = 2000
use_animation = Sc_fire
toughness = 100
flash_particle_name = ku_capgun_01_flash
flash_radius = 41
light_anim = l_gun01_flash
projectile_archetype = fc_rh_gun02_mark01_ammo
separation_explosion = sever_debris
auto_turret = false
turn_rate = 90
lootable = true
LODranges = 0, 100, 300, 500
- - - - - - - -
Now, this entry has the characteristics/stats I want for the gun (velocity, range, damage, flash, impact, damage (only hull), etc.) and it refers to the correct .3db file and .mat, but when I fire it, it fires just the rh_mine01 effect, no shell.

So I tried using a seeker, setting it to DUMB, and after some tweaking, I got it to do everything the first entry does AND use the shell .3db. Ok, you say, so what's the problem? The problem is this: every weapon that uses a seeker of any sort (at least the ones I have used/made) does not use the lead indicator (crosshairs, little cross, whatever you want to call it). They put the indicator right at the middle of the target, so whenever you're moving at a high velocity or when the target is (even worse when both ), you just can't aim the darned weapon! To try to fix this, I increased the velocity to 5000 m/s, which sort of helped - it traveled so fast that you did not really need the indicator. But it is still not very accurate, and the indicator would still be a big help.
Not to mention, putting a seeker on a weapon, whether it is set to LOCK or DUMB and regardless of the turn rate value, the info cards displays the velocity as 0 m/s and a turn rate of 100 - neither of which is true.

So. Does anyone maybe know what I can do to get this boomstick to work correctly? See something I left out or need to remove, have much experience with projectiles, anyone maybe made a gun like this one before and made it work?
I thank you for your time. Any help or recommendaitons very much appreciated

Ro9ue
_________________________________
"Do or do not. There is no try."
- Jedi Master Yoda

Post Sun May 15, 2005 4:41 pm

Here's the code I used for my 100mm Cannons from WOS B1. They work just fine. Just keep in mind a couple of things:

1. You must have a Motor, but the effect can be pointed towards an Effect with no FX, just showing the "shell". Very handy- unless your gun fires gigantic shells, you'll never see the shell otherwise.

2. Make your shells use DcDtOc textures, and make them glow a teeny bit, so that they'll show up against the starry sky better.

[Motor
nickname = one_hundred_mm_cannon_motor
lifetime = 0
accel = 0
delay = 0
;///////////////////////////////////////////////////////
[Explosion
nickname = one_hundred_mm_cannon_explosion
effect = one_hundred_mm_cannon_impact
lifetime = 0.000000, 0.000000
process = disappear
strength = 100
radius = 100
hull_damage = 50000
energy_damage = 0
impulse = 0
;///////////////////////////////////////////////////////
[Munition
nickname = one_hundred_mm_cannon_ammo
explosion_arch = one_hundred_mm_cannon_explosion
loot_appearance = ammo_crate
units_per_container = 1
hp_type = hp_gun
requires_ammo = true
hit_pts = 2
detonation_dist = 0
lifetime = 3
one_shot_sound = heavy_cannon
Motor = one_hundred_mm_cannon_motor
force_gun_ori = false
const_effect = one_hundred_mm_cannon_trail
HP_trail_parent = HPExhaust
seeker = DUMB
DA_archetype = equipment\models\weapons\rh_seeker_missile.3db
material_library = equipment\models\ge_equip.mat
ids_name = 0 ;GENERATESTRRES("100mm. Heavy Cannon Rounds"
ids_info = 0 ;GENERATEXMLRES("<xml></xml>"
mass = 0
volume = 1
LODranges = 0, 20, 60, 2500
[LOD
obj = Root
LODranges = 0, 2500
[LOD
obj = barrel
LODranges = 0, 2500
;///////////////////////////////////////////////////////
[Gun
nickname = one_hundred_mm_cannon
ids_name = 0 ;GENERATESTRRES("100mm. Heavy Cannon"
ids_info = 0 ;GENERATEXMLRES("<xml><RDL><PUSH/><TRA data="1" mask="1" def="-2"/><JUST loc="center"/><TEXT>100mm. Heavy Cannon</TEXT><PARA/><TEXT> </TEXT><PARA/><TRA data="0" mask="1" def="-1"/><JUST loc="left"/><TEXT>100mm. rifles are some of the largest weapons used in the world of Oceania. They are powerful enough to destroy even the heaviest ships with relative ease, but very few vessels have the special structural reinforcements needed to mount them.</TEXT><PARA/><POP/></RDL></xml>"
DA_archetype = equipment\models\argh\Argh_Battleship_Cannon.cmp
material_library = equipment\models\argh\Argh_Battleship_Cannon.cmp
HP_child = HPConnect
hit_pts = 6752
explosion_resistance = 0.001
debris_type = debris_normal
parent_impulse = 20
child_impulse = 80
volume = 0.000000
mass = 10
hp_gun_type = hp_turret_special_4
damage_per_fire = 0
power_usage = 0
refire_delay = 2
muzzle_velocity = 800
toughness = 58.700001
flash_particle_name = one_hundred_mm_cannon_flash
projectile_archetype = one_hundred_mm_cannon_ammo
dry_fire_sound = fire_dry
separation_explosion = sever_debris
auto_turret = true
turn_rate = 90
lootable = false
LODranges = 0, 2000

Edited by - Argh on 5/15/2005 5:43:42 PM

Post Sun May 15, 2005 5:15 pm

Ah, man! OK, thanks for the speedy reply, Argh, but I tried adjusting my gun to the way in your above post ... I can see the shells now, but since the gun uses the seeker, it still does not use the lead indicator. I'm guessing that your 100mm cannon is a base weapon, NPC usage, right? Or can players use it, too? Because I cannot get mine to work properly that way :-/
Thanks for the reply, but there must be something I am missing somewhere ...

Ro9ue
_________________________________
"Do or do not. There is no try."
- Jedi Master Yoda

Post Sun May 15, 2005 6:07 pm

Try commenting out the seeker line.

I used this in WOS B1 for players... there the messed-up lead indicator didn't matter so crucially.

The only other way I can think of to implement a true projectile weapon is by making a mine-launcher... that might work, but it'd be a royal pain server-side.

You might have to compromise, and make it not work right with a lead indicator, but give it a radius and detonation distance, so that players firing it will hit fairly often by just roughly leading their targets...

Post Sun May 15, 2005 6:25 pm

Hmm, alright. I guess if I bump up the veolcity to about 5km/s that ought to eliminate the need for a led indicator ... :p Though, at that speed, you cannot really see the projectiles anyway - they're gone in a fraction of a second. So maybe I don't need to make bullet models in hte game, if you can't even see them.
But I wonder about a mine launcher ... do those even use the indicator?? Huh, never thought about that.

Well, actually, if I can ask one more thing, since I believe I remember seeing that you have worked with .dds format textures before, I was wondering how you save images (say, a .tga that I used for the torp and for a thruster model) as .dds. I have the option in Photoshop, but there are about 40 options and settings for just saving the thing! What format should a .dds that FL can use be in? And is Photoshop the best way to make these textures?

Er, and one last thing: once I have a .dds texture, I can import it into the 3db texture library as I would a .tga, right?

Thanks for your help, and I'll keep knocking away at this sucker

Ro9ue
_________________________________
"Do or do not. There is no try."
- Jedi Master Yoda

Dev

Post Sun May 15, 2005 7:11 pm

Due to issues with explosions not properly damaging capital ships, I redid the proton torpedo launchers in Tides of War to be ammo-using guns as opposed to true missiles. This is the code for the proton torpedo ammunition, which is not much different from the layout of typical weapons munitions:

[Munition
nickname = proton_torpedo_ammo
ids_name = 262194
ids_info = 1
loot_appearance = ammo_crate
units_per_container = 10
hp_type = hp_gun
requires_ammo = true <-------- expectedly, this is the key
hit_pts = 2
hull_damage = 160000
energy_damage = 0
one_shot_sound = fire_proton_torpedo
munition_hit_effect = explosion_ku_fighter
const_effect = proton_torpedo_proj
lifetime = 8
force_gun_ori = false
mass = 1
volume = 2

Choose whatever you want for const_effect; unlike with true missiles, you will be able to see both the vis_beam and vis_effect of the const_effect you choose (much like any other gun). Any gun that uses this ammunition will also provide a lead indicator as well. Also, be sure to add an appropriate entry in goods.ini so that you can actually see and buy ammunition for your gun.

Edit: The unfortunate thing here is that by attaching a .3db file to the munition, it has been my experience that the game will then treat the munition as a missile rather than a standard projectile. If you absolutely need to see the model then you will just have to live with missiles.

Edited by - Dev on 5/15/2005 8:15:01 PM

Post Sun May 15, 2005 10:20 pm

Ah, alright. I wonder why adding a physical projectile makes it a missile ... I guess DA never thought someone would be adding real ammo-based weapons, huh?
Well, as of right now, I can't play around with it too much - gotta get going on school mess that I've put off all weekend. And I have school in ... 6 hours. Woo, boy, this'll be fun. But once I have the time, maybe later this week or next, I will try making a foward facing mine launcher .. ? Don't know at all what to expect with that! But we'll see.
Thanks for the help and the replies, guys.
Oh, yeah, and Argh, do you know about .dds textures? Sorry to be a pest, but I know that you have used them before, and I was curious how to get textures that FL does not flip on me

Ro9ue
_________________________________
"Do or do not. There is no try."
- Jedi Master Yoda

Post Sun May 15, 2005 10:25 pm

Yeah, I know all about them. I've been helping AluminumHaste with his ship project this evening, and he said he'd make an improved ship-building tutorial... so I sent him screenies of my DDS Export Plugin settings. Which will (in a perfect world) result in new documentation for people wanting to make ships- Drizzt's Tutorial is a bit on the old side, and doesn't reflect current best methods very well.

Post Mon May 16, 2005 2:53 am

Ha, agreed on that one - Drzzt's tutorial was my beginner's panacea (built 3 ships using it) for a while, refered to it when making a bunch of other stuff, but - yes there are a few slightly-outdated methods in there! I myself use several things I've discovered on my own that have greatly improved and hastened my nevertheless-still-limited ships building abilities

Ok, well, that'll work great, I think. I guess bakedpotato will post it on TLR when it's done?
Thanks again - I'm looking forward to seeing the tutorial! Will let you know of any changes in the gun situation.

Ro9ue
_________________________________
"Do or do not. There is no try."
- Jedi Master Yoda

Edited by - Ro9ue on 5/16/2005 3:56:50 AM

Post Sat May 21, 2005 11:32 am

I've got one more ship to do, and if I can do this one with hardly any help (I'm trying for transparent glass and glowing textures this time) then the tutorial is right behind it.

Return to Freelancer General Editing Forum