collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18363
  • stats Total Topics: 2500
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: Standardizing colors using the colors module  (Read 8280 times)

0 Members and 2 Guests are viewing this topic.

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: Standardizing colors using the colors module
« Reply #15 on: March 10, 2007, 11:45:55 am »
Some modules use additional colors like a "light highlight" (!whois uses it for level and profession, and the "real" highlight, yellow, for the nickname).
That's what the schemes are for - if a module needs more defined colors, just go and add them for the module. No need to clutter the general theme with it.

Whatever format is being used for color schemes, would be cool if you could reuse the stuff you have defined already. Like, if you already defined gcerror (error message in guildchat, whatever) to be #FF0000, you can set pgerror to gcerror instead of setting it to #FF0000 as well.
Personally I don't intent to loop the colors in the theme over the already defined colors of the theme. With five colors total most likely that's just not needed, editing 2 lines instead of one won't really hurt anyone.

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: Standardizing colors using the colors module
« Reply #16 on: April 12, 2007, 07:40:30 pm »
If anyone got a decent XML layout for this I'll go around and add themes support into the colors module.

Offline Blueeagle

  • Omnipotent
  • BeBot Hero
  • ******
  • Posts: 323
  • Karma: +0/-0
Re: Standardizing colors using the colors module
« Reply #17 on: April 13, 2007, 02:05:20 am »
I'm not the worlds best on XML but I'll give it a shot.

Code: [Select]
<bebot color themes>
 <version>0.3.svn</version>
 <author>KoolDude</author>
 <email>[email protected]</email>
 <web>http://uberhost.net/kooldud3</web>
 <theme>
  <name>standard</name>
  <module>
   <name>global</name>
   <normal>#123456</normal>
   <highlight>#789012</highlight>
   <error>#345678</error>
  </module>
  <module>
   <name>ao</name>
   <tell>#901234</tell>
   <team>#567890</team>
  </module>
 </theme>

 <theme>
  <name>WayKoolColor5</name>
  <module>
   <name>global</name>
   <normal>#123456</normal>
   <highlight>#789012</highlight>
   <error>#345678</error>
  </module>
  <module>
   <name>ao</name>
   <tell>#901234</tell>
   <team>#567890</team>
  </module>
 </theme>
</bebot color themes>

Not sure if that's even close to being sane. I'm not an XML kind of dude.

Now the question is: Should there be a separate file for each module or should all of it be squeezed into one file?

In either case it is my opinion that we should limit the amount of colors to a core set. Vhab suggested something like 3 colors. That might be a bit low. The list I made would perhaps be too much too.

After reconsidering I am thinking something like

* Headline - For use on top of windows and perhaps with !c
* Highlight - For use on stuff that is to be highlighted like nicks, levels
* Normal - For normal text output to all channels.
* Error - For error messages apperantly.
* Enabled - For stuff that is turned ON (Might be skipped and use highlight instead)
* Disabled - For stuff that is turned OFF (As above
* Omni, Neutral and clan - For indicating faction (might be used instead of highlight for nicks

IMO that should be enough colors to liven up the output while keeping the theme configuration needs to a minimum.

I'm not saying we shouldn't support adding more colors but the modules shipped with the bot ought to use these standards.

By the way alreadythere. I wish you would hang with us on #[email protected] IRC channel. :)
The only problem that can't be solved by adding another wrapper is having too many wrappers.

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: Standardizing colors using the colors module
« Reply #18 on: April 13, 2007, 11:15:23 am »
Not sure we need all fields in your XML tree tbh. But a few more won't make much trouble I guess, while allowing nice informations.

  • normal output
  • highlighted output
  • error text
  • blob text
  • blob title
I was planning to use those 5 colors in themes. For internal uses in the color modules they would be counted as colors, so you can make a scheme with the color ref of normal.

Now the question is should we allow scheme definitions in theme files too as an option?

It would allow a nice way of transporting whole theme and scheme definitions around, setup your bot, export all into a theme file, and overload any predefined values in next bot. But of course this would create some more overhead.

Offline Glarawyn

  • BeBot Hero
  • ******
  • Posts: 521
  • Karma: +0/-0
Re: Standardizing colors using the colors module
« Reply #19 on: April 13, 2007, 05:21:57 pm »
About the xml structure, try not to nest elements without really needing it, just makes parsing a hassle :P (I'll remember to post my xml parser later if we end up using xml for stuff)
So assuming there's only 1 <theme> in each file, we can lose the outer <xml>.
And maybe for the ease of editing, use attributes rather than elements
<element name="error" htmlcc="##557799" description="Color for WTFUSUX messages">

Offline Vhab

  • Contributor
  • *******
  • Posts: 180
  • Karma: +0/-0
    • VhaBot Forum
Re: Standardizing colors using the colors module
« Reply #20 on: April 13, 2007, 05:29:08 pm »
what i keep as general rule when working with xml, make sure all element names are constant and adding more data shouldn't cause newly named elements.
so instead of adding <colorname>#123123</colorname> you're better off with <color name="colorname" color="#123123" /> imo.

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: Standardizing colors using the colors module
« Reply #21 on: April 13, 2007, 06:20:16 pm »
How about one theme per file and the following tags?
  • <theme name="somename" version="0.1" author="someauthor" link="somelink" /> optional for some information about theme and author
  • <color name="name" code="code" /> for the colors of a theme
  • <scheme module="modname" name="schemename" color="colorname" /> for actual scheme information, optional again

That list got all information, is easy to parse if you keep to one tag per line for simplicity, and should cover all needs.

Offline Blueeagle

  • Omnipotent
  • BeBot Hero
  • ******
  • Posts: 323
  • Karma: +0/-0
Re: Standardizing colors using the colors module
« Reply #22 on: April 13, 2007, 11:14:09 pm »
As I said. I'm no master of XML. :)
The only problem that can't be solved by adding another wrapper is having too many wrappers.

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: Standardizing colors using the colors module
« Reply #23 on: April 18, 2007, 02:24:49 pm »
Implemented a first version of color themes. Theme files reside in the theme/ directory under the bot root, and end on the extension .colors.xml.

Right now 5 colors are expected in themes:
  • normal
  • highlight
  • error
  • blob_text
  • blob_title

Recognized XML tags are:
  • <theme name="somename" version="0.1" author="someauthor" link="somelink" /> optional for some information about theme and author
  • <color name="name" code="code" /> for the colors of a theme using a color code
  • <color name="name" color="colorname" /> for the colors of a theme using an existing color as color

Currently there is no UI to change the theme file yet.

I've left out the scheme support yet. Not sure if I'll add that to theme files, as it creates a few questions on updates. Should a scheme definition in a theme file be written into the table? And if you update it ingame should it be written to the theme file? Best would be to add support for importing and exporting scheme definition files, so you can setup your schemes, write them to a file and share or use in other bots.

Offline Vhab

  • Contributor
  • *******
  • Posts: 180
  • Karma: +0/-0
    • VhaBot Forum
Re: Standardizing colors using the colors module
« Reply #24 on: April 18, 2007, 03:57:55 pm »
ooh, small note about the xml.
valid xml requires there only to be 1 root element. think you could place the <color> within <theme> ?

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: Standardizing colors using the colors module
« Reply #25 on: April 18, 2007, 04:07:53 pm »
So it should be something like the following?
Code: [Select]
<theme name="name">
<color name="color1">
<color name="color2">
</theme>

Offline Vhab

  • Contributor
  • *******
  • Posts: 180
  • Karma: +0/-0
    • VhaBot Forum
Re: Standardizing colors using the colors module
« Reply #26 on: April 18, 2007, 04:56:30 pm »
yep, that should do the trick.

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: Standardizing colors using the colors module
« Reply #27 on: April 18, 2007, 05:44:53 pm »
Added UI for themes (!theme command).

Changed default XML structure to valid one - not that I really do any XML parsing, I just do simple pattern matching :)

Offline ph0enix

  • BeBot Rookie
  • *
  • Posts: 1
  • Karma: +0/-0
Re: Standardizing colors using the colors module
« Reply #28 on: April 24, 2007, 10:18:09 am »
is there a list of relevant color names for an Defualt.colors.xml?
The folder themes in trunk is empty...
Myself and a friend of mine tried the 5 colors that you mentioned in your previous post.

Quote
Right now 5 colors are expected in themes:

    * normal
    * highlight
    * error
    * blob_text
    * blob_title


Recognized XML tags are:

    * <theme name="somename" version="0.1" author="someauthor" link="somelink" /> optional for some information about theme and author
    * <color name="name" code="code" /> for the colors of a theme using a color code
    * <color name="name" color="colorname" /> for the colors of a theme using an existing color as color

But the blob_text and blob_title is black all the time.

It would be nice to find a default xml in one of the next revisions :D

Edit: We found a function wich tries to create this file. But we did not know that the bot needs writing rights on the themes folder :(
The Problme with body color is still there :(
« Last Edit: April 24, 2007, 10:30:31 am by ph0enix »

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: Standardizing colors using the colors module
« Reply #29 on: April 24, 2007, 10:42:17 am »
Check the colors table, every color name in there is supported as colorname for theme colors. Most likely it's some spelling error, though the Default file should be spelled correctly.

Going to add Default theme file in themes/ asap though, should avoid some confusion.

 

* Recent Posts
[AoC] special char for items module by bitnykk
[February 09, 2024, 09:41:18 pm]


0.8.x updates for AoC by bitnykk
[January 30, 2024, 11:16:08 pm]


0.8.x updates for AO by bitnykk
[January 30, 2024, 11:15:37 pm]


BeBot still alive & kicking ! by bitnykk
[December 17, 2023, 12:58:44 am]


Bebot and Rasberry by bitnykk
[November 29, 2023, 11:04:14 pm]

* Who's Online
  • Dot Guests: 647
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.
* Forum Staff
bitnykk admin bitnykk
Administrator
Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator
SimplePortal 2.3.7 © 2008-2024, SimplePortal