Template:Infobox hero: Difference between revisions

From Descent-Community Wiki 1.2
Jump to navigation Jump to search
(Initial commit of new hero template)
 
(Undo revision 17023 by Psymia (talk) keep using the herosheet argument. change color in type color template)
(10 intermediate revisions by the same user not shown)
Line 13: Line 13:
}}{{
}}{{
   #vardefine: hero_image | {{#if: {{{image|}}} | {{{image}}} | Hero - {{{name|}}}.png }}
   #vardefine: hero_image | {{#if: {{{image|}}} | {{{image}}} | Hero - {{{name|}}}.png }}
}}{{
  #vardefine: race | {{ValidateRace|{{{race|}}}}}
}}{{
  #vardefine: racePlural | {{#if:{{#var: race}}|
    {{#switch:{{#var: race}}
      |Elf= Elves
      |Dwarf=Dwarves
      |Orrukasi=Orrukasi
      |#default={{#var: race}}s
    }}
  |}}
}}<div class="herobox_border">
}}<div class="herobox_border">
<div class="herobox_content" style="background-color:{{#var: backgroundcolor}}>
<div class="herobox_content" style="background-color:{{#var: backgroundcolor}}>
Line 39: Line 50:
{{#if:{{#var: expansion}}|
{{#if:{{#var: expansion}}|
<div style="flex-grow: 1; flex-basis:50%; min-width:100px; margin-top:10px; margin-left:5px; margin-right:5px; text-align:center; margin:auto;">{{#var: expansionlogo}}<br>[[{{#var: expansion}}|{{#var: expansioncode}} {{#var: expansion}}]]</div>
<div style="flex-grow: 1; flex-basis:50%; min-width:100px; margin-top:10px; margin-left:5px; margin-right:5px; text-align:center; margin:auto;">{{#var: expansionlogo}}<br>[[{{#var: expansion}}|{{#var: expansioncode}} {{#var: expansion}}]]</div>
|}}
</div>
<div style="display:flex; flex-wrap:wrap;>
{{#if:{{#var: race}}|
<div style="flex-grow: 1; flex-basis:50%; min-width:100px; margin-top:10px; margin-left:5px; margin-right:5px; text-align:center; margin:auto;">Race:&nbsp;[[:Category:{{#var: racePlural}}|{{#var: race}}]]</div>
|}}
|}}
</div>
</div>
Line 51: Line 67:
<div style="margin:5px -10px -5px -10px;">{{{feat|}}}</div>
<div style="margin:5px -10px -5px -10px;">{{{feat|}}}</div>
</div>
</div>
{{#if:{{{quote|}}}|<div style="margin:auto">''{{{quote|}}}''</div>|}}
{{#if:{{{quote|}}}|<div style="margin:auto; max-width:470px;">''{{{quote|}}}''</div>|}}
</div>
</div>
</div>
</div>
</div>
</div>
</div></includeonly><noinclude>{{Infobox hero |name=Example Hero |expansion=DJ07 |archetype=Mage |image=Hero_-_Zyla.png |speed=5 |health=8 |stamina=5 |defense=Grey |willpower=3 |might=3 |knowledge=3 |awareness=3 |ability=I can do something... |feat=I'm not useless |quote=Catch me if you can}}{{documentation}}</noinclude>
</div>{{#if:{{#var: archetype}}|[[Category:{{#var: archetype}}s]]
|}}{{#if:{{#var: expansion}}|[[Category:{{#var: expansion}}]]
|}}{{#if:{{#var: race}}|[[Category:{{#var: racePlural}}]]
|}}</includeonly><noinclude>{{Infobox hero |name=Example Hero |expansion=DJ07 |archetype=Mage |race=example-race |image=Hero_-_Zyla.png |speed=5 |health=8 |stamina=5 |defense=Grey |willpower=3 |might=3 |knowledge=3 |awareness=3 |ability=I can do something... |feat=I'm not useless |quote=Catch me if you can}}{{documentation}}</noinclude>

Revision as of 13:47, 12 August 2017

Example Hero

Speed: 5

Health: 8

Stamina: 5

Defense: Grey

Willpower: 3

Might: 3

Knowledge: 3

Awareness: 3

Hero Ability
I can do something...
Heroic Feat
I'm not useless
Catch me if you can
Template documentation (for the above template, sometimes hidden or invisible)
Description
This template is intended to display an infobox about a hero card.
The page will be automatically added to the various categories depending on the arguments of the template.
Syntax, all possible arguments
{{Infobox hero
|name      = <required>
|expansion = <optional>
|archetype = <required>
|race      = <optional>
|image     = <optional, use when image to show has a different name than: Hero_-_<name>.png>
|speed     = <required>
|health    = <required>
|stamina   = <required>
|defense   = <required>
|willpower = <required>
|might     = <required>
|knowledge = <required>
|awareness = <required>
|ability   = <required>
|feat      = <required>
|quote     = <optional>
}}

Visit Template:Infobox hero/doc to edit this text! (How does this work?)