- 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.
Difference between revisions of "Template:DFtext"
m |
m (Protected "Template:DFtext" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))) |
||
(7 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
<noinclude>''You may be looking for [[Template:Gametext]].'' | <noinclude>''You may be looking for [[Template:Gametext]].'' | ||
− | </noinclude><span style="color: {{fgcolor|{{{2|7:0}}}}}; font-size: 12.5px; font-family: 'fixedsys', 'IBM Plex Mono Medium', 'Consolas', monospace; background:{{bgcolor|{{{2|0:0}}}|black}}">{{{1}}}</span><noinclude>{{documentation}}</noinclude> | + | </noinclude><span style="color: {{fgcolor|{{{2|7:0}}}}}; font-size: 12.5px; font-family: 'fixedsys', 'IBM Plex Mono Medium', 'Consolas', monospace; background:{{bgcolor|{{{2|0:0}}}|black}}">{{#if:{{{links|}}}|{{colorlinks|{{fgcolor|{{{linkcolor|{{{2|7:0}}}}}}}}|{{{1}}}}}|<nowiki/>{{{1}}}<nowiki/>}}</span><noinclude>{{documentation}}</noinclude> |
Latest revision as of 22:44, 29 November 2023
You may be looking for Template:Gametext.
{{{1}}}
(view - edit - history - purge) Documentation
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 |