Template:ItemInfobox: Difference between revisions

From Fonline2 Wiki
Jump to navigation Jump to search
Improve infobox layout and conditional stats rows
Improve infobox layout and conditional stats rows
 
(2 intermediate revisions by the same user not shown)
Line 6: Line 6:
{{ItemInfobox
{{ItemInfobox
|name=Item Name
|name=Item Name
|image=brain4.png
|rows=
|type=SmallGun
|cost=140
|weight=1814
|durability=1000
|tier=5
|description=A brief description
|damage_min=50
|damage_max=70
|ap_cost=35
|skill=SkillSmallGuns
|min_skill=90
|caliber=Caliber10mm
|max_ammo=12
|reload_ap=20
|armor_dt=10
|dr_normal=25
|dr_laser=15
|dr_fire=30
|dr_plasma=20
|dr_explode=10
|dr_emp=500
|dr_electr=10
|anti_crit=20
|knock_resist=30
}}
</noinclude><includeonly>
{| class="wikitable" style="float:right; margin:0 0 1em 1em; width:320px"
|-
|-
! colspan="2" style="background-color:#3d6f4a; color:white; text-align:center" | {{{name|{{PAGENAME}}}}}
| colspan="2" style="text-align:center" | [[File:brain4.png|260px]]
{{#if:{{{image|}}}|
|-
| colspan="2" style="text-align:center" | [[File:{{{image}}}|260px]]
}}
{{#if:{{{type|}}}|
|-
|-
! Type
! Type
| {{{type}}}
| SmallGun
}}
{{#if:{{{cost|}}}|
|-
|-
! Cost
! Cost
| {{{cost}}} caps
| 140 caps
}}
|modes=
{{#if:{{{weight|}}}|
<tr><th colspan="2">Firing Modes</th></tr>
|-
<tr><td colspan="2">...</td></tr>
! Weight
| {{{weight}}} g
}}
{{#if:{{{durability|}}}|
|-
! Durability
| {{{durability}}} HP
}}
{{#if:{{{tier|}}}|
|-
! Tier
| {{{tier}}}
}}
{{#if:{{{damage_min|}}}{{{damage_max|}}}|
|-
! Damage
| {{#if:{{{damage_min|}}}|{{{damage_min}}}|-}} - {{#if:{{{damage_max|}}}|{{{damage_max}}}|-}}
}}
{{#if:{{{ap_cost|}}}|
|-
! AP Cost
| {{{ap_cost}}}
}}
{{#if:{{{skill|}}}|
|-
! Skill
| {{{skill}}}
}}
{{#if:{{{min_skill|}}}|
|-
! Min Skill
| {{{min_skill}}}
}}
{{#if:{{{caliber|}}}|
|-
! Caliber
| {{{caliber}}}
}}
{{#if:{{{max_ammo|}}}|
|-
! Max Ammo
| {{{max_ammo}}}
}}
{{#if:{{{reload_ap|}}}|
|-
! Reload AP
| {{{reload_ap}}}
}}
{{#if:{{{armor_dt|}}}|
|-
! Armor DT
| {{{armor_dt}}}
}}
{{#if:{{{dr_normal|}}}|
|-
! DR Normal
| {{{dr_normal}}}%
}}
{{#if:{{{dr_laser|}}}|
|-
! DR Laser
| {{{dr_laser}}}%
}}
{{#if:{{{dr_fire|}}}|
|-
! DR Fire
| {{{dr_fire}}}%
}}
{{#if:{{{dr_plasma|}}}|
|-
! DR Plasma
| {{{dr_plasma}}}%
}}
{{#if:{{{dr_explode|}}}|
|-
! DR Explode
| {{{dr_explode}}}%
}}
{{#if:{{{dr_emp|}}}|
|-
! DR EMP
| {{{dr_emp}}}%
}}
{{#if:{{{dr_electr|}}}|
|-
! DR Electrical
| {{{dr_electr}}}%
}}
{{#if:{{{anti_crit|}}}|
|-
! Anti-Crit
| {{{anti_crit}}}
}}
{{#if:{{{knock_resist|}}}|
|-
! Knock Resist
| {{{knock_resist}}}
}}
{{#if:{{{description|}}}|
|-
! Description
| {{{description}}}
}}
}}
|}
</noinclude>
<includeonly>
<table class="wikitable" style="float:right; margin:0 0 1em 1em; width:320px">
<tr>
<th colspan="2" style="background-color:#3d6f4a; color:white; text-align:center">{{{name|{{PAGENAME}}}}}</th>
</tr>
{{{rows|}}}
{{{modes|}}}
</table>
</includeonly>
</includeonly>

Latest revision as of 12:16, 26 May 2026

This is the ItemInfobox template. It is used to display item information in a standardized infobox format.

Usage:


Item Name
Firing Modes
...