In-game Text Formatting

al5yal511

Administrator
Staff member
Admin
Guide Author

HTML Tags​

During the translation of Allods Online you will encounter a number of lines containing HTML-like tags. These tags are used to display variables and apply different styles to text fragments, for example:

<html><rs class="color_code" >*You have received: *<r name="count"/></rs><rs class ="quality" ><r name="item"/>.</rs></html>
Let's see what these tags do:

*<html> and </html> - the line should start with <html> tag and end with </html> tag, otherwise it will display as a plain text (although this is normal for many situations).
*<rs class="color_code" > and </rs> - the text in between these tags will be formatted according to the rules set by interface programmers. For instance, by adding the following line into a piece of code for a certain interface element:

color_code = "LogColorYellow"
programmer defines yellow as default color for the texts marked as color_code inside this interface element.

*<r name="count"/> - this tag will be substituted in-game with a number: 1, 2, 3 etc. Note that <r name="count"/> tag is already considered closed as it contains / symbol. Also, as this tag is located inside a pair of formatting tags (<rs class="color_code" > and </rs>), formatting rules will apply to the number as well.
Note that the programming scripts that control interface elements may allow or disallow omitting certain substrings, such as <r name="count"/>. For example, if player receives a single item, "1" will not display in this message (may not be true for this specific line, but you get the idea). There is no visible indication in the text if a substring may be omitted.

Also, in rare cases scripts that control text substitution are quite complex, so please keep in mind that 100% concordance for all possible substring combinations is not guaranteed even in Russian version.

*<rs class ="quality" > and </rs> - the text between these tags will be formatted according to quality of an item: poor quality names will display in gray, common quality names will display as white etc. See more on item quality on the
You do not have permission to view link Log in or register now.
page.
*<r name="item"/> - this tag is substituted with an item name, which, in turn, is sometimes comprised of several substrings, like Heavy Axe of the Bear with prefix, stem and suffix.

Spaces around the controlling symbols inside tags may or may not be present - it does not affect the way the game interpret the tags. For example, you will find both <r name="item"/> and < r name = "item" / > entries in the texts, both variants are valid.

Generally, all tags fall into one of the following two categories:

  1. <rs ...> tags control formatting, such as text color, font size etc. They do not add any text contents - they just change its presentation. Opening <rs ...> tag sets the position where formatting starts, while closing </rs> tag marks the end of it.
  2. <r ...> tags are replaced in-game with text substrings or numbers, such as item names, character names, amount of gold etc. Substrings may contain their own formatting tags and smaller substrings as well.
Basic rule of formatting is simple: if a tag is present, it must be closed correctly. If you add a <rs class="quality" > or <rs class="color_code" > tag to colorize a text fragment, you must put closing </rs> tag at the end of the fragment. Tags like <r name="item"/> are self-closing, as they contain / symbol already.

If you want to reword a message for better readability and concordance, feel free to move the tags around or copy them but make sure all of them are closed properly. For instance, you can reformulate the above line in the following way:

<html><rs class="color_code" >*Bought: *</rs><rs class ="quality" ><r name="item"/></rs><rs class="color_code" > in the quantity of <r name="count"/>.</rs></html>

As you can see, you can add as many formatting tags as you wish, just remember that they must be closed properly.

If a translator made a mistake and failed to close the tag or accidentally deleted a part of it, it is unlikely that the game will crash, but chances are that such lines will not be interpreted as XML markup, so line contents, including tags, will display as a plain text.

Such cases are highly visible, so normally you can find and fix them during the testing phase.

You can use a simple Excel macro to highlight tags in a spreadsheet and improve readability: see
You do not have permission to view link Log in or register now.


CSS attributes used in tags​

AttributeFunctionalityValuesExample
alignxhorizontal alignment (default 0)0, left / 1, right / 2, center / 3alignx="center"
alignyvertical alignmenttop, middle, bottomaligny="middle"
beforeindentation before (requires paragraph=true to work)integerbefore="12"
colortext colorintegercolor="4294902015"
fontsizefont sizeintegerfontsize="21"
fontnamefont nametext stringfontname="Interface/Common/Fonts/trebuc.ttf"
outlinetext outline width0, 1, 2outline="1"
outlinecolortext outline colorintegeroutlinecolor="0xFF123456"
paragraphembraces text in line breaks, allow using before attributetrue, falseparagraph="true"
shadowpixel shadowing offsetpositive integershadow="1"
shadowcolorshadow colorintegershadowcolor="0xFF123456"
wordwrapword wrapping0 / 1 / true / falsewordwrap="true"
Note: All attributes must be in a lower case.

Chat Commands Localization​

  • Obsolete in 3.0.02 and higher: PrefixNames are no longer used and removed from localization
There is a certain requirement for translating the lines related to chat commands.
For example, there are three lines controlling raid chat command, which enables player to post into the raid chat channel. Here are these lines, with their correct values:
Client\SlashCommands\ChatRaidAliases.txt团队r

ra

rai

raid
Client\SlashCommands\ChatRaidPrefix.txt团队Raid
Interface\Ingame\ContextChatLine\PrefixNames\Raid.txt团队Raid
Note that the values of Interface\Ingame\ContextChatLine\PrefixNames\Raid.txt and Client\SlashCommands\ChatRaidPrefix.txt lines should match. Also, the same word should be added into the list of aliases in the Client\SlashCommands\ChatRaidAliases.txt line, it will allow player to enter \团队 command in the game to switch to the right chat channel.
Feel free to leave the English aliases as well, separated by soft line breaks (Alt+Enter in Excel).
The complete list of lines requiring such treatment is shown below.
Client\SlashCommands\ChatGuildAliases.txt
Client\SlashCommands\ChatGuildPrefix.txt
Interface\Ingame\ContextChatLine\PrefixNames\Guild.txt
Client\SlashCommands\ChatGuildOfficerAliases.txt
Client\SlashCommands\ChatGuildOfficerPrefix.txt
Interface\Ingame\ContextChatLine\PrefixNames\Officer.txt
Client\SlashCommands\ChatPartyAliases.txt
Client\SlashCommands\ChatPartyPrefix.txt
Interface\Ingame\ContextChatLine\PrefixNames\Party.txt
Client\SlashCommands\ChatPsionicAliases.txt
Client\SlashCommands\ChatPsionicPrefix.txt
Interface\Ingame\ContextChatLine\PrefixNames\Psionic.txt
Client\SlashCommands\ChatRaidAliases.txt
Client\SlashCommands\ChatRaidPrefix.txt
Interface\Ingame\ContextChatLine\PrefixNames\Raid.txt
Client\SlashCommands\ChatSayAliases.txt
Client\SlashCommands\ChatSayPrefix.txt
Interface\Ingame\ContextChatLine\PrefixNames\Say.txt
Client\SlashCommands\ChatTellAliases.txt
Client\SlashCommands\ChatTellPrefix.txt
Interface\Ingame\ContextChatLine\PrefixNames\Tell.txt
Client\SlashCommands\ChatWorldAliases.txt
Client\SlashCommands\ChatWorldPrefix.txt
Interface\Ingame\ContextChatLine\PrefixNames\World.txt
Client\SlashCommands\ChatYellzoneAliases.txt
Client\SlashCommands\ChatYellzonePrefix.txt
Interface\Ingame\ContextChatLine\PrefixNames\YellZone.txt
Client\SlashCommands\ChatZoneAliases.txt
Client\SlashCommands\ChatZonePrefix.txt
Interface\Ingame\ContextChatLine\PrefixNames\Zone.txt
 

Top Bottom