Template:Infobox item: Difference between revisions

From Ultimate Dragon Ball Online Wiki

Ollix (talk | contribs)
No edit summary
Tag: Manual revert
Ollix (talk | contribs)
No edit summary
 
(37 intermediate revisions by the same user not shown)
Line 1: Line 1:
{| class="infobox" style="border: 1px solid #ccc; width: 250px; background-color: #f9f9f9; font-family: Arial, sans-serif; margin: 0 auto; border-radius: 10px;"
{| class="infobox" style="border: 1px solid #ccc; width: 250px; background-color: #f9f9f9; font-family: Arial, sans-serif; margin: 0 auto; border-radius: 10px;"
! colspan="2" style="background-color: #2161c0; color: white; text-align: center; font-size: 1.25em; font-weight: bold; padding: 5px 0; border-top-left-radius: 10px; border-top-right-radius: 10px;" | [[File:{{{icon|}}}|32px]] {{PAGENAME}}
! colspan="2" style="background-color: #2161c0; color: white; text-align: center; font-size: 1.25em; font-weight: bold; padding: 5px 0; border-top-left-radius: 10px; border-top-right-radius: 10px;" | <span style="font-weight: bold; text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000; text-align: center;">{{#if: {{{title|}}} | {{{title}}} | {{PAGENAME}} }}</span>{{#if: {{{rarity|Common}}} | <br /><span style="font-size: 0.9em; font-weight: bold; text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000; color: {{#switch: {{{rarity}}}
  | Common = #64ff77  <!-- White -->
  | Superior = #99bbee  <!-- Blue -->
  | Excellent = #ffdd66  <!-- Yellow -->
  | Rare = #ff6677  <!-- Red -->
  | Legendary = #ee77dd  <!-- Magenta -->
  | default = #ffffff }}">{{{rarity|<span style="font-size: 0.9em; font-weight: bold; text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000; color: #64ff77;>Common</span>}}}</span>}}
|-
|-
| colspan="2" style="text-align: center; padding: 5px;" | [[File:{{{image|}}}|200px]]
| colspan="2" style="text-align: center; padding-top: 10px; padding-bottom: 10px;" | [[File:{{#if: {{{icon|}}} | {{{icon}}} | item_no_icon.png }}|32px]]
|-
|-
| colspan="2" style="text-align: center; font-size: 0.9em; color: #555;" | {{{caption| }}}
| colspan="2" style="border-radius: 10px; background-color: #efefef; color: #555555; text-align: center; padding: 10px; font-style: italic;" | {{{description|}}}
|-
|-
! colspan="2" style="background-color: #dcdcdc; color: black; text-align: center; font-size: 1.1em; font-weight: bold; padding: 5px;" | General Information
! colspan="2" style="background-color: #dcdcdc; color: black; text-align: center; font-size: 1.1em; font-weight: bold; padding: 5px;" | General Information
|-
|-
{{#if: {{{description|}}} |
{{#if: {{{class|}}} |
! style="text-align: left;" | Description
! <span style="display: inline-block; text-align: left; padding-left: 10px; width: 100%;">Class</span>
{{!}}{{{description|}}}
{{!}}<span style="font-weight: bold; text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000; color: {{#switch: {{{class}}}
  | Human = #fed851  <!-- Orange -->
  | Namek = #98fa80  <!-- Green -->
  | Majin = #ffb4ca  <!-- Pink -->
  | default = #ffffff }}">{{{class}}}</span>
}}
}}
|-
|-
{{#if: {{{Weight|}}} |
{{#if: {{{level|}}} |
! Weight
! <span style="display: inline-block; text-align: left; padding-left: 10px; width: 100%;">Level</span>
{{!}}{{{Weight|}}}
{{!}}<span style="display: inline-block; width: 100%;">{{{level}}}</span>
}}
}}
|-
|-
{{#if: {{{Event Item|}}} |
{{#if: {{{slot|}}} |
! Event Item
! <span style="display: inline-block; text-align: left; padding-left: 10px; width: 100%;">Slot</span>
{{!}}{{{Event Item|}}}
{{!}}<span style="display: inline-block; width: 100%;">{{{slot}}}</span>
}}
}}
|-
|-
{{#if: {{{Rarity|}}} |
{{#if: {{{weight|}}} |
! Rarity
! <span style="display: inline-block; text-align: left; padding-left: 10px; width: 100%;">Weight</span>
{{!}}<span style="color: {{#switch: {{{Rarity}}}
{{!}}<span style="display: inline-block; width: 100%;">{{{weight}}}</span>
  | Normal = black
  | Superior = blue
  | Excellent = yellow
  | Rare = red
  | Legendary = magenta
  | default = black }}">{{{Rarity|}}}</span>
}}
}}
|-
|-
{{#if: {{{Class|}}} |
{{#if: {{{npc_price|}}} |
! Class
! <span style="display: inline-block; text-align: left; padding-left: 10px; width: 100%;">NPC Price</span>
{{!}}{{{Class|}}}
{{!}}<span style="display: inline-block; width: 100%;">{{{npc_price}}} [[File:Ui_icon_zeni.png|16px]]</span>
}}
}}
|-
|-
{{#if: {{{Level|}}} |
| colspan="2" style="padding-bottom: 5px;" | <!-- This row adds space at the bottom -->
! Level
{{!}}{{{Level|}}}
}}
|-
{{#if: {{{Slot|}}} |
! Slot
{{!}}{{{Slot|}}}
}}
|-
{{#if: {{{NPC Price|}}} |
! NPC Price
{{!}}{{{NPC Price|}}} [[File:ui_icon_zeni.png|16px]]
}}
|-
{{#if: {{{Effect|}}} |
! Effect
{{!}}{{{Effect|}}}
}}
|}
|}


Line 64: Line 50:
{| class="wikitable"
{| class="wikitable"
|-
|-
! Example 1 !! Example 2
! Example Code !! Example Result
|-
|-
| <pre>
| <pre>
{{Infobox_item
{{Infobox_item
  | icon        = ItemIcon.png
  | title      = Classic Magic Rubber Suit (Top)
  | image      = ItemImage.png
  | icon        = Infobox_armor_example_icon.png
  | caption    = A powerful weapon used by Turtle Hermits.
  | description = Advanced materials are used to make this, completely without regard to cost.
  | description = A legendary wand with immense power.
  | rarity     = Rare
| Weight     = 2.5kg
  | class      = Majin
  | Event Item  = Yes
  | level       = 20
  | Rarity      = Legendary
  | slot        = Jacket
| Class       = Turtle Hermit
  | weight      = 350
  | Level      = 38
  | npc_price   = 1,649
  | Slot        = Weapon
  | NPC Price   = 50,000
| Effect      = Increases attack power by 20%
}}
}}
</pre>
</pre>
|  
| {{Infobox_item
{{Infobox_item
  | title      = Classic Magic Rubber Suit (Top)
  | icon        = ItemIcon.png
  | icon        = Infobox_armor_example_icon.png
  | image      = ItemImage.png
  | description = Advanced materials are used to make this, completely without regard to cost.
  | caption    = A powerful weapon used by Turtle Hermits.
  | rarity     = Rare
| description = A legendary wand with immense power.
  | class       = Majin
| Weight      = 2.5kg
  | level       = 20
| Event Item  = Yes
  | slot       = Jacket
  | Rarity     = Legendary
  | weight      = 350
  | Class       = Turtle Hermit
  | npc_price  = 1,649
  | Level       = 38
  | Slot       = Weapon
  | NPC Price  = 50,000
  | Effect      = Increases attack power by 20%
}}
}}
|}
|}
Line 101: Line 80:
=== Parameter Explanations ===
=== Parameter Explanations ===


* '''icon''': The file name of the small icon representing the item (e.g., ''ItemIcon.png'').
* '''title''': The name of the item. Defaults to the page name if not provided.
* '''image''': The file name of the larger image of the item (e.g., ''ItemImage.png'').
* '''icon''': The filename of the item's icon (e.g., ''ItemIcon.png''). Defaults to ''item_no_icon.png'' if not provided.
* '''caption''': A short description or additional details about the image.
* '''description''': A brief description of the item.
* '''description''': A brief explanation of what the item is and its lore or function.
* '''Weight''': The weight of the item.
* '''Weight''': The weight of the item, if applicable.
* '''Event Item''': Indicates if the item is exclusive to events. Accepts ''Yes'' or ''No''. Displays a checkmark (✅) for ''Yes'' and a cross (❌) for ''No''.
* '''Event Item''': Indicate if the item is exclusive to events (''Yes'' or ''No'').
* '''Rarity''': The rarity level of the item. Accepts values like ''Common'', ''Superior'', ''Excellent'', ''Rare'', or ''Legendary''. Each value is color-coded:
* '''Rarity''': The rarity level of the item (e.g., ''Common'', ''Rare'', ''Legendary'').
  - ''Common'': White (''#ffffff'')
* '''Class''': The player class that can use the item (e.g., ''Martial Artist'', ''Spiritualist'').
  - ''Superior'': Light Blue (''#99bbee'')
  - ''Excellent'': Yellow (''#ffdd66'')
  - ''Rare'': Red (''#ff6677'')
  - ''Legendary'': Pink (''#ee77dd'')
* '''Class''': The class that can use the item.
* '''Level''': The required level to use the item.
* '''Level''': The required level to use the item.
* '''Slot''': The equipment slot where this item is placed (e.g., ''Weapon'', ''Jacket'').
* '''Slot''': The equipment slot where this item is placed (e.g., ''Weapon'', ''Armor'').
* '''NPC Price''': The price of the item when sold to NPC vendors (use numbers only).
* '''NPC Price''': The price of the item when sold to NPC vendors.
* '''Effect''': Any special effects or bonuses provided by the item.


=== Notes ===
=== Notes ===


* If a parameter is left blank, it will not be displayed in the infobox.
* If a parameter is left blank, it will not be displayed in the infobox.
* File names for images must be correctly uploaded to the wiki for them to appear.
* Ensure that image files (e.g., icons) are correctly uploaded to the wiki for them to appear.
* Ensure proper formatting and spacing for consistency across pages.
* Proper formatting and consistent use of parameters ensure uniformity across pages.


</noinclude>
</noinclude>

Latest revision as of 04:31, 20 March 2025

Infobox item
Common
General Information


Infobox Usage Guide

Example Code Example Result
{{Infobox_item
 | title       = Classic Magic Rubber Suit (Top)
 | icon        = Infobox_armor_example_icon.png
 | description = Advanced materials are used to make this, completely without regard to cost.
 | rarity      = Rare
 | class       = Majin
 | level       = 20
 | slot        = Jacket
 | weight      = 350
 | npc_price   = 1,649
}}
Classic Magic Rubber Suit (Top)
Rare
Advanced materials are used to make this, completely without regard to cost.
General Information
Class Majin
Level 20
Slot Jacket
Weight 350
NPC Price 1,649


Parameter Explanations

  • title: The name of the item. Defaults to the page name if not provided.
  • icon: The filename of the item's icon (e.g., ItemIcon.png). Defaults to item_no_icon.png if not provided.
  • description: A brief description of the item.
  • Weight: The weight of the item.
  • Event Item: Indicates if the item is exclusive to events. Accepts Yes or No. Displays a checkmark (✅) for Yes and a cross (❌) for No.
  • Rarity: The rarity level of the item. Accepts values like Common, Superior, Excellent, Rare, or Legendary. Each value is color-coded:
 - Common: White (#ffffff)
 - Superior: Light Blue (#99bbee)
 - Excellent: Yellow (#ffdd66)
 - Rare: Red (#ff6677)
 - Legendary: Pink (#ee77dd)
  • Class: The class that can use the item.
  • Level: The required level to use the item.
  • Slot: The equipment slot where this item is placed (e.g., Weapon, Armor).
  • NPC Price: The price of the item when sold to NPC vendors.

Notes

  • If a parameter is left blank, it will not be displayed in the infobox.
  • Ensure that image files (e.g., icons) are correctly uploaded to the wiki for them to appear.
  • Proper formatting and consistent use of parameters ensure uniformity across pages.