Difference between revisions of "Template:MapInfoBox"

From Dungeon Defenders 2 Wiki
Jump to: navigation, search
m
(Small formatting change to the example)
 
(23 intermediate revisions by 2 users not shown)
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; padding: 5px;">
[[{{#ifexist:File:Minimap {{{MapName}}}.jpg|File:Minimap {{{MapName}}}.jpg|File:Minimap_default.jpg}}|200px]]
+
{{#ifexist: {{{Minimap}}}
<h3 style="text-align:center; margin:4px;">{{{MapName}}}</h3><span class="plainlinks">
+
    | [[{{{Minimap}}}|250px]]
{{#if: {{{PlannerID}}} [https://dd2planner.de/map/{{{PlannerID}}} Map Planner] %7C [https://dd2planner.de/plans/0/order/last_updated/order_dir/desc/filter_map/{{{PlannerID}}} All Plans]}}</span>
+
    | {{#ifexist: File:Minimap_{{{MapName}}}.png
 +
        | [[File:Minimap_{{{MapName}}}.png|250px]]
 +
        | [[File:Default_Minimap.png|250px]]
 +
    }}
 +
}}
 +
<p style="text-align:center; margin:4px; font-size: 1.25em"><b>{{{MapName|Map Name}}}</b></p>
 
<hr>
 
<hr>
 
{| cellpadding="2" style="border-collapse:collapse;" width="100%"
 
{| cellpadding="2" style="border-collapse:collapse;" width="100%"
 
|-
 
|-
| style="padding:4px; text-align:right; border-right:3px solid;"| Main Cores
+
| style="width:45%" | <!--Sets the width for the 1st column-->
| style="padding:4px; text-align:left;" | {{{MCores}}}
+
| style="width:55%" | <!--Sets the width for the 2nd column-->
 
|-
 
|-
| style="padding:4px; text-align:right; border-right:3px solid;"| Sub Cores
+
| style="font-size: 105%; text-align: right;"   | '''Main Cores:'''
| style="padding:4px; text-align:left;" | {{{SCores}}}
+
| style="padding-left: 10px; text-align: left;" | {{{MCores|?}}}
 
|-
 
|-
| style="padding:4px; text-align:right; border-right:3px solid;"| Ground Lanes
+
| style="font-size: 105%; text-align: right;"   | '''Sub Cores:'''
| style="padding:4px; text-align:left;" | {{{GLanes}}}
+
| style="padding-left: 10px; text-align: left;" | {{{SCores|?}}}
 
|-
 
|-
| style="padding:4px; text-align:right; border-right:3px solid;"| Air Lanes
+
| style="font-size: 105%; text-align: right;"   | '''Ground Lanes:'''
| style="padding:4px; text-align:left;" | {{{ALanes}}}
+
| style="padding-left: 10px; text-align: left;" | {{{GLanes|?}}}
 
|-
 
|-
| style="padding:4px; text-align:right; border-right:3px solid;"| Mana Chests
+
| style="font-size: 105%; text-align: right;"   | '''Air Lanes:'''
| style="padding:4px; text-align:left;" | {{{MChests}}}
+
| style="padding-left: 10px; text-align: left;" | {{{ALanes|?}}}
 
|-
 
|-
| style="padding:4px; text-align:right; border-right:3px solid;"| Defense Units
+
| style="font-size: 105%; text-align: right;"    | '''Defense Units:'''
| style="padding:4px; text-align:left;" | {{{DU}}}
+
| style="padding-left: 10px; text-align: left;" | {{{DU|?}}}
 +
|-
 +
| style="font-size: 105%; text-align: right;"   | '''Region:'''
 +
| style="padding-left: 10px; text-align: left;" | {{{Region|?}}}
 
|}
 
|}
 
</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="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="padding: 0em 2em 0em 1em; margin: 1em 0em 1em 4em; border-left: 1px solid silver;">
{{{description}}}
+
        <div style="position: absolute; margin-top: -0.2em; margin-left: -0.8em; font: bold 5em Times New Roman, Times, Georgie, serif; color: silver;">“</div>
<p style="text-align: right; font-size: 0.9em; font-style:italic; margin-top:0;">— Tavern Keeper</p>
+
        <p style="font-size:1.3em">{{{Description}}}</p>
</div>|}}
+
    </div>
<noinclude>
+
}}<!--
 +
 
 +
--><noinclude>
 +
 
 
===Parameters===
 
===Parameters===
 
{| border="1" style="border-collapse:collapse;"
 
{| border="1" style="border-collapse:collapse;"
 
|-
 
|-
 
! Parameter !! Description
 
! Parameter !! Description
 +
|-
 +
| Minimap || File reference to the Minimap image. <code>File:Minimap_{{{MapName}}}.png</code> will be used if this parameter is not set.
 +
|-
 +
| MapName || Name of the map.
 +
|-
 +
| Description || In-game description of the map.
 
|-
 
|-
 
| MCores || Total amount of Main Cores.
 
| MCores || Total amount of Main Cores.
Line 43: Line 60:
 
|-
 
|-
 
| ALanes || Total amount of Air Lanes.
 
| ALanes || Total amount of Air Lanes.
|-
 
| MChests|| Total amount of Chests on the map.
 
 
|-
 
|-
 
| DU || Defense Unit Limit.
 
| DU || Defense Unit Limit.
 
|-
 
|-
| description || Description of the map.
+
| Region || The region the map belongs to.
|-
 
| 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:
+
{| style="width:80%;"
 +
! style="font-size:150%; width: 50%;" | Wiki Text
 +
! style="font-size:150%; width: 50%;" | Result
 +
|-
 +
|<div style="display: flex; justify-content: center;"><!---
 +
---><code style="display: table; white-space: pre-wrap;"><!---
 +
    ---><nowiki>
 +
 
 +
            {{MapInfoBox  
 +
            | Minimap = File:Minimap The Gates of Dragonfall.png         
 +
            | MapName = The Gates of Dragonfall
 +
            | Description = Squire, put a description here!
 +
            | MCores = 1  
 +
            | SCores = 0
 +
            | GLanes = 3
 +
            | ALanes = 2  
 +
            | DU = 600
 +
            | Region = Dragonfall Town
 +
            }}
 +
 
 +
        </nowiki><!---
 +
---></code>
 +
</div>
 +
|<div style="display: flex; justify-content: center; flex-direction: row-reverse;">
 +
    {{MapInfoBox
 +
    | Minimap = File:Minimap The Gates of Dragonfall.png
 +
    | MapName = The Gates of Dragonfall
 +
    | Description = Squire, put a description here!
 +
    | MCores = 1
 +
    | SCores = 0
 +
    | GLanes = 3
 +
    | ALanes = 2
 +
    | DU = 600
 +
    | Region = Dragonfall Town
 +
    }}
 +
</div>
 +
|}
  
{{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>
 +
__NOEDITSECTION__

Latest revision as of 15:38, 12 February 2023

Default Minimap.png

Map Name


Main Cores:  ?
Sub Cores:  ?
Ground Lanes:  ?
Air Lanes:  ?
Defense Units:  ?
Region:  ?


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 In-game 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.
Region The region the map belongs to.

Example

Wiki Text Result
{{MapInfoBox | Minimap = File:Minimap The Gates of Dragonfall.png | MapName = The Gates of Dragonfall | Description = Squire, put a description here! | MCores = 1 | SCores = 0 | GLanes = 3 | ALanes = 2 | DU = 600 | Region = Dragonfall Town }}

Minimap The Gates of Dragonfall.png

The Gates of Dragonfall


Main Cores: 1
Sub Cores: 0
Ground Lanes: 3
Air Lanes: 2
Defense Units: 600
Region: Dragonfall Town

Squire, put a description here!