Editing User:LVL/Sandbox

Jump to navigation Jump to search
Warning: You are not logged in. Once you make an edit, a temporary account will be created for you. Learn more. Log in or create an account to continue receiving notifications after this account expires, and to access other features.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
{{Tabber|Heroes|Hero Comparison Table|Heroes by release|Voice actors|l1=Heroes|l2=Comparison Table|l3=Release Dates|l4=Voice Actors}}
== ItemData Module Tests (Pre-Deployment Check) ==


Below is a table comparing all currently playable [[Heroes]] by their stats.
=== get_cost ===
*  **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)


Use the inputs above the table to adjust {{PageRef|Boons}} and {{PageRef|Spirit Power}} and see how stats scale in real-time.
=== get_type ===
*  **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)


For heroes with Alt-Fire, click "Show Alt-Fire" or the <code>+</code> icon next to the hero to see Alt-Fire stats.
=== is_active ===
*  **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")


{{#invoke:Sandbox/LVL|write_hero_comparison_table|0|0|35|500}}  
=== get_prop ===
*  **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")


Notes:
=== get_codename ===
* Since Spirit Power scales with Boons (see Spirit Power column), it should also be accounted for when calculating level scaling for Spirit-scaling attributes.
*   **Get codename for "Refresher":** {{#invoke:ItemData|get_codename|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.
    *  (Expected: "upgrade_refresher")
* 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.
*   **Get codename for "Witchmail":** {{#invoke:ItemData|get_codename|Witchmail}}
* {{HeroIcon|McGinnis}} and {{HeroIcon|Victor}} DPS and Sustained DPS values are at max spin up.
    *   (Expected: "upgrade_absorbing_armor")
* {{HeroIcon|Silver (Transformed)}} has no ammo count and no reload.


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


[[:Category:Pages with tools]]
=== get_scalar (Testing Current Data) ===
'''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}}
Please note that all contributions to The Deadlock Wiki are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see Deadlock:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!
Cancel Editing help (opens in new window)