Alando1-doom / Toby-Accessibility-Mod-for-Doom

This is a Doom wad/mod designed to add accessibility features to assist blind/visually impaired players navigate the maps of the classic Doom games.
2 stars 1 forks source link

[Feature] Add prefix for chat messages from players #31

Open proydoha opened 11 months ago

proydoha commented 11 months ago

by stormdragon2976 » Tue Nov 28, 2023 9:29 am Part of the system I created gathers some of the items printed to the console and sends them through speech, things like when it automatically saves, the name of the map, etc.

One problem I am having currently is with the radio. If someone changes their name in settings, the regexp match I use to get that information no longer matches. Would it be possible to add the word "Radio:" before the name of the person speaking to the console output? If that can be done, making it speak the messages sent over radio would be easy.

Needs investigation. Possibly BaseStatusBar class could help with that. There are following methods that might handle that ( ? ) https://github.com/ZDoom/gzdoom/blob/master/wadsrc/static/zscript/ui/statusbar/statusbar.zs

virtual bool ProcessNotify(EPrintLevel printlevel, String outline) { return false; }
virtual void FlushNotify() {}
virtual bool ProcessMidPrint(Font fnt, String msg, bool bold) { return false; }
virtual bool DrawChat(String txt) { return false; }
virtual bool DrawPaused(int player) { return false; }

I have no idea how it works though

Alando1-doom commented 11 months ago

I wonder if there is a workaround. Maybe an alternate "Talk" system? I was thinking a system similar to that of Unreal Tournament. When the player wants to "talk," they have a selection of things to say like a type of order, status, or taunt. Not sure if this a good idea but it was the first thing that popped into my head.

proydoha commented 11 months ago

What he meant is that when he's directing console output from GZD into text to speech software he wants to know when chat messages are sent. Bt default its just prefixed by player's name. There is not enough information for him to catch it (filter out from other console output) with a regular expression so he suggested prefixing them also with "radio".