Template:Infobox Monster: Difference between revisions

From HorizonXI Wiki
(Undo revision 59086 by Aramachus (talk))
Tag: Undo
(reworked the template to improve code readability an make it mobile responsive)
Line 1: Line 1:
<noinclude>[[Category:Templates|{{PAGENAME}}]]
[[Category:Templates|{{PAGENAME}}]]
{{Tocright}}
<includeonly><onlyinclude>__NOTOC__<!--
==Usage==


Header information for a {{Cl|Bestiary}} monster entry.
Cheat sheet that is only visible during preview
 
-->{{#switch:{{{1|}}}|bp|boilerplate={{Preview Only Infobox|<pre>{{Infobox Monster
* See Also:
| image =
** {{Tl|Monster}}
| image caption =
** {{Tl|NM-Notes}}
| job =
 
| family =
===Syntax===
| family2 =
 
| family3 =
<pre>
| crystal =
{{Infobox Monster
| weaknesses =
| resistances =  
| immunities =  
| absorbs =  
| type =  
| subtype =  
| tier =  
| title obtained =
}}</pre>
|disable={{{1|}}}}}<!--
-->|#default={{Preview Only Infobox|<pre>{{Infobox Monster
| image = <!-- Image filename. LEAVE BLANK if one is not available. -->
| image = <!-- Image filename. LEAVE BLANK if one is not available. -->
| image caption = <!-- Optional image caption -->
| image caption = <!-- Optional image caption -->
Line 31: Line 40:
| title obtained =  
| title obtained =  
}}
}}
</pre>
</pre>|disable={{{1|}}}}}}}<!--


'''Without comments:'''
End of preview only infobox part
start of categorizations


<pre>
-->{{categorize|{{{1|}}}|[[Category:Bestiary]]{{#if:{{{family|}}}{{{family2}}}{{{family3}}}|[[Category:{{{family|}}}]]}}{{#switch:{{lc:{{{type|}}}}}
{{Infobox Monster
| image =
| image caption =
| job =
| family =
| family2 =
| family3 =
| crystal =
| weaknesses =
| resistances =
| immunities =
| absorbs =
| type =
| subtype =
| tier =
| title obtained =
}}
</pre>
 
===Parameters===
 
* <u>Basics</u>
** '''image:''' Filename of the monster image.<br/>If one is not available, ''leave this blank.'' It will insert the {{Tl|Mob-image-stub}} template.
** '''image caption:''' ''Optional.'' Caption for the image.
** '''job:''' {{Cl|Jobs|Job(s)}} of the monster. ''Example'': <code style="font-size:1.2em;"><nowiki>[[Black Mage]]</nowiki></code>
** '''family:''' A valid {{Cl|Bestiary|family}} that the monster belongs to.
** '''family2''' An optional parameter to be used if a monster belongs to multiple families.
** '''family3''' Another optional parameter to be used if a monster belongs to multiple families.
** '''crystal:''' ''Optional.'' Crystal that the monster drops.<br/>Valid values: ''Fire, Ice, Wind, Earth, Lightning, Water, Light, Dark''<br/>''Only provide a value if the monster can drop one.''{{Spc}}
* <u>Physical and Magical Traits</u>
** ''Important'': For {{Cl|Notorious Monsters}}, do not use these parameters. Instead, use {{Tl|NM-Notes}}
** '''weaknesses''', '''resistances''', '''immunities''', '''absorbs'''{{Spc}}
* <u>Notorious Monster</u>
** ''These parameters are only used for {{Cl|Notorious Monsters}}.''
** '''type:''' Monster type. Used for notorious monster types.<br/>Valid values: ''nm, notorious monster, znm, zeni notorious monster, vnm, voidwalker notorious monster, campaign leader, mega boss''<br/>Any other value will be output as provided.
** '''subtype:''' If the '''type''' is ''mega boss'', provide the '''subtype''' category name.
** '''tier:''' If the '''type''' is ''znm'' or ''vnm'', provide the tier number.<br/>Valid values: ''1, I, 2, II, 3, III, 4, IV, 5, V''<br/>An invalid value will result in '''??''' {{Information Needed|nc}} being displayed.{{Spc}}
** '''title obtained:''' ''Optional.'' Title obtained for defeating the monster.
 
==Default Output==
</noinclude><onlyinclude>{|width="100%"
|<includeonly>{{#switch:{{lc:{{{1|}}}}}|nc|no category=|#default=[[Category:Bestiary]]{{#if:{{{family|}}}{{{family2}}}{{{family3}}}|[[Category:{{{family|}}}]]}}{{#switch:{{lc:{{{type|}}}}}
| nm
| nm
| notorious monster = [[Category:Notorious Monsters]]
| notorious monster = [[Category:Notorious Monsters]]
Line 88: Line 56:
| campaign leader = [[Category:Notorious Monsters]][[Category:Campaign Battles]]
| campaign leader = [[Category:Notorious Monsters]][[Category:Campaign Battles]]
| mega boss = [[Category:Notorious Monsters]]{{#if:{{{subtype|}}}|[[Category:{{{subtype}}}]]}}
| mega boss = [[Category:Notorious Monsters]]{{#if:{{{subtype|}}}|[[Category:{{{subtype}}}]]}}
}}}}</includeonly>
}}}}<!--
{|width="100%" cellspacing="0"
 
|-
Categorization End
{{#if:{{{job|}}}|{{!}} '''[[Job]]:''' {{{job}}}|}}
Start of actual code
|-
 
| '''[[Bestiary|Family]]:''' {{#if:{{{family|}}}|[[:Category:{{{family}}}|{{{family}}}]]|<noinclude>{{Information Needed|nc}}</noinclude><includeonly>{{Information Needed|{{{1|}}}}}</includeonly>}}
-->
|-
<div class="flex-container" style="flex-direction: row-reverse;"><div class="flex-container-item-2">{{#if:{{{image|}}}|[[File:{{{image}}}|thumb|right|{{{image caption|{{PAGENAME}}}}}]]{{#if:{{{alternate image|}}}|[[File:{{{alternate image}}}|thumb|{{{alternate image caption|{{PAGENAME}}}}}]]}}|{{Mob-image-stub|{{{1|}}}}}}}</div><div class="flex-container-item-2">
| {{#if: {{{family2|}}} | '''[[Bestiary|Family 2]]:''' [[:Category:{{{family2}}}|{{{family2}}}]]|}}
{| class="left-col-1"
|-
|- {{#if:{{{job|}}}||style="display: none;"}}
| {{#if: {{{family3|}}} | '''[[Bestiary|Family 3]]:''' [[:Category:{{{family3}}}|{{{family3}}}]]|}}
! [[Job]]:
| {{{job}}}
|-
|-
| '''[[Crystal]]:''' {{#if:{{{crystal|}}}|[[{{{crystal}}} Crystal|{{{{{crystal}}}}}]]|''None''}}
! [[Bestiary|Family]]:
| {{#if:{{{family|}}}|[[:Category:{{{family}}}|{{{family}}}]]|{{Information Needed|{{{1|}}}}}}}
|- {{#if: {{{family2|}}}||style="display: none;"}}
! [[Bestiary|Family 2]]:
| [[:Category:{{{family2}}}|{{{family2}}}]]
|-
|-
{{#if:{{{weaknesses|}}}{{{resistances|}}}{{{immunities|}}}{{{absorbs|}}}|{{!}}&nbsp;|}}
|- {{#if: {{{family3|}}}||style="display: none;"}}
! [[Bestiary|Family 3]]:
| [[:Category:{{{family3}}}|{{{family3}}}]]
|-
! [[Crystal]]:
| {{#if:{{{crystal|}}}|[[{{{crystal}}} Crystal|{{{{{crystal}}}}}]]|''None''}}
|- {{#if:{{{weaknesses|}}}{{{resistances|}}}{{{immunities|}}}{{{absorbs|}}}||style="display: none;"}}
| style="height: 1rem;" | <!-- empty row for space -->
|- {{#if:{{{weaknesses|}}}||style="display: none;"}}
! [[Resistance|Weak against]]:
| {{{weaknesses}}}
|-
|-
{{#if:{{{weaknesses|}}}|{{!}} '''[[Resistance|Weak against]]:''' {{{weaknesses}}}|}}
{{#if:{{{resistances|}}}||style="display: none;"}}
! [[Resistance|Resistant to]]:  
| {{{resistances}}}
|-
|-
{{#if:{{{resistances|}}}|{{!}} '''[[Resistance|Resistant to]]:''' {{{resistances}}}|}}
{{#if:{{{immunities|}}}||style="display: none;"}}
! [[Resistance|Immune to]]:  
| {{{immunities}}}
|-
|-
{{#if:{{{immunities|}}}|{{!}} '''[[Resistance|Immune to]]:''' {{{immunities}}}|}}
{{#if:{{{absorbs|}}}||style="display: none;"}}
|-
! [[Resistance|Absorbs]]:
{{#if:{{{absorbs|}}}|{{!}} '''[[Resistance|Absorbs]]:''' {{{absorbs|}}}|}}
| {{{absorbs|}}}
|-
|- {{#if:{{{type|}}}{{{title|}}}||style="display: none;"}}
{{#if:{{{type|}}}{{{title|}}}|{{!}}&nbsp;|}}
| style="height: 1rem;" | <!-- empty row for space -->
|-
|- {{#if:{{{type|}}}||style="display: none;"}}
| {{#if:{{{type|}}}|{{#switch:{{lc:{{{type|}}}}}
! colspan=2 | {{#switch:{{lc:{{{type|}}}}}
| notorious monster = {{Colorlink|NM|Notorious Monster}}
| notorious monster = {{Colorlink|NM|Notorious Monster}}
| henm = {{Colorlink|NM|Hyper Empty Notorious Monster}}
| henm = {{Colorlink|NM|Hyper Empty Notorious Monster}}
Line 122: Line 109:
| mega boss = {{#if:{{{subtype|}}}|{{Colorlink|NM|{{{subtype}}}|Mega Boss}}|{{Color|NM|Mega Boss}}}}
| mega boss = {{#if:{{{subtype|}}}|{{Colorlink|NM|{{{subtype}}}|Mega Boss}}|{{Color|NM|Mega Boss}}}}
| #default = {{{type}}}
| #default = {{{type}}}
}}{{#if:{{{title obtained|}}}|<br/>}}}}<!--
}}
-->{{#if:{{{title obtained|}}}|'''[[Titles|Title Obtained]]:''' {{{title obtained}}}|}}
|- {{#if:{{{title obtained|}}}||style="display: none;"}}
|}
! [[Titles|Title Obtained]]:  
|align="right" width="38%"|
| {{{title obtained}}}
{|width="100%"
|}</div></div>
| {{#if:{{{image|}}}|[[File:{{{image}}}|thumb|right|{{{image caption|{{PAGENAME}}}}}]]{{#if:{{{alternate image|}}}|{{!}}{{!}} [[File:{{{alternate image}}}|thumb|{{{alternate image caption|{{PAGENAME}}}}}]]}}|<noinclude>{{Mob-image-stub|nc}}</noinclude><includeonly>{{Mob-image-stub|{{{1|}}}}}</includeonly>}}
</onlyinclude></includeonly>
|}
==Usage==
|}</onlyinclude>
 
Header information for a {{Cl|Bestiary}} monster entry.
 
* See Also: [[Template:Monster Information]]
 
===Parameters===
*'''First unnamed Parameter''' (optional): You can set the first unnamed parameter to:
** ''nc'' (no category) to prevent automatic categorization (e.g. for example pages)
** ''nd'' (no documentation) to suppress the preview documentation (helpful in the editing process)
** ''bp'' (boilerplate) to have the preview documentation without comments so you can just copy it to the page (helpful for creating new pages to just start with {{fontaccent|<nowiki>{{Infobox Monster|bp}}</nowiki>}} and copy the boilerplate from the preview only)
 
* <u>Basics</u>
** '''image:''' Filename of the monster image.<br/>If one is not available, ''leave this blank.'' It will insert the {{Tl|Mob-image-stub}} template.
** '''image caption:''' ''Optional.'' Caption for the image.
** '''job:''' {{Cl|Jobs|Job(s)}} of the monster. ''Example'': <code style="font-size:1.2em;"><nowiki>[[Black Mage]]</nowiki></code>
** '''family:''' A valid {{Cl|Bestiary|family}} that the monster belongs to.
** '''family2''' An optional parameter to be used if a monster belongs to multiple families.
** '''family3''' Another optional parameter to be used if a monster belongs to multiple families.
** '''crystal:''' ''Optional.'' Crystal that the monster drops.<br/>Valid values: ''Fire, Ice, Wind, Earth, Lightning, Water, Light, Dark''<br/>''Only provide a value if the monster can drop one.''{{Spc}}
* <u>Physical and Magical Traits</u>
** ''Important'': For {{Cl|Notorious Monsters}}, do not use these parameters. Instead, use {{Tl|NM-Notes}}
** '''weaknesses''', '''resistances''', '''immunities''', '''absorbs'''{{Spc}}
* <u>Notorious Monster</u>
** ''These parameters are only used for {{Cl|Notorious Monsters}}.''
** '''type:''' Monster type. Used for notorious monster types.<br/>Valid values: ''nm, notorious monster, znm, zeni notorious monster, vnm, voidwalker notorious monster, campaign leader, mega boss''<br/>Any other value will be output as provided.
** '''subtype:''' If the '''type''' is ''mega boss'', provide the '''subtype''' category name.
** '''tier:''' If the '''type''' is ''znm'' or ''vnm'', provide the tier number.<br/>Valid values: ''1, I, 2, II, 3, III, 4, IV, 5, V''<br/>An invalid value will result in '''??''' {{Information Needed|nc}} being displayed.{{Spc}}
** '''title obtained:''' ''Optional.'' Title obtained for defeating the monster.
 
===Examples===
<pre>
{{Infobox Monster
| image = Young Quadav.png
| image caption = Young Quadav
| job = [[Warrior]]
| family = Quadav
| crystal = Water
| weaknesses = {{element|Lightning}}
| resistances =  {{Fire|resist}}
| immunities = {{Dark|resist}}
| absorbs = {{Water|resist}}
| type = henm
| subtype =
| tier = 2
| title obtained = Big Shot
}}
</pre>
{{Infobox Monster|nc
| image = Young Quadav.png
| image caption = Young Quadav
| job = [[Warrior]]
| family = Quadav
| crystal = Water
| weaknesses = {{element|Lightning}}
| resistances =  {{Fire|resist}}
| immunities = {{Dark|resist}}
| absorbs = {{Water|resist}}
| type = henm
| subtype =
| tier = 2
| title obtained = Big Shot
}}

Revision as of 11:18, 20 July 2024


Usage

Header information for a Bestiary monster entry.

Parameters

  • First unnamed Parameter (optional): You can set the first unnamed parameter to:
    • nc (no category) to prevent automatic categorization (e.g. for example pages)
    • nd (no documentation) to suppress the preview documentation (helpful in the editing process)
    • bp (boilerplate) to have the preview documentation without comments so you can just copy it to the page (helpful for creating new pages to just start with {{Infobox Monster|bp}} and copy the boilerplate from the preview only)
  • Basics
    • image: Filename of the monster image.
      If one is not available, leave this blank. It will insert the {{Mob-image-stub}} template.
    • image caption: Optional. Caption for the image.
    • job: Job(s) of the monster. Example: [[Black Mage]]
    • family: A valid family that the monster belongs to.
    • family2 An optional parameter to be used if a monster belongs to multiple families.
    • family3 Another optional parameter to be used if a monster belongs to multiple families.
    • crystal: Optional. Crystal that the monster drops.
      Valid values: Fire, Ice, Wind, Earth, Lightning, Water, Light, Dark
      Only provide a value if the monster can drop one.
  • Physical and Magical Traits
    • Important: For Notorious Monsters, do not use these parameters. Instead, use {{NM-Notes}}
    • weaknesses, resistances, immunities, absorbs
  • Notorious Monster
    • These parameters are only used for Notorious Monsters.
    • type: Monster type. Used for notorious monster types.
      Valid values: nm, notorious monster, znm, zeni notorious monster, vnm, voidwalker notorious monster, campaign leader, mega boss
      Any other value will be output as provided.
    • subtype: If the type is mega boss, provide the subtype category name.
    • tier: If the type is znm or vnm, provide the tier number.
      Valid values: 1, I, 2, II, 3, III, 4, IV, 5, V
      An invalid value will result in ?? Information Needed being displayed.
    • title obtained: Optional. Title obtained for defeating the monster.

Examples

{{Infobox Monster
| image = Young Quadav.png
| image caption = Young Quadav
| job = [[Warrior]]
| family = Quadav
| crystal = Water
| weaknesses = {{element|Lightning}}
| resistances =  {{Fire|resist}}
| immunities = {{Dark|resist}}
| absorbs = {{Water|resist}}
| type = henm
| subtype = 
| tier = 2
| title obtained = Big Shot
}}
Young Quadav
Job: Warrior
Family: Quadav
Family 2: [[:Category:{{{family2}}}|{{{family2}}}]]
Family 3: [[:Category:{{{family3}}}|{{{family3}}}]]
Crystal: Water
Weak against: Lightning Lightning
Resistant to: Resistance vs. Fire
Immune to: Resistance vs. Dark
Absorbs: Resistance vs. Water
Hyper Empty Notorious Monster
Title Obtained: Big Shot