From Dark and Darker Wiki

m (Added Handtype filter variable.)
m (Minor formatting change for the sake of consistency)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{#arraydefine:all_gear|{{{1}}}}}<!--
<includeonly>{{#arraydefine:all_gear|{{{1}}}}}{{#arraydefine:filter|Lute,Torch}}{{#arraydiff:all_gear|all_gear|filter}}<!--
-->{{#vardefine:first_element|1}}{{
-->{{#vardefine:first_element|1}}<!--
#loop: i
-->{{#loop:i|0|{{#arraysize:all_gear}}<!--
  |0
-->|{{#vardefine:current_gear|{{#arrayindex:all_gear|{{#var:i}} }} }}<!--
  |{{#arraysize:all_gear}}
  |{{#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 31: Line 31:
<tr>
<tr>
<th>Code</th>
<th>Code</th>
<th>Preview</th>
<th>Preview</th></tr>
</tr><tr>
<tr>
<td style="padding: 20px 30px;">
<td style="padding: 20px 30px;"><pre>{{FilterListForClass|{{Weapon Data|All}}|Weapon Data|class=Bard|handtype=Two Handed|not_artifact=1}}</pre></td>
<pre>
<td style="padding: 20px 30px;">{{FilterListForClass|{{Weapon Data|All}}|Weapon Data|class=Bard|handtype=Two Handed|not_artifact =1}}</td></tr>
{{FilterListForClass
<tr>
|{{Weapon Data|All}}
<td style="padding: 20px 30px;"><pre>{{FilterListForClass|{{Weapon Data|All}}|Weapon Data|class=Bard|handtype=One Handed|not_artifact=1}}</pre></td>
|Weapon Data
<td style="padding: 20px 30px;">{{FilterListForClass|{{Weapon Data|All}}|Weapon Data|class=Bard|handtype=One Handed|not_artifact=1}}</td></tr></table>
|class =Bard
|not_artifact =1
}}</pre></td>
<td style="padding: 20px 30px;">
{{FilterListForClass
|{{Weapon Data|All}}
|Weapon Data
|class =Bard
|handtype=Two Handed
|not_artifact =1
}}
</td>
</tr>
</table>
</noinclude>
</noinclude>

Latest revision as of 04:43, 17 July 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,Survival Bow,Throwing Knife
{{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