Important MessageYou are browsing the archived Lancers Reactor forums. You cannot register or login. |
Charging weapons?
The general place to discuss MOD''ing Freelancer!
11 posts
• Page 1 of 1
Take the Liberty capital ships. there little giant Diamonback style weapon. You know, when you start your cruise engines, you see the white globs being sucked into your engine. could you make it look like there being sucked into your gun? like a 5 second charge up time then have it fire?
I've looked at various ways to go about this, but... unfortunately, there aren't any really good ways, at least for player-usable weapons.
For weapons that only the AI can use, I've figured out a way to fake it, more or less. You can make "guns" that are of the same dimensions as the standard weapons (i.e., they have two polygons like the no_gun, but they have their hp_fire01 and other joints placed the same positions as your visible gun- easy enough to do with FL Model Cloner).
Anyhow... the invisible version should have a turning rate that's somewhat higher than the "real" gun, so that it gets into the appropriate cone faster (the cone sizes are described in Constants.ini btw- unfortunately, we can't define this per gun). Have the invisible gun have the flashy effect deploy (there are various ways to go about this, depending on what ALE we're talking about) and play a "charging up" sound that should last awhile... while firing a shot with lots of range but no damage and an invisible effect, and then the "real gun" will get to the position a few fractions of a second later.
Unfortunately, this is all just smoke and mirrors, of course. And more than occasionally, it'll look wrong.
Until we have some ways to customize ALE files and make new ones, we're also very limited as to what ALEs you can really get away with using. For some strange reasons, only certain ALEs can be used as gun FX and actually be drawn correctly. Hopefully Alcander will get around to describing that file format in greater detail so that we can poke around with new particle FX... and maybe even have particle FX be "playable" as gun FX. Right now, they aren't, unless you attach them to a "missile".
For weapons that only the AI can use, I've figured out a way to fake it, more or less. You can make "guns" that are of the same dimensions as the standard weapons (i.e., they have two polygons like the no_gun, but they have their hp_fire01 and other joints placed the same positions as your visible gun- easy enough to do with FL Model Cloner).
Anyhow... the invisible version should have a turning rate that's somewhat higher than the "real" gun, so that it gets into the appropriate cone faster (the cone sizes are described in Constants.ini btw- unfortunately, we can't define this per gun). Have the invisible gun have the flashy effect deploy (there are various ways to go about this, depending on what ALE we're talking about) and play a "charging up" sound that should last awhile... while firing a shot with lots of range but no damage and an invisible effect, and then the "real gun" will get to the position a few fractions of a second later.
Unfortunately, this is all just smoke and mirrors, of course. And more than occasionally, it'll look wrong.
Until we have some ways to customize ALE files and make new ones, we're also very limited as to what ALEs you can really get away with using. For some strange reasons, only certain ALEs can be used as gun FX and actually be drawn correctly. Hopefully Alcander will get around to describing that file format in greater detail so that we can poke around with new particle FX... and maybe even have particle FX be "playable" as gun FX. Right now, they aren't, unless you attach them to a "missile".
Smoke is quite easy to accomplish. Go download Warriors of the Sky, Beta 1, where I have a cannon for the Hovertanks that makes smoke and a big flash when fired. You could also, once again, have an invisible gun that fired a very short-lived "missile" (obviously an invisible one) that projected the rh_continuoussmoke.ale file as its "engine" (most "continuous" ALEs are eligible as missile engine FX).
As for having smoke go sideways... well, you could fake it with a dual-barrel weapon, I suppose. Unfortunately it's probably not going to look as cool as you'd like- we really need custom ALEs to do that sort've thing well, and thus far we can't make them. I'd really like to, trust me, but nobody who's good at hex-hacking has taken me up on the various things I want to do here, like making new projection-cubes for Material FX (i.e., we could have all sorts of colored highlights on ships instead of just white), new engine flames with all of the rainbow represented, new particle-effect explosion animations to replace the bitmapped ones, etc., etc., etc....
As for having smoke go sideways... well, you could fake it with a dual-barrel weapon, I suppose. Unfortunately it's probably not going to look as cool as you'd like- we really need custom ALEs to do that sort've thing well, and thus far we can't make them. I'd really like to, trust me, but nobody who's good at hex-hacking has taken me up on the various things I want to do here, like making new projection-cubes for Material FX (i.e., we could have all sorts of colored highlights on ships instead of just white), new engine flames with all of the rainbow represented, new particle-effect explosion animations to replace the bitmapped ones, etc., etc., etc....
Argh i was just thinking about that muzzle cone angle constant myself!if Alcander can make a cruise constant specific to engines why not muzzle cone to gun?
*and about 'recoil' i think that would be possible if we had the model animations decoded as well as thn's are,because all guns have an Sc_fire script that does nothing right now...but i am wondering if these animations are all stubs or if they actually work and it's just the use_animation part thats been broken.provided the mechanism actually works and they're just empty scripts,it should be possible to make an exporter for milkshape since it already has joint and animation tools(or rather,an integration of that feature to the cmp exporter).I have 'sucessfully' made a working bay door,but i could only do so by using the same node name for the baydoor part & it creates an error on flserver about not being able to map joints which increases server load dramatically.
edit:i just remembered,i got some 'charging' eyecandy by using a nomad projectile as the gun's flash effect,it made a nice looking spinning-spiral around the gun.not 'charging' behavior,but a neat effect even though it seemed to have an infinite lifetime once activated.
Edited by - Cold_Void on 7/13/2005 7:44:49 AM
*and about 'recoil' i think that would be possible if we had the model animations decoded as well as thn's are,because all guns have an Sc_fire script that does nothing right now...but i am wondering if these animations are all stubs or if they actually work and it's just the use_animation part thats been broken.provided the mechanism actually works and they're just empty scripts,it should be possible to make an exporter for milkshape since it already has joint and animation tools(or rather,an integration of that feature to the cmp exporter).I have 'sucessfully' made a working bay door,but i could only do so by using the same node name for the baydoor part & it creates an error on flserver about not being able to map joints which increases server load dramatically.
edit:i just remembered,i got some 'charging' eyecandy by using a nomad projectile as the gun's flash effect,it made a nice looking spinning-spiral around the gun.not 'charging' behavior,but a neat effect even though it seemed to have an infinite lifetime once activated.
Edited by - Cold_Void on 7/13/2005 7:44:49 AM
Ok, I'm coming up with different ideas as I go for some reason. Next Idea.
Gun housing. a gun that requires 2 hardpoints. HP 1 is a housing and hp2 is the gun if you try to fire the gun before hp1 is fully enabled it hits your own ship. so when you enable hp1 it opens up, revealing the gun. Sort of set it on a timer, so itll open up for a few secs than start to close again. for powerful weapons, like a gauss rifle. make it take like 30 secs to open up so you dont blow yourself up? haha. I could probably make a cool mod with all these ideas if i was good enough.
Gun housing. a gun that requires 2 hardpoints. HP 1 is a housing and hp2 is the gun if you try to fire the gun before hp1 is fully enabled it hits your own ship. so when you enable hp1 it opens up, revealing the gun. Sort of set it on a timer, so itll open up for a few secs than start to close again. for powerful weapons, like a gauss rifle. make it take like 30 secs to open up so you dont blow yourself up? haha. I could probably make a cool mod with all these ideas if i was good enough.
Set it up so that engine kill brings the player to a standstill and make it so the engine draws enough power to prevent your charging weapon from firing(so engine has to be off to fire). Your weapon would be a missile entry (non-seeking and no explosion entry) in code with a motor delay long enough for your charging animation to occur.
The charge animation would be in the {Gun} entry:
flash_particle_name = li_capgun_01_flash <-
flash_radius = 15
light_anim = l_gun01_flash <-
Make sure you set the starting velocity to zero:
muzzle_velocity = 66.699997 <-
The charge sound would be in the {Munition} entry:
one_shot_sound = fire_missile_regular <-
The delay set in the {Motor} entry:
delay = 0 <-
That should do it. Make the missile projectile invisible and don't forget to up the refire_delay.
The charge animation would be in the {Gun} entry:
flash_particle_name = li_capgun_01_flash <-
flash_radius = 15
light_anim = l_gun01_flash <-
Make sure you set the starting velocity to zero:
muzzle_velocity = 66.699997 <-
The charge sound would be in the {Munition} entry:
one_shot_sound = fire_missile_regular <-
The delay set in the {Motor} entry:
delay = 0 <-
That should do it. Make the missile projectile invisible and don't forget to up the refire_delay.
11 posts
• Page 1 of 1
Return to Freelancer General Editing Forum