User:LVL/Sandbox: Difference between revisions

LVL (talk | contribs)
No edit summary
mNo edit summary
 
(283 intermediate revisions by one other user not shown)
Line 1: Line 1:
== ItemData Module Tests (Pre-Deployment Check) ==
{{Tabber|Heroes|Hero Comparison Table|Heroes by release|Voice actors|l1=Heroes|l2=Comparison Table|l3=Release Dates|l4=Voice Actors}}


=== get_cost ===
Below is a table comparing all currently playable [[Heroes]] by their stats.
*  **Valid item:** {{#invoke:ItemData|get_cost|Berserker}}
    *  (Expected: "3,200")
*  **Valid item with weird casing:** {{#invoke:ItemData|get_cost|bErSeRkEr}}
    *  (Expected: "3,200")
*  **Valid item with whitespace:** {{#invoke:ItemData|get_cost|  Berserker  }}
    *  (Expected: "3,200")
*  **Invalid item:** {{#invoke:ItemData|get_cost|This Item Does Not Exist}}
    *  (Expected: A red "Item Not Found" error)
*  **No item:** {{#invoke:ItemData|get_cost|}}
    *  (Expected: A red "Item Not Found" error)


=== get_type ===
Use the inputs above the table to adjust {{PageRef|Boons}} and {{PageRef|Spirit Power}} and see how stats scale in real-time.
*  **Weapon:** {{#invoke:ItemData|get_type|Active Reload}}
    *  (Expected: "Weapon" or its localized equivalent)
*  **Armor:** {{#invoke:ItemData|get_type|Witchmail}}
    *  (Expected: "Armor" or its localized equivalent)
*  **Tech:** {{#invoke:ItemData|get_type|Spirit Strike}}
    *  (Expected: "Tech" or its localized equivalent)


=== is_active ===
For heroes with Alt-Fire, click "Show Alt-Fire" or the <code>+</code> icon next to the hero to see Alt-Fire stats.
*  **Passive item:** {{#invoke:ItemData|is_active|Berserker}}
    *  (Expected: "false")
*  **Active item (Toggle):** {{#invoke:ItemData|is_active|Blood Tribute}}
    *  (Expected: "true")
*  **Active item (InstantCast):** {{#invoke:ItemData|is_active|Refresher}}
    *  (Expected: "true")


=== get_prop ===
{{#invoke:Sandbox/LVL|write_hero_comparison_table|0|0|35|500}}  
*  **Simple property:** {{#invoke:ItemData|get_prop|Berserker|Tier}}
    *  (Expected: "3")
*  **Table property (ShopFilters):** {{#invoke:ItemData|get_prop|Armor Piercing Rounds|ShopFilters}}
    *  (Expected: "ClipSize, WeaponDamage")
*  **Property of a disabled item:** {{#invoke:ItemData|get_prop|Ablative Coat|MaxBulletResist}}
    *  (Expected: "30")


=== get_codename ===
Notes:
*   **Get codename for "Refresher":** {{#invoke:ItemData|get_codename|Refresher}}
* Since Spirit Power scales with Boons (see Spirit Power column), it should also be accounted for when calculating level scaling for Spirit-scaling attributes.
    *  (Expected: "upgrade_refresher")
* DPS accounts for Burst weapons (like {{HeroIcon|Paradox}} and {{HeroIcon|Lash}}), and if the weapon has a Spin Up mechanic (like {{HeroIcon|McGinnis}}), it is assumed to be fully spun. Bursts that occur right at the 1 second mark may have some inaccuracy due to averaging.
*   **Get codename for "Witchmail":** {{#invoke:ItemData|get_codename|Witchmail}}
* Sustained DPS also accounts for reload speed, clip size, and the time to empty the clip, and is an average over an infinite time period.
    *   (Expected: "upgrade_absorbing_armor")
* {{HeroIcon|McGinnis}} and {{HeroIcon|Victor}} DPS and Sustained DPS values are at max spin up.
* {{HeroIcon|Silver (Transformed)}} has no ammo count and no reload.


=== get_component_name ===
== Navigation ==
*  **Item with components:** {{#invoke:ItemData|get_component_name|Vortex Web}}
{{Tools Navbox}}
    *  (Expected: The name of the item with codename "upgrade_containment". This will be blank if that item has no name.)
{{Stat Navbox}}
*  **Item without components:** {{#invoke:ItemData|get_component_name|Berserker}}
    *  (Expected: Blank)


=== get_scalar (Testing Current Data) ===
[[:Category:Pages with tools]]
'''Note:''' This confirms the module correctly handles missing `SpiritScaling` data in the current JSON.
*  **Call for "Torment Pulse":** {{#invoke:ItemData|get_scalar|Torment Pulse|DamagePulseAmount}}
    *  (Expected: A red error message like "SpiritScaling data not found for "Torment Pulse"")
 
=== get_headcount ===
*  **Total enabled items:** {{#invoke:ItemData|get_headcount}}
    *  (Expected: A number representing the total count of enabled items with names in your full JSON.)
 
=== Integration Test (Using a common template) ===
*  **Transcluding a key template with a real, enabled item:**
    {{Infobox item|name=Witchmail}}
    *  (The entire infobox should render correctly.)
 
*  **Transcluding with a disabled item:**
    {{Infobox item|name=Ablative Coat}}
    *  (The infobox should still render, showing how the template handles disabled items.)
 
=== DEBUGGING Ablative Coat ===
{{#invoke:ItemData|debug_lookup|Ablative Coat}}