Author Topic: The Guts of Spaceship 'Abilities'  (Read 2460 times)

0 Members and 1 Guest are viewing this topic.

The Guts of Spaceship 'Abilities'
To take gameplay in an unusual and interesting direction in my mod, I've decided to give all of the player-flyable Shivan fighters and bombers their own special abilities (triggered by keypresses, like in the BP missions 'One Future' and 'The Blade Itself'). As this is my first release, I'll be focusing on just four ships for now - the Manticore, Mara, Basilisk, and Taurvi. Of those, the Mara will probably be the most complex.

Is there a way to make a weapon shockwave apply EMP effects and energy-drain effects to hostile ships only? Can this be accomplished with armor.tbl? The Mara's wide-area EMP system needs to not blow up Shivan bombs, nor interfere with Shivan sensors/aspect lock. Similarly, the area-effective energy neutralizer on the Mara needs to affect only non-Shivan targets.

Alternatively, are EMP effects cumulative? Does getting hit with twenty EMP-causing projectiles in a very short time scramble your systems for twenty times as long? Are 'electronics' flagged weapons (like the D-missile) cumulative in this regard too? Because if not, a swarm of untargeted and invisible heat-seekers spawned from the Mara may be more effective.

If neither of these is practical, I'll instead give the Mara non-area-effective abilities.
« Last Edit: June 09, 2016, 12:34:13 am by Erebus Alpha »
"Obviously the meson bomb is a form of cat-toast-device, with the buttered toast inverted, so that the cat and toast both fly in the direction of gravity much faster than expected. By introducing artificial gravity, a pair of cat-toast perpetual motion accelerator units can be made to collide with one another, and they produce an unimaginably devastating explosion. Both cats are named 'Meson'."

 - Wikileaks 2383

 

Offline 0rph3u5

  • 211
  • Oceans rise. Empires fall.
Re: The Guts of Spaceship 'Abilities'
Is there a way to make a weapon shockwave apply EMP effects and energy-drain effects to hostile ships only? Can this be accomplished with armor.tbl? The Mara's wide-area EMP system needs to not blow up Shivan bombs, nor interfere with Shivan sensors/aspect lock. Similarly, the area-effective energy neutralizer on the Mara needs to affect only non-Shivan targets.

Make the shockwave cosmetic and instead make an EMP effect apply to all nearby hostile fighters.... give me a sec to whip it up



Give it a repeat count and an interval time ... added variables for uncertain values or to expand the control over the system...
EDIT: oh, you may want to check if the invalidate-argument at the end is really neccessary ... I added it before I changed it to every-of (so the event would not trigger on the same craft over and over again, as it would be possible if it had remained any-of)
« Last Edit: June 09, 2016, 06:34:59 am by 0rph3u5 »
"As you sought to steal a kingdom for yourself, so must you do again, a thousand times over. For a theft, a true theft, must be practiced to be earned." - The terms of Nyrissa's curse, Pathfinder: Kingmaker

==================

"I am Curiosity, and I've always wondered what would become of you, here at the end of the world." - The Guide/The Curious Other, Othercide

"When you work with water, you have to know and respect it. When you labour to subdue it, you have to understand that one day it may rise up and turn all your labours into nothing. For what is water, which seeks to make all things level, which has no taste or colour of its own, but a liquid form of Nothing?" - Graham Swift, Waterland

"...because they are not Dragons."

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: The Guts of Spaceship 'Abilities'
But then you've got to name every hostile ship in every mission you want to use the ability. That's valid - it's how I'd do it! - but it'd be cool to have a more elegant way.

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: The Guts of Spaceship 'Abilities'
It would be trivial to add flag to make the effect ignore same-team targets.
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 
Re: The Guts of Spaceship 'Abilities'
is this not the kind of thing scripting is good for?
The good Christian should beware of mathematicians, and all those who make empty prophecies. The danger already exists that the mathematicians have made a covenant with the devil to darken the spirit and to confine man in the bonds of Hell.

 
Re: The Guts of Spaceship 'Abilities'
But then you've got to name every hostile ship in every mission you want to use the ability. That's valid - it's how I'd do it! - but it'd be cool to have a more elegant way.

I noticed in retail FS2, in some missions (like the one where you find the Trinity on the other side of the knossos), enemy ships keep spawning and spawning, no matter how many times you destroy them. So you sometimes end up with 'Scorpio 87'. Does this mean that dozens and dozens of theoretical ships have to be named in the when-argument and every-of list? In a really big mission, that could end up being hundreds of ships.

It would be trivial to add flag to make the effect ignore same-team targets.

What flag? I'll take another look at the weapons.tbl wiki, but I didn't see anything close to an 'affect only other teams' flag.
« Last Edit: June 09, 2016, 11:34:36 pm by Erebus Alpha »
"Obviously the meson bomb is a form of cat-toast-device, with the buttered toast inverted, so that the cat and toast both fly in the direction of gravity much faster than expected. By introducing artificial gravity, a pair of cat-toast perpetual motion accelerator units can be made to collide with one another, and they produce an unimaginably devastating explosion. Both cats are named 'Meson'."

 - Wikileaks 2383

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: The Guts of Spaceship 'Abilities'
It would be trivial to add flag to make the effect ignore same-team targets.

What flag? I'll take another look at the weapons.tbl wiki, but I didn't see anything close to an 'affect only other teams' flag.
I meant adding a new flag to the source code; the functionality does not currently exist.
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 
Re: The Guts of Spaceship 'Abilities'
I've created a post in the FS2 SCP Coding forum, pertaining to this:
http://www.hard-light.net/forums/index.php?topic=92086.0

However, between then and now, I've devised a...decent compromise: Missiles. Specifically, a parent missile that spawns heat-seeking child missiles. Those should be marginally effective at hitting multiple things around the player, while hopefully not hitting friendly stuff often. I'll use a SEXP to spawn the parent missile, as the special-ability-missiles are not going to be equippable in secondary banks.

To make EMP and energy-draining warfare look pretty, does anyone have some high-rez frames (1024x1024 maybe?) of a lightning/electricity explosion, suitable for use in a .eff?
"Obviously the meson bomb is a form of cat-toast-device, with the buttered toast inverted, so that the cat and toast both fly in the direction of gravity much faster than expected. By introducing artificial gravity, a pair of cat-toast perpetual motion accelerator units can be made to collide with one another, and they produce an unimaginably devastating explosion. Both cats are named 'Meson'."

 - Wikileaks 2383