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.

Template:DFtext/doc

From Dwarf Fortress Wiki
< Template:DFtext
Revision as of 22:55, 14 January 2022 by Ziusudra (talk | contribs) (fixed attribute order for background format example, changed background example to a different number (also something about the cyan on blue makes the cyan on black look green to me))
Jump to navigation Jump to search

The DFtext template is designed to provide generally short preformatted text that resembles that of the game.

{{DFtext|Outside}} turns into Outside.
{{DFtext|Outside|3:1}} turns into Outside
{{DFtext|Outside|3:2:1}} turns into Outside.


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:

{{DFtext|color:brightness}} or...
{{DFtext|color:background:brightness}}

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:

<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: *TEXT GOES HERE*

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.

Values

Value Background Text
0              Test 
0:1              Test 
1              Test 
1:1              Test 
2              Test 
2:1              Test 
3              Test 
3:1              Test 
4              Test 
4:1              Test 
5              Test 
5:1              Test 
6              Test 
6:1              Test 
7              Test 
7:1              Test 
8+              Test