XToLevel

Custom LDB Patterns

The following describes how to use custom patterns in the XToLevel LDB text output. Custom patterns should be entered into the text box in the config window, after selecting "custom" from the dropdown.

There are two methods to create patters: the simplyfied <tag> version, specially created to make simple patters easy to create; or the custom {tag} version, used internally by the application. A bit more complex, but a lot more flexible.

Note! Storing your patters in a safe place outside the game is a good idea. Patterns might be lost during patches and addon updates.

1. The simple version

This is a simplified version, which is good for creating simple patterns.

Availble tags:

  • <kills> - The amount of kills a player needs to level.
  • <quests> - The amount of quests a player needs to level.
  • <bgs> - The amount of battlegrounds a player needs to level.
  • <bgo> - The amount of battleground objectives a player needs to level.
  • <xp> - The percentage or the number of bars of XP gained or remaining for the current level, depending on the user settings. For the percent value, the % is included.
  • <xpnum> - The XP gained or remaining for the current level.
  • <rested> - The EXTRA experience you will collect for mob kills.
  • <restedp> - The percentage of your current level the rested bonus covers. (150% or 30 bars is the ceiling)
  • <timer> - The estimated time remaining until you reach your next level, based on your current XP per hour.
  • <guildxp> - The percentage completed of the current level for your guild. (Experimental!)
  • <guilddaily> - The percentage completed of the current daily maximum for you guild. (Experimental!)

Each of those tags can optionally be defined with a number of attributes:

  • label - A string to be added in front of the tag's value.
  • seperator - A string used to separate the tag from the next tag.
  • post - A string to be appended to the value. Will be colored by XP progress if enabled.

Examples:

<font color="gray">Pattern:</font> <kills label="" post="K"><quests label="" post="Q" seperator=" ">
<font color="gray">Output</font>: 100K 20Q
<font color="gray">Pattern:</font> <xpnum label="XP"> [<xp>] <rested label="R"> [<restedp>]
<font color="gray">Output</font>: XP: 1,234 [23.4%] R: 3.210 [145%]

2. The complete version

The patterns use a very basic HTML-like syntax, using {} rather than <>. For example:

K: {kills} Q: {quests} XP: {xp}

Note that it is possible to nest certain tags within each other (see the "countdown" pattern for example), but this is highly unpredictable, and this was never, and is not now, a planned feature. Experiment if you want, but I will not consider weird behavior in nested tags as bugs. Disabling the parent tag in the in-game configuration will also disable any nested tags.

Available tags are:

  • {kills} - The amount of kills a player needs to level.
  • {quests} - The amount of quests a player needs to level.
  • {bgs} - The amount of battlegrounds a player needs to level.
  • {bgo} - The amount of battleground objectives a player needs to level.
  • {xp} - The percentage or the number of bars of XP gained or remaining for the current level.
  • {xpnum} The XP gained or remaining for the current level.
  • {timer} - The estimated time remaining until you reach your next level, based on your current XP per hour.

Inside each of these tags, you can use the following values:

  • {$label} - Will be replaced by a locale specific label defined in the locale files.
  • {$value} - Will be replaced by the tag's value.
  • {$seperator:*} - Will be used to seperate tags when needed. The * char should be replaced with whatever char you want.

Additionally, you can use the following tags to color the output:

  • {color=RRGGBB} - The RGB color will be applied to all enclosed text. NOTE! Nesting these tags will not work!
  • {progress} - Applies the color representing the XP progress to the enclosed text. Only usable inside one of the tags mentioned above.!
Example:
<font color="gray">Pattern:</font> {kills}{$seperator: }{color=FF0000}{$label}:{/color} {progress}{$value}{/progress}{/kills}
<font color="gray">Output:</font> <font color="red">K:</font> <font color="lime">123</font>

These are the built in patterns.

  • Default:
    {kills}{$seperator: }{color=cfcfdf}{$label}:{/color} {progress}{$value}{/progress}{/kills}{quests}{$seperator: }{color=cfcfdf}{$label}:{/color} {progress}{$value}{/progress}{/quests}{bgs}{$seperator: }{color=cfcfdf}{$label}:{/color} {progress}{$value}{/progress}{/bgs}{xp}{$seperator: }{progress}[{$value}]{/progress}{/xp}
  • minimal:
    {kills}{progress}{$value}{/progress}{/kills}{quests}{color=cfcfdf}{$seperator:/}{/color}{progress}{$value}{/progress}{/quests}{bgs}{color=cfcfdf}{$seperator:/}{/color}{progress}{$value}{/progress}{/bgs}{xp}{color=cfcfdf}{$seperator:/}{/color}{progress}{$value}{/progress}{/xp}
  • minimal_dashed:
    {kills}{progress}{$value}{/progress}{/kills}{quests}{color=cfcfdf}{$seperator:-}{/color}{progress}{$value}{/progress}{/quests}{bgs}{color=cfcfdf}{$seperator:-}{/color}{progress}{$value}{/progress}{/bgs}{xp}{color=cfcfdf}{$seperator:-}{/color}{progress}{$value}{/progress}{/xp}
  • brackets:
    {kills}{progress}[{$value}]{/progress}{/kills}{quests}{progress}[{$value}]{/progress}{/quests}{bgs}{progress}[{$value}]{/progress}{/bgs}{xp}{progress}[{$value}]{/progress}{/xp}
  • countdown:
    {xpnum}{color=cfcfdf}XP:{/color}{$seperator: }{progress}{$value}{/progress}{xp} {color=cfcfdf}({/color}{progress}{$value}{/progress}{color=cfcfdf}){/color}{/xp}{$seperator: }{/xpnum}{rested}{color=cfcfdf}R:{/color}{$seperator: }{progress}{$value}{/progress} {restedp}{color=cfcfdf}({/color}{progress}{$value}{/progress}{color=cfcfdf}){/color}{/restedp}{$seperator: }{/rested}

You must login to post a comment. Don't have an account? Register to get one!

Facts

Date created
Jul 07, 2011
Last updated
Jul 09, 2011

Author