Author Topic: Create ballistic weapons  (Read 1702 times)

0 Members and 1 Guest are viewing this topic.

Offline MetalDestroyer

  • Starwars reborn!
  • 210
Create ballistic weapons
I don't know if there are a topic about it. With the help of the Wiki, I made a ballistic weapon. However, the weapon have just 1 bullet and no more. Why ?

Ships.tbl
Code: [Select]
$Name:                          GTF Perseus
$Short name:                    TFight2t-03
$Species:                       Terran
+Type:                          XSTR("Interceptor", 2981)
[...]
+Length: 17 m
+Gun Mounts: 2
+Missile Banks: 2

$POF file:                      fighter2t-03.pof
$Detail distance: (0, 180, 300, 1100)
$Show damage: YES
$Density:                       1
$Damp:                          0.15
$Rotdamp:                       0.35
$Max Velocity: 0.0, 0.0, 80.0                  ;; in x/y/z -- z only specified forward.  use special tokens for backward movement
$Rotation time: 3.3, 3.3, 3.3
$Rear Velocity: 0.0
$Forward accel: 2.0
$Forward decel: 1.5
$Slide accel: 0.0
$Slide decel: 0.0
$Expl inner rad: 25.0
$Expl outer rad: 75.0
$Expl damage: 25.0
$Expl blast: 1000.0
$Expl Propagates: NO                       ;; If set to Yes, then when the ship dies, the explosion propagates through it.
$Shockwave Speed: 95.0                                             ;; speed shockwave expands at, 0 means no shockwave
$Shockwave Model:                 f_shockwave.pof
$Allowed PBanks: ( "Subach HL-7" "Akheton SDG" "Morning Star" "Prometheus S" "Prometheus R" "UD-8 Kayser" "Gaitling" "GLaser Cannon" "RLaser Cannon" )
$Allowed Dogfight PBanks: ( "MorningStar D" "Prometheus D" "Maxim D" "Circe" "UD-D Kayser" "Gaitling" )
$Default PBanks: ( "Gaitling" "Gaitling" )
$PBank Capacity: ( 2000, 2000 )
$Allowed SBanks: ( "Rockeye"  "Tempest" "Harpoon" "Trebuchet" "Stiletto II" "Hornet" "Tornado" "Hornet#Weak" "EMP Adv." "TAG-A" "TAG-B" )
$Allowed Dogfight SBanks: ( "Tempest D" "Harpoon D"  "Tornado D" )
$Default SBanks: ( "Harpoon" "Hornet" )
$SBank Capacity: ( 40, 40 )
$Shields:                        350
$Shield Color: 100 100 255
$Power Output: 2.0
$Max Oclk Speed: 100.0
$Max Weapon Eng: 150.0
$Hitpoints:                      265
$Flags:                         ( "player_ship" "default_player_ship" "fighter" "in tech database" "ballistic primaries" )
$AI Class:                      Captain
[...]
$Subsystem:                     sensors,                        10,0.0
$Subsystem:                     communications, 10,0.0
$Subsystem:                     weapons,                        10,0.0
$Subsystem:                     navigation,                     10,0.0
$Subsystem:                     engine,                         35,0.0



Weapons.tbl
Code: [Select]
; ----------------------------------------------------------------------------------
; Gaitling (only available after nebula missions begin)
;
$Name:                                 Gaitling
+Title:                                XSTR("Gaitling (standard)", 3274)
+Description:
XSTR(
"Medium Energy Usage
Level 15 Hull Damage
Level 10 Shield Damage", 3275)
$end_multi_text
+Tech Title:    XSTR("Gaitling", 3276)
+Tech Anim:    Tech_GTW-5_Prometheus_S
+Tech Description:
XSTR(
"...", 3277)
$end_multi_text
$Model File: none
@Laser Bitmap: gaitling
@Laser Glow:    gaitling_glow
@Laser Color:    20, 150, 20
@Laser Color2:    20, 150, 20
@Laser Length: 5.0
@Laser Head Radius: 1.0
@Laser Tail Radius: 1.0
$Mass:                                 0.1
$Velocity:                             650.0                           ;; speed of the weapon (initially) -- may or may not change
$Fire Wait:                            0.10                            ;; in seconds
$Damage:                               60
$Arm time:        2 ;; time before the weapon comes hot
$Armor Factor: 0.8
$Shield Factor: 0.8
$Subsystem Factor: 0.35
$Lifetime:                             2.0
$Energy Consumed: 0.5                            ;; Energy used when fired
$Cargo Size: 1.0                             ;; Amount of space taken up in weapon cargo
$Homing:                               NO
$LaunchSnd:                            78                              ;; The sound it makes when fired
$ImpactSnd:                            85                              ;; The sound it makes when it hits something
$Flags:                                ( "player allowed" "Ballistic" )
$Icon:                                 iconPromS
$Anim:                                 PromS
$Impact Explosion: none

 

Offline Wanderer

  • Wiki Warrior
  • 211
  • Mostly harmless
Re: Create ballistic weapons
There has usually been guidelines for using 1 as the PBank capacity, perhaps some current code change force this issue no matter what you write to the tables. Try setting lower $Cargo Size for your ballistic weapon, in this case 1/2000 = 0.0005.

EDIT: Though i could have sworn that i have used atleast 2 as PBank capacity with good results..
Do not meddle in the affairs of coders for they are soggy and hard to light

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: Create ballistic weapons
no i think capacitys cap at a thousand. i typically use ammo capacitys between 100 and 800 and they usually work. then i use a cargo capacity of about 0.1. so using a capacity of 800 and a cargo size of 0.1 you will get about 8000 rounds.

another thing you cant call it a gatling gun with only a fire wait of 0.1. my lowest fire wait is 0.008, or 125 rounds a second (i think some russian guns can do this). you need to use a fire rate of about 0.06 to equil the speed of the slowest modern gatling gun. also youre average freespace 2 weapon fires about as fast as a civil ware era gatling gun (depending on how fast you could crank). just a little gatling trivia for you. :D
« Last Edit: January 14, 2006, 04:15:32 pm by Nuke »
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 MetalDestroyer

  • Starwars reborn!
  • 210
Re: Create ballistic weapons
Thanks both of you. So, I put 1 into ships.tbl and 0.0005 for the cargo size. It works ^^. Now, I've just need a decent wav sample .

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: Create ballistic weapons
for sounds i got me a copy of sony's sound forge, and a gunshout sounnd of the net and sapmpeled it about a hundred times really fast. it sounds like a lawnmower hiting a rock, but it works.
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 Prophet

  • 210
  • The know-it-all
Re: Create ballistic weapons
...sounds like a lawnmower hiting a rock...
I do hate that sound so much.  :mad2:
I'm not saying anything. I did not say anything then and I'm not saying anything now. -Dukath
I am not breaking radio silence just cos' you lot got spooked by a dead flying ****ing cow. -Sergeant Harry Wells/Dog Soldiers


Prophet is walking in the deep dark places of the earth...

 

Offline MetalDestroyer

  • Starwars reborn!
  • 210
Re: Create ballistic weapons
Now, I intend to put a heat limitation but I don't know how to do that. My idea is to stop firing when the gaitling is to hot. The player have to wait X sec before refiring with normal (or correct) temperature.

 

Offline Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
Re: Create ballistic weapons
Make the ballistic weapon use energy also, and say that the energy bar represents the heat gauge.

 

Offline MetalDestroyer

  • Starwars reborn!
  • 210
Re: Create ballistic weapons
Make the ballistic weapon use energy also, and say that the energy bar represents the heat gauge.

If I use the Analog ammunition HUD flag from the Launcher, I've no heat (energy) indicator. I've just the amunition indicator instead. So it's hard to anticipate if weapons are ready to fire.

 

Offline Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
Re: Create ballistic weapons
That would be a bug.  Ballistic weapons were designed from the start to allow energy to be consumed in addition to ammunition.

Mantis this and assign it to WMC.

  

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Re: Create ballistic weapons
Actually it's the way it's designed - shouldn't be too hard to fix though, just remove all pure-energy weapon gauges, display one energy gauge and only display ballistic weapons' capacity.

Change is in CVS.
-C