Author Topic: A Possiblity Check  (Read 2541 times)

0 Members and 1 Guest are viewing this topic.

Offline NGTM-1R

  • I reject your reality and substitute my own
  • 213
  • Syndral Active. 0410.
Call it watching too much BSG (or maybe too much time in the BTRL forum), but I've been thinking about relatively simple ways to simulate electronic warfare, and I came up with this one.

How difficult would it be to add a "lock-bank" SEXP? It would function essentially like the "lock-turret" or "lock-beam" one, only it would prevent a fighter from firing a primary or secondary bank. This way you could simulate being unable to fire guided weaponry due to jamming, but turn it off or on in response to the player's actions (i.e. blowing up or chasing off the jammer).
"Load sabot. Target Zaku, direct front!"

A Feddie Story

 

Offline CaptJosh

  • 210
That could already be fredded in, I think.

There are already several missiles that won't fire without a lock. And I think there are sexps for stealthing and unstealthing ships...
CaptJosh

There are only 10 kinds of people in the world;
those who understand binary and those who don't.

 

Offline NGTM-1R

  • I reject your reality and substitute my own
  • 213
  • Syndral Active. 0410.
That's a little too hackish for my taste; also it can fly in the face of reality. It's perfectly possible, indeed common, to be able to lock with radar on the platform but not radar on the weapon. Likewise it's possible to not jam the radar but jam the guidance commands, or several other things.
"Load sabot. Target Zaku, direct front!"

A Feddie Story

  

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
I'm looking into the possibility of adding set-primary/secondary-loadout SEXPs to the code. I'm not certain if I can get them to work yet so don't get your hopes up but if I can they'll allow you to change the weapon in a ships bank at will. What you could then do is add a second weapon to the weapons.tbl called weaponName(Jammed) which does nothing (or only works as a lower yield dumbfire) and swap to it whenever you wanted.
 
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline IPAndrews

  • Disgruntled Customer
  • 212
  • This site stole my work
I could use all these SEXPs (lock-primary, lock-secondary, set-primary-weapon, set-secondary-weapon). I would be very grateful of them.
Be warned: This site's admins stole 100s of hours of my work. They will do it to you.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
I'm not certain how feasible the first two are to be honest. I'd probably have to fiddle about a lot under the hood to get them to work.

On the other hand I've got a primative version of set-secondary-weapon up and running already.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
For the first two, you could just set a ship flag or special variable, and then add if(flag) return; to the top of ship_fire_primary() and/or ship_fire_secondary(). The AI code also seems to use those functions, so you could conceivably setup a situation like the 'cold war' between Pegasus and Galactica, with the fighters engaging each other but not actually shooting.
-C

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
If everything goes through those two functions it should be worth giving it a try. It would also be very useful for turning the players weapons off during cutscenes without having to grant control to the AI or have the weapons subsystem mysteriously destroyed and fixed.

That said I need to get a better grasp on how the ship flags work before I try it and as soon as I have that better grasp the commands for making pilots maintain radio silence is higher priority :)
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Okay. I've added the change weapon SEXPs and I've updated the set-primary/secondary-ammo SEXPs to support a new feature. The rearm limit is now a specifiable option in all 4 SEXPs.

This means that you can have a mission where the player is given a brand new type of bomb and told that the 4 he is carrying are the only ones in existance. A support ship can still be present in the mission but will not rearm this weapon even though any other weapons would be rearmed. All you would have to do is make a SEXP like this.

When
-true
-Set-Secondary-Ammo
--Alpha 1
--2   <------------------------Name of the bank holding the weapon
--4   <------------------------Number of prototype weapons
--0   <------------------------Number of weapons a support ship should fill the player up to.

Previously your only option would have been to disallow support ships.

The Change-weapon SEXP will take arguments for the amount of ammo and rearm limit as optional extras too. It's worth noting that the names of the SEXPs only denote which banks are being changed NOT which weapons. It's perfectly possible to stick primary weapons in the secondary bank using the set-Secondary-weapon SEXP and visa versa. In fact you can stick capship weapons in either bank using these SEXP but I've got absolutely no idea what would happen if you tried.  :nervous:

Changes are in CVS.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Lock/Unlock-Primary/Secondary-Weapon is now implemented.

It won't lock a single primary bank just all primaries though. If you want to lock a single primary or secondary bank just swap it to a dummy weapon like I described above.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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