base
base copied to clipboard
Enhance second-person frag message with existing obituary messages
Opportunity
When a kill occurs, depending on the method of death, the top of the screen says either:
-
You fragged
$DECEASED - You fragged yourself
-
You were fragged by
$DECEASED
When the 'obituary' feed is turned on, a set of richer messages is printed to the screen. They are defined here: https://github.com/redeclipse/base/blob/70d6e58e58789a09437e4b12d7c00fd9009a3f75/src/game/weapons.h#L932-L1085
These are characterful messages, and there's an opportunity to re-use them to enhance the frag message at the top of the screen, which all players see - even on the default settings (no obituaries in feed).
Solution needs
Will vary depending on the message presented.
- [ ] 'You fragged
$DECEASED' could have the word 'fragged' substituted as-is. All the lines can be reused today by concatenating "You$OBIT_TEXT$DECEASED". - [ ] Suicide messages require a new variable to hold their second-person variants, and a quick edit to change a few lines from the third-person article "their" to "you".
- [ ] The 'You were fragged by' messages would require re-architecting some of the mesages so they make sense. We can replace 'fragged' with most obit messages, but some obit messages rely on different grammar.
For the messages with a different grammatical structure, I would argue this could be better achieved by changing the concatenative approach of today, with inline string substitution. This proposal extends to the obit feed.
e.g. "$FRAGGERblew to pieces$DECEASED" reads oddly as it is. But "$FRAGGERblew$DECEASEDto pieces" would work much better for the third-person obituary message, as well as the second-person message proposed here (replace$FRAGGERwith "You"). This is worth bearing in mind for the "You fragged" scenario as well.
NB: All variable references in this issue are in pseudocode.