T0ebr (discussão | contribuições) mSem resumo de edição |
T0ebr (discussão | contribuições) Sem resumo de edição |
||
Linha 1: | Linha 1: | ||
− | {| class=" |
+ | <onlyinclude><includeonly>{{AnalisarRaridade|{{{rarity|}}}}}{| class="{{#ifeq:{{{mini|}}}|true|mini}}infoboxtable" style="border:1px solid {{raridade|{{#var:rarity}}}};" |
|- |
|- |
||
− | ! class=" |
+ | ! class="infoboxname" colspan="2" style="color:{{raridade|{{#var:rarity}}}};border:1px solid {{raridade|{{#var:rarity}}}};" | {{{name|{{PAGENAME}}}}}{{#vardefine:i|1}}{{#while: |
+ | | {{{field{{#var:i}}|}}} |
||
− | |- |
||
+ | |{{#if:{{{value{{#var:i}}|}}}|{{#switch:{{{mode{{#var:i}}}}} |
||
− | {{#if: {{{image|}}} | ! colspan="2" {{!}} {{#ifexist:File:{{{image}}}|[[File:{{{image}}}|120x120px]]|[[File:Schematic.png|70px|link=https://fortnite.gamepedia.com/index.php?title=Special:Upload&wpDestFile={{urlencode:{{{image}}}}}|File does not exist]]<includeonly>[[Category:Infoboxes lacking images]]</includeonly>}} | <includeonly>[[Categoria:Infoboxes lacking images]]</includeonly>}} |
||
+ | | image =   |
||
− | |- |
||
+ | {{!-}} |
||
− | {{#if: {{{icon|}}} | ! colspan="2" {{!}} [[File:{{{icon}}}|30x30px]]}} |
||
+ | {{!}} colspan="2" {{!}} <center>{{#ifexist:File:{{{value{{#var:i}}}}}|[[File:{{{value{{#var:i}}}}}|{{{size{{#var:i}}|{{#ifeq:{{{mini|}}}|true|80x80px|256px}}}}}]]|{{MissingImageInfobox|{{{value{{#var:i}}}}}}}|[[Category:Infoboxes lacking images]]}}</center> |
||
− | |- |
||
+ | | block =   |
||
− | {{#if:{{{rarity|}}}{{{class|}}}{{{location|}}}{{{reward|}}}{{{type|}}}{{{tier|}}}{{{weapontype|}}}{{{traptype|}}}{{{bullettype|}}}{{{level|}}}{{{dmg|}}}{{{armingdelay|}}}{{{crithitchance|}}}{{{crithitdmg|}}}{{{attackspeed|}}}{{{firerate|}}}{{{magazinesize|}}}{{{range|}}}{{{durability|}}}{{{reloadtime|}}}{{{stuntime|}}}{{{ammocost|}}}{{{impact|}}}{{{healing|}}}{{{maxhealth|}}}{{{maxenergy|}}}{{{runspeed|}}}{{{injhealthreg|}}}{{{fortitude|}}}{{{offense|}}}{{{tech|}}}{{{res|}}}{{{weapondmg|}}}{{{weapondmgall|}}}{{{knockback|}}}{{{stuntime|}}}{{{selfheal|}}}{{{abildmg|}}}{{{abilcd|}}}{{{abilcost|}}}{{{abilcap|}}}{{{trapbasedmg|}}}{{{itemdurab|}}}{{{effect1|}}}{{{effect2|}}}|! colspan="2" class="infoboxdetails" {{!}} Detalhes }} |
||
+ | {{!-}} |
||
− | |- |
||
⚫ | |||
− | {{#if:{{{rarity|}}} | {{!}} <div>Raridade</div> {{!!}} {{#switch: {{lc:{{{raridade|}}}}} |
||
+ | {{!-}} |
||
− | |white |
||
+ | {{!}} colspan=2 style="font-style: italic;line-height: 1.3;font-size: 95%;text-align: center;" {{!}} {{{value{{#var:i}}}}} |
||
− | |gray |
||
− | | |
+ | | section =   |
+ | {{!-}} |
||
− | |green |
||
⚫ | |||
− | |incomum = Incomum |
||
+ | | link =   |
||
− | |blue |
||
+ | {{!-}} |
||
− | |raro = Raro |
||
+ | {{!}} <div>{{{field{{#var:i}}}}}</div> {{!!}} [[{{{value{{#var:i}}}}}]] |
||
− | |purple |
||
− | | |
+ | | linklist =   |
+ | {{!-}} |
||
− | |orange |
||
+ | {{!}} <div>{{{field{{#var:i}}}}}</div> {{!!}} {{#arraymap:{{{value{{#var:i}}}}}|,|x|[[x]]}} |
||
− | |lendário = Lendário |
||
+ | | custom =   |
||
− | |gold |
||
+ | {{!-}} |
||
− | |mítico = Mítico}} }} |
||
⚫ | |||
− | |- |
||
+ | | #default =   |
||
− | {{#if: {{{class|}}} | {{!}} <div>Classe</div> {{!!}} {{{class}}} }} |
||
+ | {{!-}} |
||
− | |- |
||
− | {{ |
+ | {{!}} <div>{{{field{{#var:i}}}}}</div> {{!!}} {{{value{{#var:i}}}}} |
+ | }}}}{{#vardefine: i | {{#expr: {{#var: i }} + 1 }} }} |
||
− | |- |
||
+ | }} |
||
− | {{#if: {{{traptype|}}} | {{!}} <div>Trap Type</div> {{!!}} {{{traptype}}} }} |
||
+ | |}</includeonly></onlyinclude><noinclude>{{doc}} |
||
− | |- |
||
⚫ | |||
− | {{#if: {{{type|}}} | {{!}} <div>Type</div> {{!!}} {{{type}}} }} |
||
− | |- |
||
− | {{#if: {{{tier|}}} | {{!}} <div>Tier</div> {{!!}} {{{tier}}} }} |
||
− | |- |
||
− | {{#if: {{{location|}}} | {{!}} <div>Location(s)</div> {{!!}} {{{location}}} }} |
||
− | |- |
||
− | {{#if: {{{reward|}}} | {{!}} <div>Reward</div> {{!!}} {{{reward}}} }} |
||
− | |- |
||
− | {{#if: {{{bullettype|}}} | {{!}} <div>Bullet Type</div> {{!!}} {{{bullettype}}} }} |
||
− | |- |
||
− | {{#if: {{{level|}}} | {{!}} <div>Level</div> {{!!}} {{{level}}} }} |
||
− | |- |
||
− | {{#if: {{{dmg|}}} | {{!}} <div>Damage</div> {{!!}} {{{dmg}}} }} |
||
− | |- |
||
− | {{#if: {{{armingdelay|}}} | {{!}} <div>Arming Delay</div> {{!!}} {{{armingdelay}}} }} |
||
− | |- |
||
− | {{#if: {{{crithitchance|}}} | {{!}} <div>Critical Hit Chance</div> {{!!}} {{{crithitchance}}} }} |
||
− | |- |
||
− | {{#if: {{{crithitdmg|}}} | {{!}} <div>Critical Hit Damage</div> {{!!}} {{{crithitdmg}}} }} |
||
− | |- |
||
− | {{#if: {{{attackspeed|}}} | {{!}} <div>Attack Speed</div> {{!!}} {{{attackspeed}}} }} |
||
− | |- |
||
− | {{#if: {{{firerate|}}} | {{!}} <div>Fire Rate</div> {{!!}} {{{firerate}}} }} |
||
− | |- |
||
− | {{#if: {{{magazinesize|}}} | {{!}} <div>Magazine Size</div> {{!!}} {{{magazinesize}}} }} |
||
− | |- |
||
− | {{#if: {{{range|}}} | {{!}} <div>Range</div> {{!!}} {{{range}}} }} |
||
− | |- |
||
− | {{#if: {{{headshot|}}} | {{!}} <div>Headshot Multiplier</div> {{!!}} {{{headshot}}} }} |
||
− | |- |
||
− | {{#if: {{{durability|}}} | {{!}} <div>Durability</div> {{!!}} {{{durability}}} }} |
||
− | |- |
||
− | {{#if: {{{reloadtime|}}} | {{!}} <div>Reload Time</div> {{!!}} {{{reloadtime}}} }} |
||
− | |- |
||
− | {{#if: {{{stuntime|}}} | {{!}} <div>Stun Time</div> {{!!}} {{{stuntime}}} }} |
||
− | |- |
||
− | {{#if: {{{knockback|}}} | {{!}} <div>Knockback</div> {{!!}} {{{knockback}}} }} |
||
− | |- |
||
− | {{#if: {{{ammocost|}}} | {{!}} <div>Ammo Cost</div> {{!!}} {{{ammocost}}} }} |
||
− | |- |
||
− | {{#if: {{{impact|}}} | {{!}} <div>Impact</div> {{!!}} {{{impact}}} }} |
||
− | |- |
||
− | {{#if: {{{healing|}}} | {{!}} <div>Healing</div> {{!!}} {{{healing}}} }} |
||
− | |-<!-- Stats for Abilities --> |
||
− | {{#if: {{{abilcd|}}} | {{!}} <div>Cooldown</div> {{!!}} {{{abilcd}}} }} |
||
− | |- |
||
− | {{#if: {{{abilcost|}}} | {{!}} <div>Energy Cost</div> {{!!}} {{{abilcost}}} }} |
||
− | |- |
||
− | {{#if: {{{abilcap|}}} | {{!}} <div>Charge Capacity</div> {{!!}} {{{abilcap}}} }} |
||
− | |- <!-- Stats for Characters --> |
||
− | {{#if: {{{maxhealth|}}} | {{!}} <div>Max Health</div> {{!!}} {{{maxhealth}}} }} |
||
− | |- |
||
− | {{#if: {{{maxenergy|}}} | {{!}} <div>Max Energy</div> {{!!}} {{{maxenergy}}} }} |
||
− | |- |
||
− | {{#if: {{{runspeed|}}} | {{!}} <div>Run Speed</div> {{!!}} {{{runspeed}}} }} |
||
− | |- |
||
− | {{#if: {{{injhealthreg|}}} | {{!}} <div>Injured Health Regen.</div> {{!!}} {{{injhealthreg}}} }} |
||
− | |- |
||
− | {{#if: {{{fortitude|}}} | {{!}} <div>Fortitude</div> {{!!}} {{{fortitude}}} }} |
||
− | |- |
||
− | {{#if: {{{offense|}}} | {{!}} <div>Offense</div> {{!!}} {{{offense}}} }} |
||
− | |- |
||
− | {{#if: {{{tech|}}} | {{!}} <div>Tech</div> {{!!}} {{{tech}}} }} |
||
− | |- |
||
− | {{#if: {{{res|}}} | {{!}} <div>Resistance</div> {{!!}} {{{res}}} }} |
||
− | |- |
||
− | {{#if: {{{weapondmg|}}} | {{!}} <div>Weapon Damage</div> {{!!}} {{{weapondmg}}} }} |
||
− | |- |
||
− | {{#if: {{{weapondmgall|}}} | {{!}} <div>Weapon Damage - All Weapons</div> {{!!}} {{{weapondmgall}}} }} |
||
− | |- |
||
− | {{#if: {{{stuntime|}}} | {{!}} <div>Stun Time</div> {{!!}} {{{stuntime}}} }} |
||
− | |- |
||
− | {{#if: {{{selfheal|}}} | {{!}} <div>Self Healing</div> {{!!}} {{{selfheal}}} }} |
||
− | |- |
||
− | {{#if: {{{abildmg|}}} | {{!}} <div>Ability Damage</div> {{!!}} {{{abildmg}}} }} |
||
− | |- |
||
− | {{#if: {{{trapbasedmg|}}} | {{!}} <div>Trap Base Damage</div> {{!!}} {{{trapbasedmg}}} }} |
||
− | |- |
||
− | {{#if: {{{itemdurab|}}} | {{!}} <div>Item Durability</div> {{!!}} {{{itemdurab}}} }} |
||
− | |- |
||
− | {{#if: {{{capacity|}}} | {{!}} <div>Capacity</div> {{!!}} {{{capacity}}} }} |
||
− | |- <!-- Weapon FX --> |
||
− | |-style="color: orange; font-weight:bold;" colspan="2" | |
||
− | {{#if: {{{effect1|}}} | {{!}} colspan="2" {{!}} {{{effect1}}} }} |
||
− | |- |
||
− | |-style="color: #209964; font-weight:bold;" colspan="2" | |
||
− | {{#if: {{{effect2|}}} | {{!}} colspan="2" {{!}} {{{effect2}}} }} |
||
− | |- <!-- Description --> |
||
− | |-style="{{#if: {{{desc|}}}| | display: none;}}" |
||
⚫ | |||
− | |-style="{{#if: {{{desc|}}}| | display: none;}}" |
||
− | | style="padding:0.5em; text-align:left;" colspan="2" | {{#if: {{{desc|}}} | {{{desc}}} }} |
||
− | |- <!-- Requirements to craft this item/enter icons with a template or as [[file:name.png|size]] --> |
||
− | |- style="{{#if: {{{requires|}}}| | display: none;}}" |
||
⚫ | |||
− | |- style="{{#if: {{{requires|}}}| | display: none;}}" |
||
⚫ | |||
− | |- style="{{#if: {{{setsof|}}}| | display: none;}}" |
||
− | ! colspan="2" class="bg infoboxdetails" | Crafts |
||
− | |- style="{{#if: {{{setsof|}}}| | display: none;}}" |
||
− | | colspan="2" align="center" | {{{setsof|}}}x {{PAGENAME}} |
||
− | |}{{#ifeq:{{{1|}}}|cat|[[Categoria:{{{weapontype|}}}{{{type|}}}{{{traptype|}}}]]|}}<noinclude>{{clear}}{{doc}} |
||
⚫ |
Edição das 13h33min de 3 de julho de 2018
Documentação[Limpar cache]
This template will generate infoboxes when given sets of field
and value
parameters.
Usage
{{Infobox | mini = true/false /optional | name = | rarity = | field1 = | value1 = | mode1 = /optional | field2 = | value2 = | mode2 = /optional ... | field# = | value# = | mode# = /optional }}
Parameters
As this template dynamically generates an infobox based on the number of fields supplied, #
in each section below stands for the number of each field/value set. Start your field/value sets at field1
and value1
, and increase the number by 1 for each new set.
|mini=
This parameter indicates whether to generate full-size infoboxes or mini infoboxes like those used on Battle Royale Weapons. Setting mini
to true
will make mini infoboxes, any other value (including leaving the parameter blank) will default to making full-size infoboxes.
|name=
This is the title of the infobox. It is required, though {{PAGENAME}}
can be used if you want it to default to the full name of the page the template is used on.
|rarity=
This is the border color of the infobox. Acceptable values are the same as those for {{rarity}}
. Defaults to white if not specified.
|field#=
This is the "title" of the field/value set. This is REQUIRED for ALL desired field/value sets, even for modes where it does not appear on the page (see mode below for more information).
|value#=
This is the "contents" of the field/value set.
|mode#=
This parameter indicates how the set should be displayed. Acceptable values are as follows:
- default (mode parameter blank):
- This generates a standard title/contents set, with the
field#
parameter in a header cell to the left and thevalue#
parameter in a content cell to the right.
- This generates a standard title/contents set, with the
link
- This generates a standard title/contents set like the default, except the
value#
parameter is displayed as a link.
- This generates a standard title/contents set like the default, except the
linklist
- This is identical to
mode#=link
except it works forvalue#
parameters that contain comma-separated lists. It will generate links for each value in the list.
- This is identical to
block
- This generates a title/contents set ideal for long blocks of text. The
field#
parameter is in a header cell above, and thevalue#
parameter is in a content cell with a smaller font size below.
- This generates a title/contents set ideal for long blocks of text. The
section
- This only generates a title, similar to the header generated by
mode#=block
. Thevalue#
parameter is used as the contents of the header cell, and thefield#
cell is not displayed and therefore can be anything you want other than whitespace (e.g. spaces and linebreaks).
- This only generates a title, similar to the header generated by
image
- This generates a single cell that contains an image. The file name should be put into the
value#
parameter (do not includeFile:
), and thefield#
cell is not displayed and therefore can be anything you want other than whitespace (e.g. spaces and linebreaks). - By default, the image will be size 256px for full-size infoboxes and 80px for mini infoboxes, but this can be changed with the optional
|size#=
parameter using one of the following formats:WIDTHpx
,xHEIGHTpx
, orWIDTHxHEIGHTpx
- This generates a single cell that contains an image. The file name should be put into the
custom
- This generates a single cell that contains anything you want, including wikitext and/or HTML. It has no predefined formatting. The
value#
parameter is the contents of the cell, and thefield#
cell is not displayed and therefore can be anything you want other than whitespace (e.g. spaces and linebreaks).
- This generates a single cell that contains anything you want, including wikitext and/or HTML. It has no predefined formatting. The
Examples
For a list of examples in active use, see Help:Infoboxes.
Full-Size Infobox Example
{{Infobox |name=Infobox Title |rarity=Rare |field1=Image |value1=Schematic.png |mode1=image |size1=120x120px |field2=Block |value2=Block text contents |mode2=block |field3=Default |value3=Default text content |mode3= |field4=Link |value4=Heroes |mode4=link |field5=Linklist |value5=Soldier,Ninja,Outlander,Constructor |mode5=linklist |field6=Section |value6=Section text content |mode6=section |field7=Custom |value7=Custom text content |mode7=custom }}
Infobox Title | |
---|---|
Block | |
Block text contents | |
Default |
Default text content |
Link |
Heroes |
Linklist |
Soldier, Ninja, Outlander, Constructor |
Section text content | |
Custom text content |
Mini Infobox Example
{{Infobox |mini=true |name=Infobox Title |rarity=Rare |field1=Image |value1=Schematic.png |mode1=image |field2=Block |value2=Block text contents |mode2=block |field3=Default |value3=Default text content |mode3= |field4=Link |value4=Heroes |mode4=link |field5=Linklist |value5=Soldier,Ninja,Outlander,Constructor |mode5=linklist |field6=Section |value6=Section text content |mode6=section |field7=Custom |value7=Custom text content |mode7=custom }}
Infobox Title | |
---|---|
Block | |
Block text contents | |
Default |
Default text content |
Link |
Heroes |
Linklist |
Soldier, Ninja, Outlander, Constructor |
Section text content | |
Custom text content |
Tips
- By default, field/value sets will be hidden if
value#
is empty.- As a result, sets that have plain text
value#
contents (e.g. a % sign after an optional “percent” parameter, or a section-mode set that contains plain text rather than a parameter) will cause the set to ALWAYS show up, even if the parameter defining it (or parameters below the section row) are empty. This can be avoided by enclosing all plain text contents in#if
statements. This allows those cells to be selectively shown or hidden based on the values of other parameters. See the Parser Functions documentation for more information on #if statements.
- As a result, sets that have plain text
About
A documentação acima é transclude de Predefinição:Infobox/doc. (editar | histórico)