image_by Needpix.com

Age of HTML

List of usable tags

HTML tags

When you want to format text in a script for Age of Conan, the use of HTML tags is necessary.

what is a “ tag ”?

Nothing better than a portion of code to fully understand!

afi_html_tags_sample.html

_10
<div style="text-align:center;background-color:blue;">
_10
<font color="white">My first HTML script !</font>
_10
<img src="https://imgeucdn.gamespress.com/cdn/files/Funcom/2020/11/29154750-479c6616-dafa-4f2b-b283-d0bd34ffade1/ageofconan_unchained_logo_png_jpgcopy.jpg?w=240&mode=max&otf=y&quality=90&format=jpg&bgcolor=black&ex=2024-04-01+03%3A00%3A00&sky=6e8ca1f2b2ba253b5749fd59cb9c7513192396daa6d7ed959712a2c06070fc44" />
_10
</div>

There are three types of tags:

  1. Opening tags: They begin a portion of code, such as lines 1 and 2. They delimit the start of an element and often contain text or other tags.
  2. Closing tags: They end a portion of code, as in lines 2 and 4. They mark the end of an element and must be placed in the reverse order of the opening tags.
  3. Self-closing tags: They have no internal content, as in line 3. They are used to insert elements that do not require additional content, such as images.

By copying the script snippet and pasting it into a *html file then dragging the file into your favorite browser you will obtain the following display:

My first HTML script!

In this example, the file has the file extension *.html, this extension is not usable for scripts in Age of Conan! We will therefore use files with the extension *.txt for all the following examples.

HTML tags can be accompanied by “ attributes ”, which control the behavior of the tag or its child elements. Some attributes are universal and can be used with any tag, while others are specific to certain tags.

what tags are allowed in Age of Conan?

The HTML in Age of Conan is pretty basic. We will list it and understand it.

the <a> tag

It is used to create clickable links allowing you to open a window or perform an action.

the allowed attributes are:

  • href: which will have the value:
    • A window with the value text://LE_TEXTE_OU_LA_FENETRE_ICI.
    • A command with the value chatcmd:///L_EMOTE_ICI (note that there are 3 /, 2 for chatcmd:// and 1 for the emote). Commands only work in a window.
  • style: used to change the visual appearance of an HTML element by applying style rules such as color, etc. directly in the tag. This allows you to customize the appearance of each element individually.

example of a <a> tag opening a window:

afi_tag_a_open_window_sample.txt

_10
<a href="text://Hello world !">example of a link opening a window containing text</a>

example of a <a> tag for an emote:

afi_tag_a_to_do_emote.txt

_10
<a href="text://<a href='chatcmd:///hi'>a link with an emote</a>">example of a link opening a window containing an emote</a>

We can note that in the last example, the first attribute href encapsulates its value with " (quotation), the second attribute href, which is part of the value of the first, encapsulates its value in ' (apostrophe). This is normal and mandatory! If we used the same encapsulation character for both attributes, the script engine would understand that the first quote of the second href attribute is the closing quote of the first href attribute .

There is nevertheless a solution, use the escape character which is \ before the first quotation mark of the second href attribute.

hell, I don't understand encapsulation!

Nothing better than an example to fully understand 👼.

afi_tag_a_wellbad_encapsulation.txt

_10
<a href="text://- Text with good encapsulation : <font face='chat'>abc</font><br>- Text with escaped encapsulation : <font face=\"chat\">abc</font><br>- Text with bad encapsulation : <font face="chat">abc</font>">example of a link opening a window containing well/bad encapsulation</a>

Decryption of the script
  1. - Text with good encapsulation: <font face='chat'>abc</font>, will display “ abc ”.
  2. - Text with escaped encapsulation: <font face=\"chat\">abc</font>, will display “ abc ” although the value of the enclosing href attribute is encapsulated by quotation marks.
  3. - Text with bad encapsulation: <font face="chat">abc</font>, the value of the face attribute being simply encapsulated by quotation marks, the script engine considers that the < tag font> is nothing more than text and does not display the rest of the scripts.

In game, we will obtain:


_10
- Text with good encapsulation : abc
_10
- Text with escaped encapsulation : abc
_10
- Text with bad encapsulation : <font face=

The <br> tag

The <br> tag in HTML is used to insert a line break, which means that the text or content that follows will be displayed on a new line. It's like pressing the “ Enter ” key in a word processor. The <br> tag does not require a closing tag and is self-closing.

Small clarification regarding the self-closing aspect of the tag: you will probably encounter this tag in the form <br />, which is its modern form. This is not an error, and in either case it will work as expected in a script. However, it is preferable to use the <br> form because it saves two characters each time this tag is used in a script.

example of <br> tag:

afi_tag_br_sample.txt

_10
Hello<br>world!

the <div> tag

The <div> tag in HTML is like a box that allows you to organize your content. You can think of <div> as a container that groups other HTML elements together. In the context of scripts for Age of Conan it is not possible to give it a visible border or even a colored background, just manage the alignment of the contained text using the attribute:

  • align: which can have the value right, center or left. The latter being the default.
  • style: used to change the visual appearance of an HTML element by applying style rules such as color, etc. directly in the tag. This allows you to customize the appearance of each element individually.

For modern HTML, <div> is surely one of the most used to structure a page. On the other hand, it offers very few advantages, if any, for an AoC script. So no one will blame you if you don't use it 😉.

the <font> tag

It is used to change the font, size and color of the text inside this tag.

its attributes are:

  • color: This attribute allows you to change the color of the text. It accepts a color name, but rendering may vary depending on the player's user interface, which may have been customized. Additionally, some colors may use the same color code as an existing one. Consult the page dedicated to colors in scripts for AoC
  • face: This attribute allows you to personalize the font. Know the different fonts.

example of <font> tag with different fonts:

afi_tag_font_sample.txt

_10
<a href="text://<font face=chat>Hello world, I use the font 'chat'</font><br><font face=small>Hello world, I use the font 'small'</font><br><font face=normal>Hello world, I use the font 'normal'</font><br><font face=normal_italic>Hello world, I use the font normal_italic</font><br><font face=normal_bold>Hello world, I use the font 'normal_bold'</font><br><font face=huge>Hello world, I use the font 'huge'</font><br><font face=large>Hello world, I use the font 'large'</font><br><font face=large_sc>Hello world, I use the font 'large_sc'</font><br><font face=large_bold>Hello world, I use the font 'large_bold'</font><br><font face=scaled>Hello world, I use the font 'scaled'</font><br><font face=3d_text_small>Hello world, I use the font '3d_text_small'</font><br><font face=3d_text_arial>Hello world, I use the font '3d_text_arial'</font><br><font face=3d_text>Hello world, I use the font '3d_text'</font><br><font face=3d_text_bold>Hello world, I use the font '3d_text_bold'</font><br><font face=3d_text_hyb>Hello world, I use the font '3d_text_hyb'</font><br><font face=hyboriansmall>Hello world, I use the font 'hyboriansmall'</font><br><font face=hyborianlarge>Hello world, I use the font 'hyborianlarge'</font><br><font face=headline>Hello world, I use the font 'headline'</font><br><font face=combat_feedback>Hello world, I use the font 'combat_feedback'</font>">A demonstration of different fonts</a>

the <img> tag

The <img> tag is used to display images in a script.

its attribute is:

  • src: This field contains the name of the image.
    • The protocol can only be rdb://, which means that it is not possible to use an internet protocol such as http://, or even ftp://, nor even a local protocol like file://. In other words, the image must come from the game. Also, this tag only works in windows.

example of an IMG tag:

afi_img_sample.txt

_10
<a href="text://- An image that we only see the second time we open the script :<br><img src=rdb://12325><br>- An image that appears as soon as the script is first opened :<br><img src=rdb://15599>">A demonstration of the <IMG> tag</a><img src=rdb://15599>

The images bug when first opening a script

We have all at one time or another opened a script offered by a player who recommended opening the script twice to see the images it contains. There is a technique to avoid this problem!

To display an image as soon as the window opens, you must place it next to the window opening link in the chat. This allows you to call the image from the start to make it visible in the window. However, if you change the zone with the window containing the image open, you will then have to reload it😢.

This method has a disadvantage: you have to use the <img> tag twice for the same image, which can make the script heavier and risk not being able to display it in certain chats.

But why does this technique work???

I'm not sure, but since you have to open a script twice, the game must first load the image into a temporary cache, which is done by opening the script first. times, to display it the second time you open it.

The proposed debug does this automatically since the image is first loaded into the chat and then displayed when the script is first opened. On the other hand, the cache seems temporary since the image is no longer visible after a change of instance or other teleportation.

get the list of game images

To find out where the images are and their names, it's quite simple, the rdb:// protocol indicates it itself. You need to look in files with the *.rdb extension. Unfortunately, these files cannot be opened unless you use RDB Extractor software.

the <u> tag

Underlines a portion of text.

example of <u> tag:

afi_underline_sample.txt

_10
<a href="text://A portion of text underlined :<br><u>- An underlined text!</u>">A demonstration of the underline tag</a>

the cases of bold and italics

No tag authorized in AoC allows a portion of text to be bolded or italicized... This is implemented directly in the form of font which is already bolded and/or italicized.

Now that we've learned a little more about HTML tags, it's time to move on:

💬 share your experience!

Welcome to the comments section dedicated to Age of Conan! We're excited to hear your thoughts, strategies, and experiences in this epic world. Whether you have tips to share, questions to ask, or stories to tell, we're here to listen. The lands of Hyboria are filled with mysteries and challenges, and we believe your contribution will enrich our player community. Feel free to leave your mark in the sands of time by sharing your thoughts below. Together, we're writing the history of Conan! 🎺🎺

Buy Me A Coffee