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:Free 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: freeQuests}} 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¦Free extractor} ... }}
{{Free 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{{Free 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=free
" - Before each result's output, the "
|free<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¦Free extractor} | mode = userformat | listseparators = {{Add{{!}}prefix=free,{{!}}free%PAGE%=,,}} }}
{{Add|prefix=free |freeThe Grotto=1 |freeThe Storehouse's Secret=1 |freeHeyton's Rest=1 |freeThe Cannith Crystal=1 |freeThe Collaborator=1 |freeNecromancer's Doom=1 |freeStopping the Sahuagin=1 |freeSacrifices=1 |freeRedemption (quest)=1 |freeHall of the Mark=1 |freeThe Bugbear Bandits=0 |freeTreasure Hunt=0 |freeCaged Beast=0 |freeObstructing the Orcs=0 |freeThe Hobgoblin Horde=0 |freeViolent Delights=0 |freeWatch Your Step=0 |freeDurk's Got A Secret=1 |freeWalk the Butcher's Path=1 |freeThe Smuggler's Warehouse=1 |freeProtect Baudry's Interests=1 |freeInformation is Key=1 |freeStop Hazadill's Shipment=1 |freeRetrieve the Stolen Goods=1 |freeGarrison's Missing Pack=1 |freeStealthy Repossession=1 |freeRecovering the Lost Tome=1 |freeArachnophobia=1 |freeThe Miller's Debt=1 |freeHaverdasher=1 |freeMisery's Peak=1 |freeBringing the Light=1 |freeTotal Chaos=0 |freeThe Kobolds' New Ringleader=1}}
26
CODE[edit]
0