Author Topic: How do I missile-protect a ship?  (Read 2088 times)

0 Members and 1 Guest are viewing this topic.

Offline SF-Junky

  • 29
  • Bread can mold, what can you do?
How do I missile-protect a ship?
... from fighter/bomber attacks?

I realized that even when a ship uses the "hidden from sensors" flag, AI fighters and bombers seem to be able to target-lock their secondaries even though they seem to be unable to actually target that ship (judging from pressing j ingame). Is there a way to work around this?

€: To be a little more specific: I tested this with a bomber wing attacking a capital ship with Cyclopses. They have the "no dumbfire" flag. So actually they shouldn't be able to launch them at the target if "hidden from sensors" is active.
« Last Edit: February 28, 2020, 02:42:13 pm by SF-Junky »

 
Re: How do I missile-protect a ship?
Try the "missile protect ship"-flag under "Misc" in the ships editor.

 

Offline SF-Junky

  • 29
  • Bread can mold, what can you do?
Re: How do I missile-protect a ship?
Try the "missile protect ship"-flag under "Misc" in the ships editor.
I was thinking whether to write that I tried that. But then I was like "nah, other people are more attentive than I am and realize/know that this is only for turrets". :p

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: How do I missile-protect a ship?
Just as a hack, could you lock the bombers' secondary banks for as long as necessary?

 
Re: How do I missile-protect a ship?
Try the "missile protect ship"-flag under "Misc" in the ships editor.
I was thinking whether to write that I tried that. But then I was like "nah, other people are more attentive than I am and realize/know that this is only for turrets". :p

Huh didn't know that :wtf:

 
Re: How do I missile-protect a ship?
You could try ai-ignore goals. :nervous:

 

Offline 0rph3u5

  • 211
  • Oceans rise. Empires fall.
Re: How do I missile-protect a ship?
Just as a hack, could you lock the bombers' secondary banks for as long as necessary?

... or you could store the ammo count of the banks carrying bombs in a variable, then empty the bank for the time neccessary. If you are doing that to friendlies, you may have to also swap the bank over to dummy variant that doesn't reload from a support ship.

... or you could make a variant of the Cyclops that has the "tagged only"-flag, and then use the appropriate SEXP to the force the traget ship to be tagged (iff_defs.tbl allows you to hide the change in colour if a ship is tagged) - This might not work for hostiles; honestly never tried that with hostiles before.
"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: How do I missile-protect a ship?
That seems a lot more complicated.

 

Offline SF-Junky

  • 29
  • Bread can mold, what can you do?
Re: How do I missile-protect a ship?
Thanks for the replies.

The actual mission is a little different from the test scenario described in the op. The player's squadron attacks an enemy half-stealthed frigate to disarm its main beams. The ship is escorted by fighters and a cruiser which are fully targetable. This makes working with lock-secondaries and manipulating ammunition difficult.

What I have in mind is that the player can make the target targetable by using TAG missiles. Of course I could introduce a "fire at tagged ships only" version of every secondary weapon available to the player squad (which is pretty much every secondary weapon in the game) and permanently tag all other hostiles in the mission via SEXP. But that's a lot of effort for only one mission...

While I'm writing this the idea comes to my mind that I could combine object-facing-object with lock-secondaries: Whenever an friendly fighter/bomber faces that frigate, it's secondaries are locked.

 

Offline 0rph3u5

  • 211
  • Oceans rise. Empires fall.
Re: How do I missile-protect a ship?
That seems a lot more complicated.

Complication is not, in essence, a bad thing :D

"Indirect tactics, efficiently applied, are inexhaustible as Heaven and Earth, unending as the flow of rivers and streams; like the sun and moon, they end but to begin anew; like the four seasons, they pass away to return once more."
- Sun Tzu, The Art of War




The actual mission is a little different from the test scenario described in the op. The player's squadron attacks an enemy half-stealthed frigate to disarm its main beams. The ship is escorted by fighters and a cruiser which are fully targetable. This makes working with lock-secondaries and manipulating ammunition difficult.

What I have in mind is that the player can make the target targetable by using TAG missiles. Of course I could introduce a "fire at tagged ships only" version of every secondary weapon available to the player squad (which is pretty much every secondary weapon in the game) and permanently tag all other hostiles in the mission via SEXP. But that's a lot of effort for only one mission...

While I'm writing this the idea comes to my mind that I could combine object-facing-object with lock-secondaries: Whenever an friendly fighter/bomber faces that frigate, it's secondaries are locked.

Now this is much more information which makes this much easier to workshop...

Each time the target ship enter the "stealth"-condition you simply manipulate the AI, using remove-goal* and add-goal + ai-ignore-new, to end the attack on the ship; it may give you some trouble with the dynamic orders, so I would recommend also switching the stealthed ship to an dummy IFF (see iff_defs.tbl for details) that the Friendly team does not attack by default - that should override the dynmaic AI.

Each time the "stealth"-condition is lost, simply swap back the IFF and reinstate the AI commands.

* You may need a number of those, because player orders have a range not a defined number for their priority - its only 90-100 out of 1-200, so...  ;)

"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."

 
Re: How do I missile-protect a ship?
One more idea: you could make the hostile ship stealthy and use a blip with hidden from sensor flag to make the flickering dot on the radar.

 

Offline SF-Junky

  • 29
  • Bread can mold, what can you do?
Re: How do I missile-protect a ship?
Now this is much more information which makes this much easier to workshop...
Yeah, I should've provided more info in the first place.

However, playing with goals won't do the trick, because as I said: I only want to protect that ship from missile fire, not gun fire - the player's squadron is supposed to attack that ship. This is why Nightmare's trick won't work, won't it? Because stealth mode means that my wingmen won't attack the ship at all.

 
Re: How do I missile-protect a ship?
Yeah using ai goals most likely won't work in that case.

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
Re: How do I missile-protect a ship?
I'm struggling to understand the use-case here. You want the bombers(?) to attack a particular ship but not fire their bombs?

My best idea is some combo of is-facing and distance-to-ship check -> lock-secondaries, else unlock. I don't think there's a sexp to check what ship the AI is targeting.
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.

 

Offline 0rph3u5

  • 211
  • Oceans rise. Empires fall.
Re: How do I missile-protect a ship?
Eureka?

EDIT: Oh right, can't see attachments - found this while checking if the "ignore-for-count-goals"-ship flag could be used as dummy status effect tracker (should I ever have the tagged status not avalible): It appears there is a "no secondary lock on"-flag in the list of flag for the alter-ship-flag SEXP but its not in the list of the Ships Editior ... which might be an indication that it doesn't work, but at least it is there.

[attachment eaten by a Shivan]
« Last Edit: March 04, 2020, 09:04:53 pm 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 AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: How do I missile-protect a ship?
Eureka?

EDIT: Oh right, can't see attachments - found this while checking if the "ignore-for-count-goals"-ship flag could be used as dummy status effect tracker (should I ever have the tagged status not avalible): It appears there is a "no secondary lock on"-flag in the list of flag for the alter-ship-flag SEXP but its not in the list of the Ships Editior ... which might be an indication that it doesn't work, but at least it is there.
no-secondary-lock-on means that ship can't lock secondaries, not that secondaries can't achieve aspect lock on it; in this scenario, it's no more helpful than lock-secondaries.
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.

  

Offline 0rph3u5

  • 211
  • Oceans rise. Empires fall.
Re: How do I missile-protect a ship?
no-secondary-lock-on means that ship can't lock secondaries, not that secondaries can't achieve aspect lock on it; in this scenario, it's no more helpful than lock-secondaries.

... well, someone should clear up the language of the description :)

Hidden Text: Show
Now:
Code: [Select]
no-secondary-lock-on - Will disable target acquisition for secondaries of all types (does not affect turrets)Suggested:
Code: [Select]
no-secondary-lock-on - Will disable the ability of the ship to lock on target with secondary weapons of any kind (does not affect turrets)



My best idea is some combo of is-facing and distance-to-ship check -> lock-secondaries, else unlock. I don't think there's a sexp to check what ship the AI is targeting.

Just to point that out, but is-facing already contains a distance check (4th argument):

Quote
Is Facing (Boolean training operator)
   Is true as long as the second object is within the first ship's specified forward cone.  A forward cone is defined as any point that the angle between the vector of the ship and point, and the forward facing vector is within the given angle. If the distance between the two is greater than the fourthparameter, this will return false.
emphasis mine



How married are you to the defensive ECM approach, SF-Junky? - because if you are going away from the defensive stealth/ECM approach, to something more like a "silenced"-status being projected by the target ship it would be easier mechanically - it would be down to a distance check, which you could scale if re-braned the TAG missiles as EMP missiles (you have to the keep the TAG parameters though, as I don't see the option to check if a ship is EMP'ed or Disrupted; an alternative would be a Leech effect but I don't know how that works with capital ships. The Leech effect approach theoretically also would allow for the projection range to rise and fall as you can get info on current weapons and afterburner energy of a target)
"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."