Template:Building: Difference between revisions

From Heroes 3 wiki
Jump to navigation Jump to search
Legate (talk | contribs)
mNo edit summary
Legate (talk | contribs)
Simplify/Standardize template
Line 1: Line 1:
{| border=0 cellpadding=0 cellspacing=0 valign=middle style="background-color:#{{purple 3}}; border:1px solid; border-color:rgba(0,0,0,0); float:{{{float|right}}}; margin: 0 0 8px 8px;"
<includeonly>{| border=0 cellpadding=0 cellspacing=0 valign=middle style="background-color:#{{purple 3}}; border:1px solid; border-color:rgba(0,0,0,0); float:{{{float|right}}}; margin: 0 0 8px 8px;"
|- style="height: 25px;"
|- style="height: 25px;"
| align=center bgcolor={{purple 1}} style="color:#FFFFFF" | '''{{{name|{{{Building|1}}}}}}'''
! style="background-color:#{{purple 1}}A0!important; color:white; width: 200px;" | {{{name|{{{Building|1}}}}}}
|-
|-
| <includeonly>style="text-align:center;"|{{{SingleImage|[[Image: Castle {{{Building|1}}}.gif|{{{Building|1}}} of Castle|link=Castle town]][[Image: Tower {{{Building|1}}}.gif|{{{Building|1}}} of Tower|link=Tower town]][[Image: Rampart {{{Building|1}}}.gif|{{{Building|1}}} of Rampart|link=Rampart town]]<br>[[Image: Inferno {{{Building|1}}}.gif|{{{Building|1}}} of Inferno|link=Inferno town]][[Image: Necropolis {{{Building|1}}}.gif|{{{Building|1}}} of Necropolis|link=Necropolis town]][[Image: Dungeon {{{Building|1}}}.gif|{{{Building|1}}} of Dungeon|link=Dungeon town]]<br>[[Image: Stronghold {{{Building|1}}}.gif|{{{Building|1}}} of Stronghold|link=Stronghold town]][[Image: Fortress {{{Building|1}}}.gif|{{{Building|1}}} of Fortress|link=Fortress town]][[Image: Conflux {{{Building|1}}}.gif|{{{Building|1}}} of Conflux|link=Conflux town]]}}}</includeonly>
| style="text-align:center;"|{{{SingleImage|}}}
|- {{#switch: {{{pre|}}}| = style="display: none;" | }}
! style="background-color:#{{purple 2}}; color:white;" | Prerequisite:
|- {{#switch: {{{pre|}}}| = style="display: none;" | }}
| {{{pre|}}}
|-
|-
{{{no_pre|
! style="background-color:#{{purple 2}}; color:white;" | Cost:
{{!}} align=center bgcolor=mediumorchid{{!}} '''Prerequisite:''' }}}
|-
|-
| colspan=8 style="width: 150px;" |
| align=center | {{{wood|}}} {{{mercury|}}} {{{ore|}}} {{{sulfur|}}} {{{crystal|}}} {{{gem|}}} {{{gold|}}}
{| cellpadding=0 cellspacing=0 valign=middle style="background-color:#{{purple 3}};"
| style="border-left: 5px solid #E8C0E8; border-right: 5px solid #{{purple 3}};" | {{{pre|}}}
|}
|-
{{{no_cost|
{{!}} colspan=8 align=center bgcolor=mediumorchid{{!}} '''Cost:'''
{{!-}} align=center valign=middle
{{!}} {{{wood|}}} {{{mercury|}}} {{{ore|}}} {{{sulfur|}}} {{{crystal|}}} {{{gem|}}} {{{gold|}}} }}}
|-
|-
| colspan=8 align=center bgcolor=mediumorchid style="width: 150px;" | '''Effect:'''
! style="background-color:#{{purple 2}}; color:white;" | Effect:
|-
|-
| colspan=8 style="width: 150px;" |
| {{{effect|}}}
{| cellpadding=0 cellspacing=0 valign=middle style="background-color:#{{purple 3}};"
|}</includeonly><noinclude>
| style="border-left: 5px solid #{{purple 3}}; border-right: 5px solid #E5CCFF; font-size:90%;" | {{{effect|}}}
|}
|}<noinclude>


== How to use ==
== How to use ==
Line 43: Line 35:
|}
|}


You can add more "pre rows" as parameters if the building needs more than one. If the building does not require certain resource, you have to add "no_" in front of the parameter and leave it empty. For example
You can add more "pre rows" as parameters if the building needs more than one.


{| style="background: transparent;"
== Examples ==
| <pre>
| no_sulfur  =</pre>
|}
 
== Example ==
{{Common building
{{Common building
  | Building = Library
  | Building   = Library
  | pre   = [[Mage Guild]]
  | pre         = [[Mage Guild]]
  | wood   = {{W}}5
  | wood       = 5 {{W}}
  | mercury = {{M}}5
  | mercury     = 5 {{M}}
  | ore     = {{O}}5
  | ore         = 5 {{O}}
  | sulfur = {{S}}5
  | sulfur     = 5 {{S}}
  | crystal = {{C}}5
  | crystal     = 5 {{C}}
  | gem     = {{Gem}}5
  | gem         = 5 {{Gem}}
  | gold   = {{G}}1500
  | gold       = 1500 {{G}}
  | effect = The library provides additional spells for mage guild.
  | effect     = The library provides additional spells for mage guild.
  | SingleImage = [[File:Tower Library.gif]]
  | SingleImage = [[File:Tower Library.gif]]
}}
{{Common building
| Building    = Freelancer's Guild
| pre        = [[Marketplace]]
| gold        = 1000 {{G}}
| effect      = Allows a visiting hero to sell creatures for resources
| SingleImage = [[File:Stronghold freelancer's guild (outline).gif|200px]]
}}
}}


[[Category: Building templates|{{PAGENAME}}]]</noinclude>
[[Category: Building templates|{{PAGENAME}}]]</noinclude>

Revision as of 15:25, 21 March 2025


How to use

Copy the code at the beginning of building article, and fill in the missing information. Notice, that the factors below are case sensitive meaning, that "Ore" is not the same as "ore".

{{Building
 | pre     = 
 | wood    = 
 | mercury = 
 | ore     = 
 | sulfur  = 
 | crystal = 
 | gem     = 
 | gold    = 
 | effect  = 
}}

You can add more "pre rows" as parameters if the building needs more than one.

Examples

Template:Common building Template:Common building