On this page you find a detailed documentation about the template editor.
If you find an error or have any question feel free to ask a moderator or administrator.
Root-Element
All templates have one root element to start with.
This element is called <signature> and contains two child elements called <defaults> and <layout>
<signature>
<defaults>
...
</defaults>
<layout>
...
</layout>
</signature>
Defaults-Element
In this element you can override the default settings given by the editor to your own needs.
Elements are defined as usual (see elements list below).
<signature>
<defaults>
<text color="#FF0000" size="20" />
<shape type="rectangle" color="#0000ff" />
</defaults>
<layout />
</signature>
In this example we set the texts' default color to red and its size to 20.
Additionally we set the color blue for all shapes and its type to rectangle.
Layout-Element
Mostly your whole signature design is controlled by this element.
Elements will be parsed sequentially in the order listed in your template's xml code.
So please be sure to begin with the bottommost layer. E.g. if you want a text on a red shape, draw the shape first and than add the text.
Overview about all available tags and their attributes:
Tag: image
display Set if the object should be displayed
Values: True or false
Default: true
method Method how to change objects size of a different size is given as the objects original one.
Values: crop, resize or cropresize
Default: cropresize
position Sets the position of the included object on the signature. X and Y are integers
Values: XxY
Default: 0x0
size Sets the size of the object.
Values: widthxheight
Default: Object's own size
src Sets which object should be included in your signature.
Values: Choose any from the object-list available on the editor overview
Default: none
Tag: line
alpha Sets the transparency
Values: 0-100
Default: 0
angle Sets the line's angle. Must be an integer.
Values: 0-359
Default: 0
border-color Defines the line's text bordercolor.
Values: #HEX or R,G,B
Default: #000000
border-thickness Sets the thickness of this lines's textborder. Needs to be an integer.
Values: 0-10
Default: 0
display Sets if the line should be displayed
Values: True or false
Default: true
font-color Sets the line's color
Values: #HEX or R,G,B
Default: #000000
font-size Sets the fontsize on this line
Values: Integer; any fontsize supported by the selected font.
Default: 10
fontid Sets the fontid which should be used on that line
Values: Any fontID listed on the fontoverview
Default: 35 (Verdana)
line-spacing Sets the spacing between each line
Values: Any number
Default: 1.5
text-align Aligns the text by the given value.
Values: left, right, center
Default: left
vertical-align Aligns the text vertically by the given value.
Only effective if angle is 90 or 270.
Values: top, middle, bottom, baseline
Default: baseline
Tag: shape
alpha Sets the alpha-value (transparency) for this shape
Values: 0-100
Default: 100
arc Sets the pie's/arc's start and end angle in degrees (only positive angles and they must be integers)
Values: start-end or end; 0-720
Default: 0-90
color Sets the shape's color
Values: #HEX or R,G,B
Default: #000000
dashed Works only with type=line. Defines if it should be a dashed line or not
Values: True or false
Default: false
display Defines if the shape should be displayed or not
Values: True or false
Default: true
hollow Sets whether the shape should be hollow or not.
Values: True or false
Default: false
position Position of the shape. X and Y need to be integers.
Values: XxY
Default: 0x0
size Defines the size of the shape to draw.
Values: WidthxHeight
Default: 10x10
thickness Sets the thickness of this shape's border. Needs to be an integer.
Values: 1-10
Default: 1
type Defines the type of the shape
Values: rectangle, ellipse, arc, line, dashedline
Default: none
Tag: text
alpha Sets text's tranparency
Values: 0-100
Default: 0
angle Sets text's angle
Values: 0-359
Default: 0
border-color Defines the text's bordercolor.
Values: #HEX or R,G,B
Default: #000000
border-thickness Sets the thickness of this text's border. Needs to be an integer.
Values: 0-10
Default: 0
display Sets if the text should be displayed
Values: True or false
Default: true
font-color Defines the text's color.
Values: #HEX or R,G,B
Default: #000000
font-size Sets the text's fontsize
Values: any positive integer supported by the selected font
Default: 10
fontid Select which font should be used
Values: Any fontID listed in the fontoverview.
Default: 35 (Verdana)
line-spacing Sets the spacing between each line
Values: Any number
Default: 1.5
position Sets the position of the text's first letter. X and Y must be integers.
Values: XxY
Default: 0x0
text-align Aligns the text by the given value.
Values: left, right, center
Default: left
vertical-align Aligns the text vertically by the given value.
Only effective if angle is 90 or 270.
Values: top, middle, bottom, baseline
Default: baseline
Signature Variables
The parser supportes different kinds of variables, too.
Their are variables beginning with a $ sign, those variables are set automatically and will contain information provided by the game itself.
For a list of all available $variables and their names and values see the editor page.
Additionally user-defined variables are supported, too. User-defined variables begin with a @ sign. Their name and value can be freely choosen, however the name needs to be alphanumeric and may contain _ as well.
{{ $global_variable }}
{{ @user_defined_variable }}
You can set or overwrite all variables by using the = operator:
{{ @example = "The quick brown fox jumps" }}
{{ @example = @example + " over the lazy dog" }}
As you can see you can concatenate strings with the + operator. The result, and thus the value of @example, of this two lines would be: "The quick brown fox jumps over the lazy dog".
Signature Functions
You may use several functions provided by the parser. Arguments are passed as a comma-separated list to the function and will be evaluated before they are passed on to the function.
abs number abs(number value)
Returns the absolute value of a number
{{ abs(1) }} //returns 1
{{ abs(-1) }} //returns 1
ceil number ceil(number value)
Returns the ceiling of a number
{{ ceil(4.4) }} //returns 5
{{ ceil(4.9) }} //returns 5
date string date(string format [, int timestamp])
Returns a string formatted according to the given format string using the given integer timestamp or the current time if no timestamp is given.
{{ date("Y-m-d") }} //returns e.g. "2011-03-25" of the actual date
{{ date("Y-m-d H:i", 1262516533) }} //returns "2010-01-03 12:02"
div number div(number dividend, number divisor)
Returns the integer quotient when dividing dividend with divider.
{{ div(10, 3) }} //Returns 3
fetchvar mixed fetchvar(string name)
Fetch a variable by name
{{ @test1 = "Hi!" }}
{{ fetchvar("@test1") }} //returns "Hi!"
{{ fetchvar("@test" + 1) }} //returns "Hi!"
floor number floor(number value)
Returns the floor of a number.
{{ floor(4.1) }} //returns 4
{{ floor(4.9) }} //returns 4
if mixed if(mixed value[, mixed true[, mixed false]])
Checks if the first argument evaluates to true. Returns true or false if the optional arguments aren't specified. If they are specified it returns the second argument if true and the third argument if false.
{{ if("notempty") }} //returns true
{{ if(0, "Writing...") }} //returns false
{{ if("", "String is empty", "Not empty") }} //returns "String is empty"
lang string lang(string variablename[, mixed replacement1[, mixed...]]))
Fetch the given language variable and replace existing placeholders with the given extra arguments
In case the language variable "character_name" exists and has "My character's name is {1}" as its value:
{{ @var = "character" }}
{{ @var = @var + "_name" }}
{{ lang(@var, "LazyProgrammer") }} //returns "My character's name is LazyProgrammer"
length number length(string value)
Returns the length of the given value
{{ length("Lazy programmer") }} //returns 15
{{ length("") }} //returns 0
lowercase string lowercase(mixed value[, string options])
Converts the given value to lowercase.
If only first argument is specified it converts all the characters to lower case. The second argument may be "first" or "words". If it is "first" only the string's first character will be converted. If it is set to "words", every word's first character will be converted.
{{ lowercase("Lazy Programmer") }} //returns "lazy programmer"
{{ lowercase("Lazy Programmer") }} //returns "lazy programmer"
{{ lowercase("Lazy PROGRAMMER", "words") }} //returns "lazy pROGRAMMER"
max mixed max(mixed value1, mixed value2[, mixed ...])
Returns the maximum value of the given values. Strings will be converted to integers if compared to non-integers.
{{ max(2, 3, 1, 7, 2) }} //returns 7
{{ max("Lazy", 6) }} //returns 6
{{ max(5) }} //returns 5
{{ max("a", "b", "c") }} //returns "c"
min mixed min(mixed value1, mixed value2[, mixed ...])
Returns the maximum value of the given values. Strings will be converted to integers if compared to non-integers.
{{ max(2, 3, 1, 7, 2) }} //returns 1
{{ max("Lazy", 6) }} //returns 0
{{ max(5) }} //returns 5
{{ max("a", "b", "c") }} //returns "a"
mod int mod(int value1, int value2)
Returns the result of the modulus operation of the given values.
{{ mod(5, 3) }} //returns 2
{{ mod(5, "-3") }} //returns 2
{{ mod("-5", 3) }} //returns -2
{{ mod("-5", "-3") }} //returns -2
notempty bool notempty(mixed value)
Alias for if() with only one argument.
Returns if the given value evaluates to false.
{{ notempty("") }} //returns false
{{ notempty("Lazy PRogrammer") }} //returns true
{{ notempty(0) }} //returns false
number_format string number_format(float value[, number decimals=0[, string decimal_point="."[, string thousands_seperator=","]]])
Formats the given number nicely and provides options to set the thousands-seperator and the amount of decimal points manually.
Amount of decimal points defaults to 0, the seperator itself to "." and the seperator for each thousand defaults to ","
{{ number_format(12345) }} //returns 12,345
{{ number_format(12345, 3) }} //returns 12,345.000
{{ number_format(12345, 0, ".", " ") }} //returns 12 345
pow number pow(number base, number exp)
Returns base raised to the power of exp.
If the power cannot be optained, false is returned.
{{ pow(2, 8) }} //returns 256
{{ pow("-1", 20) }} //returns 1
{{ pow(0, 0) }} //returns 1
random int rand(int min, int max)
Generates a random integer. First argument is the minimum and the second the maximum value.
{{ rand(28, 56) }} //may returns 42
round number round(number value[, number precision])
Returns a rounded number with the given precision. If precision isn't specified it will return an integer.
{{ round(2.6) }} //returns 3
{{ round(42.2) }} //returns 42
{{ round(3.12752, 3) }} //returns 3.128
sqrt number sqrt(number value)
Returns the square root of value.
{{ sqrt(9) }} //returns 3
{{ sqrt(10) }} //returns 3.1622776...
timespan string timespan(int timestamp[, string min_value])
Returns the timespan given by the provided unix-timestamp.
{{ timespan(67) }} //returns "1m 7s"
{{ timespan(48, "m") }} //returns "<1m"
truncate string truncate(string value, number length[, string appendage])
Returns the string truncated to specified length. If third argument is specified it will be appended to the returned string if it's truncated.
{{ truncate("Lazy programmer", 6) }} //returns "Lazy p"
{{ truncate("Lazy programmer", 6, "..") }} //returns "Lazy.."
{{ truncate("Lazy programmer", 15, "..") }} //returns "Lazy programmer"
uppercase string uppercase(mixed value[, string options])
Convert the given value to uppercase.
If only first argument is specified it converts all the characters to upper case. The second argument may be "first" or "words". If it is "first" only the string's first character will be converted. If it is set to "words", every word's first character will be converted.
{{ uppercase("Lazy Programmer") }} // returns "LAZY PROGRAMMER"
{{ uppercase("lazy programmer", "first") }} //returns "Lazy programmer"
{{ uppercase("lazy proGRAMMER", "words") }} //returns "Lazy ProGRAMMER"
Signature Examples
<signature>
<defaults>
<text fontid="1" font-size="6" font-color="#FFF" border-color="#000" border-thickness="1" line-spacing="0.5" />
</defaults>
<layout>
<text position="10x16">
<line>{{ $character_1_name }}</line>
<line>{{ $character_1_jobclass }}</line>
<line>{{ lang("level_land", $character_1_level_land) + " " + lang("level_sea", $character_1_level_sea) }}</line>
</text>
</layout>
</signature>
<signature>
<defaults>
<text font-color="#FFF" border-color="24,53,72" border-thickness="1" font-size="13" fontid="9" line-spacing="4" />
</defaults>
<layout>
<!-- 1st Character -->
<text font-color="24,53,72" border-color="#FFF" font-size="27" position="35x54">
<line>{{ $character_1_name }}</line>
</text>
<text position="35x84">
<line>{{ $character_1_jobclass }}</line>
<line>{{ lang("level_land", $character_1_level_land) }}</line>
<line>{{ lang("level_sea", $character_1_level_sea) }}</line>
</text>
<!-- 2nd Character -->
<text font-color="24,53,72" border-color="#FFF" font-size="27" position="447x114" text-align="right">
<line>{{ $character_2_name }}</line>
</text>
<text position="447x46" text-align="right">
<line>{{ $character_2_jobclass }}</line>
<line>{{ lang("level_land", $character_2_level_land) }}</line>
<line>{{ lang("level_sea", $character_2_level_sea) }}</line>
</text>
</layout>
</signature>
<!-- Some variables to save some writing -->
{{ @white = "#FFFFFF" }}
{{ @blue = "24,53,72" }}
<signature>
<defaults>
<text font-size="12" line-spacing="4" fontid="32" font-color="{{@white}}" border-thickness="1" border-color="{{@blue}}" />
</defaults>
<layout>
<!-- 1st Character -->
<image src="symbol_land" position="131x11" display="{{ notempty($character_1_id) }}"/>
<image src="symbol_sea" position="131x27" display="{{ notempty($character_1_id) }}" />
<text position="175x40" font-size="25" fontid="24" font-color="{{@blue}}" border-color="{{@white}}">
<line>{{ $character_1_name }}</line>
</text>
<text position="153x25">
<line>{{ $character_1_level_land }}</line>
<line>{{ $character_1_level_sea }}</line>
</text>
<!-- 2nd Character -->
<image src="symbol_land" position="131x51" display="{{ notempty($character_2_id) }}" />
<image src="symbol_sea" position="131x67" display="{{ notempty($character_2_id) }}" />
<text position="175x80" font-size="25" fontid="24" font-color="{{@blue}}" border-color="{{@white}}">
<line>{{ $character_2_name }}</line>
</text>
<text position="153x65">
<line>{{ $character_2_level_land }}</line>
<line>{{ $character_2_level_sea }}</line>
</text>
<!-- 3rd Character -->
<image src="symbol_land" position="471x11" display="{{ notempty($character_3_id) }}" />
<image src="symbol_sea" position="471x27" display="{{ notempty($character_3_id) }}" />
<text text-align="right" position="441x40" font-size="25" fontid="24" font-color="{{@blue}}" border-color="{{@white}}">
<line>{{ $character_3_name }}</line>
</text>
<text position="453x25">
<line>{{ $character_3_level_land }}</line>
<line>{{ $character_3_level_sea }}</line>
</text>
<!-- 4th Character -->
<image src="symbol_land" position="471x51" display="{{ notempty($character_4_id) }}" />
<image src="symbol_sea" position="471x67" display="{{ notempty($character_4_id) }}" />
<text text-align="right" position="441x80" font-size="25" fontid="24" font-color="{{@blue}}" border-color="{{@white}}">
<line>{{ $character_4_name }}</line>
</text>
<text position="453x65">
<line>{{ $character_4_level_land }}</line>
<line>{{ $character_4_level_sea }}</line>
</text>
</layout>
</signature>
<signature>
<defaults>
<text border-thickness="1" border-color="#2f4125" />
</defaults>
<layout>
<shape type="rectangle" color="#2f4125" position="0x0" hollow="1" size="299x108" thickness="3" alpha="30"/>
<shape type="line" color="#2f4125" position="125x0" size="0x110" thickness="1"/>
<text angle="90" fontid="9" font-size='14' position="25x53" vertical-align="middle">
<line>{{ $character_1_name }}</line>
</text>
<text text-align="right" fontid="3" font-size='10' position="120x19">
<line>Hero: {{ $character_1_lasthero }}</line>
<line>Rank: {{ $character_1_rank }}</line>
<line>RPS: {{ $character_1_rps }}</line>
<line>
</line>
<line>Won: {{ $character_1_games_win }}</line>
<line>Lost: {{ $character_1_games_lose }}</line>
<line>Total: {{ $character_1_games_total }}</line>
</text>
</layout>
</signature>
Inspired by SigServer of anidb.net. Thanks to antennen for his support.