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}}}}}
  {{#vardefine:stat|{{ #arrayindex:stats | {{ #var:i }} }}}}
|stat{{ #var:i }}               = {{ #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}}
Arming Sword
Arming Sword 1.png
-
Physical Weapon Damage 26
-
-
Move Speed
-
Required Class:
Slot Type:
Main-Hand
Hand Type:
One Handed
Hitbox:
x
A thin blade with leather bindings, supporting a firm grip for hasty attacks that feel light to the hand.



Arming Sword
Arming Sword 7.png
-
Physical Weapon Damage
-
-
Move Speed
-
-
Up to 5 extra enchantments
-
Required Class:
Slot Type:
Main-Hand
Hand Type:
One Handed
Hitbox:
x
A thin blade with leather bindings, supporting a firm grip for hasty attacks that feel light to the hand.