scp-fs2open / fs2open.github.com

Origin Repository for SCP FreeSpace 2 Open
https://www.hard-light.net/
Other
407 stars 164 forks source link

FR: change-ship-display-name #4311

Open BMagnu opened 2 years ago

BMagnu commented 2 years ago

Sometimes, a ship might want to change its name. Turns out, scripting can do that already. Buuut, caveat: You need to refer to the ship in question through when-argument SEXPs going forward, as you need to call it by its new name, but the SEXP error checker will refuse the new name as no such ship exists at parse time.

One solution to that problem is to have a name change SEXP that'll iterate through the SEXP tree, each ship's / parse_objects AI goal target names, arrival/warpout conditions and so on and update the references accordingly. But that's brittle, as we see with ship-change-class which reaches less far than change-name would.

The suggestion is thus to introduce a display-name which is used for all user-facing display, but for no internal addressing. This could then be freely changed by SEXP without concerns.

EatThePath commented 2 years ago

Seems like an idea that's about 20 years overdue, really

Goober5000 commented 2 years ago

A ship display name feature already exists. The only thing needed is the change-display-name SEXP.

Durandal-Thoth commented 2 years ago

Axem already created a lua sexp for me a little while back that does just this, and I'd be happy to redist it. Certainly wouldn't be a bad idea to create a real sexp though.

MjnMixael commented 1 year ago

Seems like this sexp already exists in ship-change-alt-name unless alt names and display names are specifically different?

Goober5000 commented 3 months ago

Dark Visor is working on this.