From Dark and Darker Wiki

(Added example transclusion for testing purposes.)
(Added documentation on template usage.)
Line 17,974: Line 17,974:
}}</includeonly><noinclude>
}}</includeonly><noinclude>


{{:Props}}
==Usage==
<pre>{{Prop_Data|<variable1>|<variable2>|...}}</pre>
 
==Variables==
*<code>AllList</code>
**<code><type></code>
**<code><grade></code>
***<code><type></code>
*<code><prop_name></code>
**<code>{N, HR, Global}</code>
***<code>localizedstring</code>
***<code>gradetype</code>
***<code>idtag</code>
***<code>drops</code>
***<code>abilities</code>
****<code><abilities></code>
***<code>interactions</code>
****<code><interactions></code>
***<code>interactioncount</code>
***<code>impactendurance</code>
***<code>impactresistance</code>
***<code>breaksifcrushPerk</code>
***<code>breaksifdemolitiondamage</code>
***<code>breaksifcollected</code>
***<code>ap</code>
***<code>xp</code>
 
Note that angled brackets are not literal. They indicate a variable string. <code><type></code> can indicate <code>item</code> or <code>environmental trap</code> or <code>regular door</code> etc.  Such notation is used when there are too many strings encapsulated by the variable, and listing them all is less clarifying than a descriptive variable.
 
Likewise, curly brackets are not literal. They are used in the sense of set notation. That is, <code>{N, HR, Global}</code> means the variable can be any of these three.
 
==All==
Many sub-layers can call <code>|all</code> for a list of all cases for a given level
 
For example,
 
<pre style="width:fit-content;">{{Prop_Data|<prop_name>|all}}</pre>
 
will output a list of all types that exist for the prop <code><prop_name></code>.
 
For example,
 
<pre style="width:fit-content;">{{Prop_Data|<prop_name>|Interactions|All}}</pre>
 
will output a list of all interactions of the prop <code><prop_name></code>.
 
==AllList Examples==
===List of Item Type Props===
<pre style="width:fit-content;">{{Prop_Data|AllList|Item}}</pre>
Outputs <code>{{Prop_Data|AllList|Item}}</code>
 
===List of Coffin Type Props of Crypts Grade===
<pre style="width:fit-content;">{{Prop_Data|AllList|Crypts|Coffin}}</pre>
Outputs <code>{{Prop_Data|AllList|Crypts|Coffin}}</code>
 
*Note: Such lists indicate existence of a prop for a given grade.  If a prop doesn't exist for that grade and type, it will never be listed.  These lists were created with this use in mind.
**To use these lists to index existing props, loop through the list and append <code>-<grade></code> to the ends of the list-indexed prop name.
 
==Prop Examples==
===Altar of Sacrifice: AP===
<pre style="width:fit-content;">{{Prop_Data|Altar of Sacrifice|Global|AP}}</pre>
Outputs <code>{{Prop_Data|Altar of Sacrifice|Global|AP}}</code>
 
===Altar of Sacrifice: List of Interactions===
<pre style="width:fit-content;">{{Prop_Data|Altar of Sacrifice|Global|Interactions|All}}</pre>
Outputs <code>{{Prop_Data|Altar of Sacrifice|Global|Interactions|All}}</code>
 
===Axe Trap: List of Abilities===
<pre style="width:fit-content;">{{Prop_Data|Axe Trap|Global|Abilities|All}}</pre>
Outputs <code>{{Prop_Data|Axe Trap|Global|Abilities|All}}</code>
 
===Copper Ore Prop-Global: List of Types===
<pre style="width:fit-content;">{{Prop_Data|Copper Ore Prop-Global|All}}</pre>
Outputs <code>{{Prop_Data|Copper Ore Prop-Global|All}}</code>
 
===Golden Chest-Crypts#Locked: List of HR Loot Tables===
<pre style="width:fit-content;">{{Prop_Data|Golden Chest-Crypts#Locked|HR|Drops|All}}</pre>
Outputs <code>{{Prop_Data|Golden Chest-Crypts#Locked|HR|Drops|All}}</code>
 
===Golden Chest-Crypts#Locked: Number of Rolls of a Specific Loot Table===
<pre style="width:fit-content;">{{Prop_Data|Golden Chest-Crypts#Locked|HR|Drops|spawn_treasure_goldchesttreasure_hr2}}</pre>
Outputs <code>{{Prop_Data|Golden Chest-Crypts#Locked|HR|Drops|spawn_treasure_goldchesttreasure_hr2}}</code>


</noinclude>
</noinclude>

Revision as of 02:51, 5 October 2024


Usage

{{Prop_Data|<variable1>|<variable2>|...}}

Variables

  • AllList
    • <type>
    • <grade>
      • <type>
  • <prop_name>
    • {N, HR, Global}
      • localizedstring
      • gradetype
      • idtag
      • drops
      • abilities
        • <abilities>
      • interactions
        • <interactions>
      • interactioncount
      • impactendurance
      • impactresistance
      • breaksifcrushPerk
      • breaksifdemolitiondamage
      • breaksifcollected
      • ap
      • xp

Note that angled brackets are not literal. They indicate a variable string. <type> can indicate item or environmental trap or regular door etc. Such notation is used when there are too many strings encapsulated by the variable, and listing them all is less clarifying than a descriptive variable.

Likewise, curly brackets are not literal. They are used in the sense of set notation. That is, {N, HR, Global} means the variable can be any of these three.

All

Many sub-layers can call |all for a list of all cases for a given level

For example,

{{Prop_Data|<prop_name>|all}}

will output a list of all types that exist for the prop <prop_name>.

For example,

{{Prop_Data|<prop_name>|Interactions|All}}

will output a list of all interactions of the prop <prop_name>.

AllList Examples

List of Item Type Props

{{Prop_Data|AllList|Item}}

Outputs Campfire,Hunting Trap,Pavise

List of Coffin Type Props of Crypts Grade

{{Prop_Data|AllList|Crypts|Coffin}}

Outputs Casket,Coffin 1,Coffin 2,Old Coffin,Stone Tomb,Wood Coffin

  • Note: Such lists indicate existence of a prop for a given grade. If a prop doesn't exist for that grade and type, it will never be listed. These lists were created with this use in mind.
    • To use these lists to index existing props, loop through the list and append -<grade> to the ends of the list-indexed prop name.

Prop Examples

Altar of Sacrifice: AP

{{Prop_Data|Altar of Sacrifice|Global|AP}}

Outputs 20

Altar of Sacrifice: List of Interactions

{{Prop_Data|Altar of Sacrifice|Global|Interactions|All}}

Outputs Use Shrine

Axe Trap: List of Abilities

{{Prop_Data|Axe Trap|Global|Abilities|All}}

Outputs Activate,Deactivate,Removed

Copper Ore Prop-Global: List of Types

{{Prop_Data|Copper Ore Prop-Global|All}}

Outputs HR,N

Golden Chest-Crypts#Locked: List of HR Loot Tables

{{Prop_Data|Golden Chest-Crypts#Locked|HR|Drops|All}}

Outputs Goldchest_HR2,Spawn_Eventcurrency_N,Spawn_Treasure_Goldchesttreasure_HR2,Utility_Goldchestutility_HR2,Spawn_Chestcoin_Goldchestgold_HR2

Golden Chest-Crypts#Locked: Number of Rolls of a Specific Loot Table

{{Prop_Data|Golden Chest-Crypts#Locked|HR|Drops|spawn_treasure_goldchesttreasure_hr2}}

Outputs 2