Jump to content

User:FizzleMaster/Sandbox/Itembox: Difference between revisions

From EverQuest Legends Wiki
mNo edit summary
mNo edit summary
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><div class="itemtopbg"><div class="itemtitle">{{{itemname}}}</div></div>
<includeonly><div class="itemtopbg"><div class="itemtitle">{{{itemname}}}</div></div>
<div class="itembg"><div class="itemdata" style="padding:0 0.8em; background-color:rgba(255,0,0,0.3);"><div class="itemicon">[[File:item_{{{lucy_img_ID}}}.png|right|link=]]</div><!--
<div class="itembg"><div class="itemdata" style="padding:0 1.4em;"><div class="itemicon">[[File:item_{{{lucy_img_ID}}}.png|right|link=]]</div><!--
-->{{#if:{{{flags|}}}|{{{flags}}}<br>}}<!--
-->{{#if:{{{flags|}}}|{{{flags}}}<br>}}<!--
-->{{#if:{{{class|}}}|Class: {{{class}}}<br>}}<!--
-->{{#if:{{{class|}}}|Class: {{{class}}}<br>}}<!--
Line 9: Line 9:
--><div><!--
--><div><!--
-->{{#if:{{{size|}}}|<div style="display:flex; justify-content:space-between;"><span>Size:</span><span>{{{size}}}</span></div>}}<!--
-->{{#if:{{{size|}}}|<div style="display:flex; justify-content:space-between;"><span>Size:</span><span>{{{size}}}</span></div>}}<!--
-->{{#if:{{{weight|}}}|<div style="display:flex; justify-content:space-between;"><span>Weight:</span><span>{{#ifeq:{{{weight}}}|0|0.0|{{{weight}}}}}</span></div>}}<!--
-->{{#if:{{{weight|}}}|{{#iferror:{{#expr:{{{weight}}}+0}}|<div style="display:flex; justify-content:space-between;"><span>Weight:</span><span style="color:#ff5555;">⚠ Invalid value</span></div>|<div style="display:flex; justify-content:space-between;"><span>Weight:</span><span>{{#ifeq:{{#expr:{{{weight}}}+0}}|0|0.0|{{#expr:{{{weight}}}+0}}}}</span></div>}}}}<!--
-->{{#if:{{{skill|}}}|<div style="display:flex; justify-content:space-between;"><span>Skill:</span><span>{{{skill}}}</span></div>}}<!--
-->{{#if:{{{skill|}}}|<div style="display:flex; justify-content:space-between;"><span>Skill:</span><span>{{{skill}}}</span></div>}}<!--
--></div><!--
--></div><!--
--><div><!--
--><div><!--
-->{{#if:{{{hp|}}}|{{#ifeq:{{{hp}}}|0||<div style="display:flex; justify-content:space-between;"><span>HP:</span><span>{{{hp}}}</span></div>}}}}<!--
-->{{#if:{{{hp|}}}|{{#iferror:{{#expr:{{{hp}}}+0}}|<div style="display:flex; justify-content:space-between;"><span>HP:</span><span style="color:#ff5555;">⚠ Invalid value</span></div>|{{#ifeq:{{#expr:{{{hp}}}+0}}|0||<div style="display:flex; justify-content:space-between;"><span>HP:</span><span>{{#expr:{{{hp}}}+0}}</span></div>}}}}}}<!--
-->{{#if:{{{mana|}}}|{{#ifeq:{{{mana}}}|0||<div style="display:flex; justify-content:space-between;"><span>Mana:</span><span>{{{mana}}}</span></div>}}}}<!--
-->{{#if:{{{mana|}}}|{{#iferror:{{#expr:{{{mana}}}+0}}|<div style="display:flex; justify-content:space-between;"><span>Mana:</span><span style="color:#ff5555;">⚠ Invalid value</span></div>|{{#ifeq:{{#expr:{{{mana}}}+0}}|0||<div style="display:flex; justify-content:space-between;"><span>Mana:</span><span>{{#expr:{{{mana}}}+0}}</span></div>}}}}}}<!--
-->{{#if:{{{endurance|}}}|{{#ifeq:{{{endurance}}}|0||<div style="display:flex; justify-content:space-between;"><span>Endurance:</span><span>{{{endurance}}}</span></div>}}}}<!--
-->{{#if:{{{endurance|}}}|{{#iferror:{{#expr:{{{endurance}}}+0}}|<div style="display:flex; justify-content:space-between;"><span>Endurance:</span><span style="color:#ff5555;">⚠ Invalid value</span></div>|{{#ifeq:{{#expr:{{{endurance}}}+0}}|0||<div style="display:flex; justify-content:space-between;"><span>Endurance:</span><span>{{#expr:{{{endurance}}}+0}}</span></div>}}}}}}<!--
--></div><!--
--></div><!--
--><div><!--
--><div><!--
-->{{#if:{{{dmg|}}}|{{#ifeq:{{{dmg}}}|0||<div style="display:flex; justify-content:space-between;"><span>Base Dmg:</span><span>{{{dmg}}}</span></div>}}}}<!--
-->{{#if:{{{dmg|}}}|{{#iferror:{{#expr:{{{dmg}}}+0}}|<div style="display:flex; justify-content:space-between;"><span>Base Dmg:</span><span style="color:#ff5555;">⚠ Invalid value</span></div>|{{#ifeq:{{#expr:{{{dmg}}}+0}}|0||<div style="display:flex; justify-content:space-between;"><span>Base Dmg:</span><span>{{#expr:{{{dmg}}}+0}}</span></div>}}}}}}<!--
-->{{#if:{{{dmg|}}}|{{#if:{{#pos:{{{class|}}}|ROG}}|{{#ifeq:{{{skill|}}}|1H Piercing|<div style="display:flex; justify-content:space-between;"><span>Backstab Dmg:</span><span>{{{backstab|{{{dmg}}}}}}</span></div>}}|{{#if:{{#pos:{{{class|}}}|ALL}}|{{#ifeq:{{{skill|}}}|1H Piercing|<div style="display:flex; justify-content:space-between;"><span>Backstab Dmg:</span><span>{{{backstab|{{{dmg}}}}}}</span></div>}}}}}}}}<!--
-->{{#vardefine:box_rogok|{{#if:{{#pos:{{{class|}}}|ROG}}|1|{{#if:{{#pos:{{{class|}}}|ALL}}|1|}}}}}}<!--
-->{{#if:{{{delay|}}}|{{#ifeq:{{{delay}}}|0||<div style="display:flex; justify-content:space-between;"><span>Delay:</span><span>{{{delay}}}</span></div>}}}}<!--
-->{{#vardefine:box_piercing|{{#ifeq:{{{skill|}}}|1H Piercing|1|}}}}<!--
-->{{#if:{{{dmg_bonus|}}}|{{#ifeq:{{{dmg_bonus}}}|0||<div style="display:flex; justify-content:space-between;"><span>Dmg Bon:</span><span>{{{dmg_bonus}}}</span></div>}}}}<!--
-->{{#if:{{{dmg|}}}|{{#if:{{#var:box_rogok}}|{{#if:{{#var:box_piercing}}|{{#if:{{{backstab|}}}|{{#iferror:{{#expr:{{{backstab}}}+0}}|<div style="display:flex; justify-content:space-between;"><span>Backstab Dmg:</span><span style="color:#ff5555;">⚠ Invalid value</span></div>|<div style="display:flex; justify-content:space-between;"><span>Backstab Dmg:</span><span>{{#expr:{{{backstab}}}+0}}</span></div>}}|{{#iferror:{{#expr:{{{dmg}}}+0}}|<div style="display:flex; justify-content:space-between;"><span>Backstab Dmg:</span><span style="color:#ff5555;">⚠ Invalid value</span></div>|<div style="display:flex; justify-content:space-between;"><span>Backstab Dmg:</span><span>{{#expr:{{{dmg}}}+0}}</span></div>}}}}}}}}}}<!--
-->{{#if:{{{delay|}}}|{{#iferror:{{#expr:{{{delay}}}+0}}|<div style="display:flex; justify-content:space-between;"><span>Delay:</span><span style="color:#ff5555;">⚠ Invalid value</span></div>|{{#ifeq:{{#expr:{{{delay}}}+0}}|0||<div style="display:flex; justify-content:space-between;"><span>Delay:</span><span>{{#expr:{{{delay}}}+0}}</span></div>}}}}}}<!--
-->{{#if:{{{dmg_bonus|}}}|{{#iferror:{{#expr:{{{dmg_bonus}}}+0}}|<div style="display:flex; justify-content:space-between;"><span>Dmg Bon:</span><span style="color:#ff5555;">⚠ Invalid value</span></div>|{{#ifeq:{{#expr:{{{dmg_bonus}}}+0}}|0||<div style="display:flex; justify-content:space-between;"><span>Dmg Bon:</span><span>{{#expr:{{{dmg_bonus}}}+0}}</span></div>}}}}}}<!--
-->{{#if:{{{dmg|}}}|<div style="display:flex; justify-content:space-between;"><span>Ratio:</span><span class="itemratio"></span></div>}}<!--
-->{{#if:{{{dmg|}}}|<div style="display:flex; justify-content:space-between;"><span>Ratio:</span><span class="itemratio"></span></div>}}<!--
--></div><!--
--></div><!--
Line 28: Line 30:
--><div style="display:grid; grid-template-columns:110px 110px 150px; gap:1.5em; margin:0.5em 0;"><!--
--><div style="display:grid; grid-template-columns:110px 110px 150px; gap:1.5em; margin:0.5em 0;"><!--
--><div><!--
--><div><!--
-->{{#if:{{{str|}}}|{{#ifeq:{{{str}}}|0||<div style="display:flex; justify-content:space-between;"><span>Strength:</span><span>{{{str}}}</span></div>}}}}<!--
-->{{#if:{{{str|}}}|{{#iferror:{{#expr:{{{str}}}+0}}|<div style="display:flex; justify-content:space-between;"><span>Strength:</span><span style="color:#ff5555;">⚠ Invalid value</span></div>|{{#ifeq:{{#expr:{{{str}}}+0}}|0||<div style="display:flex; justify-content:space-between;"><span>Strength:</span><span>{{#expr:{{{str}}}+0}}</span></div>}}}}}}<!--
-->{{#if:{{{sta|}}}|{{#ifeq:{{{sta}}}|0||<div style="display:flex; justify-content:space-between;"><span>Stamina:</span><span>{{{sta}}}</span></div>}}}}<!--
-->{{#if:{{{sta|}}}|{{#iferror:{{#expr:{{{sta}}}+0}}|<div style="display:flex; justify-content:space-between;"><span>Stamina:</span><span style="color:#ff5555;">⚠ Invalid value</span></div>|{{#ifeq:{{#expr:{{{sta}}}+0}}|0||<div style="display:flex; justify-content:space-between;"><span>Stamina:</span><span>{{#expr:{{{sta}}}+0}}</span></div>}}}}}}<!--
-->{{#if:{{{int|}}}|{{#ifeq:{{{int}}}|0||<div style="display:flex; justify-content:space-between;"><span>Intelligence:</span><span>{{{int}}}</span></div>}}}}<!--
-->{{#if:{{{int|}}}|{{#iferror:{{#expr:{{{int}}}+0}}|<div style="display:flex; justify-content:space-between;"><span>Intelligence:</span><span style="color:#ff5555;">⚠ Invalid value</span></div>|{{#ifeq:{{#expr:{{{int}}}+0}}|0||<div style="display:flex; justify-content:space-between;"><span>Intelligence:</span><span>{{#expr:{{{int}}}+0}}</span></div>}}}}}}<!--
-->{{#if:{{{wis|}}}|{{#ifeq:{{{wis}}}|0||<div style="display:flex; justify-content:space-between;"><span>Wisdom:</span><span>{{{wis}}}</span></div>}}}}<!--
-->{{#if:{{{wis|}}}|{{#iferror:{{#expr:{{{wis}}}+0}}|<div style="display:flex; justify-content:space-between;"><span>Wisdom:</span><span style="color:#ff5555;">⚠ Invalid value</span></div>|{{#ifeq:{{#expr:{{{wis}}}+0}}|0||<div style="display:flex; justify-content:space-between;"><span>Wisdom:</span><span>{{#expr:{{{wis}}}+0}}</span></div>}}}}}}<!--
-->{{#if:{{{agi|}}}|{{#ifeq:{{{agi}}}|0||<div style="display:flex; justify-content:space-between;"><span>Agility:</span><span>{{{agi}}}</span></div>}}}}<!--
-->{{#if:{{{agi|}}}|{{#iferror:{{#expr:{{{agi}}}+0}}|<div style="display:flex; justify-content:space-between;"><span>Agility:</span><span style="color:#ff5555;">⚠ Invalid value</span></div>|{{#ifeq:{{#expr:{{{agi}}}+0}}|0||<div style="display:flex; justify-content:space-between;"><span>Agility:</span><span>{{#expr:{{{agi}}}+0}}</span></div>}}}}}}<!--
-->{{#if:{{{dex|}}}|{{#ifeq:{{{dex}}}|0||<div style="display:flex; justify-content:space-between;"><span>Dexterity:</span><span>{{{dex}}}</span></div>}}}}<!--
-->{{#if:{{{dex|}}}|{{#iferror:{{#expr:{{{dex}}}+0}}|<div style="display:flex; justify-content:space-between;"><span>Dexterity:</span><span style="color:#ff5555;">⚠ Invalid value</span></div>|{{#ifeq:{{#expr:{{{dex}}}+0}}|0||<div style="display:flex; justify-content:space-between;"><span>Dexterity:</span><span>{{#expr:{{{dex}}}+0}}</span></div>}}}}}}<!--
-->{{#if:{{{cha|}}}|{{#ifeq:{{{cha}}}|0||<div style="display:flex; justify-content:space-between;"><span>Charisma:</span><span>{{{cha}}}</span></div>}}}}<!--
-->{{#if:{{{cha|}}}|{{#iferror:{{#expr:{{{cha}}}+0}}|<div style="display:flex; justify-content:space-between;"><span>Charisma:</span><span style="color:#ff5555;">⚠ Invalid value</span></div>|{{#ifeq:{{#expr:{{{cha}}}+0}}|0||<div style="display:flex; justify-content:space-between;"><span>Charisma:</span><span>{{#expr:{{{cha}}}+0}}</span></div>}}}}}}<!--
--></div><!--
--></div><!--
--><div><!--
--><div><!--
-->{{#if:{{{svmagic|}}}|{{#ifeq:{{{svmagic}}}|0||<div style="display:flex; justify-content:space-between;"><span>SV Magic:</span><span>{{{svmagic}}}</span></div>}}}}<!--
-->{{#if:{{{svmagic|}}}|{{#iferror:{{#expr:{{{svmagic}}}+0}}|<div style="display:flex; justify-content:space-between;"><span>SV Magic:</span><span style="color:#ff5555;">⚠ Invalid value</span></div>|{{#ifeq:{{#expr:{{{svmagic}}}+0}}|0||<div style="display:flex; justify-content:space-between;"><span>SV Magic:</span><span>{{#expr:{{{svmagic}}}+0}}</span></div>}}}}}}<!--
-->{{#if:{{{svfire|}}}|{{#ifeq:{{{svfire}}}|0||<div style="display:flex; justify-content:space-between;"><span>SV Fire:</span><span>{{{svfire}}}</span></div>}}}}<!--
-->{{#if:{{{svfire|}}}|{{#iferror:{{#expr:{{{svfire}}}+0}}|<div style="display:flex; justify-content:space-between;"><span>SV Fire:</span><span style="color:#ff5555;">⚠ Invalid value</span></div>|{{#ifeq:{{#expr:{{{svfire}}}+0}}|0||<div style="display:flex; justify-content:space-between;"><span>SV Fire:</span><span>{{#expr:{{{svfire}}}+0}}</span></div>}}}}}}<!--
-->{{#if:{{{svcold|}}}|{{#ifeq:{{{svcold}}}|0||<div style="display:flex; justify-content:space-between;"><span>SV Cold:</span><span>{{{svcold}}}</span></div>}}}}<!--
-->{{#if:{{{svcold|}}}|{{#iferror:{{#expr:{{{svcold}}}+0}}|<div style="display:flex; justify-content:space-between;"><span>SV Cold:</span><span style="color:#ff5555;">⚠ Invalid value</span></div>|{{#ifeq:{{#expr:{{{svcold}}}+0}}|0||<div style="display:flex; justify-content:space-between;"><span>SV Cold:</span><span>{{#expr:{{{svcold}}}+0}}</span></div>}}}}}}<!--
-->{{#if:{{{svdisease|}}}|{{#ifeq:{{{svdisease}}}|0||<div style="display:flex; justify-content:space-between;"><span>SV Disease:</span><span>{{{svdisease}}}</span></div>}}}}<!--
-->{{#if:{{{svdisease|}}}|{{#iferror:{{#expr:{{{svdisease}}}+0}}|<div style="display:flex; justify-content:space-between;"><span>SV Disease:</span><span style="color:#ff5555;">⚠ Invalid value</span></div>|{{#ifeq:{{#expr:{{{svdisease}}}+0}}|0||<div style="display:flex; justify-content:space-between;"><span>SV Disease:</span><span>{{#expr:{{{svdisease}}}+0}}</span></div>}}}}}}<!--
-->{{#if:{{{svpoison|}}}|{{#ifeq:{{{svpoison}}}|0||<div style="display:flex; justify-content:space-between;"><span>SV Poison:</span><span>{{{svpoison}}}</span></div>}}}}<!--
-->{{#if:{{{svpoison|}}}|{{#iferror:{{#expr:{{{svpoison}}}+0}}|<div style="display:flex; justify-content:space-between;"><span>SV Poison:</span><span style="color:#ff5555;">⚠ Invalid value</span></div>|{{#ifeq:{{#expr:{{{svpoison}}}+0}}|0||<div style="display:flex; justify-content:space-between;"><span>SV Poison:</span><span>{{#expr:{{{svpoison}}}+0}}</span></div>}}}}}}<!--
-->{{#if:{{{svvoid|}}}|{{#ifeq:{{{svvoid}}}|0||<div style="display:flex; justify-content:space-between;"><span>SV Void:</span><span>{{{svvoid}}}</span></div>}}}}<!--
-->{{#if:{{{svvoid|}}}|{{#iferror:{{#expr:{{{svvoid}}}+0}}|<div style="display:flex; justify-content:space-between;"><span>SV Void:</span><span style="color:#ff5555;">⚠ Invalid value</span></div>|{{#ifeq:{{#expr:{{{svvoid}}}+0}}|0||<div style="display:flex; justify-content:space-between;"><span>SV Void:</span><span>{{#expr:{{{svvoid}}}+0}}</span></div>}}}}}}<!--
--></div><!--
--></div><!--
--><div></div><!--
--><div></div><!--
--></div><!--
--></div><!--


-->{{#if:{{{focus_effect|}}}|Focus Effect: [[{{{focus_effect}}}|<span class="itemeff">{{{focus_effect}}}</span>]]<br>}}<!--
-->{{#vardefine:box_focus|{{#explode:{{#replace:{{#replace:{{{focus_effect|}}}|[|}}|]|}}|{{!}}|0}}}}<!--
-->{{#if:{{{click_effect|}}}|Click Effect: [[{{{click_effect}}}|<span class="itemeff">{{{click_effect}}}</span>]]{{#if:{{{click_effect_flag|}}}|&nbsp;({{{click_effect_flag}}})}}<br><!--
-->{{#vardefine:box_worn|{{#explode:{{#replace:{{#replace:{{{worn_effect|}}}|[|}}|]|}}|{{!}}|0}}}}<!--
-->{{#vardefine:box_combat|{{#explode:{{#replace:{{#replace:{{{combat_effect|}}}|[|}}|]|}}|{{!}}|0}}}}<!--
-->{{#vardefine:box_click|{{#explode:{{#replace:{{#replace:{{{click_effect|}}}|[|}}|]|}}|{{!}}|0}}}}<!--
-->{{#if:{{{focus_effect|}}}|Focus Effect: [[{{#var:box_focus}}|<span class="itemeff">{{#var:box_focus}}</span>]]<br>}}<!--
-->{{#if:{{{click_effect|}}}|Click Effect: [[{{#var:box_click}}|<span class="itemeff">{{#var:box_click}}</span>]]{{#if:{{{click_effect_flag|}}}|&nbsp;({{{click_effect_flag}}})}}<br><!--
-->{{#if:{{{click_cast_time|}}}|<div style="margin-left:1.5em;">Cast Time: {{{click_cast_time}}}</div>}}<!--
-->{{#if:{{{click_cast_time|}}}|<div style="margin-left:1.5em;">Cast Time: {{{click_cast_time}}}</div>}}<!--
-->{{#if:{{{click_required_level|}}}|<div style="margin-left:1.5em;">Required Level: {{{click_required_level}}}</div>}}<!--
-->{{#if:{{{click_required_level|}}}|{{#iferror:{{#expr:{{{click_required_level}}}+0}}|<div style="margin-left:1.5em; color:#ff5555;">Required Level: ⚠ Invalid value</div>|<div style="margin-left:1.5em;">Required Level: {{#expr:{{{click_required_level}}}+0}}</div>}}}}<!--
-->{{#if:{{{click_cooldown|}}}|<div style="margin-left:1.5em;">Cooldown: {{{click_cooldown}}}</div>}}<!--
-->{{#if:{{{click_cooldown|}}}|<div style="margin-left:1.5em;">Cooldown: {{{click_cooldown}}}</div>}}<!--
-->}}<!--
-->}}<!--
-->{{#if:{{{worn_effect|}}}|Worn Effect: [[{{{worn_effect}}}|<span class="itemeff">{{{worn_effect}}}</span>]]<br>}}<!--
-->{{#if:{{{worn_effect|}}}|Worn Effect: [[{{#var:box_worn}}|<span class="itemeff">{{#var:box_worn}}</span>]]<br>}}<!--
-->{{#if:{{{combat_effect|}}}|Combat Effect: [[{{{combat_effect}}}|<span class="itemeff">{{{combat_effect}}}</span>]]{{#if:{{{combat_effect_level|}}}|&nbsp;(Req Level {{{combat_effect_level}}})}}<br>}}
-->{{#if:{{{combat_effect|}}}|Combat Effect: [[{{#var:box_combat}}|<span class="itemeff">{{#var:box_combat}}</span>]]{{#if:{{{combat_effect_level|}}}|{{#iferror:{{#expr:{{{combat_effect_level}}}+0}}|&nbsp;<span style="color:#ff5555;">(⚠ Invalid value)</span>|&nbsp;(Req Level {{#expr:{{{combat_effect_level}}}+0}})}}}}<br>}}
</div></div><div class="itembotbg"></div></includeonly><noinclude>
</div></div><div class="itembotbg"></div></includeonly><noinclude>
===Description===
===Description===
Sandbox redesign of Template:Itembox, matching the in-game tooltip's layout, wording,
Sandbox redesign of Template:Itembox, matching the in-game tooltip's layout, wording, and field placement rather than the wiki's previous single-column free-text blob. Within each stat column, labels left-justify and values right-justify, matching the in-game tooltip's visual alignment. The box has left/right padding (currently <code>1.4em</code>) around all content, tuned to visually match the in-game tooltip's own margins.
and field placement rather than the wiki's previous single-column free-text blob.
Within each stat column, labels left-justify and values right-justify, matching the
in-game tooltip's visual alignment.


'''Important: always enter base (Tier 0) values.''' EQL's item upgrade system
'''Important: always enter base (Tier 0) values.''' EQL's item upgrade system (see [[Item Upgrade System]]) lets players raise an item's tier with motes, which increases its stats via a slider — the wiki should record only the base values an upgrade slider derives everything else from, never a specific upgraded copy's numbers.
(see [[Item Upgrade System]]) lets players raise an item's tier with motes, which
increases its stats via a slider — the wiki should record only the base values an
upgrade slider derives everything else from, never a specific upgraded copy's numbers.


'''Note on Class:''' the Exaltation swap system can change an item's class
'''Note on Class:''' the Exaltation swap system can change an item's class restriction (e.g. socketing a class-specific effect into an otherwise multi-class item can lock it to that class). Record the item's class access with no swapped-in Exaltations applied — its own original kit only.
restriction (e.g. socketing a class-specific effect into an otherwise multi-class
item can lock it to that class). Record the item's class access with no swapped-in
Exaltations applied — its own original kit only.


'''Note on Skill:''' use the exact in-game skill name, e.g. "1H Piercing" rather than
'''Note on Skill:''' use the exact in-game skill name, e.g. <code>1H Piercing</code> rather than <code>Piercing</code> — Rogues do not have access to a 2H Piercing skill, so the Backstab logic checks for this exact string.
"Piercing" — Rogues do not have access to a 2H Piercing skill, so the Backstab
auto-default checks for this exact string.


'''Ratio shown as an empty visual placeholder:''' the Ratio row (Base Dmg ÷ Delay)
'''Ratio shown as an empty visual placeholder:''' the Ratio row (Base Dmg ÷ Delay) always renders when the item has a dmg value, with its label present but the value intentionally left blank (<code><nowiki><span class="itemratio"></span></nowiki></code>). This mocks up how the page is expected to look once the item upgrade tier slider is implemented — that tool would compute and fill in Ratio live based on the selected tier, which a static wiki page cannot do on its own for a value tied to a variable upgrade tier. The placeholder just reserves the correct labeled position without guessing at the computation.
always renders when the item has a dmg value, with its label present but the value
intentionally left blank (<span class="itemratio"></span>). This mocks up how the
page is expected to look once the item upgrade tier slider is implemented — that
tool would compute and fill in Ratio live based on the selected tier, which a static
wiki page cannot do on its own for a value tied to a variable upgrade tier. The
placeholder just reserves the correct labeled position without guessing at the
computation.


'''Zero-value safeguard:''' every numeric stat field except Weight is skipped
'''Zero-value safeguard:''' every numeric stat field except Weight is skipped entirely — not rendered at all, with the layout adjusting automatically to close the gap — if the value evaluates to <code>0</code>. This includes Base Dmg, Delay, Dmg Bon, HP, Mana, Endurance, Strength, Stamina, Intelligence, Wisdom, Agility, Dexterity, Charisma, and all six SV resists. This guards against an editor typing 0 out of habit for a stat that doesn't apply, since with named parameters it's easy to treat this like a form to fill in completely rather than leaving a field genuinely blank. Leaving the field blank works exactly the same way as entering <code>0</code> — and so does entering <code>+0</code>, since the check now compares the evaluated value, not the raw typed text (see the plus-sign note below).
entirely — not rendered at all, with the layout adjusting automatically to close
the gap — if the value is literally "0". This includes Base Dmg, Delay, Dmg Bon,
HP, Mana, Endurance, Strength, Stamina, Intelligence, Wisdom, Agility, Dexterity,
Charisma, and all six SV resists. This guards against an editor typing 0 out of
habit for a stat that doesn't apply, since with named parameters it's easy to treat
this like a form to fill in completely rather than leaving a field genuinely blank.
Leaving the field blank works exactly the same way as entering 0.


'''Exception: Weight always renders, even at 0.''' Weight is a real physical
'''Exception: Weight always renders, even at 0.''' Weight is a real physical attribute (a weightless item is meaningful data, not "not applicable"), so <code><nowiki>|weight=0</nowiki></code> always shows and is normalized to display as <code>0.0</code> rather than a bare <code>0</code>, matching the in-game tooltip's formatting.
attribute (a weightless item is meaningful data, not "not applicable"), so
| weight = 0 always shows and is normalized to display as "0.0" rather than a bare
"0", matching the in-game tooltip's formatting.


'''Size and Skill always render regardless of value''' — these aren't numeric
'''Size and Skill always render regardless of value''' — these aren't numeric bonuses and have no meaningful "zero" state to guard against.
bonuses and have no meaningful "zero" state to guard against.
 
'''Numeric validation:''' the following 23 fields must contain a genuine number — digits, an optional leading minus sign for negative stats (e.g. Charisma penalties), and an optional decimal point (e.g. Weight) — or the page displays a short red "⚠ Invalid value" warning in that field's spot instead of a broken parser error or silently-wrong data: <code>weight</code>, <code>hp</code>, <code>mana</code>, <code>endurance</code>, <code>dmg</code>, <code>backstab</code>, <code>delay</code>, <code>dmg_bonus</code>, <code>str</code>, <code>sta</code>, <code>int</code>, <code>wis</code>, <code>agi</code>, <code>dex</code>, <code>cha</code>, <code>svmagic</code>, <code>svfire</code>, <code>svcold</code>, <code>svdisease</code>, <code>svpoison</code>, <code>svvoid</code>, <code>combat_effect_level</code>, <code>click_required_level</code>. Letters, symbols, or text (e.g. <code>five</code>, <code>N/A</code>, <code>?</code>) all trigger the warning. This works by testing each value through MediaWiki's #expr, which only accepts real numeric expressions, caught with #iferror before it can leak MediaWiki's own longer default error text (<code><nowiki>Expression error: Unrecognized word "X".</nowiki></code> — nearly 3x longer than our message and untested against these narrow columns).
 
'''Leading plus signs are stripped automatically.''' If an editor types <code>+5</code> for any of the 23 validated numeric fields, the page displays <code>5</code> — a plus sign is redundant on a stat value, since a number with no sign is already understood as positive. A minus sign is preserved correctly (<code>-30</code> still displays as <code>-30</code>). This works because every validated field's displayed value is the *result* of running it through MediaWiki's #expr (the same calculation already used to check validity), rather than the raw text the editor typed — and #expr math naturally treats <code>+5</code> and <code>5</code> as equivalent, so the sign disappears as a side effect of evaluating it as a number, with no separate string-stripping logic needed.
 
'''Side effect: decimal values also get normalized.''' Because the displayed value passes through #expr's math evaluation, a value like <code>3.50</code> for Weight will display as <code>3.5</code> — the trailing zero is dropped, same as how any calculator would simplify it. This is treated as a desirable side effect (cleaner, consistent formatting) rather than a bug, but worth knowing in case an editor notices their exact typed formatting doesn't survive character-for-character.
 
'''Effect fields silently accept wiki-link brackets, and even a custom-display-text pipe, stripping down to the plain page name automatically.''' If an editor types focus_effect, worn_effect, combat_effect, or click_effect as a plain spell name (<code>Unrighteous Bash</code>), wraps it in brackets (<code><nowiki>[[Unrighteous Bash]]</nowiki></code>), or pastes a full piped link with custom display text (<code><nowiki>[[Oathbreaker's Curse|Curse proc spell]]</nowiki></code>), all three now produce the same correct, working link using the real page name. The template already builds its own <nowiki>[[ ]]</nowiki> wikilink around whatever's entered, so an editor who also supplies brackets — or a pipe — would otherwise end up with a broken link: a literal double-bracketed string in the simple case, or (with a leftover pipe) a malformed three-part link that corrupts parsing of every effect field after it in the box. Both cases are now caught and corrected silently, with no warning shown, since there's no real ambiguity: the brackets are redundant, and any custom display text is simply discarded in favor of the true page name, which the template restyles identically either way via <code><nowiki><span class="itemeff"></nowiki></code>.
 
'''Implementation note:''' this strips brackets one character at a time — replacing every lone <code><nowiki>[</nowiki></code> and every lone <code><nowiki>]</nowiki></code> individually — rather than matching the pair <code><nowiki>[[</nowiki></code>/<code><nowiki>]]</nowiki></code> as a whole. That's a deliberate workaround, not a stylistic choice: MediaWiki's parser treats a literal <code><nowiki>[[</nowiki></code> sequence as the start of a real wikilink as soon as it's tokenized, even when it's sitting inside a parser-function argument rather than being an actual link — so searching for the two-character pair <code><nowiki>[[</nowiki></code> with '''#replace''' doesn't reliably match on this install. Searching for the single characters individually sidesteps that entirely, since a lone bracket isn't link-opening syntax. After stripping, the result is split on the first <code><nowiki>{{!}}</nowiki></code> (MediaWiki's built-in literal-pipe magic word, native since MediaWiki 1.24) via '''#explode''', keeping only the portion before it — so any trailing "|display text" is dropped rather than leaking through and breaking the rest of the box.
 
'''Backstab Dmg has special logic, not just simple validation:''' when the weapon qualifies (class contains ROG or ALL, AND skill is exactly <code>1H Piercing</code>), computed once via #vardefine into <code>box_rogok</code> and <code>box_piercing</code> to keep the nesting shallow and less error-prone than checking both conditions inline (a prior version of this template broke from a brace-count mistake at this exact spot — see the note in git history / discussion thread if this evolves into a real submission):
 
* If '''backstab''' is left blank, it auto-fills from '''dmg''' — "Backstab Dmg: <nowiki>[same value as Base Dmg]</nowiki>". This is a real EQL mechanic: Backstab damage happens to equal base damage on many 1H Piercing weapons, so this saves the editor from retyping it, while still being fully overridable (see below).
* If '''backstab''' is explicitly given a valid number, that value is used instead of the dmg default — set this whenever Backstab Dmg genuinely differs from Base Dmg in-game (confirmed to happen — do not assume they're always equal).
* If '''backstab''' is explicitly given an invalid value, the row shows the "⚠ Invalid value" warning.
* If '''backstab''' is left blank AND '''dmg''' itself is invalid, the Backstab row ALSO shows "⚠ Invalid value" — even though the editor never touched the backstab field. This is deliberate: since Backstab silently auto-fills from dmg, a broken dmg value would otherwise pass through into Backstab undetected. Two warnings for one root typo (Base Dmg's own row plus Backstab's) is judged better than letting bad data through silently on the second row.
* If the weapon doesn't qualify (wrong class or wrong skill), the entire Backstab row is omitted, exactly as today — no validation runs in this case either, since nothing would display regardless of what backstab contains.


'''Parameters:'''
'''Parameters:'''
* itemname, lucy_img_ID — same as original
* <code>itemname</code>, <code>lucy_img_ID</code> — same as original
* flags — free text, e.g. "Lore Equipped, Attunable, Quest, Placeable"
* <code>flags</code> — free text, e.g. <code>Lore Equipped, Attunable, Quest, Placeable</code>
* class, race, slot
* <code>class</code>, <code>race</code>, <code>slot</code>
* size, weight, skill, delay
* <code>size</code>, <code>weight</code>, <code>skill</code>, <code>delay</code>
* dmg, dmg_bonus, backstab (optional; defaults to dmg for Rogue-usable 1H Piercing weapons)
* <code>dmg</code>, <code>dmg_bonus</code>, <code>backstab</code> (optional; defaults to dmg for Rogue-usable 1H Piercing weapons — see Backstab section above)
* hp, mana, endurance
* <code>hp</code>, <code>mana</code>, <code>endurance</code>
* str, sta, agi, dex, wis, int, cha
* <code>str</code>, <code>sta</code>, <code>agi</code>, <code>dex</code>, <code>wis</code>, <code>int</code>, <code>cha</code>
* svmagic, svfire, svcold, svdisease, svpoison, svvoid
* <code>svmagic</code>, <code>svfire</code>, <code>svcold</code>, <code>svdisease</code>, <code>svpoison</code>, <code>svvoid</code>
* focus_effect, worn_effect — a linked spell name
* <code>focus_effect</code>, <code>worn_effect</code> — a linked spell name (brackets and custom display text optional, see note above)
* combat_effect, combat_effect_level — linked spell name + "(Req Level X)"
* <code>combat_effect</code>, <code>combat_effect_level</code> — linked spell name + <code>(Req Level X)</code>
* click_effect, click_effect_flag (e.g. "Must Equip"), click_cast_time, click_required_level, click_cooldown
* <code>click_effect</code>, <code>click_effect_flag</code> (e.g. <code>Must Equip</code>), <code>click_cast_time</code>, <code>click_required_level</code>, <code>click_cooldown</code>
 
'''Deliberately NOT tracked:''' Exaltation slot contents (which item currently
provides each effect) — this is mutable player customization, not base item data.
Only record an effect here if the in-game Exaltation slot shows the item's OWN name
as the source.


'''Deliberately omitted:''' Ratio (Base Dmg ÷ Delay) — client-computed display value,
'''Deliberately NOT tracked:''' Exaltation slot contents (which item currently provides each effect) — this is mutable player customization, not base item data. Only record an effect here if the in-game Exaltation slot shows the item's OWN name as the source.
not something an editor enters.


'''Deliberately omitted:''' Ratio (Base Dmg ÷ Delay) — client-computed display value, not something an editor enters; reserved for the admins' planned upgrade-tier slider tool (see the Ratio placeholder note above).
</noinclude>
</noinclude>

Latest revision as of 15:08, 24 August 2026

Description

Sandbox redesign of Template:Itembox, matching the in-game tooltip's layout, wording, and field placement rather than the wiki's previous single-column free-text blob. Within each stat column, labels left-justify and values right-justify, matching the in-game tooltip's visual alignment. The box has left/right padding (currently 1.4em) around all content, tuned to visually match the in-game tooltip's own margins.

Important: always enter base (Tier 0) values. EQL's item upgrade system (see Item Upgrade System) lets players raise an item's tier with motes, which increases its stats via a slider — the wiki should record only the base values an upgrade slider derives everything else from, never a specific upgraded copy's numbers.

Note on Class: the Exaltation swap system can change an item's class restriction (e.g. socketing a class-specific effect into an otherwise multi-class item can lock it to that class). Record the item's class access with no swapped-in Exaltations applied — its own original kit only.

Note on Skill: use the exact in-game skill name, e.g. 1H Piercing rather than Piercing — Rogues do not have access to a 2H Piercing skill, so the Backstab logic checks for this exact string.

Ratio shown as an empty visual placeholder: the Ratio row (Base Dmg ÷ Delay) always renders when the item has a dmg value, with its label present but the value intentionally left blank (<span class="itemratio"></span>). This mocks up how the page is expected to look once the item upgrade tier slider is implemented — that tool would compute and fill in Ratio live based on the selected tier, which a static wiki page cannot do on its own for a value tied to a variable upgrade tier. The placeholder just reserves the correct labeled position without guessing at the computation.

Zero-value safeguard: every numeric stat field except Weight is skipped entirely — not rendered at all, with the layout adjusting automatically to close the gap — if the value evaluates to 0. This includes Base Dmg, Delay, Dmg Bon, HP, Mana, Endurance, Strength, Stamina, Intelligence, Wisdom, Agility, Dexterity, Charisma, and all six SV resists. This guards against an editor typing 0 out of habit for a stat that doesn't apply, since with named parameters it's easy to treat this like a form to fill in completely rather than leaving a field genuinely blank. Leaving the field blank works exactly the same way as entering 0 — and so does entering +0, since the check now compares the evaluated value, not the raw typed text (see the plus-sign note below).

Exception: Weight always renders, even at 0. Weight is a real physical attribute (a weightless item is meaningful data, not "not applicable"), so |weight=0 always shows and is normalized to display as 0.0 rather than a bare 0, matching the in-game tooltip's formatting.

Size and Skill always render regardless of value — these aren't numeric bonuses and have no meaningful "zero" state to guard against.

Numeric validation: the following 23 fields must contain a genuine number — digits, an optional leading minus sign for negative stats (e.g. Charisma penalties), and an optional decimal point (e.g. Weight) — or the page displays a short red "⚠ Invalid value" warning in that field's spot instead of a broken parser error or silently-wrong data: weight, hp, mana, endurance, dmg, backstab, delay, dmg_bonus, str, sta, int, wis, agi, dex, cha, svmagic, svfire, svcold, svdisease, svpoison, svvoid, combat_effect_level, click_required_level. Letters, symbols, or text (e.g. five, N/A, ?) all trigger the warning. This works by testing each value through MediaWiki's #expr, which only accepts real numeric expressions, caught with #iferror before it can leak MediaWiki's own longer default error text (Expression error: Unrecognized word "X". — nearly 3x longer than our message and untested against these narrow columns).

Leading plus signs are stripped automatically. If an editor types +5 for any of the 23 validated numeric fields, the page displays 5 — a plus sign is redundant on a stat value, since a number with no sign is already understood as positive. A minus sign is preserved correctly (-30 still displays as -30). This works because every validated field's displayed value is the *result* of running it through MediaWiki's #expr (the same calculation already used to check validity), rather than the raw text the editor typed — and #expr math naturally treats +5 and 5 as equivalent, so the sign disappears as a side effect of evaluating it as a number, with no separate string-stripping logic needed.

Side effect: decimal values also get normalized. Because the displayed value passes through #expr's math evaluation, a value like 3.50 for Weight will display as 3.5 — the trailing zero is dropped, same as how any calculator would simplify it. This is treated as a desirable side effect (cleaner, consistent formatting) rather than a bug, but worth knowing in case an editor notices their exact typed formatting doesn't survive character-for-character.

Effect fields silently accept wiki-link brackets, and even a custom-display-text pipe, stripping down to the plain page name automatically. If an editor types focus_effect, worn_effect, combat_effect, or click_effect as a plain spell name (Unrighteous Bash), wraps it in brackets ([[Unrighteous Bash]]), or pastes a full piped link with custom display text ([[Oathbreaker's Curse|Curse proc spell]]), all three now produce the same correct, working link using the real page name. The template already builds its own [[ ]] wikilink around whatever's entered, so an editor who also supplies brackets — or a pipe — would otherwise end up with a broken link: a literal double-bracketed string in the simple case, or (with a leftover pipe) a malformed three-part link that corrupts parsing of every effect field after it in the box. Both cases are now caught and corrected silently, with no warning shown, since there's no real ambiguity: the brackets are redundant, and any custom display text is simply discarded in favor of the true page name, which the template restyles identically either way via <span class="itemeff">.

Implementation note: this strips brackets one character at a time — replacing every lone [ and every lone ] individually — rather than matching the pair [[/]] as a whole. That's a deliberate workaround, not a stylistic choice: MediaWiki's parser treats a literal [[ sequence as the start of a real wikilink as soon as it's tokenized, even when it's sitting inside a parser-function argument rather than being an actual link — so searching for the two-character pair [[ with #replace doesn't reliably match on this install. Searching for the single characters individually sidesteps that entirely, since a lone bracket isn't link-opening syntax. After stripping, the result is split on the first {{!}} (MediaWiki's built-in literal-pipe magic word, native since MediaWiki 1.24) via #explode, keeping only the portion before it — so any trailing "|display text" is dropped rather than leaking through and breaking the rest of the box.

Backstab Dmg has special logic, not just simple validation: when the weapon qualifies (class contains ROG or ALL, AND skill is exactly 1H Piercing), computed once via #vardefine into box_rogok and box_piercing to keep the nesting shallow and less error-prone than checking both conditions inline (a prior version of this template broke from a brace-count mistake at this exact spot — see the note in git history / discussion thread if this evolves into a real submission):

  • If backstab is left blank, it auto-fills from dmg — "Backstab Dmg: [same value as Base Dmg]". This is a real EQL mechanic: Backstab damage happens to equal base damage on many 1H Piercing weapons, so this saves the editor from retyping it, while still being fully overridable (see below).
  • If backstab is explicitly given a valid number, that value is used instead of the dmg default — set this whenever Backstab Dmg genuinely differs from Base Dmg in-game (confirmed to happen — do not assume they're always equal).
  • If backstab is explicitly given an invalid value, the row shows the "⚠ Invalid value" warning.
  • If backstab is left blank AND dmg itself is invalid, the Backstab row ALSO shows "⚠ Invalid value" — even though the editor never touched the backstab field. This is deliberate: since Backstab silently auto-fills from dmg, a broken dmg value would otherwise pass through into Backstab undetected. Two warnings for one root typo (Base Dmg's own row plus Backstab's) is judged better than letting bad data through silently on the second row.
  • If the weapon doesn't qualify (wrong class or wrong skill), the entire Backstab row is omitted, exactly as today — no validation runs in this case either, since nothing would display regardless of what backstab contains.

Parameters:

  • itemname, lucy_img_ID — same as original
  • flags — free text, e.g. Lore Equipped, Attunable, Quest, Placeable
  • class, race, slot
  • size, weight, skill, delay
  • dmg, dmg_bonus, backstab (optional; defaults to dmg for Rogue-usable 1H Piercing weapons — see Backstab section above)
  • hp, mana, endurance
  • str, sta, agi, dex, wis, int, cha
  • svmagic, svfire, svcold, svdisease, svpoison, svvoid
  • focus_effect, worn_effect — a linked spell name (brackets and custom display text optional, see note above)
  • combat_effect, combat_effect_level — linked spell name + (Req Level X)
  • click_effect, click_effect_flag (e.g. Must Equip), click_cast_time, click_required_level, click_cooldown

Deliberately NOT tracked: Exaltation slot contents (which item currently provides each effect) — this is mutable player customization, not base item data. Only record an effect here if the in-game Exaltation slot shows the item's OWN name as the source.

Deliberately omitted: Ratio (Base Dmg ÷ Delay) — client-computed display value, not something an editor enters; reserved for the admins' planned upgrade-tier slider tool (see the Ratio placeholder note above).