Шаблон:Npc infobox/док
This template is used for displaying the infobox for an NPC (including enemies, bosses, critters, etc.). Together with {{item infobox}}
, it is one of the most important and most powerful infobox templates.
Использование
The template's main functionality is to display the standard infobox.
The data which is to be displayed can be manually entered when calling the template, but thanks to {{npcinfo}}, the vast majority of data is generated automatically. To enable automatic data, use the parameter
and set it to the ID of the NPC (alternatively: auto
auto=yes
and either id=<NPC ID>
, name=<NPC name>
, or nothing else – the latter two methods will cause the template to automatically generate the ID using {{npcNameFromId}}, with the last method using the page title for name reference). This way, all relevant NPC parameters are set automatically. See the table below for affected parameters. However, they can still be overridden, and manually entered parameters always take precedence over the automatic ones.
Основные параметры
- Примечания:
- The dollar sign (
) is used to signify that the word after it is the name of a template parameter.$
- All parameters which have a default value listed can usually be omitted. Note that this does not mean that parameters which do not have a default value listed should always be filled in.
Параметр | Описание | Авто | Пример | Значение по умолчанию (если пропущено) |
Примечание |
---|---|---|---|---|---|
{{npc infobox
| |||||
Параметры карточкиПараметры карточки | |||||
| boxwidth |
Ширина карточки | 27em |
Number with unit. The box is adjusting to the width of the images by default. | ||
| float |
Позиционирование карточки | left |
right |
||
| css or | style |
CSS-стили влияют на всю карточку | Any or properties defined here will override the template's and parameters, respectively.
| |||
| tab или | tabs |
Переключает вкладки сложностей |
|
Вкладки классика/эксперт/мастер не используются в карточках поселенцев, живностей, мебели и эксклюзивных вариациях существ, будут использоваться для всех остальных существ. Данный параметр перезаписывает его значение по умолчанию, установленное в конфигурации. | ||
| auto |
Включает автоматические данные | 201 |
Также может иметь значение (см. примечания выше).
| ||
| id |
Идентификатор существа | ✔️ | 201 |
Cosmetic ID to be displayed, overrides the display of and .
| |
| name |
Название существа | ✔️ | Skelet |
<название страницы> |
Будет отображаться как заголовок карточки |
| name2 |
Косметическое дополнение к названию |   / {{expert|Лунатик-культист}} |
Will be directly appended to .
| ||
| namesub |
Название первого подзаголовка | ✔️ | Additional information directly underneath the title of the infobox. Mainly internal NPC variant names, like .
| ||
| namesub2 |
Название первого подзаголовка | вторая форма |
Additional information directly underneath the title of the infobox or underneath . Intended to be used as a manual , because manually setting to something would prevent its automatic display.
| ||
| namenote |
Название второго подзаголовка | ✔️ | Will be displayed underneath / . Mainly NPC variant descriptions, like .
| ||
| variant |
Заметка об эксклюзивности | yes |
Displays a note at the top of the infobox informing about the Консоли старого поколения и -exclusivity of the NPC. | ||
| expertonly |
Эксклюзивность существа для режима эксперта | yes |
Убирает вкладку «Классика» tab and displays the following line underneath title / / / : (эксклюзивно в режиме эксперта)
| ||
| masteronly |
Эксклюзивность существа для режима мастера | yes |
Убирает вкладки «Классика» и «Эксперт» and displays the following line underneath title / / / : (эксклюзивно в режиме мастера)
| ||
Параметры изображенийПараметры изображений | |||||
| imagealt |
Complete custom control over the display of the first image | [[File:Skeleton.png]] |
Overrides the and parameters. Multiple images can be provided and/or text and other formatting.
| ||
| image |
Основное изображение существа | Skeleton.png |
$namesub.png or $name.png |
This is the image that is stored to cargo by default. | |
| imagesize |
Размер основного изображения | 40x20px*0.75 |
*1 |
Corresponds to the parameter of {{image}}: <width>x<height>*<scale>
| |
| imageexpert |
Изображение вариации режима эксперта | Skeleton.png |
|||
| image2 |
Дополнительное изображение | Skeleton.png |
Default value: <$image without ".png">_(old).png / .gif . Leave it empty to disable this automatic old image discovering.
| ||
| imagemode |
Управление отображением изображения | full |
Setting it to anything other than prevents the automatic display of .
| ||
| image3 |
Дополнительное изображение | Skeleton.png |
|||
| imageversion2 |
Exclusive versions of
|
desktop-console |
old-gen-3ds |
Versions that will be displayed when hovering over (by default the one, so the "old" versions are the default). Valid values are , , , , and .
| |
| imageversion3 |
Exclusive versions of
|
desktop-console |
Versions that will be displayed when hovering over . Valid values are the same as for .
| ||
| imageother |
Additional, visually separated image | Map Icon Skeletron.png |
Will be displayed underneath all other images, above the statistics, separated by a horizontal line at the bottom of the infobox. Usually used for map icons or sprites of NPCs' temporary states (e.g. the "rolling" state of the Sroller). Can be a slash-separated ( ) list for multiple images.
| ||
| imageothercaption |
Caption of
|
Rolling state |
Will be displayed underneath . Has no effect if is not set. Is not mandatory; the image will also be displayed if the caption is omitted.
| ||
Параметры характеристикПараметры характеристик | |||||
| type (deprecated: | type2 ,| type3 ) |
Классификация и категоризация | Boss |
Enemy |
Broad classifications like "Flying Enemy", "Critter", etc. Separate multiple values with a slash ( ). All types will be linked, if the respective page exists.
| |
| environment (deprecated: | environment2 ,| environment3 ) |
Native environment of the NPC | Desert Forest+Rain Desert / Forest Desert / Forest+Rain |
Biome in which or event during which the NPC naturally spawns. All environments will be linked if the respective page exists. A plus ( ) means "AND" and a slash ( ) means "OR".
The | ||
| ai |
Стиль поведения существа | ✔️ | Fighter AI |
||
| damage |
Урон | ✔️ | |||
| damage2 |
Addition to the damage | Will be directly appended to . Can be used, for instance, for differentiation between different attacks of the NPC or different platforms.
| |||
| life |
Maximum health of the NPC | ✔️ | |||
| life2 |
Addition to the maximum health | Will be directly appended to .
| |||
| defense |
Defense of the NPC | ✔️ | |||
| defense2 |
Addition to the defense | Will be directly appended to .
| |||
| knockback |
Resistance to knockback of the NPC | ✔️ | |||
| knockback2 |
Addition to the knockback resistance | Will be directly appended to .
| |||
| banner |
Banner of the NPC | ✔️ | yes |
Setting it to will cause it to take as the banner name, but it can also simply be set to the name of the banner.
Note that, if using | |
| immune (deprecated: | immune1 | immune2 ... | immune<n> ) |
Debuffs to which the NPC is immune | ✔️ | Poisoned / Frostburn |
The /etc. parameters are deprecated, instead use only the parameter. Separate multiple debuff names with a slash ( ).
All immunity-related information will only be displayed if | |
| immuneall |
Immunity to all debuffs | ✔️ | yes |
All immunity-related information will only be displayed if does not contain , , and .
| |
| immuneallnotwhips |
Immunity to all debuffs except whip debuffs | ✔️ | yes |
||
| immuneallnote or | immunenote |
Addition to /
|
Will be directly appended to the text that is displayed if / is set.
Example: All immunity-related information will only be displayed if | |||
Параметры бафов и дебафовПараметры бафов и дебафов | |||||
| buff |
Buff that the NPC causes | ❌ | Dryad's Blessing |
Name of the buff. As a shortcut for , , and , they can be appended to this value, separated with a slash: | buff = <name> / <duration> / <chance> <mode> . Chance and mode may also be omitted, and only the standard mode values[1] are allowed.
Examples:
| |
| idbuff |
Buff ID | ✔️ | |||
| bufflink |
Buff link target | ✔️ | |||
| bufftip |
Buff tooltip | ✔️ | |||
| buffchance |
Buff chance | ❌ | |||
| buffduration |
Buff duration | ❌ | Enter the value using the {{duration}} template. | ||
| buffmode |
Mode-exclusivity of the buff | ❌ | Can be one of the standard mode options[1] or , , or . The buff will only be displayed in the respective tab(s). By default, it will be displayed in all three tabs.
| ||
| buffidshow |
Vanity buff ID | ||||
| buff<n> |
Additional buff that the NPC causes | Can be continued nearly infinitely, e.g. buff2 , buff3 , etc.
| |||
| idbuff<n> |
Buff ID | ||||
| bufflink<n> |
Buff link target | ||||
| bufftip<n> |
Buff tooltip | ||||
| buffchance<n> |
Buff chance | ||||
| buffduration<n> |
Buff duration | ||||
| buffmode<n> |
Mode-exclusivity | ||||
| buffidshow<n> |
Vanity buff ID | ||||
| debuff |
Debuff that the NPC inflicts | ❌ | See above. Debuffs and buffs are handled identically. | ||
| iddebuff |
Debuff ID | ✔️ | |||
| debufflink |
Debuff link target | ||||
| debufftip |
Debuff tooltip | ✔️ | |||
| debuffchance |
Debuff chance | ❌ | |||
| debuffduration |
Debuff duration | ❌ | |||
| debuffmode |
Mode-exclusivity of the debuff | ❌ | |||
| debuffidshow |
Vanity debuff ID | ||||
| debuff<n> |
Additional debuff that the NPC causes | Can be continued nearly infinitely, e.g. debuff2 , debuff3 , etc.
| |||
| iddebuff<n> |
Debuff ID | ||||
| debufflink<n> |
Debuff link target | ||||
| debufftip<n> |
Debuff tooltip | ||||
| debuffchance<n> |
Debuff chance | ||||
| debuffduration<n> |
Debuff duration | ||||
| debuffmode<n> |
Mode-exclusivity | ||||
| debuffidshow<n> |
Vanity debuff ID | ||||
Параметры выпадаемых предметовПараметры выпадаемых предметов | |||||
| money |
Base amount of money that the NPC drops | ✔️ | {{coin|3gc 80sc}} |
Use the {{coin}} template. | |
| money2 |
Addition to dropped money | Will be directly appended to .
| |||
| <item name 1>
...
|
Dropped item | ❌ | |Gel|2–5|{{modes|75%|100%}}
|
Note that these are unnamed parameters, i.e., they are not used with an equals sign (= ) like the other parameters.
| |
|:group:start
...
|
Group of dropped items | |:group:start|Only one of the following 4 will drop|@normal
...
|
Note that these are unnamed parameters, i.e., they are not used with an equals sign (= ) like the other parameters.
| ||
|:loot:start
...
|
Subgroup of a dropped item | Note that these are unnamed parameters, i.e., they are not used with an equals sign (= ) like the other parameters.
All items inside the section will be stored to cargo with the name of the item directly above the section, instead of the name of the NPC as usual. For example, preceding a loot section on Wall of Flesh that contains the Demon Heart with Treasure Bag (Wall of Flesh) will store the dropping entity of the Demon Heart as "Treasure Bag (Wall of Flesh)" instead of "Wall of Flesh", as would be the case with all items outside the loot section. | |||
| custom:<raw item name(s)> |
Custom dropped item | Note that these are unnamed parameters, i.e., they are not used with an equals sign (= ) like the other parameters.
| |||
Параметры снарядовПараметры снарядов | |||||
| idprojectile |
Создаваемый существом снаряд | ❌ | Идентификатор снаряда. Можно вставить несколько идентификаторов, разделив их запятыми. Каждому идентификатору можно присвоить режим и примечание в формате <ID><режим>//<примечание>; их указывать необязательно. Часть с режимом может быть одним из стандартных значений режимов[1].
Примеры:
| ||
| projectileblock |
Расположение изображения со снарядом | ❌ | Работает аналогично .
| ||
Параметры звуковПараметры звуков | |||||
| soundhurt |
Звуковой эффект при ударе | ✔️ | NPC_Hit_1.wav |
Можно вставить несколько звуков, разделив их запятыми. Имеет подпись «При ударе». Установите пустое значение (|soundhurt= ), чтобы спрятать автоматически сгенерированные звуки.
| |
| soundkilled |
Звуковой эффект при смерти | ✔️ | NPC_Killed_1.wav |
Можно вставить несколько звуков, разделив их запятыми. Имеет подпись «При смерти». Установите пустое значение (|soundkilled= ), чтобы спрятать автоматически сгенерированные звуки.
| |
| sound1 |
Дополнительный звуковой эффект | Можно вставить несколько звуков, разделив их запятыми. | |||
| soundcaption1 |
Подпись к звуковому эффекту | ||||
| soundmode1 |
Звуковой эффект, доступный только в определённых режимах |
|
Может иметь значение , или . Такие звуки будет отображаться только в соответствующих вкладках (если установлено , то во вкладках «Эксперт» и «Мастер»). По умолчанию звук отображается во всех трёх вкладках.
| ||
| sound2 |
Дополнительный звуковой эффект | См. выше. Эти параметры ведут себя точно так же. | |||
| soundcaption2 |
Подпись к звуковому эффекту | ||||
| soundmode2 |
Звуковой эффект, доступный только в определённых режимах | ||||
| sound<n> |
Дополнительный звуковой эффект | Может перечисляться почти бесконечно. Звуки будут отображаться только, если указан параметр sound<n> с соответствующим ему параметром soundcaption<n> .
| |||
| soundcaption<n> |
Подпись к звуковому эффекту | ||||
| soundmode<n> |
Звуковой эффект, доступный только в определённых режимах | ||||
Параметры бэкендаПараметры бэкенда | |||||
| cate |
Toggles all categorization | ❌ | no |
Set to to force categorization when it is disabled by default (on non-mainspace pages). Set to to disable categorization.
| |
| listcat (deprecated: | listcat2 ) |
Categorization | ❌ | Supplemental category names (Category:<$listcat> NPCs ). Separate multiple with a slash ( ).
Note: The template mainly categorizes the page based on the | ||
| allversions |
Platform version availability | ✔️ |
|
Set to to assert that the NPC is available on all platforms of Terraria. This is only to be used if no {{exclusive}} banner is on the page. If omitted, it will be detected automatically based on the result of {{eversions|<NPC name>}} (even though might not be set!). Categorizes the page in all five version content categories (with the exception of Category:Japanese console content), if is determined.
| |
| hardmode |
Hardmode-exclusivity | ❌ | yes |
Set to to assert that the NPC is not available in pre-Hardmode, but only becomes available in Hardmode. Categorizes the page in Category:Hardmode-only NPCs.
| |
| cargo |
Toggles cargo data storage | ❌ | no |
Set to to force cargo data storage when it is disabled by default (on non-mainspace root pages[2]). Set to to disable cargo data storage.
| |
| cargodrops |
Toggles drops cargo data storage | ❌ | no |
By default, dropped item data will be stored to cargo if , i.e., main cargo data storage, is enabled. Use this parameter to override that.
A frequently used example is in cases where an enemy with multiple parts, e.g. a worm, does not store its main infobox data to cargo (since only the individual parts should be stored), but contains the drop information in the main infobox, which should be stored to cargo. | |
| cargobanner |
Prevents banner cargo data storage | ❌ | no |
If using and the NPC has a valid banner associated to it, the banner item will be stored to cargo in a hidden {{item infobox}}. Use this parameter to prevent that, e.g. if there are two NPCs that have the same banner (such as Demons and Voodoo Demons). Only one of the two pages should store the banner to cargo in order to prevent duplicate rows. This parameter is only necessary if the two (or more) NPCs are across multiple pages. If, for instance, the Demon and Voodoo Demon both had their infoboxes on a single page, then this parameter would not be necessary, as the template would already prevent the duplicate storage on its own in this case.
| |
| idcargo |
NPC ID to store to cargo | ❌ | 201 |
Can be a comma-separated list. Can also be left empty to prevent cargo storage as well. | |
| imagecargo |
NPC image to store to cargo | ❌ | [[File:Skeleton.png]] |
Define an image to store to cargo, completely overriding the image parameters. |
Подстраницы
Существует множество дополнительных подстраниц, которые используются для форматирования определённых данных:
- Шаблон:Npc infobox/AI
- Шаблон:Npc infobox/customView
- Шаблон:Npc infobox/drop
- Шаблон:Npc infobox/environment
- Шаблон:Npc infobox/infoboxView
- Шаблон:Npc infobox/initOptions
- Шаблон:Npc infobox/itemView
- Шаблон:Npc infobox/knockback
- Шаблон:Npc infobox/l10n
- Шаблон:Npc infobox/modestat
- Шаблон:Npc infobox/namedb
- Шаблон:Npc infobox/namedb-en
- Шаблон:Npc infobox/namedb-ru
- Шаблон:Npc infobox/npcToBannerItemId
- Шаблон:Npc infobox/options
- Шаблон:Npc infobox/strip
- Шаблон:Npc infobox/tableView
- Шаблон:Npc infobox/tableView/damage
- Шаблон:Npc infobox/tableView/damageBlock
- Шаблон:Npc infobox/tableView/defense
- Шаблон:Npc infobox/tableView/defenseBlock
- Шаблон:Npc infobox/tableView/drops
- Шаблон:Npc infobox/tableView/health
- Шаблон:Npc infobox/tableView/healthBlock
- Шаблон:Npc infobox/tableView/item
- Шаблон:Npc infobox/tableView/kbresist
- Шаблон:Npc infobox/tableView/kbresistBlock
- Шаблон:Npc infobox/tableView/money
- Шаблон:Npc infobox/tableView/moneyBlock
- Шаблон:Npc infobox/tableView/npcid
- Шаблон:Npc infobox/tableView/variant
- Шаблон:Npc infobox/tableend
- Шаблон:Npc infobox/tablestart
- Шаблон:Npc infobox/voidView
См. также
- {{item infobox}}
Сноски
- ↑ 1,0 1,1 1,2 1,3
Доступны следующие значения:
– только для классического режима@normal
– только для режима эксперта@expert
– только для режима мастера@master
– только для классического режима и режима эксперта#normal
– только для режима эксперта и мастера#expert
– только для классического режима и режима мастера#master
- ↑ A root page is a page that is not a subpage. This prevents language subpages from storing duplicates by default.