• Print

Author Topic: Tsay enhancement  (Read 21 times)

0 Members and 1 Guest are viewing this topic.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Tsay enhancement
« on: March 21, 2015, 06:30:56 am »
I was about to suggest something to the developer of Rsay as an enhancement when I realized, why not an enhancement for us?
Add an additional parameter, optional, to tsay/@@ that when typed, changes the output color.
Not typed - standard color used.
Typed - uses that color.
I imagine most basic addition would be the "standard" 16 text colors to select from. (think old school DOS "color" command selection)
Black, Blue, Green, Aqua, Red, Purple, Yellow, White, Light Blue, Light Green,  Light Aqua, Light Red, Light Purple, Light Yellow, Bright White
Not fully sure what to use as parameter.
Typing @@ red Warning! - is one thing.
Typing @@ light_purple I love purple! - is totally another.
Perhaps Hex could be used
"@@ 0 Server uses ULX and its awesome" - black
"@@ 1 Server uses ULX and its awesome" - blue
" ..."
"@@ F Server uses ULX and its awesome" - bright white

But then with hex we are concerned with people trying to type (and forgetting, cause I know I would) "1 minute remainging until server restart" (but then, they'd hopfully be remembering to use "@@ 4 1 minute..." anyway.

Perhaps after that basic functionality, XGUI panel could later be whipped up to allow some custom additions. AA, BB, XX with color hue/slider selections for users.

Ok. I think that's the brightest ULX lightbulb idea I've had in a while.
Have fun with it.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Stickly Man!

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 1270
  • Karma: 164
  • What even IS software anymore?
    • XGUI
Re: Tsay enhancement
« Reply #1 on: March 22, 2015, 07:00:26 pm »
AMXX used to support color codes for tsay.. or was it csay: @@r This is a red message! It would be a nifty idea, but we want to make sure the formatting works such that a message doesn't accidentally get treated like a color :P
Join our Team Ulysses community discord! https://discord.gg/gR4Uye6

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Tsay enhancement
« Reply #2 on: April 15, 2015, 03:53:10 pm »
Sorry, I didn't intend to wait so long before replying. I'm very... cautious about this type of feature. I do not like adding things that require our users to learn a specific syntax or lexicon, unless I can't avoid it or the feature justifies it.

For example, our special way of formatting "ulx ent" parameters frustrates me, but I figure it's an advanced enough command and a simple enough syntax to justify it.

But for tsay... I'm more conflicted. It was intended to be a dead-simple way to shoot a message across. Adding specific flags doesn't necessarily change that, but it complicates things. If there was a reasonably well-accepted standard of specifying colors in text, I'd probably go for that. HTML comes to mind, but is way too verbose for this purpose (who wants to type '<font color=...>'?). If Markdown/Markup supported coloring, I'd jump on that. Alas, that is not part of that standard.
Experiencing God's grace one day at a time.

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2727
  • Karma: 430
    • |G4P| Gman4President
Re: Tsay enhancement
« Reply #3 on: April 16, 2015, 02:37:25 am »
Why don't we just use Hex or RGB?
We could have an optional tag at the beginning of a TSay
Example: @@ [FF0000] This is my message.

This would be a red TSay. If the tag is invalid or not there, we just default to white or black or whatever the default TSay color is now. It's adding a feature that some might find useful, while essentially not changing the current function for everyone else.

  • Print