Skip to content
DummkopfOfHachtenduden edited this page Jun 27, 2023 · 8 revisions

Specification for the "Silkroad Markup Language 2"

Line breaks from the examples need to be removed!


Internally known as PML:

sml2

The root element that encloses all other elements, equivalent to <html>

br

Creates a line break. There is no end tag allowed here.

Example:

<sml2>
This text<br>has<br>multiple line breaks>
</sml2>

image

p

Defines a paragraph.

<sml2>After this text<p>There is a paragraph that stands alone</p>And more text</sml2>

image

line_margin

line_margin can be added to p to create spacing between text lines. Value is in pixels.

<sml2>
<strong>Line Margin 5</strong>
<p line_margin="5">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</p>
<strong>Line Margin 10</strong>
<p line_margin="10">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</p>
<strong>Line Margin 25</strong>
<p line_margin="25">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</p>
</sml2>

image

align

align can be added to p to align the paragraph on the left, center or right.

<sml2>
<strong>Left align</strong>
<p align="left">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</p>
<strong>Center align</strong>
<p align="center">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</p>
<strong>Right align</strong>
<p align="right">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</p>
</sml2>

image

left

Forces text to be aligned on the left.

Example:

<sml2><left>This text is left aligned</left></sml2>

image

center

Forces text to be aligned in the center

Example:

<sml2><center>This text is centered</center></sml2>

image

right

Forces text to be aligned on the right

Example:

<sml2><right>This text is right aligned</right></sml2>

image

font

Forces text to be rendered in a rich way.

Example:

<font index="1" 
      color="255,236,219,156" 
      style="bold" 
      bgcolor="255,128,128,128">Stylized font example</font>

index

Sets the font index to one of the 5 cached font styles created by the client..

Example:

<sml2>
<font index="0">Font Index 0</font><br>
<font index="1">Font Index 1</font><br>
<font index="2">Font Index 2</font><br>
<font index="3">Font Index 3</font><br>
<font index="4">Font Index 4</font><br>
</sml2>

image

style

Sets the style of the font

Italic seems to crash on vsro188 Shadow, Blur, Outline, Underline and Glow don't seem to work here.

<sml2>
<font style="bold">Font Style Bold</font><br>
<font style="italic">Font Style Italic</font><br>
<font style="shadow">Font Style Shadow</font><br>
<font style="blur">Font Style Blur</font><br>
<font style="outline">Font Style Outline</font><br>
<font style="underline">Font Style Underline</font><br>
<font style="glow">Font Style Glow</font><br>
<font style="shadow|bold|blur|outline|underline|glow|italic">They can be mixed together like this</font><br>
</sml2>

color

Sets the color of the font

<sml2>
<font color="255,255,0,0">Font with red foreground</font><br>
<font color="255,0,255,0">Font with green foreground</font><br>
<font color="255,0,0,255">Font with blue foreground</font><br>
</sml2>

image

bgcolor

Sets the background color for the font

<sml2>
<font bgcolor="255,255,0,0">Font with red background</font><br>
<font bgcolor="255,0,255,0">Font with green background</font><br>
<font bgcolor="255,0,0,255">Font with blue background</font><br>
</sml2>

image

strong

Renders text as strong which is just shorter way of saying bold.

<sml2><strong>This text is strong.</strong></sml2>

table

Creates a table layout for the text.

Example:

<sml2>
<table>
  <tr>
    <td>Name</td>
    <td>Chance</td>
  </tr>
  <tr>
    <td><img src="icon\item\etc\hp_potion_01.ddj"> HP Recovery Herb</td>
    <td>15%</td>
  </tr>
  <tr>
    <td><img src="icon\item\etc\hp_potion_02.ddj"> HP Recovery Potion (Small)</td>
    <td>15%</td>
  </tr>
  <tr>
    <td><img src="icon\item\etc\hp_potion_03.ddj"> HP Recovery Potion (Medium)</td>
    <td>15%</td>
  </tr>
  <tr>
    <td><img src="icon\item\etc\hp_potion_04.ddj"> HP Recovery Potion (Large)</td>
    <td>15%</td>
  </tr>
  <tr>
    <td><img src="icon\item\etc\hp_potion_05.ddj"> HP Recovery Potion (X-Large)</td>
    <td>15%</td>
  </tr>
  <tr>
    <td><img src="icon\item\etc\hp_spotion_01.ddj"> HP Recovery Grain (Small)</td>
    <td>10%</td>
  </tr>
</table>
</sml2>

image

<sml2>
<table border="1" bordercolor="255,100,100,200">
  <tr>
    <td bgcolor="255,63,63,150" align="center" valign="middle">Name</td>
    <td bgcolor="255,63,63,150" align="center" valign="middle">Chance</td>
  </tr>
  <tr>
    <td valign="middle"><img src="icon\item\etc\hp_potion_01.ddj"> HP Recovery Herb</td>
    <td align="right" valign="middle">15%</td>
  </tr>
  <tr>
    <td valign="middle"><img src="icon\item\etc\hp_potion_02.ddj"> HP Recovery Potion (Small)</td>
    <td align="right" valign="middle">15%</td>
  </tr>
  <tr>
    <td valign="middle"><img src="icon\item\etc\hp_potion_03.ddj"> HP Recovery Potion (Medium)</td>
    <td align="right" valign="middle">15%</td>
  </tr>
  <tr>
    <td valign="middle"><img src="icon\item\etc\hp_potion_04.ddj"> HP Recovery Potion (Large)</td>
    <td align="right" valign="middle">15%</td>
  </tr>
  <tr>
    <td valign="middle"><img src="icon\item\etc\hp_potion_05.ddj"> HP Recovery Potion (X-Large)</td>
    <td align="right" valign="middle">15%</td>
  </tr>
  <tr>
    <td><img src="icon\item\etc\hp_spotion_01.ddj"> HP Recovery Grain (Small)</td>
    <td align="right" valign="middle">10%</td>
  </tr>
</table>
</sml2>

image

width

Width of the table in pixels

<sml2><table width="100"></table></sml2>

height

Height of the table in pixels

<sml2><table width="300"></table></sml2>

border

Border width in pixels

<sml2><table border="2"></table></sml2>

bordercolor

Border color

<sml2><table bordercolor="255,255,0,0"></table></sml2>

cellpadding

Adds padding to the inside of the cell in pixels.

<sml2><table cellpadding="5"></table></sml2>

align

Aligns the content of the cells left, center or right

<sml2><table cellpadding="5"></table></sml2>

td

Creates a table data cell

<sml2>
   <table>
    <tr>
      <td>Column 1</td>
      <td>Column 2</td>
    <tr>
  </table>
</sml2>

width

Sets the width of the cell

<sml2>
   <table>
    <tr>
      <td width="50">Column 1</td>
      <td width="120">Column 2</td>
    <tr>
  </table>
</sml2>

height

Sets the height of the cell

<sml2>
   <table>
    <tr>
      <td height="25">Column 1</td>
      <td height="35">Column 2</td>
    <tr>
  </table>
</sml2>

colspan

Sets number of columns this cell spans across

<sml2>
   <table>
    <tr>
      <td">Header 1</td>
      <td">Header 2</td>
    <tr>
    <tr>
      <td colspan="2">Column</td>
    <tr>    
  </table>
</sml2>

rowspan

Sets number of rows this cell spans across

bgcolor

Sets the background color of the cell

align

Aligns the content of the cell left, center or right

valign

Aligns the content of the cell vertically top, middle or bottom

tr

Creates a table row

<sml2>
<table>
<tr>
  <td>Column 1</td>
  <td>Column 2</td>
<tr>
</table>
</sml2>

height

Sets the height of the table row in pixels

<sml2>
<table>
<tr height="25">
  <td>Column 1</td>
  <td>Column 2</td>
</tr>
</table>
</sml2>

img

Adds an image to the text.

src

Required
File has to be within Media.pk2

<sml2><img src="icon\item\etc\hp_potion_01.ddj"></sml2>

image

uv

width

Sets the width of the image in pixels

<sml2><img src="icon\item\etc\hp_potion_01.ddj" width="64" height="64"></sml2>

image

height

Sets the height of the image in pixels

<sml2><img src="icon\item\etc\hp_potion_01.ddj" width="64" height="64"></sml2>

image

set_id

abs_pos

layer

area

target_id

like_text

Clone this wiki locally