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.

Difference between revisions of "Template:Tileset"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
m
(param fix)
 
(17 intermediate revisions by 9 users not shown)
Line 1: Line 1:
{| style="margin: 0 0 0.5em 0.5em; border-spacing: 0;"
+
<includeonly>{| style="width: 100%; margin: 0 0 0.5em 0.5em; border-spacing: 0;"
 
|-
 
|-
| style="width:270px; padding-top:0.5em;" "valign="top" | {{{image}}} || valign="top" |  
+
| style="width:270px; padding-top:0.5em;" valign="top" | <div style="background:darkmagenta; float:left;">{{#if: {{{image|}}}
 +
  | {{{image}}}
 +
  | {{#if: {{{filename|}}} | [[Image:{{{filename|}}}]] | <span class="error">no image file</span> }}
 +
}}</div> || valign="top" |  
  
 
{|
 
{|
 +
|- {{#if:{{{title|{{{filename|}}}}}}||style="display:none;"}}
 +
! style="text-align:left; padding:0 2em 0 1em;" | Title
 +
| <span id="{{{title|{{{filename}}}}}}">[[#{{{title|{{{filename}}}}}}|{{{title|{{{filename}}}}}}]]</span>
 
|-  
 
|-  
 
! style="text-align:left; padding:0 2em 0 1em;" | Author
 
! style="text-align:left; padding:0 2em 0 1em;" | Author
| {{{author}}}
+
| {{{author|-}}}
 +
|- {{#if:{{{dated|}}}||style="display:none;"}}
 +
! style="text-align:left; padding:0 2em 0 1em;" | Dated
 +
| {{{dated|}}}
 
|-
 
|-
 
! style="text-align:left; padding:0 2em 0 1em;" | Tile Size
 
! style="text-align:left; padding:0 2em 0 1em;" | Tile Size
| {{{size}}}
+
| {{{size|-}}}
|-
+
|- {{#if:{{{resolution|}}}||style="display:none;"}}
 
! style="text-align:left; padding:0 2em 0 1em;" | Resolution
 
! style="text-align:left; padding:0 2em 0 1em;" | Resolution
| {{{resolution}}}
+
| {{{resolution|}}}
|-
+
|- {{#if:{{{versions|}}}||style="display:none;"}}
 +
! style="text-align:left; padding:0 2em 0 1em;" | Versions
 +
| {{{versions|}}}
 +
|- {{#if:{{{comments|}}}||style="display:none;"}}
 
! style="text-align:left; padding:0 2em 0 1em;" valign="top" | Comments
 
! style="text-align:left; padding:0 2em 0 1em;" valign="top" | Comments
| {{{comments}}}
+
| {{{comments|-}}}
 
|}
 
|}
  
|}<noinclude>
+
|
 +
{| style="float: right;"
 +
|- {{#if:{{{demo|}}}||style="display:none;"}}
 +
| valign="top" |  <div style="background:none; float:right;">{{{demo|}}}</div> || valign="top" |
 +
|- {{#if:{{{demo2|}}}||style="display:none;"}}
 +
| valign="top" | <div style="background:none; float:right;">{{{demo2|}}}</div> || valign="top" |
 +
|- {{#if:{{{demo3|}}}||style="display:none;"}}
 +
| valign="top" | <div style="background:none; float:right;">{{{demo3|}}}</div> || valign="top" |
 +
|- {{#if:{{{demo4|}}}||style="display:none;"}}
 +
| valign="top" | <div style="background:none; float:right;">{{{demo4|}}}</div> || valign="top" |
 +
|}
 +
 
 +
|}</includeonly><noinclude>
 
Usage:
 
Usage:
 
<pre><nowiki>
 
<pre><nowiki>
 
{{Tileset|
 
{{Tileset|
|image=[[Image:Herrbdog_16x16_tileset.gif]]
+
|filename=Herrbdog_16x16_tileset.gif
 +
|title=herrbdog_16x16
 +
|image=[[File:Herrbdog_16x16_tileset.gif]]
 
|author=[[User:Herrbdog|Herrbdog]]
 
|author=[[User:Herrbdog|Herrbdog]]
|size=16x16
+
|dated=2007-11-15
|resolution=1280x400
+
|size=16&amp;times;16
 +
|resolution=1280&amp;times;400
 +
|versions=14&times;14, 16&times;16
 
|comments=This is Herrbdog's well-known tileset.
 
|comments=This is Herrbdog's well-known tileset.
 +
|demo=
 +
|demo2=
 +
|demo3=
 +
|demo4=
 
}}
 
}}
 
</nowiki></pre>
 
</nowiki></pre>
 +
 +
It is best to specify <code>filename=tileset.png</code>, and leave <code>title</code> and <code>image</code> unspecified, in most cases.
  
 
Output:
 
Output:
  
 
{{Tileset|
 
{{Tileset|
|image=[[Image:Herrbdog_16x16_tileset.gif]]
+
|filename=Herrbdog_16x16_tileset.gif
 +
|title=herrbdog_16x16
 +
|image=[[File:Herrbdog_16x16_tileset.gif]]
 
|author=[[User:Herrbdog|Herrbdog]]
 
|author=[[User:Herrbdog|Herrbdog]]
|size=16x16
+
|dated=2007-11-15
|resolution=1280x400
+
|size=16&times;16
 +
|resolution=1280&times;400
 +
|versions=14&times;14, 16&times;16
 
|comments=This is Herrbdog's well-known tileset.
 
|comments=This is Herrbdog's well-known tileset.
 +
|demo=
 +
|demo2=
 +
|demo3=
 +
|demo4=
 
}}
 
}}
  
 
[[Category:Templates]]
 
[[Category:Templates]]
 
</noinclude>
 
</noinclude>

Latest revision as of 14:19, 16 May 2022

Usage:

{{Tileset|
|filename=Herrbdog_16x16_tileset.gif
|title=herrbdog_16x16
|image=[[File:Herrbdog_16x16_tileset.gif]]
|author=[[User:Herrbdog|Herrbdog]]
|dated=2007-11-15
|size=16&times;16
|resolution=1280&times;400
|versions=14×14, 16×16
|comments=This is Herrbdog's well-known tileset.
|demo=
|demo2=
|demo3=
|demo4=
}}

It is best to specify filename=tileset.png, and leave title and image unspecified, in most cases.

Output:

Herrbdog 16x16 tileset.gif
Title herrbdog_16x16
Author Herrbdog
Dated 2007-11-15
Tile Size 16×16
Resolution 1280×400
Versions 14×14, 16×16
Comments This is Herrbdog's well-known tileset.