Year of the Dragon: Through May 28th, claim free Expansion Pack (excluding Vecna Unleashed) or a Greater Elixir of Discovery! Speak to Xatheral in the Hall of Heroes.edit
Game mechanics • Newbie guide • In development • DDO Store • Social Media
Challenges • Classes • Collectables • Crafting • Enhancements • Epic Destinies • Favor • Feats
Glossary • Items • Maps • Monsters • Places • Quests • Races • Reincarnation • Skills • Spells
Please create an account or log in to build a reputation and unlock more editing privileges, and then visit DDO wiki's IRC Chat/Discord if you need any help!
User:Faltout/SandBox/DPL category attribute sum
Usage[edit]
Sums numbers collected from pages in categories using DPL
{{ User:Faltout/SandBox/DPL category attribute sum | category = | notcategory = | template = | attribute = | num_template = | phantom = }}
- category is a list of categories to select pages from, separated with the character
¦
. - andcategory is an optional list of categories that the pages selected should also be part of. Separated with the character
¦
. - notcategory is an optional list of categories that the selected pages should not belong to, separated with the character
¦
. - template is the name of the template used in the selected pages with the template's namespace. For example, "
Template:Quest
" - attribute is the name of the attribute that should be selected from the template.
- num_template is the name of the template that can translate the output of
|template=
or|attribute=
or|phantom=
to a numerical value. - phantom is the name of a phantom template that will take the original parameters of the
|template=
and output a different result.
Notes: |category=
and |template=
are mandatory. However, for the sum to work, the final output should be a numerical value. Initially, we have the result of |template=
. If this is not what we want, we can either take an attribute passed to it, or designate a phantom template to create a different result. If this is still not what we want, we can provide a |num_template=
to translate the output of |attribute=
or |phantom=
to a numerical value.
Examples[edit]
Give |category=
|template=
and |attribute=
to sum the specific attribute/parameter of a template from all the pages in one category.
Example: {{User:Faltout/SandBox/DPL category attribute sum|category=The Twelve patron quests|template=Template:Quest|attribute=favor}}
219
You can also count attributes that are not numbers by providing a template in |num_template=
that will convert text to number.
Example: {{User:Faltout/SandBox/DPL category attribute sum |category=The Twelve patron quests |template=Template:Quest |attribute=free |num_template=IO}}
29
You can use a phantom template to produce numbers based on more complex calculations that involve more than one of the initial template parameters. The phantom template provided in the parameter |phantom=
should have a number as a result. The parameter |attribute=
does not have an effect if |phantom=
is given.
Example: {{User:Faltout/SandBox/DPL category attribute sum |category=The Coin Lords patron quests |template=Template:Quest |phantom=User:Faltout/SandBox/Max quest favor}}
702
Use |notcategory=
to prevent pages from being in a certain category.
Example: {{User:Faltout/SandBox/DPL category attribute sum |category=Short quests¦Long quests |notcategory= History¦Quests with no favor reward |template=Template:Quest |attribute=favor}}
Expression error: Unexpected < operator.
Use |andcategory=
to make pages belong to more categories.
Example: {{User:Faltout/SandBox/DPL category attribute sum |category=Level 14 quests |andcategory=Epic quests |template=Template:Quest |attribute=epic |num_template=IO}}
11
CODE[edit]
You haven't selected a category