Author Topic: Weapon modes  (Read 1601 times)

0 Members and 1 Guest are viewing this topic.

Thought of a new feature and a possible implementation last night.

Let's say you have three weapons representing the Subach SD-7 firing in different modes - normal mode, shotgun mode, and high field of fire mode. The Subach normal's weapon entry has an extra field, $NextMode, which would reference the weapon to change to when a key/SEXP is triggered. So normal would refer to shotgun mode, shotgun mode to high FOF mode, and high FOF back to normal mode. To ensure that no abuse of this feature occurs (e.g. avoiding the longer reload time for shotgun mode by switching the weapon twice), you have to wait for the value set in $Fire wait until you can fire the new weapon. You could also apply this to missiles - perhaps a swarm mode for Harpoons, or a mode that sacrifices damage for speed and agility.

Should it allow weapon modes with different ammo sizes or ballistic/energy weapons to be switched between? I'd say perhaps to the former and no to the latter. Different ammo sizes are easy to handle if the game calculates the remaining ammo integer in a primary bank on-the-fly, rather than once at the mission start (dividing primary capacity by weapon's cargo size). I don't think switching from energy to ballistic weapons would be realistic though; why would you load extra ammunition on a fighter that uses energy weapons? I'd leave this up to a modder's discretion, however.

As far as I can see, the code for doing this is halfway done - the cheat code that allows you to change your weapons.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Ummm. The code is all done. You can swap weapons by SEXP at will using the change-primary-weapon SEXP I added about a week back. :)

You'd just need to make 3 versions of the Subach.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 
But that wouldn't allow a player to change his weapon modes based on his chosen loadout, would it? Even if there is some way to find a particular ship's equipped weaponry, so you could choose appropriate weapons to switch to, you'd use large numbers of sexp nodes.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Ah. You want to do this to every weapon not just one or two. Fair enough.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline phreak

  • Gun Phreak
  • 211
  • -1
would something like ctrl+next weapon and ctrl+prev weapon be the default binding for this

then in the table would be something like

Code: [Select]
$Name: Subach Normal
$Prev Alt Fire Mode: Subach FOF
$Next Alt Fire Mode: Subach Shotgun

$Name: Subach Shotgun
$Prev Alt Fire Mode: Subach Normal
$Next Alt Fire Mode: Subach FOF

$Name: Subach FOF
$Prev Alt Fire Mode: Subach Shotgun
$Next Alt Fire Mode: Subach Normal
Offically approved by Ebola Virus Man :wtf:
phreakscp - gtalk
phreak317#7583 - discord

 
Yeah, that'd be awesome. :)

 

Offline Nuclear1

  • 211
Oh, awesome idea indeed. Sure would mix things up a bit. :)
Spoon - I stand in awe by your flawless fredding. Truely, never before have I witnessed such magnificant display of beamz.
Axem -  I don't know what I'll do with my life now. Maybe I'll become a Nun, or take up Macrame. But where ever I go... I will remember you!
Axem - Sorry to post again when I said I was leaving for good, but something was nagging me. I don't want to say it in a way that shames the campaign but I think we can all agree it is actually.. incomplete. It is missing... Voice Acting.
Quanto - I for one would love to lend my beautiful singing voice into this wholesome project.
Nuclear1 - I want a duet.
AndrewofDoom - Make it a trio!

 

Offline Galemp

  • Actual father of Samus
  • 212
  • Ask me about GORT!
    • Steam
    • User page on the FreeSpace Wiki
While we're at it. I was discussing with the Star Wars team the possibility of locking a turret to a fixed-forward position for either firepower or defense as necessary. A system like this is the perfect framework to implement it in, where instead of an alt-fire mode it unlocks the turret and locks the weapon bank.

The issues to be resolved are that of the turret geometry reorienting itself to face forward, energy use to ensure the turret drew from the primary weapon energy banks, and whether the AI would use it properly.
"Anyone can do any amount of work, provided it isn't the work he's supposed to be doing at that moment." -- Robert Benchley

Members I've personally met: RedStreblo, Goober5000, Sandwich, Splinter, Su-tehp, Hippo, CP5670, Terran Emperor, Karajorma, Dekker, McCall, Admiral Wolf, mxlm, RedSniper, Stealth, Black Wolf...

 
That sounds like an interesting idea, although I dare say it's more a ship issue than a weapon one. The effect of this would just be to substitute one weapon for another, not configuring firepoints. Could you do something similar by having a primary bank for the fixed lasers, and a primary bank with the firepoints for the turrets when facing forward, then enable/disable the turrets as well?

  

Offline Galemp

  • Actual father of Samus
  • 212
  • Ask me about GORT!
    • Steam
    • User page on the FreeSpace Wiki
Not really, as this would require compatibility for 3 primary weapon banks and you would be able to use both the guns and the turret at the same time. What's needed is a primary weapon entry that specifies no projectiles, assigns itself to the turret01 bank on the parent model, and unlocks that turret.
"Anyone can do any amount of work, provided it isn't the work he's supposed to be doing at that moment." -- Robert Benchley

Members I've personally met: RedStreblo, Goober5000, Sandwich, Splinter, Su-tehp, Hippo, CP5670, Terran Emperor, Karajorma, Dekker, McCall, Admiral Wolf, mxlm, RedSniper, Stealth, Black Wolf...