Template:NpcData: Difference between revisionsGive feedback
Jump to navigation
Jump to search
Created page with "<includeonly>{{#if:{{{index|}}} |<!-- If index is provided, get an element from a list -->{{#invoke:NpcData|get_list_elem|{{{1}}}|{{{2}}}|{{{index}}}}} |<!-- Otherwise, get a single stat -->{{#invoke:NpcData|get_npc_var|{{{1}}}|{{{2}}}|{{{3|}}}}} }}</includeonly><noinclude> {{Documentation}} </noinclude>" |
Add support for get_nester_var |
||
| Line 1: | Line 1: | ||
<includeonly>{{#if:{{{index|}}} | <includeonly>{{#if:{{{index|}}} | ||
|<!-- If index is provided, get an element from a list -->{{#invoke:NpcData|get_list_elem|{{{1}}}|{{{2}}}|{{{index}}}}} | |<!-- If index is provided, get an element from a list -->{{#invoke:NpcData|get_list_elem|{{{1}}}|{{{2}}}|{{{index}}}}} | ||
|<!-- Otherwise, | |<!-- Otherwise, check for dots (nested path) or fall back to single stat -->{{#if:{{#pos:{{{2}}}|.}} | ||
|{{#invoke:NpcData|get_nested_var|{{{1}}}|{{{2}}}|{{{3|}}}}} | |||
|{{#invoke:NpcData|get_npc_var|{{{1}}}|{{{2}}}|{{{3|}}}}} | |||
}} | |||
}}</includeonly><noinclude> | }}</includeonly><noinclude> | ||
{{Documentation}} | {{Documentation}} | ||
</noinclude> | </noinclude> | ||