Editing
Module
:
NpcData/doc
(section)
Give feedback
Jump to navigation
Jump to search
Warning:
You are not logged in. Once you make an edit, a temporary account will be created for you.
Learn more
.
Log in
or
create an account
to continue receiving notifications after this account expires, and to access other features.
Anti-spam check. Do
not
fill this in!
== Available Functions == === Get a Single or Nested Stat (`get_npc_var`) === This is the primary function for retrieving NPC data. It can get a simple top-level stat or traverse deeply into nested objects and arrays (up to 6 levels deep via the template). '''Syntax''' <code><nowiki>{{#invoke:NpcData|get_npc_var|NPC Name|Key 1|Key 2|...|Rounding}}</nowiki></code> '''Parameters''' * '''NPC Name:''' The internal key for the NPC (e.g., `npc_boss_tier2`, `trooper_normal`). * '''Key 1, Key 2, ...:''' The path to the stat you want. ** For a simple stat, this is one key (e.g., `MaxHealth`). ** For nested data, provide each key in order (e.g., `RebirthModifier`, `RespawnDelay`). ** For arrays (lists), use the position number as a key (e.g., `IntrinsicModifiers`, `1`, `BULLET_ARMOR_DAMAGE_RESIST`). * '''Rounding:''' (Optional) A number to round the result to that many significant figures. This should always be the last parameter. '''Examples''' * To get the max health of a Normal Trooper: ** '''Code:''' <code><nowiki>{{#invoke:NpcData|get_npc_var|trooper_normal|MaxHealth}}</nowiki></code> ** '''Result:''' {{#invoke:NpcData|get_npc_var|trooper_normal|MaxHealth}} * To get the name of a Walker's second ability (nested in BoundAbilities): ** '''Code:''' <code><nowiki>{{#invoke:NpcData|get_npc_var|npc_boss_tier2|BoundAbilities|ESlot_Signature_2|Name}}</nowiki></code> ** '''Result:''' {{#invoke:NpcData|get_npc_var|npc_boss_tier2|BoundAbilities|ESlot_Signature_2|Name}} * To get a value from a list of modifiers (nested array): ** '''Code:''' <code><nowiki>{{#invoke:NpcData|get_npc_var|npc_boss_tier2|IntrinsicModifiers|1|BULLET_ARMOR_DAMAGE_RESIST}}</nowiki></code> ** '''Result:''' {{#invoke:NpcData|get_npc_var|npc_boss_tier2|IntrinsicModifiers|1|BULLET_ARMOR_DAMAGE_RESIST}} * If a path is incorrect, an error message will show the full path attempted: ** '''Code:''' <code><nowiki>{{#invoke:NpcData|get_npc_var|trooper_normal|InvalidKey|Stat}}</nowiki></code> ** '''Result:''' <span class="error">Error: Key "InvalidKey" not found in path "trooper_normal".</span>
Summary:
Please note that all contributions to The Deadlock Wiki are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
Deadlock:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Preview page with this template
Navigation menu
Personal tools
Create account
Log in
associated-pages
Module
Discussion
English
Views
Read
Edit source
History
Tools
Search
Discord
Discord
Navigation
Main page
About us
Random page
Special pages
Recent changes
Graf
39m ago
路
Kai
Graf
42m ago
路
~2026-AlchemicalKnockdownShard1152
Vindicta
56m ago
路
~2026-InfernusBreakableSecure558
Silver
1h ago
路
Gammaton32
Show more...
Interface Admin
Common CSS
Vector CSS
Minerva CSS
Citizen CSS
Brown theme CSS
Gadgets
Gadgets definition
Editing
How to edit
Style guide
All guides
New files
Unresolved feedback
Tools
What links here
Related changes
Page information