fs2open.github.com icon indicating copy to clipboard operation
fs2open.github.com copied to clipboard

FR: Generalized wing message

Open EatThePath opened this issue 3 years ago • 7 comments

Instead of having

$Name: Epsilon Arrived
$Message: XSTR("Epsilon wing now on station.", -1)
...
$Name: Gamma Arrived
$Message: XSTR("Gamma wing has arrived. Awaiting orders.", -1)

it'd be useful to instead have

$Name: Wing Arrived
$Message: XSTR("Epsilon wing now on station.", -1)
+Wing: Epsilon
...
$Name: Arrived
$Message: XSTR("Gamma wing has arrived. Awaiting orders.", -1)
+Wing: GAmma

And then have the game try to match an arriving wing's name. This would mean mods could have individualized arrival lines for more than the standard FS2 wing set.

EatThePath avatar Sep 06 '22 19:09 EatThePath

The game already searches for these messages by wing name; the problem is that it only finds them if they're part of the builtin messages list. This validation does not happen when parsing messages.tbl, so e.g. "Omicron Arrived" would be successfully parsed into the Messages[] vector, it just would never be sent because message_send_builtin_to_player() relies on having a valid type index. There'd need to either be a significant overhaul of missionmessage.cpp or some sort of special exception for wing arrival messages added.

MageKing17 avatar Sep 06 '22 19:09 MageKing17

Evidently @naomimyselfandi is working on a set of features including this, so I'll keep an eye out for it's submission.

EatThePath avatar Sep 06 '22 21:09 EatThePath

You've heard correctly! Your proposal is nicer than mine, though, so I'm incorporating elements of it. :)

naomimyselfandi avatar Sep 08 '22 01:09 naomimyselfandi

@naomimyselfandi Something else that's come to mind is a desire to have arbitrary new scripted persona lines, so new lines types can be added and a script function can call for them on a given ship and have it handled like any other persona line. Is that something your features might enable, or should I make a new FR for it?

EatThePath avatar Sep 13 '22 16:09 EatThePath

It's something I've been on the fence about. If there's a need for it, I can certainly implement it.

naomimyselfandi avatar Sep 14 '22 14:09 naomimyselfandi

@naomimyselfandi Having thought about it more, the existance of lua-ai orders makes that kind of script-only persona message a lot more likely to be useful. having persona responses to new order types seems like a practical necessity now that I've thought of it

EatThePath avatar Sep 16 '22 04:09 EatThePath

Yup! Supporting that use case has always been part of the plan.

naomimyselfandi avatar Sep 17 '22 13:09 naomimyselfandi

Implemented in #5253

MjnMixael avatar Mar 24 '23 14:03 MjnMixael