Plasma Engine HTML

From Alcugs

Jump to: navigation, search
Previous: List of Properties Contents Next: Contents

Note: Anything extracted from any Plasma Resource Files is property of Cyan Worlds, Inc. You may not use these assets without recieving written permission from Cyan Worlds, Inc.

Please read this Notice from Cyan about Age Creation before continuing.


Contents

Introduction

All journals in Uru (except for the personal journal in PotS) are formatted with a script language called PBML (Plasma Book Markup Language), which is based on HTML; so those who are familiar with it should have no difficulties; and for those who aren’t it’s very simple. This language has a limited set of instructions (‘tags’) to lay out the text, change fonts, display the journal cover, and add pictures. It has one important difference from HTML though: you don’t have to close the tags (like </font>).


Important: When integrated in the python Code the PBML code must be written on a single line. Because even though it can be very long it is only an argument of the "uam.ShowBook(' ' self.key)" function.

In readable form a typical Uru journal looks like this:

<cover src="JournalCoverTexture">\n
<font size=10 face=courier color=000000><margin left=62 right=62 top=48>\n
\n
<p align=left>Line 1\n
\n
Text of page 1; paragraph 1. \n
<p align=center>Text of paragraph 2. \n
<img src="randomDrawing1" align=center resize=no>
<pb>
Text of Page 2
This text was written by Spam\x40Hotmail.com and costed 0.3\x24 to create.

But because it needs to be put together on a single line, the above example inside the Python file would look like this:

uam.showBook('<cover src="JournalCoverTexture">\n<font size=10 face=courier color=000000><margin left=62 right=62 top=48>\n\n<p align=left>\nLine 1\n\nText of page 1; paragraph 1. \n<p align=center>Text of paragraph 2. \n<img src="randomDrawing1" align=center resize=no><pb>Text of Page 2<pb>Text of Page 3|nThis text was written by Spam\x40Hotmail.com and costed 0.3\x24 to create. ', self.key)

About textures

All textures used in the journal (for the cover and for images) must be placed in the Age textures Prp files. So you will need to put each texture on a separate object somewhere in the Age so that it is saved in the textures Prp file during the Age export process. For each texture used in the journal (cover and images) just add a simple plane with the corresponding texture somewhere in the Age hidden from view (underground or inside a wall.)


Tags

Cover

Specifies the cover texture for the journal. The texture file name must be written without the extension. This can probably be put anywhere in the code, but it is usually put in the first line.

<cover src="TextureFileName">

Note: Do not use alpha transparency for your cover texture or it will appear black.


Margin

Specifies a margin (in some unknown units) to use around a set of items (paragraphs or images) to offset them from the edge of the page..

<margin left=42 right=42 top=48 bottom=96>

You can only have one margin tag for the whole journal; so the margin is kept uniform. If you have several margin tags only the last one will be used. Like the cover tag it can be anywhere in the code. If you do not specify any margin, by default the text will be really close to the edge of the pages, which doesn’t look good. Margins around 40 or 60 are good choices. All DRC journals use a value of 62.


Paragraph

Start a paragraph of text.

<p align=center>
  • Align: can be left, right or center.


Font

Change the font face, size, color and style (bold/Italic/both). The available fonts are all the .p2f files in the Uru/dat folder.

<font size=16 face=Michelle color=982A3F style=bi spacing=-14>
  • size: DRC journals use a size of 10,‘Yeesha’ journals in Relto use 30.
  • face: Font used (Arial, Courrier, Yeesha, etc)
  • color: Color in hexadecimal notations like in HTML.
  • style: Bold (b) Italic (i) or both (bi)
  • spacing: Unknown so far, probably spacing between letters.

You can find the list of the avaible fonts in Uru at the bottom of this page.

Note: You can use any of the Uru fonts, but you can also create and use your own custom fonts by following this tutorial.


Line breaks

There is no <BR> tag like in HTML. Instead the following tag is used:

\n

Page breaks

Anything after this tag will go on to the next page in the journal.

<pb>


Img

Inserts an image into the page. Although most Uru journals do not use any images you can have some in there and add drawings, notes, or photos to make your journal more interesting. All images indicated this way must be inside the Age’s textures.prp file.

<img src="whatever.hsm*0#1" align=center pos=100,200 resize=no blend=alpha link=100>
  • Src: Point to the file in the Prp. For some reason some images will not display in the journal eventhough the correct name is given here. If an image doesn’t display, try changing its name.
  • Align: can be left, right, center, (if not defaut=left)
  • Pos: Position of the texture (I haven’t able to get this to work)
  • Resize: Can be Yes or No. For an unknown reason by default images will appear deformed, so you need to have the option ‘resize=no’ for them to appear correctly.
  • Blend: To use alpha transparency or other possible transparencies. But it doesn’t seem to work.
  • Link: optional - only add this if the image is a linking panel.

You can only have one image per line and nothing else. (ie: no other images, no text, no nothing). For some reason some images will not display in the journal eventhough the correct name is given in the "src" tag. Warning: When using images with Alpha transparency, make sure the plug-in does not compress them. Otherwise, they will not appear.

Decals (For 'PotS' Only!)

Unfortunately this doesn’t seem to work so far; a cover with a decal will appear totally black (or white). Decals on pages do not appear at all.
Places a ‘decal’ (a texture that is put on top of another texture) on the book cover or any page. An example of that can be seen in PotS on the ‘Words’ journal cover in Relto, they all have the same cover but they all have a different D'ni number texture used as a decal.

<decal src="TextureFileName" align=center pos=100,200 resize=no blend=Alpha>
  • Align: can be 'left', 'right' or 'center'. If not specified by defaut it is left.
  • Pos: Position of the texture
  • Resize: Can be 'Yes' or 'No'. For an unknown reason by default images will appear deformed, so you need to have the option ‘resize=no’ for them to appear correctly.
  • Blend: To use alpha transparency or other possible transparencies. But it doesn’t seem to work.


Special characters

‘Common’ special characters such as ? ! ” / : % don’t need special code. But other special characters (accents, symbols) must be inserted using special tags; they are coded in Unicode, using the following syntax:

\x(character code)

For example : é = \xe9 The only exception is the apostrophe which is : \’

A list of the most common special characters can be found here: PBML_Special_Characters.


Fonts list

The following is a complete list of all available fonts, though it is possible to create your own. B = bold, I = italics, # = fontsize

Arial           8,10,12,16,24,B7,B8,B10,B11,B12,B14,BI12,BI14
Atrus           12,14,16,18,20,22,24,26,28,30,32
Courier         6,8,9,10,12,14,16,18,20,22,24,26,28,30,32,B8,B14,B18
DniFontDniHand  8,12
Michelle        12,14,16,18,20,22,24,26,28,30,32
Nick            12,14,16,18,20,22,24,26,28,30,32
Sam             12,14,16,18,20,22,24,26,28,30,32
Sharper         12,14,16,18,20,22,24,26,28,30,32
Tahoma          8,10,12,14,24
Tricia          12,14,16,18,20,22,24,26,28,30,32
Uru             12,14,16,18,20,22,24,26,28,30,32
Yeesha          12,14,16,18,20,22,24,26,28,30,32

If you want to create your own font follow this tutorial.

Previous: List of Properties Contents Next: Contents
Personal tools