Template:ItemInfobox: Difference between revisions

From Fonline2 Wiki
Jump to navigation Jump to search
for all items
 
Improve infobox layout and conditional stats rows
Line 6: Line 6:
{{ItemInfobox
{{ItemInfobox
|name=Item Name
|name=Item Name
|image=
|image=brain4.png
|type=SmallGun
|type=SmallGun
|cost=140
|cost=140
Line 17: Line 17:
|ap_cost=35
|ap_cost=35
|skill=SkillSmallGuns
|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>
</noinclude><includeonly>
{| class="wikitable" style="float:right; margin-left: 10px; width: 300px"
{| class="wikitable" style="float:right; margin:0 0 1em 1em; width:320px"
|-
|-
! colspan="2" style="background-color: #4CAF50; color: white" | {{{name|}}}
! colspan="2" style="background-color:#3d6f4a; color:white; text-align:center" | {{{name|{{PAGENAME}}}}}
{{#if:{{{image|}}}|
|-
|-
| colspan="2" style="text-align: center" | [[File:{{{image|}}}|200px]]
| colspan="2" style="text-align:center" | [[File:{{{image}}}|260px]]
}}
{{#if:{{{type|}}}|
|-
|-
! Type
! Type
| {{{type|}}}
| {{{type}}}
}}
{{#if:{{{cost|}}}|
|-
|-
! Cost
! Cost
| {{{cost|}}} caps
| {{{cost}}} caps
}}
{{#if:{{{weight|}}}|
|-
|-
! Weight
! Weight
| {{{weight|}}} g
| {{{weight}}} g
}}
{{#if:{{{durability|}}}|
|-
|-
! Durability
! Durability
| {{{durability|}}} HP
| {{{durability}}} HP
}}
{{#if:{{{tier|}}}|
|-
|-
! Tier
! Tier
| {{{tier|}}}
| {{{tier}}}
}}
{{#if:{{{damage_min|}}}{{{damage_max|}}}|
|-
|-
! Damage (Min-Max)
! Damage
| {{{damage_min|}}} - {{{damage_max|}}}
| {{#if:{{{damage_min|}}}|{{{damage_min}}}|-}} - {{#if:{{{damage_max|}}}|{{{damage_max}}}|-}}
}}
{{#if:{{{ap_cost|}}}|
|-
|-
! AP Cost
! 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|}}}|
|-
|-
! Required Skill
! DR Fire
| {{{skill|}}}
| {{{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
| colspan="2" | {{{description|}}}
| {{{description}}}
}}
|}
|}
</includeonly>
</includeonly>

Revision as of 09:40, 26 May 2026

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

Usage:

Item Name

{{#if:brain4.png|

}} {{#if:SmallGun|

Type SmallGun

}} {{#if:140|

Cost 140 caps

}} {{#if:1814|

Weight 1814 g

}} {{#if:1000|

Durability 1000 HP

}} {{#if:5|

Tier 5

}} {{#if:5070|

Damage 50|-}} - {{#if:70|70|-}}

}} {{#if:35|

AP Cost 35

}} {{#if:SkillSmallGuns|

Skill SkillSmallGuns

}} {{#if:90|

Min Skill 90

}} {{#if:Caliber10mm|

Caliber Caliber10mm

}} {{#if:12|

Max Ammo 12

}} {{#if:20|

Reload AP 20

}} {{#if:10|

Armor DT 10

}} {{#if:25|

DR Normal 25%

}} {{#if:15|

DR Laser 15%

}} {{#if:30|

DR Fire 30%

}} {{#if:20|

DR Plasma 20%

}} {{#if:10|

DR Explode 10%

}} {{#if:500|

DR EMP 500%

}} {{#if:10|

DR Electrical 10%

}} {{#if:20|

Anti-Crit 20

}} {{#if:30|

Knock Resist 30

}} {{#if:A brief description|

Description A brief description

}}