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:Max quest favor
Usage[edit]
This template is a phantom template used in DPL calls. It's specially designed to work with {{DPL category sum}}
, so it can't be used to get the max favor of quests by placing it directly as a phantom template of the quest template.
{{Max quest favor |favor= |solo only= |shares favor= |no output= }}
It calculates the max favor of a quest using the following parameters:
|favor=
|solo only=
|shares favor=
If |shares favor=
is empty or not defined, then the result of the template will be a number with the max favor (usually {{{favor}}}
* 3, unless a solo quest).
If |shares favor=
contains something, then the result will be the max favor number followed by a "|xQuest name=0
". This ensures that this quest's favor is counted only once by the template {{DPL category sum}}
when both the heroic version and the epic version appear in the DPL result set. This functionality makes the template unusable as a phantom template for purposes other than adding favor. (Still can be used as a normal template if "shares favor
" is ignored).
For normal template use, this template also contains a parameter |no output=
that takes a boolean value (true, false, 1, 0) and suppresses the output.
The template also stores the max favor value in the variable {{#var: max_favor}}, so in case the output is suppressed, this is the only result.
Examples[edit]
- When
|solo only=
is true, max favor is simply|favor=
.
{{Max quest favor | favor = 2 | solo only = yes | shares favor = | no output = }}
2
- When
|solo only=
is not true, max favor is{{{favor}}}
*3.
{{Max quest favor | favor = 6 | solo only = | shares favor = | no output = }}
18
- When
|shares favor=
contains something (not for normal use), then the output contains a hack for DPL.
{{Max quest favor | favor = 6 | solo only = | shares favor = A Legend Revisited | no output = }}
18|xA Legend Revisited=0
- The below code does the following:
- It selects every level 14 and level 24 quest.
- It restricts the selection to the quests that actually use the template
{{Quest}}
- It passes all the parameters of template
{{Quest}}
to{{Max quest favor}}
. - 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=x
" - Before each result's output, the "
|x<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 14 quests¦Level 24 quests | uses = Template:Quest | include = {Quest¦Max quest favor} | mode = userformat | listseparators = {{Add{{!}}prefix=x,{{!}}x%PAGE%=,,}} }}
{{Add|prefix=x |xThe Prison of the Planes=18|xReturn to Prison of the Planes=0 |xThe Reaver's Fate=18 |xA Cabal for One=18|xReturn to Cabal for One=0 |xDesecrated Temple of Vol=18|xDesecrated Temple of Vol (epic)=0 |xFlesh Maker's Laboratory=18|xFlesh Maker's Laboratory (epic)=0 |xGhosts of Perdition=18|xGhosts of Perdition (epic)=0 |xInferno of the Damned=18|xInferno of the Damned (epic)=0 |xTavern Brawl=12 |xGrim and Barett=18 |xSubversion=18 |xMultitude of Menace=18 |xTower of Frost=18 |xNight Falls on Stormreach=15 |xQuarantine=15 |xThe Madness of Crowds=15 |xToxic Treatment=18 |xThe Age of Rage=15 |xMadstone Crater=24|xReturn to Madstone Crater=0 |xThe Crucible=24 |xGianthold Tor=21|xReturn to Gianthold Tor=0 |xReturn to Cabal for One=18|xA Cabal for One=0 |xReturn to Madstone Crater=24|xMadstone Crater=0 |xReturn to Prison of the Planes=18|xThe Prison of the Planes=0 |xCaught in the Web=24 |xA Cry for Help=21 |xFeast or Famine=18 |xFoundation of Discord=18 |xThe Maze of Madness=18 |xTrial by Fire=18 |xA Stay at the Inn=18 |xDetour=21 |xRest Stop=18 |xLost in the Swamp=18 |xReturn to Gianthold Tor=21|xGianthold Tor=0 |xThe End of the Road=21}}
570
CODE[edit]
0