Difference between revisions of "Text Replacement"
Jump to navigation
Jump to search
no edit summary
imported>Qazaaq |
imported>Qazaaq |
||
Line 2: | Line 2: | ||
[[Category:User Interface]] | [[Category:User Interface]] | ||
The '''Text Replacement''' game system parses value tokens and formatting tags. This is used on a several forms like [[Book]]s and [[Terminal]]s. | The '''Text Replacement''' game system parses value tokens and formatting tags. This is used on a several forms like [[Book]]s and [[Terminal]]s. | ||
==Book Text== | ==Book Text== | ||
Line 7: | Line 8: | ||
Quest-associated books can contain additional tags used for '''Text Replacement'''. | Quest-associated books can contain additional tags used for '''Text Replacement'''. | ||
To associate book with the quest you need to add book alias to the quest and set "Uses Stored Text" flag on this alias. | To associate book with the quest you need to add book alias to the quest and set "Uses Stored Text" flag on this alias. | ||
==Markup== | ==Markup== | ||
Some text fields support a variety of '''Markup''' tags used with formatting. | |||
===Syntax=== | |||
* '''Comment Tag''' | * '''Comment Tag''' | ||
** Tag: <code><!--Comment text--></code> | ** Tag: <code><!--Comment text--></code> | ||
** Description: Comments tell the renderer not display the text wrapped within the tags while still retaining the text in the editor. | ** Description: Comments tell the renderer not display the text wrapped within the tags while still retaining the text in the editor. | ||
* '''Bold Tag''' | * '''Bold Tag''' | ||
** Tag: <code><nowiki><b></b></nowiki></code> | ** Tag: <code><nowiki><b></b></nowiki></code> | ||
** Description: Text surrounded by bold tags will be '''bolded'''. | ** Description: Text surrounded by bold tags will be '''bolded'''. | ||
* '''Italic Tag''' | * '''Italic Tag''' | ||
** Tag: <code><nowiki><i></i></nowiki></code> | ** Tag: <code><nowiki><i></i></nowiki></code> | ||
** Description: Text surrounded by italics tags will be ''italicized''. | ** Description: Text surrounded by italics tags will be ''italicized''. | ||
* '''Underline Tag''' | * '''Underline Tag''' | ||
** Tag: <code><nowiki><u></u></nowiki></code> | ** Tag: <code><nowiki><u></u></nowiki></code> | ||
** Description: Text surrounded by underline tags will be <u>underlined</u>. | ** Description: Text surrounded by underline tags will be <u>underlined</u>. | ||
* '''List Tag''' | * '''List Tag''' | ||
** Tag: <code><nowiki><ul><li>ITEM HERE</li></ul></nowiki></code> | ** Tag: <code><nowiki><ul><li>ITEM HERE</li></ul></nowiki></code> | ||
** Description: Creates list items with an empty square for the icon. Each list item is indented and separated by an empty line. | ** Description: Creates list items with an empty square for the icon. Each list item is indented and separated by an empty line. | ||
** Example: <code><nowiki><ul><li>Red</li><li>Green</li><li>Blue</li></ul></nowiki></code> | |||
* '''Line-Break Tag''' | * '''Line-Break Tag''' | ||
** Tag: <code><nowiki><br></nowiki></code> | ** Tag: <code><nowiki><br></nowiki></code> | ||
** Description: Breaks the text to the next line. Strictly speaking, this tag isn't necessary. You can just as easily add blank lines to the book text. | ** Description: Breaks the text to the next line. Strictly speaking, this tag isn't necessary. You can just as easily add blank lines to the book text. | ||
* '''Page-Break''' | * '''Page-Break''' | ||
** Tag: <code>[pagebreak]</code> | ** Tag: <code>[pagebreak]</code> | ||
** Description: Breaks to the next page. Must be on its own line. Text automatically breaks to the next page once it reaches the end. | ** Description: Breaks to the next page. Must be on its own line. Text automatically breaks to the next page once it reaches the end. | ||
** Note: images do not, so if you notice your images running off the edge of the page, manually place a page-break or reduce the size of your image. | ** Note: images do not, so if you notice your images running off the edge of the page, manually place a page-break or reduce the size of your image. | ||
* '''Paragraph Tag''' | * '''Paragraph Tag''' | ||
** Tag: <code><nowiki><p></nowiki></code> | ** Tag: <code><nowiki><p></nowiki></code> | ||
Line 45: | Line 44: | ||
**** Description: Aligns the surrounded text. Valid values are 'left', 'right', 'justify', 'center'. | **** Description: Aligns the surrounded text. Valid values are 'left', 'right', 'justify', 'center'. | ||
**** Note: If you want to place an image within some text so that it wraps around it, the text containing the image needs to be within paragraph tags. | **** Note: If you want to place an image within some text so that it wraps around it, the text containing the image needs to be within paragraph tags. | ||
* '''Font Tags''' | * '''Font Tags''' | ||
** Tag: <code><nowiki><font></nowiki></code> | ** Tag: <code><nowiki><font></nowiki></code> | ||
Line 61: | Line 59: | ||
**** Tag: <code><nowiki><font alpha='#FF'></font></nowiki></code> | **** Tag: <code><nowiki><font alpha='#FF'></font></nowiki></code> | ||
**** Description: Changes the font's transparency. Two-digit hexadecimal values from <code>'#00'</code> (fully transparent) through <code>'#FF'</code> (fully opaque) are supported. | **** Description: Changes the font's transparency. Two-digit hexadecimal values from <code>'#00'</code> (fully transparent) through <code>'#FF'</code> (fully opaque) are supported. | ||
* '''Image tags''' | * '''Image tags''' | ||
** Tag: <code><nowiki><img></nowiki></code> | ** Tag: <code><nowiki><img></nowiki></code> | ||
Line 75: | Line 72: | ||
**** Tag: <code><img src='img://Textures/Interface/Books/Illuminated_Letters/X_letter.png'></code> | **** Tag: <code><img src='img://Textures/Interface/Books/Illuminated_Letters/X_letter.png'></code> | ||
**** Description: Used for adding special illuminated letters at the beginning of books. (Replace the "X" with any letter or number.) | **** Description: Used for adding special illuminated letters at the beginning of books. (Replace the "X" with any letter or number.) | ||
===Example=== | |||
<code> | |||
<nowiki><!--This is the example for text markup--></nowiki><BR> | |||
<nowiki><font face='$HandwrittenFont' size='35'>Hello World!</font></nowiki><BR> | |||
<nowiki><b><i><u>This is bold, italic, and underlined.</u></i></b></nowiki><BR> | |||
<nowiki><BR>These are some colors I like.</nowiki><BR> | |||
<nowiki><ul></nowiki><BR> | |||
<nowiki><li>Black</li></nowiki><BR> | |||
<nowiki><li>White</li></nowiki><BR> | |||
<nowiki><li>Red</li></nowiki><BR> | |||
<nowiki><li>Green</li></nowiki><BR> | |||
<nowiki><li>Blue</li></nowiki><BR> | |||
<nowiki></ul></nowiki></nowiki><BR> | |||
<nowiki>[pagebreak]</nowiki><BR> | |||
<nowiki><!--A new page has starts here--></nowiki><BR> | |||
<nowiki><p align='center'>My center aligned text.</nowiki><BR> | |||
<nowiki><p align='left'>My left aligned text.</nowiki> | |||
</code> | |||