Awbz / OneLife

a multiplayer survival game of parenting and civilization building
http://onehouronelife.com
Other
72 stars 16 forks source link

Add support for Text-to-Speech #96

Open Adrinus opened 4 years ago

Adrinus commented 4 years ago

Something built-in would be amazing, but a simple hack-around would be to generate, and keep automatically updated a plain-text log file of all text a client can see on screen, perhaps indexing it by speaking player's name:

Joe Smith: you are johanna
You: k
Garry Smith: we need wheat

Something like the above that automatically updates would probably be enough to get something simple in python running at the least.

The log would need to be deleted or cleared on client close as well, or at least on new launch.

Awbz commented 4 years ago

Built-in Text-to-Speech would be beyond the scope of what I'd be willing to add to this particular mod, especially with the level of trolling/spamming that would inevitably happen. That being said, it isn't necessarily a bad idea and I think the base client already has what you'd need (for python, et al.) to implement some sort of personal Text-to-Speech setup.

If you're strictly looking for speech output, you can already parse this in the stdout.txt file, which also happens to already get re-created with each new launch of the client. While it doesn't directly give you player names associated with the speech, there may be ways to fetch that information from the public life log data if it's really necessary. They're already indexed by the player's ID, so you could associate different voices for different indices or something of the ilk.

As an aside, separate logging of speech could also prove useful with "faking" a modern-style MMO chat system...which has also been a long-requested feature. So while I don't plan on implementing any sort of Text-to-Speech feature(s), I'm going to leave this issue open as a reminder about possibly using this separate speech logging idea for "MMO-style global chat."