Template:Infobox consumable: Difference between revisions

From Ultimate Dragon Ball Online Wiki

Ollix (talk | contribs)
No edit summary
Ollix (talk | contribs)
No edit summary
 
(23 intermediate revisions by the same user not shown)
Line 1: Line 1:
{| class="infobox" style="border: 1px solid #ccc; width: 300px; 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;" | <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;">{{{title|}}}</span>
! 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:{{{icon|}}}|32px]]
| colspan="2" style="text-align: center; padding-top: 10px; padding-bottom: 10px;" | [[File:{{#if: {{{icon|}}} | {{{icon}}} | item_no_icon.png }}|32px]]
|-
| 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: {{{event_item|}}} |
! <span style="display: inline-block; text-align: left; vertical-align: top; width: 100px;">Description</span>
! <span style="display: inline-block; text-align: left; padding-left: 10px; width: 100%;">Event Item</span>
{{!}}{{{description|}}}
{{!}}<span style="display: inline-block; width: 100%;">{{#switch: {{{event_item}}}
  | Yes = ✅
  | No = ❌
  | default = {{{event_item}}} }}</span>
}}
}}
|-
|-
{{#if: {{{Weight|}}} |
{{#if: {{{level|}}} |
! <span style="display: inline-block; text-align: left; width: 100px;">Weight</span>
! <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: {{{weight|}}} |
! <span style="display: inline-block; text-align: left; width: 100px;">Event Item</span>
! <span style="display: inline-block; text-align: left; padding-left: 10px; width: 100%;">Weight</span>
{{!}}<span>{{#switch: {{{Event Item}}}
{{!}}<span style="display: inline-block; width: 100%;">{{{weight|}}}</span>
  | Yes = ✅
  | No = ❌
  | default = {{{Event Item}}} }}</span>
}}
}}
|-
|-
{{#if: {{{Rarity|}}} |
{{#if: {{{npc_price|}}} |
! <span style="display: inline-block; text-align: left; width: 100px;">Rarity</span>
! <span style="display: inline-block; text-align: left; padding-left: 10px; width: 100%;">NPC Price</span>
{{!}}<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: {{{Rarity}}}
{{!}}<span style="display: inline-block; align-items: center; width: 100%;">{{{npc_price}}} [[File:Ui_icon_zeni.png|16px]]</span>
  | Common = #ffffff  <!-- Black -->
  | Superior = #99bbee  <!-- Blue -->
  | Excellent = #ffdd66  <!-- Yellow -->
  | Rare = #ff6677  <!-- Red -->
  | Legendary = #ee77dd  <!-- Magenta -->
  | default = #000000 }}">{{{Rarity|}}}</span>
}}
}}
|-
|-
! colspan="2" style="background-color: #dcdcdc; color: black; text-align: center; font-size: 1.1em; font-weight: bold; padding: 5px;" | Item Effects
! colspan="2" style="background-color: #dcdcdc; color: black; text-align: center; font-size: 1.1em; font-weight: bold; padding: 5px;" | Item Effects
|-
|-
{{#if: {{{Effect|}}} |
{{#if: {{{effect|}}} |
! <span style="display: inline-block; text-align: left; width: 100px;">Effect</span>
! <span style="display: inline-block; text-align: left; padding-left: 10px; width: 100%;"">Effect</span>
{{!}}{{{Effect|}}}
{{!}}<span style="display: inline-block; width: 100%;">{{{effect|}}}</span>
}}
}}
|-
|-
{{#if: {{{LP Recovery|}}} |
{{#if: {{{LP_recovery|}}} |
! <span style="display: inline-block; text-align: left; width: 100px;">LP Recovery</span>
! <span style="display: inline-block; text-align: left; padding-left: 10px; width: 100%;"">LP Recovery</span>
{{!}}{{{LP Recovery|}}}
{{!}}<span style="display: inline-block; width: 100%;">{{{LP_recovery|}}}</span>
}}
}}
|-
|-
{{#if: {{{EP Recovery|}}} |
{{#if: {{{EP_recovery|}}} |
! <span style="display: inline-block; text-align: left; width: 100px;">EP Recovery</span>
! <span style="display: inline-block; text-align: left; padding-left: 10px; width: 100%;"">EP Recovery</span>
{{!}}{{{EP Recovery|}}}
{{!}}<span style="display: inline-block; width: 100%;">{{{EP_recovery|}}}</span>
}}
}}
|-
|-
{{#if: {{{Duration|}}} |
{{#if: {{{duration|}}} |
! <span style="display: inline-block; text-align: left; width: 100px;">Duration</span>
! <span style="display: inline-block; text-align: left; padding-left: 10px; width: 100%;"">Duration</span>
{{!}}{{{Duration|}}}
{{!}}<span style="display: inline-block; width: 100%;">{{{duration|}}}</span>
}}
}}
|-
| colspan="2" style="padding-bottom: 5px;" | <!-- This row adds space at the bottom -->
|}
|}


Line 67: Line 71:
{{Infobox_consumable
{{Infobox_consumable
  | title      = CC Life Pill S
  | title      = CC Life Pill S
  | icon        = Infobox_item_example_icon.png
  | icon        = Infobox_consumable_example_icon.png
  | description = Specially designed therapeutic capsule made after a study on Senzu Beans were conducted. The CC logo is affixed on the capsule.
  | description = Specially designed therapeutic capsule made after a study on Senzu Beans were conducted. The CC logo is affixed on the capsule.
  | Weight      = 0.0
  | event_item  = No
  | Event Item = No
  | level      = 1
  | Rarity     = Common
  | rarity      = Common
  | Effect     = Restores health
  | weight     = 0.0
  | LP Recovery = 750
| npc_price  = 375
  | EP Recovery = 0
  | effect     = Restores health
  | Duration   = 0 seconds
  | LP_recovery = 750
  | EP_recovery = 0
  | duration   = 0 seconds
}}
}}
</pre>
</pre>
Line 81: Line 87:
{{Infobox_consumable
{{Infobox_consumable
  | title      = CC Life Pill S
  | title      = CC Life Pill S
  | icon        = Infobox_item_example_icon.png
  | icon        = Infobox_consumable_example_icon.png
  | description = Specially designed therapeutic capsule made after a study on Senzu Beans were conducted. The CC logo is affixed on the capsule.
  | description = Specially designed therapeutic capsule made after a study on Senzu Beans were conducted. The CC logo is affixed on the capsule.
  | Weight      = 0.0
  | event_item  = No
  | Event Item = No
  | level      = 1
  | Rarity     = Common
  | rarity      = Common
  | Effect     = Restores health
  | weight     = 0.0
  | LP Recovery = 750
| npc_price  = 375
  | EP Recovery = 0
  | effect     = Restores health
  | Duration   = 0 seconds
  | LP_recovery = 750
  | EP_recovery = 0
  | duration   = 0 seconds
}}
}}
|}
|}
Line 105: Line 113:
* '''Duration''': The duration of the item's effect (e.g., ''30 seconds'', ''5 minutes'').
* '''Duration''': The duration of the item's effect (e.g., ''30 seconds'', ''5 minutes'').


=== Notes ===
=== Important! ===


* 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.

Latest revision as of 04:32, 20 March 2025

Infobox consumable
Common
General Information
Item Effects


Infobox Usage Guide

Example Code Example Result
{{Infobox_consumable
 | title       = CC Life Pill S
 | icon        = Infobox_consumable_example_icon.png
 | description = Specially designed therapeutic capsule made after a study on Senzu Beans were conducted. The CC logo is affixed on the capsule.
 | event_item  = No
 | level       = 1
 | rarity      = Common
 | weight      = 0.0
 | npc_price   = 375
 | effect      = Restores health
 | LP_recovery = 750
 | EP_recovery = 0
 | duration    = 0 seconds
}}
CC Life Pill S
Common
Specially designed therapeutic capsule made after a study on Senzu Beans were conducted. The CC logo is affixed on the capsule.
General Information
Event Item
Level 1
Weight 0.0
NPC Price 375
Item Effects
Effect Restores health
LP Recovery 750
EP Recovery 0
Duration 0 seconds


Parameter Explanations

  • icon: The file name of the small icon representing the item (e.g., ItemIcon.png).
  • description: A brief explanation of what the item is and its lore or function.
  • Weight: The weight of the item, if applicable.
  • Event Item: Indicate if the item is exclusive to events (Yes or No).
  • Rarity: The rarity level of the item (e.g., Common, Rare, Legendary).
  • Effect: Any special effects or bonuses provided by the item.
  • LP Recovery: The amount of Life Points (LP) recovered when using the item.
  • EP Recovery: The amount of Energy Points (EP) recovered when using the item.
  • Duration: The duration of the item's effect (e.g., 30 seconds, 5 minutes).

Important!

  • 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 proper formatting and spacing for consistency across pages.