FreeDelete-Software / ALPACASclient

Advanced, Lightweight, Point-And-Click Adventure Style graphical client for Evennia servers built in Godot.
Other
2 stars 0 forks source link

Process color coding of game output. #5

Open mfreidel opened 3 years ago

mfreidel commented 3 years ago

Process Evennia's color coding system for output to the RichTextLabel node with bbcode tags.

mfreidel commented 3 years ago

Current idea is to split the message data by the |n color code and essentially assume it's always used as a closing tag. Then, each array element of the split string should have (theoretically) one color tag to change via some pattern matching and string manipulation.

Potential issue is that Evennia supports many different "Text Tags" in its output, including some color options I wasn't aware of. More information on that is avaliable here

mfreidel commented 3 years ago

The more I research this, the more I think it's something that should be in the 0.2.x release. Evennias color system is much more complex than I initially thought, and I just learned about TextTags a few days ago. This is going to be a ton of regex and playing around. Enabling "screenreader" mode upon connecting will remove all of the text tags (plus plenty of other formatting) from the game output. It doesn't look pretty, but these are the initial stages.

mfreidel commented 3 years ago

This is turning out to seem more like a feature that will be handled at the server until some of Evennia's bugs are fixed. I've been doing a lot of research in order to potentially contribute with some of the fixes, but I'm not sure how helpful I can be at the moment. I may have to just retool its current HTML translation code to write in BBCode (or using a contrib module). That will probably also help me get more familiarized with its inner workings.