Шаблон:Loot

Матеріал з Terraria Wiki
Перейти до навігації Перейти до пошуку

Цей шаблон додає рядки до таблиці «Drops», заявленої шаблоном Картка НІПів/drop. Переглянути таблицю.

Цей шаблон i18n-ready, що означає, що його легко локалізувати для різних мов. Будь ласка, ознайомтеся з i18n та l10n для шаблонів, щоб дізнатися більше.
Див. «Шаблон:Loot/l10n» для локалізації цього шаблону.
Template-info.svg Документація Наведена нижче документація запозичена з «Шаблон:Loot/doc». (редагувати | історія)
Для більш повної чи актуальної інформації ви можете переглянути документацію англійською.

This template is used to give a standardized tabular overview over the items that can be looted from items like Chests and crates, along with their respective quantities and chances.

It stores its information to the Drops cargo table, which is queried by {{drop infobox}}.

Usage

{{ loot | item = <item containing the loot> | id = <item ID of the item containing the loot> | title = <table caption> | cargo = force/y/yes/n/no | <loot information> }}

item, id

Item name or ID of the item that contains the loot; defaults to page name.

title

Caption of the table. Default: "Loot". Can be set to @primary and @secondary to display two other standard, localized captions: "Primary items (only one)" and "Secondary items", respectively.

cargo

By default, all mainspace root pages will store their {{loot}} content to Cargo. Use this parameter to prevent or force Cargo storage.

Unnamed parameters

Loot information, passed in groups of three: item name, quantity, and rate/chance.

| <item 1> | <quantity 1> | <rate 1>
| <item 2> | <quantity 2> | <rate 2>
...
| <item n> | <quantity n> | <rate n>

If the rate is passed as a fraction, i.e., in an <integer>/<integer> format, then it will be wrapped in {{chance}} in the output. This can be prevented by replacing one number with its HTML entity (e.g. &#50; for 2).

It is possible to group items (i.e., suppress the horizontal line between them in the resulting table) by surrounding them with a group starter and a group terminator row:

| :group:start | <group quantity> | <group rate>
  | <group item 1> | <group item quantity 1> | <group item rate 1>
  | <group item 2> | <group item quantity 2> | <group item rate 2>
  ...
  | <group item n> | <group item quantity n> | <group item rate n>
| :group:end|-----------------|-

If group quantity and/or rate are not passed, then each item may specify an individual quantity/rate. If this information is defined in the group starter, though, then individual quantities/rates will be ignored.

The template supports altering the display of the item using a "custom" mode:

| :custom:<raw name(s) of the item>:<custom display> | <quantity> | <rate>

It is not mandatory to include the raw name of the item, but doing so ensures a correct cargo data storage. Separate multiple raw item names with a slash (/) character. Omit the raw item name entirely to prevent cargo storage for that item.


All unnamed parameters can be used ad infinitum.

Examples

Code Result
{{loot|title=Looted items

| Apprentice Bait|1–4|2/9

|:group:start||<!-- no group stats -->
  | Obsidian Skin Potion|1–3|1/14
  | Swiftness Potion|2–4|1/28
  | Ironskin Potion|4–78|
  | Night Owl Potion|1|1/112
  | Shine Potion||1/224
|:group:end|-----------------|-

| Silver Coin|999|1/100
| Gold Coin|99|1/45

|:group:start|1|<!-- group quantity -->
  | Sailfish Boots||1/40
  | Tsunami in a Bottle|314|1/41<!-- individual quantity is ignored -->
  | Extractinator|foobar|1/53
|:group:end|-----------------|-

|:group:start||1/14<!-- group rate -->
  | Copper Bar|1–7|
  | Iron Bar|2–7|ignored rate<!-- individual rate is ignored -->
  | Gold Bar|3–7|42/42
|:group:end|-----------------|-

|:group:start|4–11|<!-- suppress {{chance}} -->
  | Tin Bar||&#50;/3
  | Lead Bar||3/&#52;
|:group:end|-----------------|-

|:group:start||4.17% {{eicons|1.4.0.1|small=y}}<br/>2.56% {{eicons|1.3.0.1|not=1.4.0.1|small=y}}<!-- custom group rate -->
  | Cobalt Bar|1–7|
  | Palladium Bar|2–7|ignored rate
  | Orichalcum Bar|3–7|42/42
|:group:end|-----------------|-

| Copper Ore|1–7|1/7
| Iron Ore|2–7|2/7

|:group:start|1|1/45<!-- group quantity and group rate -->
  | Aglet|2.7812|1/78
  | Umbrella|56|2651/63178
  | Climbing Claws||{{item|Moon Lord}}
  | Guide to Plant Fiber Cordage||
  | Radar|141421|
|:group:end|-----------------|-

|:group:start||
  |:custom:Gold Ore/Platinum Ore:{{item|Gold Ore|note=(in worlds with Gold)}}<br/>{{item|Platinum Ore|note=(in worlds with Platinum)}}|5–9|3/7
  |:custom:Gold Bar/Platinum Bar:{{item|Gold Bar|note=(in worlds with Gold)}}<br/>{{item|Platinum Bar|note=(in worlds with Platinum)}}|3–7|2/7
|:group:end|-----------------|-

}}
Looted items
ItemQuantityChance
Наживка ПочатківцяНаживка Початківця1–42/9 (22,22%)
Зілля Обсидіанової ШкіриЗілля Обсидіанової Шкіри1–31/14 (7,14%)
Зілля СтрімкостіЗілля Стрімкості2–41/28 (3,57%)
Зілля Залізної ШкіриЗілля Залізної Шкіри4–78
Зілля СовиЗілля Сови11/112 (0,89%)
Зілля СяйностіЗілля Сяйності1/224 (0,45%)
Срібна МонетаСрібна Монета9991/100 (1%)
Золота МонетаЗолота Монета991/45 (2,22%)
Чоботи ВітрильникаЧоботи Вітрильника(Видання для ПК, консолей та мобільних пристроїв)11/40 (2,5%)
Цунамі у БанціЦунамі у Банці(Видання для ПК, консолей та мобільних пристроїв)1/41 (2,44%)
ЕкстракторЕкстрактор1/53 (1,89%)
Мідний ЗлитокМідний Злиток1–71/14 (7,14%)
Залізний ЗлитокЗалізний Злиток2–7
Золотий ЗлитокЗолотий Злиток3–7
Олов'яний ЗлитокОлов'яний Злиток4–112/3
Свинцевий ЗлитокСвинцевий Злиток3/4
Кобальтовий ЗлитокКобальтовий Злиток1–74.17% (Видання для ПК, консолей та мобільних пристроїв)
2.56% !!Error: Некоректне використання шаблону EICONS!
Паладієвий ЗлитокПаладієвий Злиток2–7
Оріхалковий ЗлитокОріхалковий Злиток3–7
Мідна РудаМідна Руда1–71/7 (14,29%)
Залізна РудаЗалізна Руда2–72/7 (28,57%)
АксельбантАксельбант11/45 (2,22%)
ПарасолькаПарасолька
Кігті АльпіністаКігті Альпініста
Посібник з Рослиних МотузокПосібник з Рослиних Мотузок(Видання для ПК, консолей та мобільних пристроїв)
РадарРадар(Видання для ПК, консолей та мобільних пристроїв)
Золота РудаЗолота Руда(in worlds with Gold)
Платинова РудаПлатинова Руда(in worlds with Platinum)
5–93/7 (42,86%)
Золотий ЗлитокЗолотий Злиток(in worlds with Gold)
Платиновий ЗлитокПлатиновий Злиток(in worlds with Platinum)
3–72/7 (28,57%)