Difference between revisions of "Template:MapInfoBox"

From Dungeon Defenders 2 Wiki
Jump to: navigation, search
m
(Updating to remove dd2 planner parameter, actually adding documentation for how to set a minimap image, rearranging the parameters, and capitalizing "description" to conform with the rest of the parameters.)
Line 1: Line 1:
 
<div style="float:right; border:1px solid; margin:5px; text-align:center">
 
<div style="float:right; border:1px solid; margin:5px; text-align:center">
[[{{#ifexist:File:Minimap {{{MapName}}}.png|File:Minimap {{{MapName}}}.png|File:Minimap_default.jpg}}|200px]]
+
[[{{#ifexist:{{{Minimap}}}|{{{Minimap}}}|#ifexist:File:Minimap_{{{MapName}}}.png|File:Minimap_{{{MapName}}}.png|File:Minimap_default.jpg}}|200px]]
<h3 style="text-align:center; margin:4px;">{{{MapName}}}</h3><span class="plainlinks">
+
<h3 style="text-align:center; margin:4px;">{{{MapName}}}</h3>
{{#if: {{{PlannerID|}}} |[https://dd2tools.com/planner/?map={{{PlannerID}}} Map Planner] / [https://dd2tools.com/planner/ All Plans] |}}</span>
 
 
<hr>
 
<hr>
 
{| cellpadding="2" style="border-collapse:collapse;" width="100%"
 
{| cellpadding="2" style="border-collapse:collapse;" width="100%"
Line 22: Line 21:
 
|}
 
|}
 
</div>
 
</div>
{{#if:{{{description|}}}|<div style="padding: 0em 2em 0em 1em; margin: 1em 0em 1em 4em; border-left: 1px solid silver;">
+
{{#if:{{{Description|}}}|<div style="padding: 0em 2em 0em 1em; margin: 1em 0em 1em 4em; border-left: 1px solid silver;">
 
<div style="position: absolute; margin-top: -0.2em; margin-left: -{{{icon-size|0.8em}}}; font: bold 5em Times New Roman, Times, Georgie, serif; color: silver;">“</div>
 
<div style="position: absolute; margin-top: -0.2em; margin-left: -{{{icon-size|0.8em}}}; font: bold 5em Times New Roman, Times, Georgie, serif; color: silver;">“</div>
{{{description}}}
+
{{{Description}}}
 
<p style="text-align: right; font-size: 0.9em; font-style:italic; margin-top:0;">— Tavern Keeper</p>
 
<p style="text-align: right; font-size: 0.9em; font-style:italic; margin-top:0;">— Tavern Keeper</p>
 
</div>|}}
 
</div>|}}
Line 32: Line 31:
 
|-
 
|-
 
! Parameter !! Description
 
! Parameter !! Description
 +
|-
 +
| Minimap || File reference to the Minimap image. <code style="color:white">File:Minimap_{{{MapName}}}.png</code> will be used if this parameter is not set.
 +
|-
 +
| MapName || Name of the map.
 +
|-
 +
| Description || Description of the map.
 
|-
 
|-
 
| MCores || Total amount of Main Cores.
 
| MCores || Total amount of Main Cores.
Line 42: Line 47:
 
|-
 
|-
 
| DU || Defense Unit Limit.
 
| DU || Defense Unit Limit.
|-
 
| description || Description of the map.
 
|-
 
| MapName || Name of the map.
 
 
|}
 
|}
  
 
===Example===
 
===Example===
<nowiki>{{MapInfoBox | name=The Gates of DragonFall | MCores=1 | SCores=1 | GLanes=2 | ALanes=3 | MChests=1 | DU=50 | description=Squire, put a description here.}}</nowiki> produces the following:
+
<nowiki>{{MapInfoBox | name=The Gates of DragonFall | MCores=1 | SCores=1 | GLanes=2 | ALanes=3 | MChests=1 | DU=50 | Description=Squire, put a description here.}}</nowiki> produces the following:
  
{{MapInfoBox | MapName=The Gates of Dragonfall | MCores=1 | SCores=1 | GLanes=2 | ALanes=3 | MChests=1 | DU=50 | description=Squire, put a description here.}}
+
{{MapInfoBox | MapName=The Gates of Dragonfall | MCores=1 | SCores=1 | GLanes=2 | ALanes=3 | MChests=1 | DU=50 | Description=Squire, put a description here.}}
 
</noinclude>
 
</noinclude>

Revision as of 16:27, 15 January 2023

[[

  1. ifexist:File:Minimap_{{{MapName}}}.png|200px]]

{{{MapName}}}


Main Cores: {{{MCores}}}
Sub Cores: {{{SCores}}}
Ground Lanes: {{{GLanes}}}
Air Lanes: {{{ALanes}}}
Defense Units: {{{DU}}}


Parameters

Parameter Description
Minimap File reference to the Minimap image. File:Minimap_{{{MapName}}}.png will be used if this parameter is not set.
MapName Name of the map.
Description Description of the map.
MCores Total amount of Main Cores.
SCores Total amount of Sub Cores.
GLanes Total amount of Ground Lanes.
ALanes Total amount of Air Lanes.
DU Defense Unit Limit.

Example

{{MapInfoBox | name=The Gates of DragonFall | MCores=1 | SCores=1 | GLanes=2 | ALanes=3 | MChests=1 | DU=50 | Description=Squire, put a description here.}} produces the following:

Minimap The Gates of Dragonfall.png

The Gates of Dragonfall


Main Cores: 1
Sub Cores: 1
Ground Lanes: 2
Air Lanes: 3
Defense Units: 50
Region:  ?

Squire, put a description here.