L* R*
HOME FORUM DOWNLOADS
Content
  Links
     Browse SVN
     SVN Commit log
     Documentation (Wiki)
  Developers
     Taskmanager
User
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 01, 2008, 12:14:40 PM

Login with username, password and session length
Search



Advanced search
Support GoPHP5.org
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Development > Coding and development discussion > Topic: Standardizing colors using the colors module
Pages: 1 [2] 3   Go Down
« previous next »
Print
Author Topic: Standardizing colors using the colors module  (Read 1695 times)
0 Members and 1 Guest are viewing this topic.
Alreadythere
BeBot Maintainer
Administrator
Grandmaster
********
Offline Offline

Posts: 1085


Re: Standardizing colors using the colors module
« Reply #15 on: March 10, 2007, 05:45:55 AM »

Quote from: pusikas on March 09, 2007, 09:05:26 PM
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.

Quote from: pusikas on March 09, 2007, 09:05:26 PM
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.
Logged
Alreadythere
BeBot Maintainer
Administrator
Grandmaster
********
Offline Offline

Posts: 1085


Re: Standardizing colors using the colors module
« Reply #16 on: April 12, 2007, 12:40:30 PM »

If anyone got a decent XML layout for this I'll go around and add themes support into the colors module.
Logged
Blueeagle
Omnipotent
BeBot Developer
Expert
********
Offline Offline

Gender: Male
Posts: 313



Re: Standardizing colors using the colors module
« Reply #17 on: April 12, 2007, 07:05:20 PM »

I'm not the worlds best on XML but I'll give it a shot.

Code:
<bebot color themes>
 <version>0.3.svn</version>
 <author>KoolDude</author>
 <email>uberkool@uberhost.net</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 #bebot@irc.funcom.com IRC channel. Smiley
Logged

The only problem that can't be solved by adding another wrapper is having too many wrappers.
Alreadythere
BeBot Maintainer
Administrator
Grandmaster
********
Offline Offline

Posts: 1085


Re: Standardizing colors using the colors module
« Reply #18 on: April 13, 2007, 04: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.

Quote from: Alreadythere on March 09, 2007, 01:18:58 PM
  • 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.
Logged
Glarawyn
BeBot Developer
Champion
********
Offline Offline

Posts: 414



Re: Standardizing colors using the colors module
« Reply #19 on: April 13, 2007, 10:21:57 AM »

Quote from: Vhab on March 06, 2007, 01:08:12 AM
About the xml structure, try not to nest elements without really needing it, just makes parsing a hassle Tongue (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">
Logged
Vhab
BeBot Contributor
Experienced
*******
Offline Offline

Posts: 158


WWW
Re: Standardizing colors using the colors module
« Reply #20 on: April 13, 2007, 10:29:08 AM »

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.
Logged
Alreadythere
BeBot Maintainer
Administrator
Grandmaster
********
Offline Offline

Posts: 1085


Re: Standardizing colors using the colors module
« Reply #21 on: April 13, 2007, 11:20:16 AM »

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.
Logged
Blueeagle
Omnipotent
BeBot Developer
Expert
********
Offline Offline

Gender: Male
Posts: 313



Re: Standardizing colors using the colors module
« Reply #22 on: April 13, 2007, 04:14:09 PM »

As I said. I'm no master of XML. Smiley
Logged

The only problem that can't be solved by adding another wrapper is having too many wrappers.
Alreadythere
BeBot Maintainer
Administrator
Grandmaster
********
Offline Offline

Posts: 1085


Re: Standardizing colors using the colors module
« Reply #23 on: April 18, 2007, 07:24:49 AM »

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.
Logged
Vhab
BeBot Contributor
Experienced
*******
Offline Offline

Posts: 158


WWW
Re: Standardizing colors using the colors module
« Reply #24 on: April 18, 2007, 08:57:55 AM »

ooh, small note about the xml.
valid xml requires there only to be 1 root element. think you could place the <color> within <theme> ?
Logged
Alreadythere
BeBot Maintainer
Administrator
Grandmaster
********
Offline Offline

Posts: 1085


Re: Standardizing colors using the colors module
« Reply #25 on: April 18, 2007, 09:07:53 AM »

So it should be something like the following?
Code:
<theme name="name">
<color name="color1">
<color name="color2">
</theme>
Logged
Vhab
BeBot Contributor
Experienced
*******
Offline Offline

Posts: 158


WWW
Re: Standardizing colors using the colors module
« Reply #26 on: April 18, 2007, 09:56:30 AM »

yep, that should do the trick.
Logged
Alreadythere
BeBot Maintainer
Administrator
Grandmaster
********
Offline Offline

Posts: 1085


Re: Standardizing colors using the colors module
« Reply #27 on: April 18, 2007, 10:44:53 AM »

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 Smiley
Logged
ph0enix
Freshman
*
Offline Offline

Posts: 1


Re: Standardizing colors using the colors module
« Reply #28 on: April 24, 2007, 03: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 Cheesy

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 Sad
The Problme with body color is still there Sad
« Last Edit: April 24, 2007, 03:30:31 AM by ph0enix » Logged
Alreadythere
BeBot Maintainer
Administrator
Grandmaster
********
Offline Offline

Posts: 1085


Re: Standardizing colors using the colors module
« Reply #29 on: April 24, 2007, 03: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.
Logged
Pages: 1 [2] 3   Go Up
Print
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Development > Coding and development discussion > Topic: Standardizing colors using the colors module
« previous next »
 
Jump to:  

Recent
[request] Raid timers
by Alreadythere
[Today at 11:42:32 AM]

Shared DB online list
by Temar
[Today at 01:55:47 AM]

relay colors
by Temar
[Today at 01:54:56 AM]

BeBot v0.6.0 released
by Alreadythere
[November 30, 2008, 05:32:00 PM]

Change to Bid.php
by Temar
[November 30, 2008, 11:41:44 AM]

OnlineOrg
by Jiheld
[November 29, 2008, 12:44:27 PM]

Silly Newbie Question.
by Temar
[November 29, 2008, 12:00:02 PM]

massive_pvp_time_table 1
by gerborg
[November 29, 2008, 06:55:35 AM]

Bot not see Guild Chat
by Delvar
[November 28, 2008, 08:30:34 AM]

Starting Bot
by Allisande
[November 28, 2008, 07:08:21 AM]
Stats
Members
Total Members: 1243
Latest: Whackoeng
Stats
Total Posts: 11143
Total Topics: 1505
Online Today: 21
Online Ever: 168
(July 01, 2007, 09:30:02 PM)
Users Online
Users: 3
Guests: 18
Total: 21
gerborg
Ifris

Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC
TinyPortal v0.9.8 © Bloc | NewDef design by Bloc
Page created in 0.71 seconds with 28 queries. (Pretty URLs adds 0.032s, 4q)
Loading...