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!
Template:Expansion extractor
Usage[edit]
This template is a phantom template used in DPL calls.
It extracts the free state from a quest template that uses the following named parameters:
|free=
The result is a raw unformatted number usable in calculations.
It also stores the result in the variable {{#var: xpanQuests}} for further use by the calling template. This is only useful if the template is not used as a phantom in DPL, in which case the variable cannot be accessed.
In case the template can't extract a value (missing parameters or unknown format), nothing is produced.
Examples[edit]
{{#dpl: ... | include = {Quest¦Expansion extractor} ... }}
{{Expansion extractor | free = {{{free|}}} }}
* The below code does the following:
- It selects every level 1 and level 2 quest.
- It restricts the selection to the quests that actually use the template
{{Quest}}
- It passes all the parameters of template
{{Quest}}
to{{Expansion extractor}}
. - It declares that the output should follow the format strictly defined by the user (and not lists or tables)
- It defines the format of the output
- The output will start with "
{{Add|prefix=xpan
" - Before each result's output, the "
|xpan<name of the page>=
" will be added. - After each result's output nothing will be added
- At the end of the output, "
}}
" will be added.
- The output will start with "
- This would pass every favor number as a parameter to a template
{{Add}}
.
{{#dpl: | category = Level 1 quests¦Level 2 quests | uses = Template:Quest | include = {Quest¦Expansion extractor} | mode = userformat | listseparators = {{Add{{!}}prefix=xpan,{{!}}xpan%PAGE%=,,}} }}
{{Add|prefix=xpan |xpanThe Grotto=0 |xpanThe Storehouse's Secret=0 |xpanHeyton's Rest=0 |xpanThe Cannith Crystal=0 |xpanThe Collaborator=0 |xpanNecromancer's Doom=0 |xpanStopping the Sahuagin=0 |xpanSacrifices=0 |xpanRedemption (quest)=0 |xpanHall of the Mark=0 |xpanThe Bugbear Bandits=0 |xpanTreasure Hunt=0 |xpanCaged Beast=0 |xpanObstructing the Orcs=0 |xpanThe Hobgoblin Horde=0 |xpanViolent Delights=0 |xpanWatch Your Step=0 |xpanDurk's Got A Secret=0 |xpanWalk the Butcher's Path=0 |xpanThe Smuggler's Warehouse=0 |xpanProtect Baudry's Interests=0 |xpanInformation is Key=0 |xpanStop Hazadill's Shipment=0 |xpanRetrieve the Stolen Goods=0 |xpanGarrison's Missing Pack=0 |xpanStealthy Repossession=0 |xpanRecovering the Lost Tome=0 |xpanArachnophobia=0 |xpanThe Miller's Debt=0 |xpanHaverdasher=0 |xpanMisery's Peak=0 |xpanBringing the Light=0 |xpanTotal Chaos=0 |xpanThe Kobolds' New Ringleader=0}}
0
CODE[edit]
0