Predefinição: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.
Usage
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.
Basic parameters
- Notes:
- 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.
Parameter | Description | Auto | Example | Default value (if omitted) |
Note |
---|---|---|---|---|---|
{{npc infobox
| |||||
Box-related parameters | |||||
| boxwidth |
Width of the infobox | 27em |
Number with unit. The box is adjusting to the width of the images by default. | ||
| float |
Position of the infobox | left |
right |
||
| css or | style |
CSS style affecting the entire infobox | Any or properties defined here will override the template's and parameters, respectively.
| |||
| auto |
Enables automatic data | 201 |
Can also be (see text above).
| ||
| id |
ID of the NPC | ✔️ | 201 |
Cosmetic ID to be displayed, overrides the display of and .
| |
| name |
Name of the NPC | ✔️ | Skeleton |
<page name> |
Will be displayed as the heading of the infobox. |
| name2 |
Cosmetic addition to the name |   / {{expert|Lunatic Cultist}} |
Will be directly appended to .
| ||
| namesub |
Name sub-heading | ✔️ | Additional information directly underneath the title of the infobox. Mainly internal NPC variant names, like .
| ||
| namesub2 |
Name sub-heading | First Form |
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 |
Name sub-sub-heading | ✔️ | Will be displayed underneath / . Mainly NPC variant descriptions, like .
| ||
| expertonly |
Expert-exclusivity of the NPC |
|
Causes the {{expert}} formatting to be applied to most of the displayed stats and the following line to be displayed underneath title / / / : (Exclusivo do modo Perito)
| ||
Image-related parameters | |||||
| 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 |
Main image of the NPC | Skeleton.png |
$namesub.png or $name.png |
This is the image that is stored to cargo by default. | |
| imagesize |
Size of the main image | 40x20px*0.75 |
*1 |
Corresponds to the parameter of {{image}}: <width>x<height>*<scale>
| |
| imageexpert |
Image of the Expert variant | Skeleton.png |
|||
| image2 |
Additional image | Skeleton.png |
Default value: <$image without ".png">_(old).png / .gif . Leave it empty to disable this automatic old image discovering.
| ||
| imagemode |
Controls image display | full |
Setting it to anything other than prevents the automatic display of .
| ||
| image3 |
Additional image | 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 image at the bottom | Map Icon Skeletron.png |
Will be displayed 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). | ||
| imageothercaption |
Caption of
|
Rolling state |
Will be displayed underneath . Has no effect if is not set.
| ||
Statistics-related parameters | |||||
| type | type2 | type3 |
Classification | Boss |
Enemy |
will be separated with a dot (•) from ; will always be on a new line. All types will be linked, if the respective page exists.
| |
| environment | environment2 (deprecated)| environment3 (deprecated) |
Native environment of the NPC | Desert Forest+Rain Desert / Forest Desert / Forest+Rain |
Biome in which or event during which the NPC naturally spawns. "+" means AND and "/" means OR; all environments will be linked if the respective page exists. |environment=A|environment2=B|environment3=C is same as |environment=A/B/C
| ||
| ai |
AI style of the NPC | ✔️ | Fighter AI |
||
| damage |
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 | |
| immune1 through | immune10 |
Debuffs to which the NPC is immune | ✔️ | Will only be displayed if is not one of the following:
| ||
| immuneall |
Immunity to all debuffs | ✔️ | yes |
||
| immuneallnote |
Addition to
|
Will be directly appended to the text "Todos os efeitos negativos" that is displayed if is set. Example: <br/><span style="color:#666;">(except {{item|Stunned|scale=0.5}})</span>
| |||
Buff- & Debuff-related parameters | |||||
| buff |
Name or ID of the buff the NPC causes | ❌ | Dryad's Blessing |
||
| bufftip |
Buff tooltip | ✔️ | No effect if is not set.
| ||
| buffduration |
Buff duration | ❌ | 5–10 seconds |
||
| debuff |
Name or ID of the debuff that the NPC inflicts | ❌ | |||
| debufftip |
Debuff tooltip | ✔️ | |||
| debuffchance |
Debuff chance | ❌ | |||
| debuffchancenote |
Addition to
|
❌ | Will be displayed underneath . Has no effect if is not set.
| ||
| debuffduration | duration (deprecated) |
Debuff duration | ❌ | |||
| debuff2 |
Second debuff that the NPC inflicts | ❌ | See above. These parameters behave in the exact same manner. | ||
| debufftip2 |
Debuff tooltip | ✔️ | |||
| debuffchance2 |
Debuff chance | ❌ | |||
| debuffchancenote2 |
Addition to
|
❌ | |||
| debuffduration2 | duration2 (deprecated) |
Debuff duration | ❌ | |||
Drop-related parameters | |||||
| 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|75% / {{expert|100%}} |
Note that these are unnamed parameters, i.e., they are not used with an equals sign (= ) like the other parameters.
Leave | |
| group |
Group of dropped items | |group|Only one of the following 4 will drop|4 |
Note that these are unnamed parameters, i.e., they are not used with an equals sign (= ) like the other parameters.
| ||
| custom |
Custom dropped item | Note that these are unnamed parameters, i.e., they are not used with an equals sign (= ) like the other parameters.
| |||
Sound-related parameters | |||||
| soundhurt |
Hurt sound effect | ✔️ | NPC_Hit_1.wav |
Can be a comma-separated list for multiple sounds. Caption is "Machucado". Set to an empty value (|soundhurt= ) to hide the automatically generated sounds.
| |
| soundkilled |
Killed sound effect | ✔️ | NPC_Killed_1.wav |
Can be a comma-separated list for multiple sounds. Caption is "Derrotado". Set to an empty value (|soundkilled= ) to hide the automatically generated sounds.
| |
| sound1 |
Custom additional sound effect | Can be a comma-separated list for multiple sounds. | |||
| soundcaption1 |
Caption for the sound effect | ||||
| sound2 |
Custom additional sound effect | Can be a comma-separated list for multiple sounds. | |||
| soundcaption2 |
Caption for the sound effect | ||||
| sound<n> |
Custom additional sound effect | Can be continued nearly infinitely. Sounds will only be displayed if there is a sound<n> parameter with a corresponding soundcaption<n> parameter.
| |||
| soundcaption<n> |
Caption for the sound effect | ||||
Back-end-related parameters | |||||
| 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 | listcat2 |
Categorization | ❌ | Supplemental category names ( ).
Note: The template mainly categorizes the page based on the other parameters (using {{npc infobox/cate}}). It takes the values of the following parameters:
and adds the category | ||
| allversions |
Platform version availability | ❌ | yes |
Set to to assert that the NPC is available on all platforms of Terraria. Categorizes the page in all five version content categories (with the exception of Category:Japanese console content).
| |
| 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[1]). Set to to disable cargo data storage.
| |
| 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. |
Subpages
There are numerous supplemental subpages which are mainly used for formatting certain data:
- Predefinição:Npc infobox/AI
- Predefinição:Npc infobox/cate
- Predefinição:Npc infobox/cate/environment
- Predefinição:Npc infobox/customView
- Predefinição:Npc infobox/drop
- Predefinição:Npc infobox/env-cate-pt
- Predefinição:Npc infobox/environment
- Predefinição:Npc infobox/infoboxView
- Predefinição:Npc infobox/initOptions
- Predefinição:Npc infobox/itemView
- Predefinição:Npc infobox/knockback
- Predefinição:Npc infobox/l10n
- Predefinição:Npc infobox/modestat
- Predefinição:Npc infobox/namedb
- Predefinição:Npc infobox/namedb-en
- Predefinição:Npc infobox/namedb-pt
- Predefinição:Npc infobox/npcToBannerItemId
- Predefinição:Npc infobox/options
- Predefinição:Npc infobox/stat
- Predefinição:Npc infobox/strip
- Predefinição:Npc infobox/tableView
- Predefinição:Npc infobox/tableView/damage
- Predefinição:Npc infobox/tableView/damageBlock
- Predefinição:Npc infobox/tableView/defense
- Predefinição:Npc infobox/tableView/defenseBlock
- Predefinição:Npc infobox/tableView/drops
- Predefinição:Npc infobox/tableView/health
- Predefinição:Npc infobox/tableView/healthBlock
- Predefinição:Npc infobox/tableView/item
- Predefinição:Npc infobox/tableView/kbresist
- Predefinição:Npc infobox/tableView/kbresistBlock
- Predefinição:Npc infobox/tableView/money
- Predefinição:Npc infobox/tableView/moneyBlock
- Predefinição:Npc infobox/tableView/npcid
- Predefinição:Npc infobox/tableView/variant
- Predefinição:Npc infobox/tableend
- Predefinição:Npc infobox/tablestart
- Predefinição:Npc infobox/voidView
See also
- {{item infobox}}
Footnotes
- ↑ A root page is a page that is not a subpage. This prevents language subpages from storing duplicates by default.