Author Topic: Primary Weapons with Ammunition!!!  (Read 7388 times)

0 Members and 1 Guest are viewing this topic.

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Primary Weapons with Ammunition!!!
For real this time. :cool: I finally worked through all the code, sorted through all the bugs, and implemented ballistic primary weapons. :D

To make your own missions with ballistic primaries, make the following table changes:

Ships.tbl
--Add "ballistic primaries" to the fighter flags
--Add +Pbank Capacity: ( x, ... ) right after $Default Pbanks (in the same vein as for secondaries)

Weapons.tbl
--Add "ballistic" to the weapon flags
--Include $Rearm Rate: x immediately before $Flags (again, just like with secondaries)

Sounds.tbl
--In the Game Sounds section, copy entries 33 and 34 to spaces 165 and 166.  These will be the sounds for when the ballistic primaries rearm.  You may want to change them, or you may want to leave them the same sounds as for secondaries.  (I know, 165 and 166 aren't asthetically the best place to put them, but I wanted to make them conspicuous.  If someone wants to suggest a better location in the Game Sounds section, I'm all ears.)

That's it.  Here is a link (I tried an attachment, but it didn't work - yeah, I know, GeoCities :rolleyes: ) to the newest SCP build, as well as a sample mission with the required POF and TBL files so you can try it out. :)  Have fun shooting stuff, and press the 1 key to summon some dogfighting opponents.

Please note that the ETS system does not appear on your HUD, nor does the weapon energy gauge.  This is because your ship has neither shields nor weapon energy storage, and there's no point in modifying engine energy when the other two are not present.  I added this functionality because now we have the option of using energy-less primary weapons.  To bring back the ETS display, either enable shields or set Max Weapon Eng to a value greater than zero (or both).  To bring back the weapon energy gauge, just set Max Weapon Eng.

You'll also note that the primary weapon ammunition readouts spill over past the left side of their place in the HUD display.  Obviously, Volition didn't anticipate this SCP addition. :) I'll have to make a new weapon box that'll be shown on a ballistic-primary-enabled ship, big enough for 4 digits of ammo.  I'm thinking kinda like this...

Code: [Select]
        ________________
[WEAPONS]                \
|                        |
|                        |
|------------------------|
|                        |
|                        |
\________________________|


Once I make that (it should only take a short while in the Photoshop lab) I'll be able to implement it pretty quickly, I think.

Next job after this is the distance-from-subsystem SEXP.  Should be a piece of cake after this. :lol:

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
Primary Weapons with Ammunition!!!
if you figure out the hud,
there are a few things I'd like to do

this looks prety good, I am sure there are quite a few peole that will be made very happy by this
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Primary Weapons with Ammunition!!!
Temporary alternate download site

:yes: :yes: I imagine the TVWP and AP teams will find this useful, just to name a couple.
-C

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Primary Weapons with Ammunition!!!
Ooh, thanks for the mirror. :yes:

I'm eager to see what will come of this - imagine, a training mission where they introduce lasers and the ETS as "brand new technology". ;7

 

Offline Inquisitor

Primary Weapons with Ammunition!!!
Goober: Since youare taking a more active role on the team, I canget you the FTP stuff so you can upload things to the warpcore site.
No signature.

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Primary Weapons with Ammunition!!!
That'll be cool; thanks.  What things do you have in mind?

 

Offline Inquisitor

Primary Weapons with Ammunition!!!
Thing like built exes :)
No signature.

 

Offline Sesquipedalian

  • Atankharz'ythi
  • 211
Primary Weapons with Ammunition!!!
Good job, Goober!

Questions:

1) If we are copying entries 33 and 34, why not just code it to reference entries 33 and 34 in the first place???

2) Can we have weapons that use both energy and ammo?  The Maxim is what I particularly have in mind here, as it should always have been an ammuntion based weapon, but since it has always used energy I wouldn't want to change that, or it would throw off gameplay (as opposed to nicely enhancing it).
Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

The Scroll of Atankharzim | FS2 syntax highlighting

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Primary Weapons with Ammunition!!!
Quote
Originally posted by Inquisitor
Thing like built exes :)


Aha.  Good thinking. :)

Quote
Originally posted by Sesquipedalian
Good job, Goober!


Thanks. :)

Quote
Questions:

1) If we are copying entries 33 and 34, why not just code it to reference entries 33 and 34 in the first place???


Because someone may want to use a different sound for loading ballistic primaries.  Think of the sound a magazine makes when it's loaded - something like that.  By making ballistic primaries and conventional secondaries reference two different rearming sound sets, they will be able to sound different.  If people don't want the sounds to be different, they can simply copy the existing sound entries.

Quote
2) Can we have weapons that use both energy and ammo?  The Maxim is what I particularly have in mind here, as it should always have been an ammuntion based weapon, but since it has always used energy I wouldn't want to change that, or it would throw off gameplay (as opposed to nicely enhancing it).


Absolutely.  All primaries can still consume energy.  I even left a comment in the code saying that people may want to have ballistic primaries consume energy in addition to ammo - say, to simulate overheating if you fire it too rapidly.


Note to everyone on the subject of ammunition: Since machine guns and other primary weapons are conceptually different from missiles, here is what I had in mind for keeping track of ammo.  Set the Pbank Capacity for ballistic-enabled fighters to ( 1 ), or ( 1, 1 ).  Then set the primary weapon cargo size to the reciprocal of its total capacity.  In other words, if you need it to have 2000 rounds, set the size to .0005.

This puts the onus on the weapon designer for determination of ammo capacity, as opposed to the ship designer.  By having every ship have a Pbank Capacity of 1, you enforce consistency.  All ballistic primary weapons will come with a predetermined number of rounds (notice that the tech description of the M-72 says "Standard Issue - 2000 Rounds").  So you can have 10-round bazookas or 8000-round machine guns.

I was going to hard-code it this way, but I thought I'd leave it flexible so that modders could make their own judgement calls.  Thoughts?

 

Offline ZylonBane

  • The Infamous
  • 29
Primary Weapons with Ammunition!!!
Why do you keep using the word "ballistic" to describe this modification? In weapons terminology, ballistic just means "a projectile whose point of impact is determined by the direction and velocity with which it is launched". So FS2's primary weapons are already ballistic.
ZylonBane's opinions do not represent those of the management.

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Primary Weapons with Ammunition!!!
Because projectiles have mass, and existing FS2 primaries are energy based.

From your link:
Quote
Examples of ballistic projectiles include sling stones, arrows, and thrown spears in antiquity, and cannon balls, rifle and machine-gun bullets, and conventional artillery shells in modern times.

Do you suggest an alternative term?

 

Offline diamondgeezer

Primary Weapons with Ammunition!!!
Course he doesn't. He's ZylonBane. He's here to ***** and whine, and he does a damn good job of it to.

Go Zylon!

 

Offline Fetty

  • 27
Primary Weapons with Ammunition!!!
as far as i know ballistics also have to do with the projectile "riding" the air and gravity or something (never pay much attention to physics im affraid :nervous: )



erm dunno call it massdriver :) or "thing that goes bum very rapid"

 

Offline Inquisitor

Primary Weapons with Ammunition!!!
Ballistics is fine.

A projectile is a solid object. Solid objects have mass. Ballistics is the study of projectile motion.

;)

Come on, you people are all supposed to be budding physics afficianodos ;)

Make it really cool, and have them be affected by gravity :)
No signature.

 

Offline ZylonBane

  • The Infamous
  • 29
Primary Weapons with Ammunition!!!
Quote
Originally posted by Goober5000
Because projectiles have mass, and existing FS2 primaries are energy based.
Completely irrelevant. "Ballistic" refers to trajectory (specifically, an unpowered trajectory), not whether or not something has mass.

Don't see why this source code mod has to have a catchy name anyway. "Primaries use ammo" seems more than sufficient. But if you're going to just make up a meaning for an existing and well-defined word, why not go with something more snazzy, like "Nanotech Primaries" or "Electric Dance Boogaloo Primaries"?  :p
ZylonBane's opinions do not represent those of the management.

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Primary Weapons with Ammunition!!!
Quote
Originally posted by ZylonBane
Completely irrelevant. "Ballistic" refers to trajectory (specifically, an unpowered trajectory), not whether or not something has mass.


Your "ballistic" definition (from a book on ammunition) cited all kinds of things that had mass.

Quote
Don't see why this source code mod has to have a catchy name anyway. "Primaries use ammo" seems more than sufficient. But if you're going to just make up a meaning for an existing and well-defined word, why not go with something more snazzy, like "Nanotech Primaries" or "Electric Dance Boogaloo Primaries"?  :p


:wtf: Trolling is Z-26 STUPAD... :wtf:

This thread is called "Primary Weapons with Ammunition".  Ballistics is just a term I decided to use to enforce consistency.  It's concise, descriptive, and doesn't cause confusion with secondary weapons (whereas "ammo" might).

Just go with what Inquisitor said. :)

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
Primary Weapons with Ammunition!!!
Quote
Note to everyone on the subject of ammunition: Since machine guns and other primary weapons are conceptually different from missiles, here is what I had in mind for keeping track of ammo. Set the Pbank Capacity for ballistic-enabled fighters to ( 1 ), or ( 1, 1 ). Then set the primary weapon cargo size to the reciprocal of its total capacity. In other words, if you need it to have 2000 rounds, set the size to .0005.

This puts the onus on the weapon designer for determination of ammo capacity, as opposed to the ship designer. By having every ship have a Pbank Capacity of 1, you enforce consistency. All ballistic primary weapons will come with a predetermined number of rounds (notice that the tech description of the M-72 says "Standard Issue - 2000 Rounds"). So you can have 10-round bazookas or 8000-round machine guns.
quote]

why in the name of hades whould you want to do it like that, balencing would be better for ships if you could vary the amount of ammo they could store, it's like saying all ships should have the same secondary storage, it is obvious that some ships would have more storage than others. (wich is why you left us with the flexability to do it the way we see fit ;) )
could there be some sort of trade off for not useing the extra storage (not useing these types of weapons) like more weapon energy, maybe a per bank energy bonus that if that bank doesn't use "balistic" ( :D ) weapons it has the bonus added to the energy reserves
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Primary Weapons with Ammunition!!!
Quote
Originally posted by Bobboau
why would you want to do it like that, balancing would be better for ships if you could vary the amount of ammo they could store, it's like saying all ships should have the same secondary storage, it is obvious that some ships would have more storage than others. (which is why you left us with the flexibility to do it the way we see fit ;))


Because it's intrinsic to the weapon itself how much ammo to carry.  Say a rifle magazine holds nine bullets (I don't know, I'm guessing. ;))  If you mount a rifle on your Jeep, it's going to carry nine bullets, no matter how big your Jeep is.  If you want more ammo, you'll have to reload it with another nine-bullet magazine.  If you want to fire more bullets before reloading, you'll have to put a second rifle on your Jeep.  It's a weird analogy, but do you see what I'm saying?  Yeah, I left it flexible because I figured not everyone would want to do it that way, but I think it makes so much more sense for primaries to do it like that.

Quote
could there be some sort of trade off for not using the extra storage (not using these types of weapons) like more weapon energy, maybe a per bank energy bonus that if that bank doesn't use "ballistic" (:D) weapons it has the bonus added to the energy reserves


Eh, you'd need a particle accelerator to convert mass into energy, which would be far too much to put on a single fighter. ;)

 

Offline ZylonBane

  • The Infamous
  • 29
Primary Weapons with Ammunition!!!
Quote
Originally posted by Goober5000
Your "ballistic" definition (from a book on ammunition) cited all kinds of things that had mass.
Hello, McFly? Helllooo??? Energy-based non-beam weapons haven't been invented yet. Of course a book on real-world ammo is only going to cite examples with mass.

Where did you get the notion that mass made a difference to the definition anyway? A ballistic trajectory is a ballistic trajectory, no matter what the projectile. Anyway, FS2 primaries DO have mass. If they didn't, they'd travel at lightspeed.

Oh and BTW--

Quote
Because it's intrinsic to the weapon itself how much ammo to carry.
Well... no. In the real world, aircraft guns are mated with ammunition systems of widely varying capacities and delivery rates (as someone who spent 2 years as a weapons loader for the USAF, you might want to trust me on this one).
ZylonBane's opinions do not represent those of the management.

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Primary Weapons with Ammunition!!!
Quote
Originally posted by ZylonBane
Energy-based non-beam weapons haven't been invented yet. Of course a book on real-world ammo is only going to cite examples with mass.


:lol: Yeah, but then also they haven't decided whether or not to extend the definition.

Quote
Anyway, FS2 primaries DO have mass. If they didn't, they'd travel at lightspeed.


Hmm... can't argue with that. :)

Quote
In the real world, aircraft guns are mated with ammunition systems of widely varying capacities and delivery rates (as someone who spent 2 years as a weapons loader for the USAF, you might want to trust me on this one).


But doesn't that have more to do with the weapon module, as opposed to the fighter itself?  I.e., the weapon can be mounted on different aircraft regardless of the aircraft's size.