Author Topic: 1 SEXP required to fly capital ships  (Read 7632 times)

0 Members and 1 Guest are viewing this topic.

Offline Dark RevenantX

  • 29
  • anonymity —> animosity
1 SEXP required to fly capital ships
Yes, I've nearly got it working perfectly (except the annoying problem with flak knocking back the test aeolus slightly).  However, we absolutely need a PrimaryFired and possibly a SecondaryFired (takes a ship, a primary/secondary weapon bank, and maybe a delay) SEXP in order to have decent beams working.  I've managed to get the targeting, beam firing, etc working, so that capital ships can be targeted and fired upon as if the beam was a primary.  Blob turrets and anti-fighter beams are a completely different story, however, and would require much more than just 1 SEXP to do with any kind of sane speed (1 event must be added per targetable ship).  The problem with key-pressed is that you can push the key however many times you want, but the primary dummy weapon will only fire for however much energy you have (50% energy is drained with each beam firing, so you can drain your engines (the aeolus is given afterburners, too) in order to increase beam output).  The result is that you will be getting free beams...

Why all of this?  Currently, player-fireable beams can only shoot straight forward.  For a better capitalship style play, they need to be able to fire on targets like true turrets would, meaning broadsides would be more effective.

Optional SEXPs:
1. GetTargetedShip (to be used as a data field; this would make it possible to use anti-fighter beams and it would be a ****load easier to FRED in general)
2. GetLoadedPrimary / GetLoadedSecondary (checking the primary/secondary type would allow for swappable beam types in the loadout selection screen.  There is simply no way to check which weapon is installed as it is...)
« Last Edit: February 07, 2009, 01:14:37 pm by Dark RevenantX »

 

Offline Dilmah G

  • Failed juggling
  • 211
  • Do try it.
Re: 1 SEXP required to fly capital ships
Yes, I've nearly got it working perfectly (except the annoying problem with flak knocking back the test aeolus slightly).  However, we absolutely need a PrimaryFired and possibly a SecondaryFired (takes a ship, a primary/secondary weapon TYPE, and maybe a delay) SEXP in order to have decent beams working.  I've managed to get the targeting, beam firing, etc working, so that capital ships can be targeted and fired upon as if the beam was a primary.  Blob turrets and anti-fighter beams are a completely different story, however, and would require much more than just 1 SEXP to do with any kind of sane speed (1 event must be added per targetable ship).  The problem with key-pressed is that you can push the key however many times you want, but the primary dummy weapon will only fire for however much energy you have (50% energy is drained with each beam firing, so you can drain your engines (the aeolus is given afterburners, too) in order to increase beam output).  The result is that you will be getting free beams...

Another cool thing about a PrimaryFired SEXP is that if it checked by primary/secondary type rather than bank, it would be very easy to allow for swappable beam types in the loadout selection screen.  There is simply no way to check which primary is installed as it is...

Why all of this?  Currently, player-fireable beams can only shoot straight forward.  For a better capitalship style play, they need to be able to fire on targets like true turrets would, meaning broadsides would be more effective.

Optional SEXP:
1. GetTargetedShip (to be used as a data field; this would make it possible to use anti-fighter beams and it would be a ****load easier to FRED in general)

Wow that is awesome! But I imagine it would take years to sexp.

 

Offline Galemp

  • Actual father of Samus
  • 212
  • Ask me about GORT!
    • Steam
    • User page on the FreeSpace Wiki
Re: 1 SEXP required to fly capital ships
He says he's nearly got it working. I trust him.

As for flak/AAA/blob turrets, they're mainly defensive weapons. Can you just leave them on auto-targeting, like bomber turrets work now?
"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...

 

Offline Dark RevenantX

  • 29
  • anonymity —> animosity
Re: 1 SEXP required to fly capital ships
Keep in mind that AAA turrets can be used to selectively destroy fighters and attack capital ships...

Edit: Crap, is there any way to detect if BOTH primaries are selected at the same time?





« Last Edit: February 07, 2009, 12:33:29 pm by Dark RevenantX »

 

Offline tinfoil

  • i'm 13 remember
  • 29
Re: 1 SEXP required to fly capital ships
 :jaw:
Alcibades' Gamble - We Love Our Ice Cream

Everything you need to know, and more can be found at The Freespace Wiki

 

 

Offline Rhymes

  • Galactic Mediator
  • 29
  • Fatum Iustum Stultorum
Re: 1 SEXP required to fly capital ships
2 things:

1: WOW.   :jaw:


2:  How do WE set it up so us humble end-users can try it?
If you don't have Knossos, you need it.

“There was a button," Holden said. "I pushed it."
"Jesus Christ. That really is how you go through life, isn't it?”

 

Offline Dark RevenantX

  • 29
  • anonymity —> animosity
Re: 1 SEXP required to fly capital ships
Well, it's not really much at the moment because beam firing is so exploitable right now.  I'd have to have a PrimaryIsFired / SecondaryIsFired (takes a ship and a bank, possibly a delay) to make it fully-functioning.

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: 1 SEXP required to fly capital ships
Well you might as well think ahead and if requesting such a sexp make it just and is-fired.  Then you could make the type one of the arguments and it could be primary, secondary, turret, counter measure, or anything else added later on.  That way it's not only useful for the caps but for regular ships as well. 
No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras

 

Offline Dark RevenantX

  • 29
  • anonymity —> animosity
Re: 1 SEXP required to fly capital ships
It's really up to the programmer tbh.  The coders know more about the engine than I do...

Anyway, if the three SEXP's are created, I can/will make a campaign out of this.

SEXPs preferred:
IsFired (takes a ship, a weapon category (as said in the above post), and weapon bank/turret/whatever, returns true/false)
GetLoadedWeapon (takes a ship, a weapon category (primary or secondary), and a weapon bank, returns a weapon type)
GetTarget (takes a player ship, returns its current target)


For the prototype:  Extract to your FreeSpace 2 directory.

Edit: this prototype is of course out of date and has some bugs other than the obvious ones I've posted

[attachment deleted by admin]
« Last Edit: February 08, 2009, 05:13:23 pm by Dark RevenantX »

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: 1 SEXP required to fly capital ships
I'm still a little confused about what you want from this is-fired SEXP. From what you describe it sounds like it's a "has this weapon ever been fired" SEXP. I've not played with the weapon code much but if you want a SEXP that says "Has the weapon fired in the last x seconds" that should be possible.

Similarly I could probably make a get-loaded-weapon SEXP but all I can return is a string. It will be up to you to figure out what to compare it to as none of the other SEXPs can deal with a weapon type.

As for get-target, you can do that with the current targetted sexp and when-argument. Not certain how hard a SEXP would be. Probably not very.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Dark RevenantX

  • 29
  • anonymity —> animosity
Re: 1 SEXP required to fly capital ships
Targeted is not very good for this because I have to make a separate event for each and every targetable ship.  This makes large missions tedious and fighter targeting impossible.  A get-target SEXP would let me completely drop the target events altogether and have a much more streamlined and versatile code overall.  And meaningful AAA beam usage would be possible.  I'd be able to use it directly in the weapon-fire SEXP's without having to use a variable (meaning this would also allow multiplayer support).

It's fine if get-loaded-weapon returns a string.  Actually, a string is the only way it would logically work for my purposes.

is-fired would basically check if a weapon has been fired in the last instant or other reasonably short measure of time, if needed.  0.5 seconds would be fine for my purposes, but a 0.05 second check would be more versatile.  Keep in mind that this SEXP would be used in an every-time conditional.

 

Offline Commander Zane

  • 212
  • Spoot Knight of Anvils
Re: 1 SEXP required to fly capital ships
The stories of mere fighter pilots beoming fleet admirals will arise. ;7

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: 1 SEXP required to fly capital ships
Targeted is not very good for this because I have to make a separate event for each and every targetable ship. 

Even with when-argument? Admittedly it's a clumsy way of doing it but it's certainly easier than making an event for each ship.

Quote
I'd be able to use it directly in the weapon-fire SEXP's without having to use a variable (meaning this would also allow multiplayer support).

Somewhat confused again. What's the problem with variables?

Quote
is-fired would basically check if a weapon has been fired in the last instant or other reasonably short measure of time, if needed.  0.5 seconds would be fine for my purposes, but a 0.05 second check would be more versatile.  Keep in mind that this SEXP would be used in an every-time conditional.

The only way I'd make this SEXP is if I added a delay argument (probably in ms rather than s) so that the FREDder can determine the length of time they need themselves. Bear in mind I'm still not certain it's possible. I'd have to look into how the fire wait code works.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Dark RevenantX

  • 29
  • anonymity —> animosity
Re: 1 SEXP required to fly capital ships
Even with an every-time-argument event, fighters would still be extremely difficult to make work because not only would I have to specify each and every single fighter craft, I would also have to specify all of their reinforcements as well.  This basically makes it an unbelievably tedious and time consuming process for large missions, especially since the final mission in my campaign will essentially be a BOE. (I can get away with it because you will be using a destroyer and will be able to order around 15 or so other capital ships).

Also, there's no problem with variables.  It's just that there is currently no way for a SEXP to figure out which primary/secondary is loaded.  I need one so that the game can swap out the turret weapons on your ship based on which primaries have been selected for the mission.

Edit: Anyone know a way to get rid of the red screen flash upon being hit?
« Last Edit: February 08, 2009, 05:14:33 pm by Dark RevenantX »

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: 1 SEXP required to fly capital ships
Strange I was just talking about such a bit list in the FRED forum.  I know what you mean about specifying every single ship.  I've done it and it's not fun.  Well the second wing isn't too bad but that first one is a killer. 
No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras

 

Offline JGZinv

  • 211
  • The Last Dual! Guardian
    • The FringeSpace Conversion Mod
Re: 1 SEXP required to fly capital ships
Forgive me if this is a stupid question, but say if you equipped your wingman
with similar cap ship abilities, would this not be similar to a small flotilla command?

(IE question being would it work?)
True power comes not from strength, but from the soul and imagination.
Max to PCS2 to FS2 SCP Guide
The FringeSpace Conversion Mod

 

Offline Dark RevenantX

  • 29
  • anonymity —> animosity
Re: 1 SEXP required to fly capital ships
Well, AI wingmen would just use beams like they normally would.

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: 1 SEXP required to fly capital ships
Remember that linked fire code someone came up with a while back.  Could you imagine you and your AI caps linked like that? 
No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras

 

Offline Aardwolf

  • 211
  • Posts: 16,384
    • Minecraft
Re: 1 SEXP required to fly capital ships
Well I tried the mod so far, and I'm sorry to say it wasn't that awesome. This really seems like the sort of thing that could be more easily done through scripting, but then again, you did mention multiplayer, and I know scripting and multiplayer do not get along all that well.

 

Offline Dark RevenantX

  • 29
  • anonymity —> animosity
Re: 1 SEXP required to fly capital ships
Of course, it's hardly awesome to do something as simple as rushing a Moloch head-to-head.  It's mainly a tech demo.  More complicated missions and a true challenge where your input actually does affect the outcome considerably is certainly a lot more entertaining.