User:Amerzel/Focus Effect Page DPL Demo
This is a prototype for path B — auto-categorized items + DPL query — as an alternative to the extension-based prototype. It demonstrates what the Template:Tl template's items_with_effect block would look like on a real focus-effect page (e.g. Improved Damage I) once path B is deployed.
Deployment steps this prototype assumes
- Template:Tl template patched so that
focus_effect = Xauto-addsand. See the exact template edit. - Existing hardcoded
<ul><li>{{:Item Name}}</li>…blocks on focus-effect pages replaced with a one-line DPL query (shown below).
For this user-page prototype, only 22 items across 5 effects have been categorized by hand (as if the template edit were in place). Those categories are:
Category:Items with Improved Damage I focusCategory:Items with Improved Healing I focusCategory:Items with Spell Haste I focusCategory:Items with Extended Enhancement II focusCategory:Items with Enhancement Haste I focus
Simple demo — bulleted list per effect
Improved Damage I
DPL source:
{{#dpl:
category=Items with Improved Damage I focus
|mode=unordered
|ordermethod=title
}}
Renders as:
{{#dpl: category=Items with Improved Damage I focus |mode=unordered |ordermethod=title }}
Improved Healing I
{{#dpl: category=Items with Improved Healing I focus |mode=unordered |ordermethod=title }}
Spell Haste I
{{#dpl: category=Items with Spell Haste I focus |mode=unordered |ordermethod=title }}
Extended Enhancement II
{{#dpl: category=Items with Extended Enhancement II focus |mode=unordered |ordermethod=title }}
Enhancement Haste I
{{#dpl: category=Items with Enhancement Haste I focus |mode=unordered |ordermethod=title }}
Richer demo — table with slot column via DPL include
DPL can pull specific fields out of each item's Template:Tl template invocation using the include= parameter, which lets us build tables like the bjornstar reference. This one grabs the statsblock parameter and dumps it inline — noisy, but shows the mechanism.
DPL source:
{{#dpl:
category=Items with Improved Damage I focus
|include={Itempage}:statsblock
|mode=userformat
|listseparators=,{| class="wikitable"\n! Item !! Statsblock,,\n|}
|format=,\n|-\n| [[%PAGE%]] || %CATLIST%,,
|ordermethod=title
}}
Renders as:
{{#dpl: category=Items with Improved Damage I focus |include={Itempage}:statsblock |mode=userformat |listseparators=,{| class="wikitable"\n! Item !! Statsblock,,\n|} |format=,\n|-\n| %PAGE% || (statsblock unavailable in this DPL build),, |ordermethod=title }}
Column-rich version — needs Scribunto
For the columns you actually want (item / slot / classes / drops from / zone), the cleanest wiki-native path is a small Scribunto Lua module that extracts those fields from each item's raw wikitext. The DPL query would then look like:
{{#dpl:
category=Items with Improved Damage I focus
|mode=userformat
|listseparators=,{| class="wikitable sortable"\n! Item !! Slot !! Classes !! Drops from !! Zone,,\n|}
|format=,\n|-\n| [[%PAGE%]] {{#invoke:FocusItemRow|columns|%PAGE%}},,
|ordermethod=title
}}
Where Module:FocusItemRow is ~40 lines of Lua that reads the item page and returns || ARMS || ALL || a minotaur patriarch || Lower Guk. The installed extensions list includes Scribunto so this is available today.
Compared to the extension prototype
- Path B (this page) — one template edit + DPL queries on each focus-effect page. No new extension code. Rich columns require a small Lua module.
- Path A (extension prototype) — dedicated
Special:DynamicFocusItemListextension modelled on Template:Tl. See User:Amerzel/Focus_Items_Prototype and the extension source in the workspace repo.
Both end up self-updating and use the same source-of-truth: the focus_effect parameter on each item's Template:Tl invocation.