From Dark and Darker Wiki
(testing) |
(initial auto infobox) |
||
Line 2: | Line 2: | ||
{{ #arraydefine: stats | {{Weapon_Data|{{{1}}}|stats|allstats}} }} | {{ #arraydefine: stats | {{Weapon_Data|{{{1}}}|stats|allstats}} }} | ||
{{Infobox | {{Infobox | ||
|name = {{{1}}} | |name = {{#ifeq:{{{2}}}|7|{{#if:{{Weapon_Data|{{{1}}}|unique}}|{{Weapon_Data|{{{1}}}|unique}}|{{{1}}}}}|{{{1}}}}} | ||
|image = {{{1}}} {{{2}}} | |image = {{{1}}} {{{2}}} | ||
|rarity = {{{2}}} | |rarity = {{{2}}} | ||
{{ | |stats ={{ | ||
#loop: i | #loop: i | ||
| 0 <!-- {{#ifexpr:{{#expr: {{{2}}} -2 }} >0|{{#expr: {{{2}}} -2 }}}} --> | | 0 <!-- {{#ifexpr:{{#expr: {{{2}}} -2 }} >0|{{#expr: {{{2}}} -2 }}}} --> | ||
| {{ #arraysize:stats }} <!-- number of loops --> | | {{ #arraysize:stats }} <!-- number of loops --> | ||
| <nowiki/> | | <nowiki/>{{#vardefine:stat|{{ #arrayindex:stats | {{ #var:i }} }}}}{{#ifeq:{{ #var:i }}|0||,}}{{ #var:stat }} {{Weapon_Data|{{{1}}}|stats|{{ #var:stat }} {{{2}}}}} | ||
}} | }} | ||
|classes = {{Weapon Data|{{{1}}}|classes}} | |classes = {{Weapon Data|{{{1}}}|classes}} |
Revision as of 06:54, 2 September 2023
Auto creates weapon row
Example
{{GenerateWeaponInfobox|<weapon name>|<rarity number>}}
{{GenerateWeaponInfobox|Arming Sword|1}}