Author Topic: Combining ballistic and energy primaries  (Read 3133 times)

0 Members and 2 Guests are viewing this topic.

Offline SF-Junky

  • 29
  • Bread can mold, what can you do?
Combining ballistic and energy primaries
Atm I am trying to add three ships (Falcon, Mustang Alpha and Atlas)and two ballistic primary weapons (M-83 and P-22) from the TVWP Demo to my WhatIf mod. But the ballistic primaries do not work with the FS1 era ships and the TVWP ships do not work with energy guns.

Just adding a $PBank Capacity: line to the FS1 era ships doesn't do it.

Is is actually possible at all to combine these two kinds of primaries within one fighter?

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: Combining ballistic and energy primaries
Yes, definitely.

 

Offline sigtau

  • 29
  • unfortunate technical art assclown
Re: Combining ballistic and energy primaries
The type of weapon is not the problem, it's just whether or not the ship supports the weapon in its table entry.

http://www.hard-light.net/wiki/index.php/Ships.tbl
Who uses forum signatures anymore?

 

Offline Solatar

  • 211
Re: Combining ballistic and energy primaries
You have to add "ballistic primaries" to the ship's flags (unless that's been changed).


 

Offline SF-Junky

  • 29
  • Bread can mold, what can you do?
Re: Combining ballistic and energy primaries
The "ballistic primaries" flag is no longer needed in 3.6.10. That's what I forgot to say before: I'm using 3.6.10 final.

As I said, I added a $PBank Capacity line and it doesn't seem to work. So what else do I have to do.

 

Offline Wanderer

  • Wiki Warrior
  • 211
  • Mostly harmless
Re: Combining ballistic and energy primaries
Did you mark the weapons themselves as 'ballistic'? Did you give the weapons the size and reload times?
Do not meddle in the affairs of coders for they are soggy and hard to light

 

Offline SF-Junky

  • 29
  • Bread can mold, what can you do?
Re: Combining ballistic and energy primaries
Yes, yes, of course. I just copied the entries over from the TVWP Demo weapons.tbl.

Code: [Select]
;----------------------------------------------------------------------------------
$Name: M-83
+Title: M-83 Machine Gun
+Description:
Standard Issue
Very High Fire Rate
Large Capacity Magazine
$end_multi_text
+Tech Title: M-83 Machine Gun
+Tech Anim: SD4
+Tech Description:
The Decker Corporation's M-83 is the most widely used successor to the M-72.  Improving upon the M-72 in almost every respect, the M-83 is reserved for experienced pilots who have proven their facility with the Lunar Republic's sensor technology.", -1)
$end_multi_text
$Model File: none
@Laser Bitmap: MG_02_particle
@Laser Glow: MG_Glow
@Laser Color: 250, 250, 0
@Laser Color2: 250, 0, 0
@Laser Length: 0.46
@Laser Head Radius: 0.67
@Laser Tail Radius: 0.67
$Mass: 0.0
$Velocity: 620.0
$Fire Wait: 0.053
$Damage: 2.1
$Blast Force: 0.04
$Inner Radius: 0.0
$Outer Radius: 0.0
$Shockwave Speed: 0
$Armor Factor: 1.0
$Shield Factor: 0.02
$Subsystem Factor: 0.3
$Lifetime: 1.2
$Energy Consumed: 0.0
$Cargo Size: 0.000322580645161290322580645161290323
$Homing: NO
$LaunchSnd: 123
$ImpactSnd: 120
$Rearm Rate: 5000.0
$Flags: ( "in tech database" "player allowed" "ballistic" "cycle"  )
$Trail:
 +Start Width: 0.085
 +End Width: 0.085
 +Start Alpha: 1.0
 +End Alpha: 0.0
 +Max Life: 0.06
 +Bitmap: MG_02_trail
$Icon: m83-1
$Anim: SD4
$Impact Explosion: none
$Fof: 0.2

;----------------------------------------------------------------------------------
$Name: P-22
+Title: P-22 Assault Rifle
+Description:
Standard Issue
Medium Fire Rate
Medium Capacity Magazine
$end_multi_text
+Tech Title: P-22 Assault Rifle
+Tech Anim: flail2
+Tech Description:
The P-22 is a modified variant of the P-16, boasting a higher projectile velocity and damage quotient at the cost of ammunition capacity and fighter compatibility.  While these disadvantages have prevented it from being as widely accepted as its predecessor, the P-22 nonetheless is an effective weapon in the hands of pilots who have learned to adapt their strategies accordingly.", -1)
$end_multi_text
$Model File: none
@Laser Bitmap: MG_04_particle
@Laser Glow: MG_Glow
@Laser Color: 0, 255, 100
@Laser Color2: 200, 0, 0
@Laser Length: 0.6
@Laser Head Radius: 0.88
@Laser Tail Radius: 0.88
$Mass: 0.1
$Velocity: 550.0
$Fire Wait: 0.175
$Damage: 11.4 ;;
$Blast Force: 0.2
$Inner Radius: 0.0
$Outer Radius: 0.0
$Shockwave Speed: 0
$Armor Factor: 1.1
$Shield Factor: 0.1
$Subsystem Factor: 0.25
$Lifetime: 2.0
$Energy Consumed: 0.0
$Cargo Size: 0.001333
$Homing: NO
$LaunchSnd: 125
$ImpactSnd: 120
$Rearm Rate: 800.0
$Flags: ( "in tech database" "player allowed" "ballistic" "cycle"  )
$Trail:
+Start Width: 0.115
+End Width: 0.115
+Start Alpha: 1.0
+End Alpha: 0.0
+Max Life: 0.07
+Bitmap: MG_04_trail
$Icon: p22-1
$Anim: flail2
$Impact Explosion: none
$Fof: 0.23

As I said, they are working with the ships I took from TVWP Demo. But vice versa energy guns like the ML-16 do not work with the Falcon, Mustang and Atlas.

 

Offline headdie

  • i don't use punctuation lol
  • 212
  • Lawful Neutral with a Chaotic outook
    • Skype
    • Twitter
    • Headdie on Deviant Art
Re: Combining ballistic and energy primaries
Yes, yes, of course. I just copied the entries over from the TVWP Demo weapons.tbl.

Code: [Select]
;----------------------------------------------------------------------------------
$Name: M-83
+Title: M-83 Machine Gun
+Description:
Standard Issue
Very High Fire Rate
Large Capacity Magazine
$end_multi_text
+Tech Title: M-83 Machine Gun
+Tech Anim: SD4
+Tech Description:
The Decker Corporation's M-83 is the most widely used successor to the M-72.  Improving upon the M-72 in almost every respect, the M-83 is reserved for experienced pilots who have proven their facility with the Lunar Republic's sensor technology.", -1)
$end_multi_text
$Model File: none
@Laser Bitmap: MG_02_particle
@Laser Glow: MG_Glow
@Laser Color: 250, 250, 0
@Laser Color2: 250, 0, 0
@Laser Length: 0.46
@Laser Head Radius: 0.67
@Laser Tail Radius: 0.67
$Mass: 0.0
$Velocity: 620.0
$Fire Wait: 0.053
$Damage: 2.1
$Blast Force: 0.04
$Inner Radius: 0.0
$Outer Radius: 0.0
$Shockwave Speed: 0
$Armor Factor: 1.0
$Shield Factor: 0.02
$Subsystem Factor: 0.3
$Lifetime: 1.2
$Energy Consumed: 0.0
$Cargo Size: 0.000322580645161290322580645161290323
$Homing: NO
$LaunchSnd: 123
$ImpactSnd: 120
$Rearm Rate: 5000.0
$Flags: ( "in tech database" "player allowed" "ballistic" "cycle"  )
$Trail:
 +Start Width: 0.085
 +End Width: 0.085
 +Start Alpha: 1.0
 +End Alpha: 0.0
 +Max Life: 0.06
 +Bitmap: MG_02_trail
$Icon: m83-1
$Anim: SD4
$Impact Explosion: none
$Fof: 0.2

;----------------------------------------------------------------------------------
$Name: P-22
+Title: P-22 Assault Rifle
+Description:
Standard Issue
Medium Fire Rate
Medium Capacity Magazine
$end_multi_text
+Tech Title: P-22 Assault Rifle
+Tech Anim: flail2
+Tech Description:
The P-22 is a modified variant of the P-16, boasting a higher projectile velocity and damage quotient at the cost of ammunition capacity and fighter compatibility.  While these disadvantages have prevented it from being as widely accepted as its predecessor, the P-22 nonetheless is an effective weapon in the hands of pilots who have learned to adapt their strategies accordingly.", -1)
$end_multi_text
$Model File: none
@Laser Bitmap: MG_04_particle
@Laser Glow: MG_Glow
@Laser Color: 0, 255, 100
@Laser Color2: 200, 0, 0
@Laser Length: 0.6
@Laser Head Radius: 0.88
@Laser Tail Radius: 0.88
$Mass: 0.1
$Velocity: 550.0
$Fire Wait: 0.175
$Damage: 11.4 ;;
$Blast Force: 0.2
$Inner Radius: 0.0
$Outer Radius: 0.0
$Shockwave Speed: 0
$Armor Factor: 1.1
$Shield Factor: 0.1
$Subsystem Factor: 0.25
$Lifetime: 2.0
$Energy Consumed: 0.0
$Cargo Size: 0.001333
$Homing: NO
$LaunchSnd: 125
$ImpactSnd: 120
$Rearm Rate: 800.0
$Flags: ( "in tech database" "player allowed" "ballistic" "cycle"  )
$Trail:
+Start Width: 0.115
+End Width: 0.115
+Start Alpha: 1.0
+End Alpha: 0.0
+Max Life: 0.07
+Bitmap: MG_04_trail
$Icon: p22-1
$Anim: flail2
$Impact Explosion: none
$Fof: 0.23

As I said, they are working with the ships I took from TVWP Demo. But vice versa energy guns like the ML-16 do not work with the Falcon, Mustang and Atlas.

could the issue be the length of the cargo string
$Cargo Size: 0.000322580645161290322580645161290323

the mod i am building looks like this
weapon table
Code: [Select]
$Name: LMG-Mauler
+Title: LMG-236 Mauler
+Description:
Standard Issue
Light Projectile Weapon
$end_multi_text
+Tech Description:
Standard Issue light machinegun for Terran Republic fighters.  Though its damage potential is low the weapon makes up for this with large ammo reserves
$end_multi_text
$Model File: none
@Laser Bitmap: newglo8
@Laser Glow: 2_laserglow03
@Laser Color: 210, 190, 0
@Laser Color2: 210, 190, 0
@Laser Length: 15.0
@Laser Head Radius: 1.0
@Laser Tail Radius: 1.0
$Mass: 0.2
$Velocity: 525.0 ;; speed of the weapon (initially) -- may or may not change
$Fire Wait: 0.125 ;; in seconds
$Damage: 12
$Armor Factor: 1.25
$Shield Factor: 0.5
$Subsystem Factor: 0.75
$Lifetime: 1.8
$Energy Consumed: 0.0 ;; Energy used when fired
$Cargo Size: 0.1 ;; Amount of space taken up in weapon cargo
$Homing: NO
$LaunchSnd: 162 ;; The sound it makes when fired
$ImpactSnd: 85 ;; The sound it makes when it hits something
$Rearm Rate: 20.0
$Flags: ( "stream" "player allowed" "ballistic" "in tech database" "Shudder" "same turret cooldown")
$Icon: icon_avenger
$Anim: avenger
$Impact Explosion: none
ships table looks liek this
Code: [Select]
$Name:                          MsF-16 M3 Tornado
$Short name:                    TFight2t-05
$Species:                       Terran
+Type:                          XSTR("Space Superiority", 2987)
+Maneuverability:               XSTR("Average", 2988)
+Armor:                         XSTR("Average", 2989)
+Manufacturer:                  XSTR("Tornado Systems", 2990)
+Description: XSTR(" ", 2991)
$end_multi_text
+Tech Description:
XSTR("Fleet Superiority / Escort / Patrol Fighter
MsF-16 M3 Tornado fleet superiority fighters have been the backbone of the terran fleet since 2376 a solid fighter capable of handling most missions, its biggest shortcoming is its inability to jump.

Terran Navy Command issues the following threat ratings
Fighters 6.27
Warships 3.14.
", 2992)
$end_multi_text
+Length: 16 m
+Gun Mounts: 6
+Missile Banks: 2
$POF file:                      fighter2t-05.pof
$Detail distance: (0, 180, 300, 1100)
$ND: 253 253 168
$Show damage: YES
$Density:                       1
$Damp:                          0.2
$Rotdamp:                       0.35
$Max Velocity: 0.0, 0.0, 85.0                  ;; in x/y/z -- z only specified forward.  use special tokens for backward movement
$Rotation time: 3.5, 3.5, 3.5
$Rear Velocity: 0.0
$Forward accel: 2.4
$Forward decel: 2.0
$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: 0.0                      ;; speed shockwave expands at, 0 means no shockwave
$Allowed PBanks: ( "LMG-Mauler" )
$Allowed Dogfight PBanks: (   )
$Default PBanks: ( "LMG-Mauler" "LMG-Mauler" )
$PBank Capacity: ( 600, 600 )
$Allowed SBanks: ( "HS-Sparrow" "RS-Homer" "CM-Torrent")
$Allowed Dogfight SBanks: (  )
$Default SBanks: ( "HS-Sparrow" "HS-Sparrow" "RS-Homer" )
$SBank Capacity: ( 6, 6, 6 )
$Shields:                       1500
$Shield Color: 100 100 255
$Power Output: 2.4
$Max Oclk Speed: 95.0
$Max Weapon Eng: 110.0
$Hitpoints:                     1500
$Flags:                         ( "player_ship" "default_player_ship" "fighter" "in tech database")

this combination makes for 6000 rounds which so far makes a reasonable amount but i am only two missions in so it might need expanding when you meet a good number of opponents bu i will sort that when I get there
Minister of Interstellar Affairs Sol Union - Retired
quote General Battuta - "FRED is canon!"
Contact me at [email protected]
My Release Thread, Old Release Thread, Celestial Objects Thread, My rubbish attempts at art

  

Offline SF-Junky

  • 29
  • Bread can mold, what can you do?
Re: Combining ballistic and energy primaries
could the issue be the length of the cargo string
$Cargo Size: 0.000322580645161290322580645161290323
I can only repeat myself: I copied the entries from the tables used in TVWP Demo where they work just perfectly. And the guns are working with the ships I took from TVWP Demo. They do not work with ships from FS1 and energy weapons do not work with the ships from TVWP Demo.

As for your own mod: Does your fighter equally use ballstic cannons AND energy guns we know from FS1 and FS2? Because that's what my primary concern is: Can I make a ship use those two kinds of weapons at the same time?

 

Offline Wanderer

  • Wiki Warrior
  • 211
  • Mostly harmless
Re: Combining ballistic and energy primaries
To the last question... Yes.

Run debug build and post the log (fs2_open.log).
Do not meddle in the affairs of coders for they are soggy and hard to light

 

Offline SF-Junky

  • 29
  • Bread can mold, what can you do?
Re: Combining ballistic and energy primaries
When I launch the mod with a debug build it says:

Code: [Select]
Warning: $Rearm Rate specified for non-ballistic primary M-83

File: Weapons.cpp
Line: 2595


Call stack:
------------------------------------------------------------------
    parse_weaponstbl()    weapon_init()    game_init()    game_main()    WinMain()    WinMainCRTStartup()    kernel32.dll 7c817077()
------------------------------------------------------------------

But as you can see above the M-83 is specified as a ballistic primary.

 

Offline Wanderer

  • Wiki Warrior
  • 211
  • Mostly harmless
Re: Combining ballistic and energy primaries
The log file might help a bit here... But couple of checks... Are you using modular tables? If so is the M-83 defined in more than one tbm?
Do not meddle in the affairs of coders for they are soggy and hard to light

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: Combining ballistic and energy primaries
could the issue be the length of the cargo string
$Cargo Size: 0.000322580645161290322580645161290323
I can only repeat myself: I copied the entries from the tables used in TVWP Demo where they work just perfectly. And the guns are working with the ships I took from TVWP Demo. They do not work with ships from FS1 and energy weapons do not work with the ships from TVWP Demo.

As for your own mod: Does your fighter equally use ballstic cannons AND energy guns we know from FS1 and FS2? Because that's what my primary concern is: Can I make a ship use those two kinds of weapons at the same time?

Almost all the ships in Steve-O's fighter pack (which War in Heaven uses) mix ballistic and energy weapons. However, they're all custom. Might want to look at those tables?

 

Offline SF-Junky

  • 29
  • Bread can mold, what can you do?
Re: Combining ballistic and energy primaries
The M-83 is defined in one .tbm, but that's just for tech descriptions. I'll post the log file tomorrow.

 

Offline SF-Junky

  • 29
  • Bread can mold, what can you do?
Re: Combining ballistic and energy primaries
Log...

[attachment deleted by Tolwyn]

 

Offline Wanderer

  • Wiki Warrior
  • 211
  • Mostly harmless
Re: Combining ballistic and energy primaries
Hmm... That didnt help... Yeah.. I think we might need to see the tables to fix this one
Do not meddle in the affairs of coders for they are soggy and hard to light

 

Offline Mad Bomber

  • Booooom
  • 210
Re: Combining ballistic and energy primaries
I don't think he actually changed the "Allowed PBanks" field on the respective fighters in the ship TBL to include any more weapons.
« Last Edit: August 23, 2009, 10:39:51 am by Mad Bomber »
"What the hell!? I've got a Snuffleupagus on my scanners! The Snuffleupagus is active!"

 

Offline SF-Junky

  • 29
  • Bread can mold, what can you do?
Re: Combining ballistic and energy primaries
I've just found out why the TVWP Demo ships couldn't use energy guns: Because the $Max Weapon Eng: was set to 0.0. Changed that e voila - it works.

Ballistic cannons now also work with every vessel. But I'm not aware of changing anything there. Odd...