Editing Module:LevelTables/doc

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:
This module is used to create tables that display a stat of the heroes against the souls of each level powerup. The data comes from [[Data:HeroData.json]] and [[Data:SoulUnlockData.json]].
This module is used to create tables that display a stat of the heroes against the souls of each level powerup. The data comes from [[Data:HeroData.json]] and [[Data:SoulUnlockData.json]].


The primary function creates a theme-aware, collapsible section containing a data table. This is invoked with:
A table is created with <br>'''<nowiki>{{#invoke:LevelTables|write_power_increase_table|</nowiki>''(stat)''}}'''<br>
'''<nowiki>{{#invoke:LevelTables|write_power_increase_table|</nowiki>''(stat)''|title=''Section Title''}}'''
where '''''(stat)''''' is replaced with one of the power level increase stats.
where '''''(stat)''''' is replaced with one of the power level increase stats, and '''''Section Title''''' is the text that appears in the header of the collapsible box.


The generated table provides a summary of key milestones and includes an expandable '[Show All]' button for each hero to view the complete scaling data.
Currently, the valid stats are '''BulletDamage''', '''MaxHealth''', '''TechPower''', '''LightMeleeDamage''', '''HeavyMeleeDamage'''
 
Currently, the valid stats are '''BulletDamage''', '''MaxHealth''', '''TechPower''', '''LightMeleeDamage''', and '''HeavyMeleeDamage'''


The stat keys and names are stored in the private variable ''level_scaling_key_to_name'', so if a new stat gets added to level scaling in [[Data:HeroData.json|HeroData.json]], you can add it to that variable.
The stat keys and names are stored in the private variable ''level_scaling_key_to_name'', so if a new stat gets added to level scaling in [[Data:HeroData.json|HeroData.json]], you can add it to that variable.


Since the alternate fires of some heroes' guns are not stored in [[Data:HeroData.json|HeroData.json]], there is a variable to store the damage and scaling called ''alt_fires''.
Since the alternate fires of some heroes' guns are not stored in [[Data:HeroData.json|HeroData.json]], there is a varibale to store the damage and scaling called ''alt_fires''.


Here is an example of the Bullet Damage Table:
Here is an example of the Bullet Damage Table:
{{#invoke:LevelTables|write_power_increase_table|BulletDamage|title=Base Bullet Damage}}
{{#invoke:LevelTables|write_power_increase_table|BulletDamage}}
 
This module also has a function to write a list of heroes with multi-shot weapons, how many shots their weapon has, how much base damage a shot does, and how much damage a shot increases by per boon.
 
The list is automatically sorted alphabetically (ignoring "The" for names like The Doorman) and provides accurate descriptions for special cases, such as heroes whose multi-pellet attacks only deal damage once.
 
This list can be invoked with: <br>'''<nowiki>{{#invoke:LevelTables|write_multishot_stats}}</nowiki>'''
 
This is what the generated list looks like:
 
{{#invoke:LevelTables|write_multishot_stats}}
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)
Preview page with this template