Provide a text version of TRP3 only feature for MSP
Ellypse opened this issue ยท 1 comments
As discussed on this US forums post with Bor, developer of the XRP add-on, we could provide more compatibility with other RP add-on via the Mary Sue Protocol by basically create a text only representation of the data to be appended to the character description and be sent alongside it.
We would try to make the text version as close to the graphic version as possible, within the limitations of text. Here's an example
== At first glance ==
[At first glance icon]
Title
Description
[At first glance icon]
Title
Description
== Personality traits ==
Good --++++ Evil
Pure ++++-- Filthy
More features could provide a text based representation, like the Total RP 3: Extended equipped items, our additional RP flags like accepts injuries or death.
Bor (on Blizzard's forums)
If we were to simply append those information to the character description we would be assured of a compatibility with add-ons that wouldn't be updated to support new fields (MRP).
That's certainly one option. The big downside is that it does prevent other addons supporting those features without further changes on all sides in the future (so it may eventually require a revisit), but considering how significant the "at a glance" has reportedly become for a lot of peoples' profiles, that's probably a downside worth taking for now. I'd also like to see specifically at-a-glance, for probably obvious reasons, added to the top of the description, rather than the end.
For some of those other fields, rather than just squashing them into the description (DE) field, you could opt to put them in history (HI), too. It's a bit of a misnomer to call it history, in my opinion, as it's actually where I prefer adding personality information too -- essentially, things that are not physically visible. Injuries/equipped items/etc. are great for a physical description, but appending (or prepending) personality traits to the history, for the moment at least, would likely be a better place to put them.
Edit: It may be worth, just in case another addon wants to do a bit of extra formatting ever, defining a standard 'section separator' for the description/history fields when concatenating extra data into them. Something visually friendly, but can be matched easily to separate out things for display if desired. Maybe something like:
\n\n----------\n\n
Two line breaks -- resulting in one blank line -- followed by ten dashes, and another two line breaks. The specifics of it aren't terribly important, as long as it looks fine in plain text and is matchable.For TRP, it could obviously be used to separate the different profile data sources. In other addons they could, for example, scroll by section rather than line, or snip out the first section of a profile to display in a "quick view" of sorts. And yet, addons that weren't aware of it, would still work just fine -- only showing a visually simple separator bar.
This is the sort of thing I love doing, and it's why I like text-based formats (I heart RST, >Markdown, etc. too). I know it's a very different approach from TRP, but, hey, it works in some places.
Edit2:
07/27/2017 05:56 AM Posted by Ellypse
It's basically having a toString() version of our extra featuresI just remembered to note, if you're using tables for these that you can attach a metatable to, you can directly make it work with the built-in tostring(). An __tostring entry in a metatable is executed when tostring() is run on it, if it exists and is a function. Bit of an aside there, but it's a neat little thing that can make for some very slick code.
We need to change the system implemented in commit ed91eea to:
- enable additional data providers to indicate which field they should be added to
- and if they should be appended or prepended.