Difference between revisions of "Plasma:esHTML"

(Fixup typeface segment)
(Fixup content flow)
Line 24: Line 24:
 
<p align=center>
 
<p align=center>
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
  
 
= Content Flow =
 
= Content Flow =
Line 29: Line 30:
 
This defines the border in pixels at which the text is written.
 
This defines the border in pixels at which the text is written.
 
IIRC, this works per-page and not per-line. Which means you cannot change the margin for a single line, but can change it for the full page.
 
IIRC, this works per-page and not per-line. Which means you cannot change the margin for a single line, but can change it for the full page.
  ''<margin left=62 right=62 top=48>''
+
<syntaxhighlight lang="html">
 +
<margin left=62 right=62 top=48>
 +
</syntaxhighlight>
  
 
== Page Break ==
 
== Page Break ==
 
This forces the Journal to make a new page for your text. For example, if you wanted each journal entry to appear on a new separate page.
 
This forces the Journal to make a new page for your text. For example, if you wanted each journal entry to appear on a new separate page.
  ''<''pb''>''
+
<syntaxhighlight lang="html">
 +
<pb>
 +
</syntaxhighlight>
 +
 
 +
== Line Spacing ==
 +
Line spacing can also be adjusted:
 +
<syntaxhighlight lang="html">
 +
<font spacing=1>
 +
</syntaxhighlight>
  
 
= Images =
 
= Images =

Revision as of 10:33, 7 September 2020

Plasma offers several options for customizing the appearance of your journals in game. These can be altered by adding HTML-like tags within the text of your Journal. These tags apply their effect to all the text that appears after them until there is a new tag to change change the effect. If you are already familiar with HTML, Plasma markup does not have closing tags--it is analogous to markdown using HTML tags.

Text Options

Typeface

You can use any of the fonts that are available in your dat folder. You can adjust the size and the color. The built-in font files in your dat folder have the file extension .p2f but should not be supplied in the font name.

For example, if you want to use the Courier font at size 20 and have it displayed in red then the code to put in your text file would be:

<font face=Courier size=20 color=ff0000>
Font color is the hexadecimal code you will find in your graphics program when you use the color picker

You may also request bold or italics by using the style attribute:

<font style=bi>

You will need to use either b, i, or bi. Be aware that using the longform bold or italics will not function.

Remember, ALL the text in your file that comes AFTER this tag will be formatted this way until you use a new command to change it. You can add new commands at any time during your Journal's text.

Text alignment

You can have the text aligned to the left, center or right of the page using the align command:

<p align=center>


Content Flow

Page Margins

This defines the border in pixels at which the text is written. IIRC, this works per-page and not per-line. Which means you cannot change the margin for a single line, but can change it for the full page.

<margin left=62 right=62 top=48>

Page Break

This forces the Journal to make a new page for your text. For example, if you wanted each journal entry to appear on a new separate page.

<pb>

Line Spacing

Line spacing can also be adjusted:

<font spacing=1>

Images

Appearance and Position of Images

Images can be placed into your Journal along with the text (see below). To change their position and appearance in your Journal you can use these commands:

  • img src = (see below for more information on this)
  • opacity = How transparent you want the image to be on the page
  • blend = If your image has an alpha layer you must choose "alpha" in order for the alpha to show. This is useful for things like images that you want to look like they have been sketched into the Journal.
  • align = how you want it aligned on the page

A typical command for an image that has an alpha layer and you wish to appear in the centre of the page and with an addition transparency would be:

  <img src="yourimage.hsm" opacity=0.7 align=center blend=alpha>

Closed Book cover

If you want your Journal to first display as a closed book then you must put a cover image in your image library (see below) To show the cover you need to start your Journal's text file with the following command:

<cover src="yourcover.hsm">

where "yourcover.hsm" is the name of your cover image file in the image library. This filename name must always have a .hsm file extension

If you fail to include this command in your Journal text file then the Journal will first appear as open, even if you have selected the "closed" option in the modifier.