Template:Infobox npc: Difference between revisions

From Ultimate Dragon Ball Online Wiki

Ollix (talk | contribs)
No edit summary
Ollix (talk | contribs)
No edit summary
 
(41 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: 280px; 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;">{{#if: {{{title|}}} | {{{title}}} | {{PAGENAME}} }}</span>{{#if: {{{rarity|Rare}}} | <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}}}
! 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>
  | 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-top: 10px;" | [[File:{{#if: {{{icon|}}} | {{{icon}}} | item_no_icon.png }}|32px]]
! colspan="2" style="background-color: #dcdcdc; color: white; text-align: center; font-size: 1.25em; font-weight: bold; padding: 5px; border-top-left-radius: 0px; border-top-right-radius: 0px;" | {{#if: {{{race|}}} | [[File:Race_icon_{{{race}}}.png|24px]] <span style="font-size: 0.9em;">{{RaceText|{{{race}}}}}</span>
| <span style="font-size: 0.9em;">{{RaceText|Unknown Race}}</span>
}}
|-
|-
| colspan="2" style="text-align: center; padding-top: 5px; font-style: italic;" | {{{description|}}}
| colspan="2" style="text-align: center; padding: 10px;" | [[File:{{#if: {{{image|}}} | {{{image}}} | npc_no_image.png }}|250px]]
|-
|-
! 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: {{{class|}}} |
{{#if: {{{type|}}} |
! <span style="display: inline-block; text-align: left; padding-left: 10px; width: 100%;">Class</span>
! <span style="display: inline-block; text-align: left; padding-left: 10px; width: 100%;">Type</span>
{{!}}<span style="display: inline-block; width: 100%;">{{{class}}}</span>
{{!}}<span style="display: inline-block; width: 100%;">{{{type}}}</span>
}}
}}
|-
|-
Line 24: Line 20:
}}
}}
|-
|-
{{#if: {{{slot|}}} |
{{#if: {{{power|}}} |
! <span style="display: inline-block; text-align: left; padding-left: 10px; width: 100%;">Slot</span>
! <span style="display: inline-block; text-align: left; padding-left: 10px; width: 100%;">Power</span>
{{!}}<span style="display: inline-block; width: 100%;">{{{slot}}}</span>
{{!}}<span style="display: inline-block; width: 100%;">{{{power}}}</span>
}}
}}
|-
|-
{{#if: {{{weight|}}} |
! colspan="2" style="background-color: #dcdcdc; color: black; text-align: center; font-size: 1.1em; font-weight: bold; padding: 5px;" | Location
! <span style="display: inline-block; text-align: left; padding-left: 10px; width: 100%;">Weight</span>
{{!}}<span style="display: inline-block; width: 100%;">{{{weight}}}</span>
}}
|-
|-
{{#if: {{{npc_price|}}} |
! colspan="2" | <span class="material-button">[{{{location}}} View Location in Map]</span> <!-- Here you insert the map link URL -->
! <span style="display: inline-block; text-align: left; padding-left: 10px; width: 100%;">NPC Price</span>
{{!}}<span style="display: inline-block; width: 100%;">{{{npc_price}}} [[File:Ui_icon_zeni.png|16px]]</span>
}}
|-
|-
| colspan="2" style="padding-bottom: 5px;" | <!-- This row adds space at the bottom -->
| colspan="2" style="padding-bottom: 5px;" | <!-- This row adds space at the bottom -->
Line 50: Line 40:
| <pre>
| <pre>
{{Infobox_npc
{{Infobox_npc
  | title      = Classic Magic Rubber Suit (Top)
  | title      = Goku
  | icon        = Infobox_armor_example_icon.png
  | image      = Infobox_npc_example.png
  | description = Advanced materials are used to make this, completely without regard to cost.
  | race        = Saiyan
  | rarity      = Rare
  | type        = Quest
  | class       = Majin
  | level       = 1
  | level       = 20
  | power       = 9000+
  | slot        = Jacket
  | location    = https://ultimatedbo.com/tools/world-map/?tool=Map&map=world&filter=100&coord=1009&markers=00114302773
| weight      = 350
| npc_price  = 50,000
}}
}}
</pre>
</pre>
| {{Infobox_npc
| {{Infobox_npc
  | title      = Classic Magic Rubber Suit (Top)
  | title      = Goku
  | icon        = Infobox_armor_example_icon.png
  | image      = Infobox_npc_example.png
  | description = Advanced materials are used to make this, completely without regard to cost.
  | race        = Saiyan
  | rarity      = Rare
  | type        = Quest
  | class       = Majin
  | level       = 1
  | level       = 20
  | power       = 9000+
  | slot        = Jacket
  | location    = https://ultimatedbo.com/tools/world-map/?tool=Map&map=world&filter=100&coord=1009&markers=00114302773
| weight      = 350
| npc_price  = 50,000
}}
}}
|}
|}


=== Parameter Explanations ===
== Available Races ==
 
* '''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 ===
<table style="width: 100%; font-size: 1.4em; text-align: center; margin: auto; border: none; border-collapse: collapse;">
  <tr>
    <td>[[File:Race_icon_Human.png|24px]] {{RaceText|Human}} / {{RaceText|Saiyan}}</td>
    <td>[[File:Race_icon_Namek.png|24px]] {{RaceText|Namek}}</td>
    <td>[[File:Race_icon_Majin.png|24px]] {{RaceText|Majin}}</td>
    <td>[[File:Race_icon_Animal.png|24px]] {{RaceText|Animal}} / {{RaceText|Beast}}</td>
  </tr>
  <tr>
    <td>[[File:Race_icon_Humanoid.png|24px]] {{RaceText|Humanoid}} / {{RaceText|Soldier}}</td>
    <td>[[File:Race_icon_Dino.png|24px]] {{RaceText|Dino}}</td>
    <td>[[File:Race_icon_Alien.png|24px]] {{RaceText|Alien}}</td>
    <td>[[File:Race_icon_Android.png|24px]] {{RaceText|Android}}</td>
  </tr>
  <tr>
    <td>[[File:Race_icon_Robot.png|24px]] {{RaceText|Robot}}</td>
    <td>[[File:Race_icon_Dragon.png|24px]] {{RaceText|Dragon}}</td>
    <td>[[File:Race_icon_Demon.png|24px]] {{RaceText|Demon}}</td>
    <td>[[File:Race_icon_Ghost.png|24px]] {{RaceText|Ghost}}</td>
  </tr>
  <tr>
    <td>[[File:Race_icon_Plant.png|24px]] {{RaceText|Plant}} / {{RaceText|Saibaman}}</td>
    <td>[[File:Race_icon_Insect.png|24px]] {{RaceText|Insect}} / {{RaceText|Bug}}</td>
    <td>[[File:Race_icon_Item Box.png|24px]] {{RaceText|Item Box}}</td>
    <td>{{RaceText|Unknown Race}}</td>
  </tr>
</table>


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


</noinclude>
</noinclude>

Latest revision as of 22:00, 20 March 2025

Infobox npc
Unknown Race
General Information
Location
[{{{location}}} View Location in Map]


Infobox Usage Guide

Example Code Example Result
{{Infobox_npc
 | title       = Goku
 | image       = Infobox_npc_example.png
 | race        = Saiyan
 | type        = Quest
 | level       = 1
 | power       = 9000+
 | location    = https://ultimatedbo.com/tools/world-map/?tool=Map&map=world&filter=100&coord=1009&markers=00114302773
}}
Goku
Saiyan
General Information
Type Quest
Level 1
Power 9000+
Location
View Location in Map


Available Races

Human / Saiyan Namek Majin Animal / Beast
Humanoid / Soldier Dino Alien Android
Robot Dragon Demon Ghost
Plant / Saibaman Insect / Bug Item Box Unknown Race