v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

Editing Template:DFtext/doc

Jump to navigation Jump to search

Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.


The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
 
{{DFtext|The DFtext template is designed to provide generally short preformatted text that resembles that of the game.}}
 
{{DFtext|The DFtext template is designed to provide generally short preformatted text that resembles that of the game.}}
  
<code><nowiki>{{DFtext|Outside}}</nowiki></code> turns into {{DFtext|Outside}}.<br><code><nowiki>{{DFtext|Outside|3:1}}</nowiki></code> turns into {{DFtext|Outside|3:1}}<br><code><nowiki>{{DFtext|Outside|3:2:1}}</nowiki></code> turns into {{DFtext|Outside|3:2:1}}.
+
<code><nowiki>{{DFtext|Outside}}</nowiki></code> turns into {{DFtext|Outside}}.<br><code><nowiki>{{DFtext|Outside|3:1}}</nowiki></code> turns into {{DFtext|Outside|3:1}}<br><code><nowiki>{{DFtext|Outside|3:1:1}}</nowiki></code> turns into {{DFtext|Outside|3:1:1}}.
  
  
This template mimics the 16 [[cv:color|colors]] available to ''Dwarf Fortress''. The format differs between 2 or 3 numbers being used. The format of the template is as follows:<br />
+
This template mimics the 16 colors available to Dwarf Fortress. The format differs between 2 or 3 numbers being used. The format of the template is as follows:<br />
  
 
<code><nowiki>{{DFtext|color:brightness}}</nowiki></code> or...<br />
 
<code><nowiki>{{DFtext|color:brightness}}</nowiki></code> or...<br />
<code><nowiki>{{DFtext|color:background:brightness}}</nowiki></code><br />
+
<code><nowiki>{{DFtext|background:color:brightness}}</nowiki></code><br />
  
 
There are 8 colors available, though each one has a dark and bright variation (0 and 1), adding up to 16 possible colors. Looking at the chart below will show which number refers to which color. Not including any numbers in the template defaults to light grey text on a black background - the background will also default to black if a third number is not included.
 
There are 8 colors available, though each one has a dark and bright variation (0 and 1), adding up to 16 possible colors. Looking at the chart below will show which number refers to which color. Not including any numbers in the template defaults to light grey text on a black background - the background will also default to black if a third number is not included.
  
 
Alternatively, there is another, more complex format you can use to achieve the same text formatting. This is only helpful if this template doesn't provide a text (or highlight) color that's in the game. A CSS span style syntax can be used:
 
Alternatively, there is another, more complex format you can use to achieve the same text formatting. This is only helpful if this template doesn't provide a text (or highlight) color that's in the game. A CSS span style syntax can be used:
<pre><span style="font-family:IBM Plex Mono Medium, Consolas, monospace; font-size:12.5px; background-color:#000; color:#91caff;">*TEXT GOES HERE*</span></pre>
+
<pre><span style="font-family:IBM Plex Mono Medium; font-size:12.5px; background-color:#000; color:#91caff;">*TEXT GOES HERE*</span></pre>
The example would provide the following: <span style="font-family:IBM Plex Mono Medium, Consolas, monospace; font-size:12.5px; background-color:#000; color:#91caff;">*TEXT GOES HERE*</span>
+
The example would provide the following: <span style="font-family:IBM Plex Mono Medium; font-size:12.5px; background-color:#000; color:#91caff;">*TEXT GOES HERE*</span>
  
 
This should only be a last resort, as this is a lot of text that can muddle up the flow of editing a page, therefore possibly adding more editing difficulty for other editors. Also, if there is a text color in the game that's very similar to a color this template can provide, it may be best to just use the next closest color from this template.
 
This should only be a last resort, as this is a lot of text that can muddle up the flow of editing a page, therefore possibly adding more editing difficulty for other editors. Also, if there is a text color in the game that's very similar to a color this template can provide, it may be best to just use the next closest color from this template.
 +
 +
<includeonly>[[Category:Inline formatting templates]]</includeonly>
 +
<noinclude>[[Category:Template Documentation]]</noinclude>
  
 
==Values==
 
==Values==
Line 50: Line 53:
 
| 3
 
| 3
 
| {{DFtext|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|3:3:1}}
 
| {{DFtext|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|3:3:1}}
| {{DFtext|&nbsp;Test&nbsp;|3:0}}
+
| {{DFtext|&nbsp;Test&nbsp;|3:1}}
 
|+  
 
|+  
 
| 3:1
 
| 3:1
 
| {{DFtext|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|3:3:1}}
 
| {{DFtext|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|3:3:1}}
| {{DFtext|&nbsp;Test&nbsp;|3:1}}
+
| {{DFtext|&nbsp;Test&nbsp;|3:0}}
 
|+  
 
|+  
 
| 4
 
| 4
Line 92: Line 95:
 
| {{DFtext|&nbsp;Test&nbsp;|8:0}}
 
| {{DFtext|&nbsp;Test&nbsp;|8:0}}
 
|}
 
|}
<includeonly>[[Category:Inline formatting templates]]</includeonly>
 
<noinclude>[[Category:Template Documentation]]</noinclude>
 

Please note that all contributions to Dwarf Fortress Wiki are considered to be released under the GFDL & MIT (see Dwarf Fortress Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel Editing help (opens in new window)

Templates used on this page: