Author Topic: D-Missile question  (Read 2407 times)

0 Members and 1 Guest are viewing this topic.

Offline Solatar

  • 211
I'm FREDing a mission where the player has to fly around checking friendly civilian transports for a nuclear device.  The nuke is intended to be set off at the convoy's destination, but if discovered before, those responsible will detonate the nuke prematurely in order to at least take out some of the convoy ships. Upon discovering which one contains it, the player must keep the offending ship disrupted with D-Missiles for 30 seconds or so until the rest of the convoy clears the potential blast radius.  In the scenario, the ship must be instantly, entirely incapacitated (either EMP or D-Missile), or those onboard will realize they have been caught and blow the ship.

Is there a way to check if a ship has been/is disrupted with a D-Missile?  I'll settle for EMP blasted if I  have, but canonically, the EMP missile hasn't been developed when my mission takes place (the D-Missile has).

Is this possible to pull off without creating a D-Missile#TAG, or should I just move on and have the player disable the ship?

 

Offline niffiwan

  • 211
  • Eluder Class
From a quick look through the code, there doesn't appear to be a sexp or scripting access to check if a given subsystem on a ship is disrupted (i.e. affected by a weapon with the $Electronics flag).  But it doesn't look like it would be too hard to add, calling one of the ship_subsys_disrupted() functions should do the job.  Of course, this is all assuming that you want to check a specific subsystem or type of subsystem (probably the engines in this case?).  If you just want to check if any part of ship is affected it'd be a little bit more work, but not a lot more.

Having said that, I don't really have time to do this myself at the moment, I need to clear a few other tasks of my plate before taking more on  (:nervous:)
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...

 

Offline Mito [PL]

  • 210
  • Proud Member of Slavicus Mechanicus
Maybe you should check its speed every second or two? That way you can detonate it if it's moving too fast after stopping it (D-missiles will stop the ship, right?)?
Else you might set a turret on ship to 1 percent health and start checking ships speed if turret is down...
How do you kill a hydra?

You starve it to death.

 

Offline Fury

  • The Curmudgeon
  • 213
the player must keep the offending ship disrupted with D-Missiles for 30 seconds or so until the rest of the convoy clears the potential blast radius.  In the scenario, the ship must be instantly, entirely incapacitated (either EMP or D-Missile), or those onboard will realize they have been caught and blow the ship.
Crew 1: "Hey, something just short-circuited. What happened?"
Crew 2: "Dunno, it's old piece of crap anyway. Stop bothering me and let me eat my sandwich in peace."
Crew 1: "Right right. ...Asshole."
Crew 3: "I think something just impacted our hull... wait, the ship is losing speed and I can't steer."
Crew 1: "Another dial just short-circuited. Are you sure we're okay?"
Crew 2: "*snores*"
Crew 4: "I just looked out the window and the other convoy ships are moving away from us."
Crew 3: "Huh? You should have your eyes checked mate."
Crew 1: "Seriously guys? Anyone else think we may have been found out?"
Crew 2: "*snores*"
Crew 4: "Nah, I think we just smell a bit."
Crew 3: "There's that noise again. Screw it, I'm hitting the toilet."

 

Offline Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
From a story perspective, it would be better to have the D-Missile incapacitate both the transport AND the bomb.  As soon as the first missile hits they'll try to detonate, but if they are saturated with D-Missile effects they won't be able to.

 

Offline Solatar

  • 211
Good call Mito.  I've been using the check speed workaround, and I think it's going to do what I need to do well enough.  If not, I can always just make the ship permanently disrupted upon impact (it's a friendly vessel, won't fire on the missile, and requires a lock, so if the player fires, it's going to hit), and find another way to give the player agency while the convoy moves away.

@Niffiwan - thanks for checking the code, this was more of an idiot check post on my part than anything.  As far as I know, the electronics flag is really only used in FS1/Port, so it probably shouldn't be a very high priority anyway.

As soon as the first missile hits they'll try to detonate, but if they are saturated with D-Missile effects they won't be able to.

This is the exact scenario I'm trying to implement.  That's much clearer in the actual mission than in my (apparently) misleading synopsis.

My first plan was to try to simulate an EMP saturation, but because the mission takes place before Silent Threat, I'm using the D-Missile instead.
« Last Edit: November 14, 2013, 04:21:14 pm by Solatar »

 

Offline Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
This is the exact scenario I'm trying to implement.  That's much clearer in the actual mission than in my (apparently) misleading synopsis.

Okay, cool.  Your scenario was pretty clear, except that the wording in this sentence...
Quote
In the scenario, the ship must be instantly, entirely incapacitated (either EMP or D-Missile), or those onboard will realize they have been caught and blow the ship.
...seemed to imply that incapacitating the ship via D-Missile will prevent the occupants from realizing something.  Which would lead to the somewhat comedic scenario described by Fury.

 

Offline Solatar

  • 211
After some set time, I can see the ambiguity.  I should order my clauses better.  It's one of a few things I'm supposed to actually be good at.  I meant to convey that all the electronics systems on/in the ship (including the bomb), had to be disabled simultaneously or CAUSE the amusing scenario Fury described.  To be honest, I'm still trying to reason out how I'm going to explain how an electronic detonator on a bomb hidden in a civilian ship gets disrupted by a missile, but the lights, oxygen, and gravity stay on for the civvies.  :nervous:

Still, much better to have a potentially jarring plot hole poked here than in a release thread.  :)

 

Offline niffiwan

  • 211
  • Eluder Class
Well, oxygen is the only really critical one, and I imagine the existing oxygen would last some time, certainly until the end of the mission, even if the oxygen generator/recycler/scrubber/whatever is knocked out by the missile.
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...

 

Offline Mito [PL]

  • 210
  • Proud Member of Slavicus Mechanicus
To be honest, I'm still trying to reason out how I'm going to explain how an electronic detonator on a bomb hidden in a civilian ship gets disrupted by a missile, but the lights, oxygen, and gravity stay on for the civvies.
Hm... If we use the scenario of entire ship electronics being knocked out (civ ships aren't EMP shielded, right?) then it is a good thing to assume that electronic doors, artificial gravity will be also down so the bad guys (i am sure that there are) will be unable to reach the nuke...

If the civvies are unaware of nuke presence on-board, why not to order them to stop?
How do you kill a hydra?

You starve it to death.

 

Offline Rodo

  • Custom tittle
  • 212
  • stargazer
    • Minecraft
    • Steam
why not say the bad guys remotely detonate the nuke and they are unable to contact the bomb when the ship is saturated?
el hombre vicio...