consolecolors.txt: Difference between revisions

From OpenKore Wiki
Jump to navigation Jump to search
mNo edit summary
No edit summary
 
(7 intermediate revisions by 6 users not shown)
Line 2: Line 2:


There is one required configuration option in this file that should appear at the first line (excluding comments and empty lines):
There is one required configuration option in this file that should appear at the first line (excluding comments and empty lines):
  useColors <flag>
 
'''useColors''' enables or disables console colors. Set '''<flag>''' to '''1''' to enable, or '''0''' to disable.
  useColors <[[boolean]]>
 


This file has four possible sections that correspond to the type of messages printed in the console. The four message types are:
This file has four possible sections that correspond to the type of messages printed in the console. The four message types are:
Line 9: Line 10:
* '''warning''' - warning message. It warns the user that a possible non-fatal error has occured or will occur.
* '''warning''' - warning message. It warns the user that a possible non-fatal error has occured or will occur.
* '''error''' - error message. It tells the user that a non-recoverable error has occured. A "non-recoverable error" could either be a fatal error, or an error that prevents the program from performing an action the user requested.
* '''error''' - error message. It tells the user that a non-recoverable error has occured. A "non-recoverable error" could either be a fatal error, or an error that prevents the program from performing an action the user requested.
* '''debug''' - debugging message.<message domain> <foreground>/<background>
* '''debug''' - debugging message.




==Syntax==
== Syntax ==
Each section may contain one or more lines that observes the following syntax.  
Each section may contain one or more lines that observes the following syntax.  
<message domain> <foreground>/<background>


==Details==
<domain> <foreground>/<background>


===<message domain>===
=== Details ===
This is the name of the domain (message group) whose color you want to customize. You can find out the corresponding domain name of certain messages by setting the config.txt option showDomain to 1. You can set the default color for all domains other than the ones you already specified by using the keyword "default".
----


===<foreground>===
; <[[domain]]>
This is a color keyword that specifies the foreground color of a message. Valid color keywords include: black, grey (or gray), darkgrey (or darkgray), white, red, darkred, green, darkgreen, yellow, brown, blue, darkblue, magenta, darkmagenta, cyan, darkcyan, and default. The default foreground color (and the actual colors) may vary with each interface.  
: This is the name of the domain (message group) whose color you want to customize. You can find out the corresponding domain name of certain messages by setting the config.txt option [[showDomain]] to 1. You can set the default color for all domains other than the ones you already specified by using the keyword "default".  


===<background>===
 
This is a color keyword that specifies the background color of a message. Valid color keywords are the same as those defined in <foreground>.  
; <foreground>
: This is a color keyword that specifies the foreground color of a message. Valid color keywords include: black, grey (or gray), darkgrey (or darkgray), white, red, darkred, green, darkgreen, yellow, brown, blue, darkblue, magenta, darkmagenta, cyan, darkcyan, and default. The default foreground color (and the actual colors) may vary with each interface.
 
 
; <background>
: This is a color keyword that specifies the background color of a message. Valid color keywords are the same as those defined in '''<foreground>'''.  
The default background color (and the actual colors) may vary with each interface.  
The default background color (and the actual colors) may vary with each interface.  


==Examples==
 
== Examples ==
In the example below, messages when you attack a monster will be shown in blue text, while messages when a monster attacks you will be in dark red. System messages will be shown in yellow text over a dark green background. And debug messages will be shown in magenta.  
In the example below, messages when you attack a monster will be shown in blue text, while messages when a monster attacks you will be in dark red. System messages will be shown in yellow text over a dark green background. And debug messages will be shown in magenta.  
  useColors 1
  useColors 1
   
   
Line 39: Line 46:
  [debug]  
  [debug]  
  default magenta
  default magenta
'''''Note.''''' Lines that begin with the pound sign (#) are comment lines. They are ignored by Openkore.
 
 
[[Category:control]]

Latest revision as of 23:47, 26 April 2021

The file consolecolors.txt allows you to customize the colors used to highlight messages in the console.

There is one required configuration option in this file that should appear at the first line (excluding comments and empty lines):

useColors <boolean>


This file has four possible sections that correspond to the type of messages printed in the console. The four message types are:

  • message - normal message.
  • warning - warning message. It warns the user that a possible non-fatal error has occured or will occur.
  • error - error message. It tells the user that a non-recoverable error has occured. A "non-recoverable error" could either be a fatal error, or an error that prevents the program from performing an action the user requested.
  • debug - debugging message.


Syntax

Each section may contain one or more lines that observes the following syntax.

<domain> <foreground>/<background>

Details


<domain>
This is the name of the domain (message group) whose color you want to customize. You can find out the corresponding domain name of certain messages by setting the config.txt option showDomain to 1. You can set the default color for all domains other than the ones you already specified by using the keyword "default".


<foreground>
This is a color keyword that specifies the foreground color of a message. Valid color keywords include: black, grey (or gray), darkgrey (or darkgray), white, red, darkred, green, darkgreen, yellow, brown, blue, darkblue, magenta, darkmagenta, cyan, darkcyan, and default. The default foreground color (and the actual colors) may vary with each interface.


<background>
This is a color keyword that specifies the background color of a message. Valid color keywords are the same as those defined in <foreground>.

The default background color (and the actual colors) may vary with each interface.


Examples

In the example below, messages when you attack a monster will be shown in blue text, while messages when a monster attacks you will be in dark red. System messages will be shown in yellow text over a dark green background. And debug messages will be shown in magenta.

useColors 1

[message] 
attackMon blue 
attacked darkred
schat yellow/darkgreen

[debug] 
default magenta