From Dark and Darker Wiki

m (Added Handtype filter variable.)
m (Added example. Added comments.)
Line 4: Line 4:
   |0
   |0
   |{{#arraysize:all_gear}}
   |{{#arraysize:all_gear}}
   |{{#vardefine:current_gear|{{#arrayindex:all_gear|{{#var:i}}}}}}<!--
   |{{#vardefine:current_gear|{{#arrayindex:all_gear|{{#var:i}} }} }}<!--
Filter gear for the class we are interested in
Filter gear for the class we are interested in
-->{{#if:  {{#pos:{{{{{2}}}|{{#var:current_gear}}|classes}}|{{{class}}}}}<!-- Gear is for the class we are interested in
-->{{#if:  {{#pos:{{ {{{2}}}|{{#var:current_gear}}|classes}}|{{{class}}}}}<!-- Gear is for the class we are interested in
-->{{#if:{{{{{2}}}|{{#var:current_gear}}|classes}}||no_classes}}<!-- OR Gear is for all classes
-->{{#if:{{ {{{2}}}|{{#var:current_gear}}|classes}}||no_classes}}<!-- OR Gear is for all classes
-->{{#if:{{{class|}}}||continue}}<!-- OR we are not filtering by class
-->{{#if:{{{class|}}}||continue}}<!-- OR we are not filtering by class
Filter gear for the handtype we are interested in
Filter gear for the handtype we are interested in
-->|{{#if: {{#pos:{{{{{2}}}|{{#var:current_gear}}|handtype}}|{{{handtype}}}}}<!-- Gear is for the class we are interested in
-->|{{#if: {{#pos:{{ {{{2}}}|{{#var:current_gear}}|handtype}}|{{{handtype}}}}}<!-- Gear is for the handtype we are interested in
-->{{#if:{{{handtype|}}}||continue}}<!-- OR we are not filtering by class
-->{{#if:{{{handtype|}}}||continue}}<!-- OR we are not filtering by handtype
Filter gear for non-artifacts
Filter gear for non-artifacts
-->|{{#if:{{{{{2}}}|{{#var:current_gear}}|artifactpower}}<!-- Gear is an Artifact
-->|{{#if:{{ {{{2}}}|{{#var:current_gear}}|artifactpower}}<!-- Gear is an Artifact
-->|{{#if:{{{not_artifact|}}}<!-- AND we are filtering out Artifacts
-->|{{#if:{{{not_artifact|}}}<!-- AND we are filtering out Artifacts
Then display nothing
Else if Gear is not an Artifact AND we are filtering out Artifacts, display it
-->||{{#if:{{#var:first_element}}|{{#vardefine:first_element|}}|,}}<!--
-->||{{#if:{{#var:first_element}}|{{#vardefine:first_element|}}|,}}<!--
-->{{#var:current_gear}}}}<!--
-->{{#var:current_gear}} }}<!--
-->|{{#if:{{#var:first_element}}|{{#vardefine:first_element|}}|,}}<!--
-->|{{#if:{{#var:first_element}}|{{#vardefine:first_element|}}|,}}<!--
-->{{#var:current_gear}}}}}}}}
-->{{#var:current_gear}} }} }} }}
  }}</includeonly><noinclude>
  }}</includeonly><noinclude>
List gear for specific class, variables:
List gear for specific class, variables:
*1=List
*1=List
*2=Weapon Data/Armor Data
*2=Weapon Data/Armor Data
*handtype=Two Handed/One Handed
*class=Fighter/Barbarian/Rogue/Ranger/Wizard/Cleric/Bard/Warlock
*class=Fighter/Barbarian/Rogue/Ranger/Wizard/Cleric/Bard/Warlock
*handtype=Two Handed/One Handed
*artifact=1 to exclude artifacts
*artifact=1 to exclude artifacts


Line 39: Line 41:
|Weapon Data
|Weapon Data
|class =Bard
|class =Bard
|handtype=Two Handed
|not_artifact =1
|not_artifact =1
}}</pre></td>
}}</pre></td>
Line 47: Line 50:
|class =Bard
|class =Bard
|handtype=Two Handed
|handtype=Two Handed
|not_artifact =1
}}
</td>
</tr><tr>
<td style="padding: 20px 30px;">
<pre>
{{FilterListForClass
|{{Weapon Data|All}}
|Weapon Data
|class =Bard
|handtype=One Handed
|not_artifact =1
}}</pre></td>
<td style="padding: 20px 30px;">
{{FilterListForClass
|{{Weapon Data|All}}
|Weapon Data
|class =Bard
|handtype=One Handed
|not_artifact =1
|not_artifact =1
}}
}}

Revision as of 02:44, 23 March 2024

List gear for specific class, variables:

  • 1=List
  • 2=Weapon Data/Armor Data
  • handtype=Two Handed/One Handed
  • class=Fighter/Barbarian/Rogue/Ranger/Wizard/Cleric/Bard/Warlock
  • artifact=1 to exclude artifacts

Example

Code Preview
{{FilterListForClass
|{{Weapon Data|All}}
|Weapon Data
|class =Bard
|handtype=Two Handed
|not_artifact =1
}}

Bare Hand Two Handed,Crossbow,Francisca Axe,Lute,Survival Bow,Throwing Knife,Torch

{{FilterListForClass
|{{Weapon Data|All}}
|Weapon Data
|class =Bard
|handtype=One Handed
|not_artifact =1
}}

Arming Sword,Bare Hand One Handed,Buckler,Castillon Dagger,Dagger of Righteousness,Demon's Glee,Divine Dagger,Divine Short Sword,Falchion of Honor,Falchion,Frostlight Lantern Shield,Hand Crossbow,Icefang,Lantern Shield,Rapier,Rondel Dagger,Short Sword of Righteousness,Short Sword,Sterling Dagger,Sterling Short Sword