Template:Building: Difference between revisions

From Heroes 3 wiki
Jump to navigation Jump to search
ShushMaster (talk | contribs)
No edit summary
mNo edit summary
 
(16 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{| border=0 cellpadding=0 cellspacing=0 valign=middle style="background-color:#{{purple 3}}; border: 1px solid; float:{{{float|right}}};"
<includeonly>{| cellspacing=0 valign=middle style="background-color:#{{purple 3}}; float:{{{float|right}}}; margin-left:12px;"
|- 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|{{PAGENAME}}}}}
|-
|-
| <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;"|{{{image|[[File:{{{town}}} {{{name|{{PAGENAME}}}}}.gif]]}}}
|-
|-
{{{no_pre|
! style="background-color:#{{purple 2}}; color:white;" | Prerequisite:
{{!}} align=center bgcolor=mediumorchid{{!}} '''Prerequisite:''' }}}
|-
|-
| colspan=8 style="width: 150px;" |
| style="padding-left:5px; padding-right:5px; text-align:center;" | {{{pre|}}}
{| cellpadding=0 cellspacing=0 valign=middle style="background-color:#{{purple 3}};"
|-
| style="border-left: 5px solid #E8C0E8; border-right: 5px solid #{{purple 3}};" | {{{pre|}}}
! style="background-color:#{{purple 2}}; color:white;" | Cost:
|}
|-
|-
{{{no_cost|
| align=center style="padding-left:5px; padding-right:5px" | {{{wood|}}} {{{mercury|}}} {{{ore|}}} {{{sulfur|}}} {{{crystal|}}} {{{gem|}}} {{{gold|}}}
{{!}} 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;" |
| style="padding-left:5px; padding-right:5px" | {{{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 31: Line 23:
{| style="background: transparent;"  
{| style="background: transparent;"  
| <pre>{{Building
| <pre>{{Building
| town    =
| name    =
| image  =
  | pre    =  
  | pre    =  
  | wood    =  
  | wood    =  
Line 42: Line 37:
}}</pre>
}}</pre>
|}
|}
* "name=" is only needed if the building differs from the page name.
* "image=" is only needed if the desired image is not of the form  "<town> <name>.gif"
* all cost parameters are optional if they don't exist.


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
== Examples ==
 
{{Building
{| style="background: transparent;"
| town    = Tower
| <pre>
| name    = Library
  | no_sulfur =</pre>
| pre     = [[Mage Guild]]
|}
| wood    = 5 {{W}}
| mercury = 5 {{M}}
| ore    = 5 {{O}}
| sulfur  = 5 {{S}}
| crystal = 5 {{C}}
| gem    = 5 {{Gem}}
| gold    = 1500 {{G}}
| effect  = The library provides additional spells for mage guild.
}}
{{Building
| town  = Stronghold
| name  = Freelancer's Guild
| pre    = [[Marketplace]]
| gold  = 1000 {{G}}
| effect = Allows a visiting hero to sell creatures for resources
| image  = [[File:Stronghold freelancer's guild (outline).gif|200px]]
}}
{{Building
| town    = Rampart
| name    = Mystic Pond
| pre     = (none)
  | wood    = 2 {{W}}
  | mercury = 2 {{M}}
| ore    = 2 {{O}}
| sulfur  = 2 {{S}}
| crystal = 2 {{C}}
| gem    = 2 {{Gem}}
| gold    = 2000 {{G}}
| effect  = Produces 1-4 of a random [[Resource]] (except gold) on the first day of every week.
}}


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

Latest revision as of 15:05, 22 March 2025


How to use[edit | hide | hide all]

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
 | town    =
 | name    =
 | image   =
 | pre     = 
 | wood    = 
 | mercury = 
 | ore     = 
 | sulfur  = 
 | crystal = 
 | gem     = 
 | gold    = 
 | effect  = 
}}
  • "name=" is only needed if the building differs from the page name.
  • "image=" is only needed if the desired image is not of the form "<town> <name>.gif"
  • all cost parameters are optional if they don't exist.

Examples[edit | hide]

Library
Prerequisite:
Mage Guild
Cost:
5 Wood 5 Mercury 5 Ore 5 Sulfur 5 Crystal 5 Gem 1500 Gold
Effect:
The library provides additional spells for mage guild.
Freelancer's Guild
Prerequisite:
Marketplace
Cost:
1000 Gold
Effect:
Allows a visiting hero to sell creatures for resources
Mystic Pond
Prerequisite:
(none)
Cost:
2 Wood 2 Mercury 2 Ore 2 Sulfur 2 Crystal 2 Gem 2000 Gold
Effect:
Produces 1-4 of a random Resource (except gold) on the first day of every week.