From Dark and Darker Wiki

m (Raw Salad moved page Template:ArmorTable to Template:GenerateArmorTable: Merging templates, changing name to be consistent with other templates of the same type.)
(Fixed loop issue. Fixed depreciated string for "Magical Resistance".)
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><table cellspacing="0" class="wikitable sortable jquery-tablesorter" style="width:95%;color:#eee; background:transparent; text-align:center; vertical-align:middle;">
<includeonly><!--
 
--><table cellspacing="0" class="wikitable sortable jquery-tablesorter" style="width:95%;color:#eee; background:transparent; text-align:center; vertical-align:middle;">
<tr style="font-weight:bold; color:#eee;">
<tr style="font-weight:bold; color:#eee;">
<th style="width:5%" class="headerSort" tabindex="0" role="columnheader button" title="Sort ascending">Name</th>
<th style="width:5%" class="headerSort" tabindex="0" role="columnheader button" title="Sort ascending">Name</th>
{{#if:{{{back|}}}<!--
{{#ifeq:{{lc:{{{2|}}}}}|back
-->||<th style="width:5%" class="headerSort" tabindex="0" role="columnheader button" title="Sort ascending">Class Requirements</th>
||<th style="width:5%" class="headerSort" tabindex="0" role="columnheader button" title="Sort ascending">Class Requirements</th>
<th style="width:5%" class="headerSort" tabindex="0" role="columnheader button" title="Sort ascending">Movement Speed</th>}}
<th style="width:5%" class="headerSort" tabindex="0" role="columnheader button" title="Sort ascending">Movement Speed</th>}}
<th style="width:10%" class="headerSort" tabindex="0" role="columnheader button" title="Sort ascending">Armor/Magic Rating</th>
<th style="width:10%" class="headerSort" tabindex="0" role="columnheader button" title="Sort ascending">Armor/magical Rating</th>
<th style="width:10%" class="headerSort" tabindex="0" role="columnheader button" title="Sort ascending">Attributes</th>
<th style="width:10%" class="headerSort" tabindex="0" role="columnheader button" title="Sort ascending">Attributes</th>
<th style="width:25%" class="headerSort" tabindex="0" role="columnheader button" title="Sort ascending">Other</th>
<th style="width:25%" class="headerSort" tabindex="0" role="columnheader button" title="Sort ascending">Other</th>
</tr>
</tr><!--
{{{1}}}
Parameter {{{1}}} has the domain: {Uncraftable,Cratable}
</table><!--
Parameter {{{2}}} has the domain: {Foot,Back,Chest,Head,Legs,Hands}
-->{{#arraydefine:armors|{{Armor Data|AllLists|SlotType|Armor|{{{1}}}|{{{2}}}}}}}<!--
-->{{#loop:i|0|{{ #arraysize:armors }}<!--
-->|{{#vardefine:current|{{#arrayindex:armors|{{#var:i}}}}}}<!--
-->{{#vardefine:AllStats|{{Armor Data|{{#var:current}}|Stats|AllStats}} }}<!--
-->{{#vardefine:use_horizontal_format|}}<!--
--><tr><!--
 
Iconbox
--><td>{{Iconbox|<!--
-->{{#var:current}}<!--
-->|image={{#var:current}}.png<!--
-->|size={{IconboxInventorySize|Armor Data|{{#var:current}}}}<!--
-->|rarity=<!--
-->{{#if:{{#pos:{{#vardefineecho:rarities|{{Armor Data|{{#var:current}}|rarities}}}}|,}}<!--
-->|2<!--
-->|{{#var:rarities}}}}<!--
-->|amount=<!--
--><span style="color:#EEEA; font-size:16px">{{Armor Data|{{#var:current}}|Types|All}}</span><!--
-->|caption=<span class="colorrarity{{#var:rarities}}">{{#var:current}}</span>}}</td><!--
 
Classes
-->{{#if:{{#pos:{{Armor Data|{{#var:current}}|slottype}}|Back}}<!--
-->||<td>{{#replace:{{Armor Data|{{#var:current}}|classes}}|,|<br>}}</td>}}<!--
 
Movement Speed
-->{{#if:{{#pos:{{Armor Data|{{#var:current}}|slottype}}|Back}}<!--
-->||<td>{{#if:{{#vardefineecho:armor_stat|{{Armor Data|{{#var:current}}|stats|move speed}} }}<!--
-->|{{#var:armor_stat}}<!--
-->|{{#if:{{#vardefineecho:armor_stat|{{Armor Data|{{#var:current}}|stats|move speed 1}} }}<!--
-->|<span class="colorrarity1">{{#var:armor_stat}}</span><br><!--
-->{{#if:{{#vardefineecho:armor_stat|{{Armor Data|{{#var:current}}|stats|move speed 2}} }}<!--
-->|<span class="colorrarity2">{{#var:armor_stat}}</span><br>}}<!--
-->{{#if:{{#vardefineecho:armor_stat|{{Armor Data|{{#var:current}}|stats|move speed 3}} }}<!--
-->|<span class="colorrarity3">{{#var:armor_stat}}</span><br>}}<!--
-->{{#if:{{#vardefineecho:armor_stat|{{Armor Data|{{#var:current}}|stats|move speed 4}} }}<!--
-->|<span class="colorrarity4">{{#var:armor_stat}}</span><br>}}<!--
-->{{#if:{{#vardefineecho:armor_stat|{{Armor Data|{{#var:current}}|stats|move speed 5}} }}<!--
-->|<span class="colorrarity5">{{#var:armor_stat}}</span><br>}}<!--
-->{{#if:{{#vardefineecho:armor_stat|{{Armor Data|{{#var:current}}|stats|move speed 6}} }}<!--
-->|<span class="colorrarity6">{{#var:armor_stat}}</span><br>}}<!--
-->{{#if:{{#vardefineecho:armor_stat|{{Armor Data|{{#var:current}}|stats|move speed 7}} }}<!--
-->|<span class="colorrarity7">{{#var:armor_stat}}</span>}} }} }}</td>}}<!--
 
Magic/Armor Rating
--><td>{{#if:{{#pos:{{#var:AllStats}}|Magical Resistance}}<!--
-->|<div style="display:inline-block; vertical-align:top; margin-right:15px; margin-left:15px;"><!--
--><span style="color:#eee8;">Magical Resistance<br></span><!--
-->{{#if:{{#vardefineecho:armor_stat|{{Armor Data|{{#var:current}}|stats|magical resistance}} }}<!--
-->|{{#var:armor_stat}}<!--
-->|{{#vardefine:use_horizontal_format|{{#if:{{Armor Data|{{#var:current}}|stats|armor rating 5}}|1}} }}<!--
-->{{#if:{{#vardefineecho:armor_stat|{{Armor Data|{{#var:current}}|stats|magical resistance 1}} }}<!--
-->|<span class="colorrarity1">{{#var:armor_stat}}</span><br>}}<!--
-->{{#if:{{#vardefineecho:armor_stat|{{Armor Data|{{#var:current}}|stats|magical resistance 2}} }}<!--
-->|<span class="colorrarity2">{{#var:armor_stat}}</span><br>}}<!--
-->{{#if:{{#vardefineecho:armor_stat|{{Armor Data|{{#var:current}}|stats|magical resistance 3}} }}<!--
-->|<span class="colorrarity3">{{#var:armor_stat}}</span><br>}}<!--
-->{{#if:{{#vardefineecho:armor_stat|{{Armor Data|{{#var:current}}|stats|magical resistance 4}} }}<!--
-->|<span class="colorrarity4">{{#var:armor_stat}}</span><br>}}<!--
-->{{#if:{{#vardefineecho:armor_stat|{{Armor Data|{{#var:current}}|stats|magical resistance 5}} }}<!--
-->|<span class="colorrarity5">{{#var:armor_stat}}</span><br>}}<!--
-->{{#if:{{#vardefineecho:armor_stat|{{Armor Data|{{#var:current}}|stats|magical resistance 6}} }}<!--
-->|<span class="colorrarity6">{{#var:armor_stat}}</span><br>}}<!--
-->{{#if:{{#vardefineecho:armor_stat|{{Armor Data|{{#var:current}}|stats|magical resistance 7}} }}<!--
-->|<span class="colorrarity7">{{#var:armor_stat}}</span>}} }}</div>}}<!--
-->{{#if:{{#pos:{{#var:AllStats}}|Armor Rating}}<!--
-->|<div style="display:inline-block; vertical-align:top; margin-right:15px; margin-left:15px;"><!--
--><span style="color:#eee8;">Armor Rating<br></span><!--
-->{{#if:{{#vardefineecho:armor_stat|{{Armor Data|{{#var:current}}|stats|armor rating}} }}<!--
-->|{{#var:armor_stat}}<!--
-->|{{#if:{{#vardefineecho:armor_stat|{{Armor Data|{{#var:current}}|stats|armor rating 1}} }}<!--
-->|<span class="colorrarity1">{{#var:armor_stat}}</span><br>}}<!--
-->{{#if:{{#vardefineecho:armor_stat|{{Armor Data|{{#var:current}}|stats|armor rating 2}} }}<!--
-->|<span class="colorrarity2">{{#var:armor_stat}}</span><br>}}<!--
-->{{#if:{{#vardefineecho:armor_stat|{{Armor Data|{{#var:current}}|stats|armor rating 3}} }}<!--
-->|<span class="colorrarity3">{{#var:armor_stat}}</span><br>}}<!--
-->{{#if:{{#vardefineecho:armor_stat|{{Armor Data|{{#var:current}}|stats|armor rating 4}} }}<!--
-->|<span class="colorrarity4">{{#var:armor_stat}}</span><br>}}<!--
-->{{#if:{{#vardefineecho:armor_stat|{{Armor Data|{{#var:current}}|stats|armor rating 5}} }}<!--
-->|<span class="colorrarity5">{{#var:armor_stat}}</span><br>}}<!--
-->{{#if:{{#vardefineecho:armor_stat|{{Armor Data|{{#var:current}}|stats|armor rating 6}} }}<!--
-->|<span class="colorrarity6">{{#var:armor_stat}}</span><br>}}<!--
-->{{#if:{{#vardefineecho:armor_stat|{{Armor Data|{{#var:current}}|stats|armor rating 7}} }}<!--
-->|<span class="colorrarity7">{{#var:armor_stat}}</span>}} }}</div>}}</td><!--
 
Sieve Stats into Attributes and Others
-->{{#arraydefine:Stats|{{#var:AllStats}} }}<!--
-->{{#arraydefine:ResistancesAndMoveSpeed|Armor Rating,Magical Resistance,Move Speed}}<!--
-->{{#arraydefine:AllAttributes|Strength,Vigor,Agility,Dexterity,Will,Knowledge,Resourcefulness}}<!--
 
-->{{#arrayintersect:Attributes|Stats|AllAttributes}}<!--
-->{{#arraydiff:Others|Stats|AllAttributes|ResistancesAndMoveSpeed}}<!--
 
Attribute Stats
--><td><!--
-->{{#loop:i|0|{{#arraysize:Attributes}}<!--
-->|{{#vardefine:attribute|{{#arrayindex:Attributes|{{#var:i}} }} }}<!--
--><div style="display:inline-block; vertical-align:top; margin-right:15px; margin-left:15px;"><!--
-->{{#if:{{#vardefineecho:armor_stat|{{Armor Data|{{#var:current}}|stats|{{#var:attribute}} }} }}<!--
-->|<span style="color:#eee8;">{{#var:attribute}}</span><br><!--
-->{{#var:armor_stat}}<br><!--
-->|<span style="color:#eee8;">{{#var:attribute}}</span><br><!--
-->{{#if:{{#vardefineecho:armor_stat|{{Armor Data|{{#var:current}}|stats|{{#var:attribute}} 1}} }}<!--
-->|<span class="colorrarity1">{{#var:armor_stat}}</span><br>}}<!--
-->{{#if:{{#vardefineecho:armor_stat|{{Armor Data|{{#var:current}}|stats|{{#var:attribute}} 2}} }}<!--
-->|<span class="colorrarity2">{{#var:armor_stat}}</span><br>}}<!--
-->{{#if:{{#vardefineecho:armor_stat|{{Armor Data|{{#var:current}}|stats|{{#var:attribute}} 3}} }}<!--
-->|<span class="colorrarity3">{{#var:armor_stat}}</span><br>}}<!--
-->{{#if:{{#vardefineecho:armor_stat|{{Armor Data|{{#var:current}}|stats|{{#var:attribute}} 4}} }}<!--
-->|<span class="colorrarity4">{{#var:armor_stat}}</span><br>}}<!--
-->{{#if:{{#vardefineecho:armor_stat|{{Armor Data|{{#var:current}}|stats|{{#var:attribute}} 5}} }}<!--
-->|<span class="colorrarity5">{{#var:armor_stat}}</span><br>}}<!--
-->{{#if:{{#vardefineecho:armor_stat|{{Armor Data|{{#var:current}}|stats|{{#var:attribute}} 6}} }}<!--
-->|<span class="colorrarity6">{{#var:armor_stat}}</span><br>}}<!--
-->{{#if:{{#vardefineecho:armor_stat|{{Armor Data|{{#var:current}}|stats|{{#var:attribute}} 7}} }}<!--
-->|<span class="colorrarity7">{{#var:armor_stat}}</span><br>}} }}</div>}}</td><!--
 
Other Stats
--><td><!--
-->{{#loop:i|0|{{#arraysize:Others}}<!--
-->|{{#vardefine:stat|{{#arrayindex:Others|{{#var:i}} }} }}<!--
--><div style="display:inline-block; vertical-align:top; margin-right:15px; margin-left:15px;"><!--
-->{{#if:{{#vardefineecho:armor_stat|{{Armor Data|{{#var:current}}|stats|{{#var:stat}} }} }}<!--
-->|<span style="color:#eee8;">{{#var:stat}}</span><br><!--
-->{{#var:armor_stat}}<br><!--
-->|<span style="color:#eee8;">{{#var:stat}}</span><br><!--
-->{{#if:{{#vardefineecho:armor_stat|{{Armor Data|{{#var:current}}|stats|{{#var:stat}} 1}} }}<!--
-->|<span class="colorrarity1">{{#var:armor_stat}}</span><br>}}<!--
-->{{#if:{{#vardefineecho:armor_stat|{{Armor Data|{{#var:current}}|stats|{{#var:stat}} 2}} }}<!--
-->|<span class="colorrarity2">{{#var:armor_stat}}</span><br>}}<!--
-->{{#if:{{#vardefineecho:armor_stat|{{Armor Data|{{#var:current}}|stats|{{#var:stat}} 3}} }}<!--
-->|<span class="colorrarity3">{{#var:armor_stat}}</span><br>}}<!--
-->{{#if:{{#vardefineecho:armor_stat|{{Armor Data|{{#var:current}}|stats|{{#var:stat}} 4}} }}<!--
-->|<span class="colorrarity4">{{#var:armor_stat}}</span><br>}}<!--
-->{{#if:{{#vardefineecho:armor_stat|{{Armor Data|{{#var:current}}|stats|{{#var:stat}} 5}} }}<!--
-->|<span class="colorrarity5">{{#var:armor_stat}}</span><br>}}<!--
-->{{#if:{{#vardefineecho:armor_stat|{{Armor Data|{{#var:current}}|stats|{{#var:stat}} 6}} }}<!--
-->|<span class="colorrarity6">{{#var:armor_stat}}</span><br>}}<!--
-->{{#if:{{#vardefineecho:armor_stat|{{Armor Data|{{#var:current}}|stats|{{#var:stat}} 7}} }}<!--
-->|<span class="colorrarity7">{{#var:armor_stat}}</span><br>}} }}</div>}}</td></tr>}}</table><!--


--></includeonly><noinclude>
--></includeonly><noinclude>
{{ArmorTable}}
*1={Uncraftable,Craftable,Both}
*2={Foot,Back,Chest,Head,Legs,Hands}
== Example ==
<table class="wikitable">
<tr>
<th>Code</th>
<th>Preview</th></tr>
<tr>
<td style="padding: 20px 30px;">
<pre>{{GenerateArmorTable|Uncraftable|Head}}</pre></td>
<td style="padding: 20px 30px;">
{{GenerateArmorTable|Uncraftable|Head}}</td></tr></table>
</noinclude>
</noinclude>

Latest revision as of 03:29, 22 July 2024

  • 1={Uncraftable,Craftable,Both}
  • 2={Foot,Back,Chest,Head,Legs,Hands}

Example

Code Preview
{{GenerateArmorTable|Uncraftable|Head}}
Name Class Requirements Movement Speed Armor/magical Rating Attributes Other
ArmetPlate
Armet
Fighter-7
Armor Rating
31
32~33
34~36
37~38
39~40
41
43~44
Strength
1
2
3
4
5
6
7
Projectile Damage Reduction
2.1%
Headshot Damage Reduction
18%
Fighter
Barbarian
-6
Magical Resistance
30
Armor Rating
19
20~21
22~23
24~25
26~27
28
30~31
Dexterity
1
2
3
4
5
6
7
Projectile Damage Reduction
1.2%
Headshot Damage Reduction
15%
Fighter
Cleric
-4
Magical Resistance
10
Armor Rating
21
22~23
24~26
27~28
29~30
31
33~34
Agility
1
2
3
4
5
6
7
Projectile Damage Reduction
0.6%
Headshot Damage Reduction
13%
Cleric-2
Magical Resistance
20
Armor Rating
10
11
12~13
14
15
16
18~19
Will
1
2
3
4
5
6
7
Headshot Damage Reduction
8%
Fighter
Cleric
-7
Armor Rating
28
30~31
32~34
35~36
37
37~38
40~41
Strength
1
1
2
2
3
3
4
Vigor
1
2
2
3
3
4
4
Projectile Damage Reduction
1.8%
Headshot Damage Reduction
18%
Druid-2
Armor Rating
12
13
14~15
16
17
18
20~21
Strength
1
2
2
3
3
4
4
Will
1
1
2
2
3
3
4
Headshot Damage Reduction
8%
Druid-3
Armor Rating
18
19
20~21
22
23
24
26~27
Dexterity
1
1
2
2
3
3
4
Vigor
1
2
2
3
3
4
4
Headshot Damage Reduction
11%
Bard-2
Armor Rating
15
16~17
18
19
20
21
23~24
Knowledge
1
2
3
4
5
6
7
Headshot Damage Reduction
9%
Ranger
Druid
-4
Magical Resistance
15
Armor Rating
13
14
15~16
17
18
19
21~22
Strength
1
2
3
4
5
6
7
Headshot Damage Reduction
8%
Barbarian-6
Magical Resistance
15
Armor Rating
22
23~25
26~28
29~30
31~32
33
35~36
Vigor
1
2
3
4
5
6
7
Projectile Damage Reduction
1.2%
Headshot Damage Reduction
15%
Fighter
Cleric
-8
Armor Rating
34
36~37
38~40
41~42
43
44
46~47
Knowledge
1
2
3
4
5
6
7
Projectile Damage Reduction
2.1%
Headshot Damage Reduction
23%
Fighter
Cleric
-8
Magical Resistance
-10
Armor Rating
35
36~37
38~40
41~42
43~44
45
47~48
Vigor
1
2
3
4
5
6
7
Projectile Damage Reduction
2.1%
Headshot Damage Reduction
23%
Fighter
Cleric
-5
Magical Resistance
10
Armor Rating
22
23~25
26~28
29~30
31~32
33
35~36
Knowledge
1
2
3
4
5
6
7
Projectile Damage Reduction
0.6%
Headshot Damage Reduction
13%
Bard-2
Armor Rating
17
18
19~20
20~21
22
23
25~26
Resourcefulness
1
2
3
4
5
6
7
Headshot Damage Reduction
10%
-3
Armor Rating
18
19~20
21
22
23
24
26~27
Vigor
1
2
3
4
5
6
7
Headshot Damage Reduction
11%
Barbarian-6
Armor Rating
20
22~23
24~26
27~28
29
30
32~33
Strength
1
1
2
2
3
3
4
Vigor
1
2
2
3
3
4
4
Projectile Damage Reduction
0.9%
Headshot Damage Reduction
13%
Warlock-2
Armor Rating
12
13~14
15~17
18~19
20
21
23~24
Headshot Damage Reduction
8%
Outgoing Magical Healing Add
1
2
3
4
5
6
7
Fighter
Ranger
Cleric
Bard
-4
Armor Rating
21
23~24
25~27
28~29
30
31
33~34
Will
1
1
2
2
2
3
3
Knowledge
1
1
1
2
2
2
3
Resourcefulness
1
2
2
2
3
3
3
Projectile Damage Reduction
0.9%
Headshot Damage Reduction
14%
Ranger-2
Armor Rating
13
14
15~16
17
18
19
21~22
Agility
1
2
3
4
5
6
7
Headshot Damage Reduction
8%
Rogue-2
Armor Rating
13
14
15~16
17
18
19
21~22
Agility
1
2
3
4
5
6
7
Headshot Damage Reduction
8%
SalletPlate
Sallet
Fighter
Cleric
-4
Armor Rating
20
22~23
24~26
27~28
29
30
32~33
Strength
1
1
2
2
3
3
4
Vigor
1
2
2
3
3
4
4
Projectile Damage Reduction
0.9%
Headshot Damage Reduction
13%
Rogue
Warlock
-3
Magical Resistance
15
Armor Rating
12
13
14~15
16
17
18
20~21
Strength
1
2
3
4
5
6
7
Headshot Damage Reduction
8%
Rogue
Warlock
Armor Rating
2
3
4~5
6
7
8
10~11
Agility
1
2
2
2
3
3
3
Dexterity
1
1
2
2
2
3
3
Strength
1
1
1
2
2
2
3
Fighter
Ranger
Cleric
-5
Armor Rating
23
24~25
26~28
29~30
31
32
34~35
Agility
1
1
2
2
3
3
4
Dexterity
1
2
2
3
3
4
4
Projectile Damage Reduction
1.2%
Headshot Damage Reduction
16%
Bard
Druid
-2
Armor Rating
14
15
16~17
18
19
20
22~23
Strength
1
2
3
4
5
6
7
Headshot Damage Reduction
8%
Fighter
Cleric
-10
Armor Rating
33
34~35
36~39
40~41
42
43
45~46
Will
1
1
2
2
3
3
4
Vigor
1
2
2
3
3
4
4
Projectile Damage Reduction
2.1%
Headshot Damage Reduction
24%
Barbarian-6
Armor Rating
21
22~24
25~27
28~29
30
31
33~34
Agility
1
2
3
4
5
6
7
Projectile Damage Reduction
2%
Headshot Damage Reduction
15%
Fighter-6
Armor Rating
23
24~26
27~29
30~31
32
33
35~36
Will
1
2
3
4
5
6
7
Projectile Damage Reduction
1.8%
Headshot Damage Reduction
16%
Action Speed
1%
1.2%
1.4%
1.6%
1.8%
2%
2.2%
Barbarian-8
Armor Rating
29
31~32
33~35
36~37
38
39
41~42
Agility
1
1
2
2
3
3
4
Dexterity
1
2
2
3
3
4
4
Projectile Damage Reduction
2.1%
Headshot Damage Reduction
18%
Wizard
Warlock
-2
Armor Rating
11
12
13~15
16
17
18
20~21
Headshot Damage Reduction
5%
Magical Power
1
2
3
4
5
6
7