Author Topic: Different Display Name & Different Departures  (Read 2085 times)

0 Members and 1 Guest are viewing this topic.

Offline Trivial Psychic

  • 212
  • Snoop Junkie
Different Display Name & Different Departures
So I'm working on the second mission in the FS1:U chapter 1 loop, and I'd like one ship to be miss identified as another, until it is scanned.  I'm not talking about a different class, but as a different ship name.  I thought that the ship-change-callsign might do it, but it just adds a second name next to the main.  Is there any way to do this?

Also, I have a wing of ships that I want to depart via destroyer fighterbays, except I want two to enter the fighterbay of one ship, and the 3rd into the bay of another ship.  I've tried using set-departure-into, but it seems that the wing's departure info overrides this.  I thought that perhaps there might be a disband-wing sexp, which I could use to kill this, but I couldn't find one.  I guess it doesn't exist.  Any ideas?
The Trivial Psychic Strikes Again!

 
Re: Different Display Name & Different Departures
I don't believe either of these are possible.

For the name issue, you could try spawning a replacement ship, noting the position and rotation of the other (and speed and damage, if appropriate - there's a copy-damages SEXP that'll help with the last), then ship-vanishing it and copying the noted values to the replacement. Of course, that'll forcibly un-target the ship...

For the wing issue: does it actually have to be a wing? I mean, if the player never gets to give them orders, you could just manually name them as if they were in a wing and hope no one looks too closely at the F3 menu. Failing that, you could use warp-effect, ship-vanish, and a waypoint to pantomime the first two ships jumping out.



Otoh, hm, I've been looking for something useful to contribute to the SCP codebase...

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Different Display Name & Different Departures
You can change a ship's name via Lua; there's no SEXP to do it (aside from script-eval and friends, of course).

As far as I'm aware, a wing's departure cue/type/anchor will always override those of the individual ships in that wing.
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 Trivial Psychic

  • 212
  • Snoop Junkie
Re: Different Display Name & Different Departures
Thanks guys.  Scripting is a bit above my skill level, so I'll just have to change the plot a bit.  As for the wing departures, I can live with that I guess.
The Trivial Psychic Strikes Again!

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Different Display Name & Different Departures
Thanks guys.  Scripting is a bit above my skill level, so I'll just have to change the plot a bit.
This isn't very complicated scripting; just need something like:
Code: [Select]
( script-eval-block
   "Ships['"
   "old name goes here"
   "'].name = '"
   "new name goes here"
   "'"
)
(Somebody who actually knows Lua may want to double-check my work.)
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 Axem

  • 211
Re: Different Display Name & Different Departures
.Name should be capitalized. On simple testing it does work, but you'll need to have your name changey ship referred to in sexps with variables and not just your ship's name by itself, because the game isn't going to keep up to date with your changes on its own.

 

Offline Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
Re: Different Display Name & Different Departures
If you set the "hide ship name" flag on a ship, then all it will display is the callsign.  You can then make the callsign correspond to whatever identification you want, and change it as you see fit.

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Different Display Name & Different Departures
If you set the "hide ship name" flag on a ship, then all it will display is the callsign.  You can then make the callsign correspond to whatever identification you want, and change it as you see fit.
Oh, yeah, that's a much better solution than using Lua to change the ship's name.
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 Mito [PL]

  • 210
  • Proud Member of Slavicus Mechanicus
Re: Different Display Name & Different Departures
How about clearing the wing orders for them and giving each fighter an individual order? I think I saw something like that (a vessel from the player's wing following waypoints regardless of other orders) actually working somewhere.
How do you kill a hydra?

You starve it to death.

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Different Display Name & Different Departures
How about clearing the wing orders for them and giving each fighter an individual order? I think I saw something like that (a vessel from the player's wing following waypoints regardless of other orders) actually working somewhere.
Works for orders because you can clear them; you can't not have departure information specified.
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 Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
Re: Different Display Name & Different Departures
Do all the ships in the wing have to depart simultaneously?  Because you could set the departure for one ship and then change it for the other two.

 

Offline Trivial Psychic

  • 212
  • Snoop Junkie
Re: Different Display Name & Different Departures
I've just decided to disband the wing and give them all separate waypoints and departure cues.
The Trivial Psychic Strikes Again!