Author Topic: Rapid Fire Weapons  (Read 2240 times)

0 Members and 1 Guest are viewing this topic.

Hi

I've been trying to make a rapid fire weapon for capital ships, kinda like the ones you see in battlestar galactica. So far I haven't had any luck with it as there is always a pause between shots. Can anyone give me a hint on how to do it, I know its possible because I have seen some freespace videos on youtube where ships have rapid fire weaponry.

 

Offline Fury

  • The Curmudgeon
  • 213
http://www.hard-light.net/wiki/index.php/Ai_profiles.tbl
http://www.hard-light.net/wiki/index.php/Ai.tbl

What you want is to do is to create custom AI profile with following flag enabled.
Code: [Select]
$don't insert random turret fire delay: YES

And in ai.tbl create custom AI class for large ships.
Code: [Select]
$Name: Largeship Captain
$accuracy: 0.5, 0.55, 0.6, 0.65, 0.7
$evasion: 10, 20, 30, 40, 50
$courage: 10, 20, 30, 40, 50
$patience: 10, 20, 30, 40, 50
$Friendly AI Fire Delay Scale: 1.0, 1.0, 1.0, 1.0, 1.0
$Hostile AI Fire Delay Scale: 1.0, 1.0, 1.0, 1.0, 1.0
The five values are difficulty levels from very easy to insane. So you could use 2.0, 1.75, 1.5, 1.25, 1.0 as an example of difficulty scaling.

Now, balancing it properly is another matter entirely. But with these, turrets will fire as fast as set in weapons.tbl or -wep.tbm. Note that turret AI does nothing, turrets use pilot AI.


Easier way to set it up is to use "same turret cooldown" flag in weapons.tbl.
http://www.hard-light.net/wiki/index.php/Weapons.tbl#.22same_turret_cooldown.22
The downside is that rate of fire is same regardless of difficulty level, so you can't have rof scaling based on difficulty level. This flag is most useful on weapons that have "huge" flag, as it makes balancing capital ship engagements that much easier.
« Last Edit: November 28, 2009, 06:15:33 am by Fury »

 

Offline Snail

  • SC 5
  • 214
  • Posts: ☂
Easier way to set it up is to use "same turret cooldown" flag in weapons.tbl.
http://www.hard-light.net/wiki/index.php/Weapons.tbl#.22same_turret_cooldown.22
The downside is that rate of fire is same regardless of difficulty level, so you can't have rof scaling based on difficulty level. This flag is most useful on weapons that have "huge" flag, as it makes balancing capital ship engagements that much easier.
I would personally go for "same turret cooldown" seems a lot easier than the alternative method.

 

Offline Dragon

  • Citation needed
  • 212
  • The sky is the limit.
Yes, it's easy and usefull, I've been using it since it was introduced, with great results.
Also, if you want to see something epic, try using it with flak cannons and Nighteyes' flak explosion (it should be in Hollywood effects beta package).
If you have good computer, you won't be disappointed with the results.
And of course, you can play on Insane, it makes even standard FS2 weapons to fire rapidy compared to other levels.
It also ups AI skill and removes boosts from player's fighter, so unless you're a very good pilot it may be too difficult.

 
Thanks for the replies, tried it out and it works perfectly (used "same turret cooldown").


 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
as for me i scripted a gatling turret feature. they fire in bursts so they can still have an adjustable delay. not only does it look really awesome, but it is just as scarey as an aaa beam or flak barrage.
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline Woolie Wool

  • 211
  • Fire main batteries
You don't need a script for that anymore, not with $Burst Shots and $Burst Delay.
16:46   Quanto   ****, a mosquito somehow managed to bite the side of my palm
16:46   Quanto   it itches like hell
16:46   Woolie   !8ball does Quanto have malaria
16:46   BotenAnna   Woolie: The outlook is good.
16:47   Quanto   D:

"did they use anesthetic when they removed your sense of humor or did you have to weep and struggle like a tiny baby"
--General Battuta

  

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
aye but that doesnt come with the scripted spinning barrels or the accelerating/decelerating fire rates which looks badass.
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN