Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Trivial Psychic on December 10, 2022, 10:55:57 am

Title: Global Name Spoofing
Post by: Trivial Psychic on December 10, 2022, 10:55:57 am
So a few times I've used combinations of 'Hide Ship Name' and 'Callsign' to allow one ship to appear with a different display name.  It's often useful in scenarios when, "Oh, here comes ship X.  It's friendly.  WAIT a MINUTE, that's not ship X, that's ship Y!  Its an enemy!  FIRE!"  Unfortunately, things like the escort list and the status of other ships related to it, (like if they're docked to it, or are given orders that pertain to it) will still display the REAL name, regardless of my use of flags.  Is there any way (short of LUA) to solve this?  If not, is such a change trivial enough for coders to implement a simple work-around, such as "when 'hide ship name' and 'callsign' are both enabled, use the 'callsign' name for all data pertaining to that ship that is displayed to the player."?

Or, to put it in FRED code:

when
-and
--is flag enabled
---hide-ship-name
--is flag enabled
---callsign
-escort name shows
--callsign
-docked-to name shows
--callsign
-orders for other ships regarding name show
--callsign
-any other places where the player might see this that I can't think about right now name show
--callsign

How does that sound?
Title: Re: Global Name Spoofing
Post by: Mobius on December 10, 2022, 11:12:24 am
Just my two cents here, perhaps all of this could be solved by adding a third and optional argument to the add-remove-escort SEXP.

Said extra argument would manage dynamically the name by which the ship should appear in the escort list itself.
Title: Re: Global Name Spoofing
Post by: Novachen on December 10, 2022, 01:24:24 pm
There exists also a 'Display Name' ($Display Name in mission files) that was introduced for my localization effort and that was a desired feature to offer the possibility to translate ship names or the name of Waypoints properly.

But actually it should be possible to get this string to create a LUA-SEXP that enables the changing of the used Display Name during a mission.
Title: Re: Global Name Spoofing
Post by: Trivial Psychic on December 11, 2022, 01:32:39 am
Just my two cents here, perhaps all of this could be solved by adding a third and optional argument to the add-remove-escort SEXP.

Said extra argument would manage dynamically the name by which the ship should appear in the escort list itself.

That might not solve the issue where other ships are interacting with it.  For example, if you order a ship to attack something that has the 'hide name+callsign' combination, its orders will still say that its attacking the true name of the ship, and not the one listed in callsign.
Title: Re: Global Name Spoofing
Post by: EatThePath on December 11, 2022, 05:24:28 pm
that sounds like an engine oversight that should be fixed rather than worked around
Title: Re: Global Name Spoofing
Post by: Trivial Psychic on December 11, 2022, 09:25:48 pm
Well, to be fair, I don't think that hide-name+callsign is something that was planned as a feature, it merely exploits 2 features together to achieve a result.  That said, I could see how the fact that a ship's hidden name still being seen in the referenced sources COULD be considered an oversight in itself.
Title: Re: Global Name Spoofing
Post by: Goober5000 on December 11, 2022, 10:12:32 pm
The ship's "display name" is supposed to be used whereever it is visible to the player.  That includes the escort list and the docking display.  So if the display name isn't being displayed, then that qualifies as a bug that should be fixed.