Module:HeroDataArrays: Difference between revisions

cleaned up
added alt fire stats to all tables where applicable
 
(18 intermediate revisions by 3 users not shown)
Line 23: Line 23:


     table.sort(rows, function(a, b)
     table.sort(rows, function(a, b)
         local nameA = getSortName(a.name or "")
         local nameA = getSortName(a.sortName or a.name or "")
         local nameB = getSortName(b.name or "")
         local nameB = getSortName(b.sortName or b.name or "")
         return nameA:lower() < nameB:lower()
         return nameA:lower() < nameB:lower()
     end)
     end)
Line 33: Line 33:
     if type(value) == "number" then
     if type(value) == "number" then
         return util_module.round_to_sig_fig(value, 3)
         return util_module.round_to_sig_fig(value, 3)
    end
    return value
end
-- Round to 4 digits
local function roundValueFour(value)
    if type(value) == "number" then
        return util_module.round_to_sig_fig(value, 4)
    end
    return value
end
-- Round to an integer (up to 2 digits)
local function roundValueInteger(value)
    if type(value) == "number" then
        return util_module.round_to_sig_fig(value, 2)
     end
     end
     return value
     return value
Line 85: Line 101:
             cells = cells .. " || " .. (r[col.field] or 0)
             cells = cells .. " || " .. (r[col.field] or 0)
         end
         end
        -- A row may carry an alternate sort key and a label suffix, used by
        -- secondary fire rows so they stay underneath their hero's main row
        local nameCell = "| style=\"text-align:left;\""
        if r.sortName then
            nameCell = nameCell .. " data-sort-value=\"" .. r.sortName .. "\""
        end
        nameCell = nameCell .. " | " ..
            frame:expandTemplate{ title = "PageRef", args = { r.name } } ..
            (r.nameSuffix or "")


         t = t ..
         t = t ..
             "|- \n" ..
             "|- \n" ..
             "| style=\"text-align:left;\" | " ..
             nameCell ..
            frame:expandTemplate{ title = "PageRef", args = { r.name } } ..
             cells .. " \n"
             cells .. " \n"
     end
     end
Line 140: Line 165:
             maxHealth = data["MaxHealth"] or 0,
             maxHealth = data["MaxHealth"] or 0,
             scalingHealth = "+" .. data["LevelScaling>MaxHealth"] or 0,
             scalingHealth = "+" .. data["LevelScaling>MaxHealth"] or 0,
             maxScalingHealth = tonumber(roundValue(data["MaxHealth"] + data["LevelScaling>MaxHealth"] * soul_unlock.get_max("PowerIncrease"))) or 0
             maxScalingHealth = (data["MaxHealth"] + data["LevelScaling>MaxHealth"] * soul_unlock.get_max("PowerIncrease")) or 0
         })
         })
     end
     end
Line 223: Line 248:
             altBulletsPerShot = data["Weapon>AltFire>BulletsPerShot"] or 0
             altBulletsPerShot = data["Weapon>AltFire>BulletsPerShot"] or 0
         })
         })
       
        local altBulletDamage = data["Weapon>AltFire>BulletDamage"]
        local altDPS = data["Weapon>AltFire>DPS"]
        local altRoundsPerSecond = data["Weapon>AltFire>RoundsPerSecond"]
        local altBulletsPerShot = data["Weapon>AltFire>BulletsPerShot"]
        if altBulletDamage and altBulletDamage ~= 0 then
            table.insert(rows, {
                name = name,
                sortName = name .. " (alt fire)",
                nameSuffix = " (alt fire)",
                DPS = altDPS,
                reloadDelay = data["Weapon>ReloadDelay"] or 0,
                reloadTime = data["Weapon>ReloadTime"] or 0,
                clipSize = data["Weapon>ClipSize"] or 0,
                roundsPerSecond = altRoundsPerSecond,
                bulletDamage = altBulletDamage,
                bulletsPerShot = altBulletsPerShot
            })
        end
     end
     end
     sortHeroes(rows)
     sortHeroes(rows)
Line 238: Line 282:
                 { label = "Bullets Per Shot", field = "bulletsPerShot"  },
                 { label = "Bullets Per Shot", field = "bulletsPerShot"  },
             }
             }
         },
         }   
    {
            title   = "Base Alt-Fire Damage Stats",
            columns = {
                { label = "Damage per sec", field = "altDPS"  },
                { label = "Ammo Per Shot", field = "altAmmoConsumedPerShot"  },
                { label = "Bullets per sec", field = "altRoundsPerSecond"  },
                { label = "Bullet Damage", field = "altBulletDamage"  },
                { label = "Bullets Per Shot", field = "altBulletsPerShot"  },
            }
        }   
     }
     }


Line 276: Line 310:
             altBulletSpeed = data["Weapon>AltFire>BulletSpeed"] or 0
             altBulletSpeed = data["Weapon>AltFire>BulletSpeed"] or 0
         })
         })
       
        local altBulletSpeed = data["Weapon>AltFire>BulletSpeed"]
        if altBulletSpeed and altBulletSpeed ~= 0 then
            table.insert(rows, {
                name = name,
                sortName = name .. " (alt fire)",
                nameSuffix = " (alt fire)",
                bulletSpeed = altBulletSpeed
            })
        end
     end
     end


Line 285: Line 329:
             columns = {
             columns = {
                 { label = "m/s", field = "bulletSpeed" }
                 { label = "m/s", field = "bulletSpeed" }
            }
        },
        {
            title = "Base Alt-Fire Bullet Velocity",
            columns = {
                { label = "m/s", field = "altBulletSpeed" }
             }
             }
         }
         }
Line 319: Line 357:
             ammoConsumedPerShot = data["Weapon>AltFire>AmmoConsumedPerShot"] or 0
             ammoConsumedPerShot = data["Weapon>AltFire>AmmoConsumedPerShot"] or 0
         })
         })
       
        local ammoConsumedPerShot = data["Weapon>AltFire>AmmoConsumedPerShot"]
        if ammoConsumedPerShot and ammoConsumedPerShot ~= 0 then
            table.insert(rows, {
                name = name,
                sortName = name .. " (alt fire)",
                nameSuffix = " (alt fire)",
                bulletsPerBurst = ammoConsumedPerShot,
                clipSize = data["Weapon>ClipSize"] or 0,
                spiritClipSize = "+".. (data["SpiritScaling>ClipSize"] or 0),
            })
        end
     end
     end
   
   
Line 331: Line 381:
                 { label = "Spirit Scaling", field = "spiritClipSize"  },
                 { label = "Spirit Scaling", field = "spiritClipSize"  },
             }
             }
         },
         }  
    {
            title  = "Alt-Fire Ammo Cost",
            columns = {
                { label = "Ammo Per Shot", field = "ammoConsumedPerShot"  },
            }
        }   
     }
     }


Line 363: Line 407:
             spiritFireRate = "+".. (data["SpiritScaling>FireRate"] or 0),
             spiritFireRate = "+".. (data["SpiritScaling>FireRate"] or 0),
         })
         })
       
        local altRoundsPerSecond = data["Weapon>AltFire>RoundsPerSecond"]
        if altRoundsPerSecond and altRoundsPerSecond ~= 0 then
            table.insert(rows, {
                name = name,
                sortName = name .. " (alt fire)",
                nameSuffix = " (alt fire)",
                roundsPerSecond = altRoundsPerSecond,
                spiritRoundsPerSecond = "+".. (data["SpiritScaling>RoundsPerSecond"] or 0),
            })
        end
     end
     end
     sortHeroes(rows)
     sortHeroes(rows)
Line 373: Line 428:
                 { label = "Spirit Scaling", field = "spiritRoundsPerSecond"  },
                 { label = "Spirit Scaling", field = "spiritRoundsPerSecond"  },
             }
             }
         },
         }   
    {
            title  = "Base Alt-Fire Fire Rate",
            columns = {
                { label = "Rounds/s", field = "altRoundsPerSecond" },
            }
        }   
     }
     }


Line 395: Line 444:
p.heroFalloffRangeTable = function(frame)
p.heroFalloffRangeTable = function(frame)
     local heroFalloffRangeData = heroDataArray({"Name", "Weapon>FalloffStartRange", "Weapon>FalloffEndRange",  "Weapon>AltFire>FalloffStartRange", "Weapon>AltFire>FalloffEndRange",
     local heroFalloffRangeData = heroDataArray({"Name", "Weapon>FalloffStartRange", "Weapon>FalloffEndRange",  "Weapon>AltFire>FalloffStartRange", "Weapon>AltFire>FalloffEndRange",
     "Weapon>AltFire>ExplosionRadius", "Weapon>FalloffEndScale"})
     "Weapon>AltFire>ExplosionRadius", "Weapon>FalloffEndScale", "Weapon>AltFire>ExplosionDamageScaleAtMaxRadius",})
      
      
     local rows = {}
     local rows = {}
Line 403: Line 452:
             falloffStartRange = data["Weapon>FalloffStartRange"] or 0,
             falloffStartRange = data["Weapon>FalloffStartRange"] or 0,
             falloffEndRange = data["Weapon>FalloffEndRange"] or 0,
             falloffEndRange = data["Weapon>FalloffEndRange"] or 0,
             falloffEndScale = -100 + (100 * tonumber(data["Weapon>FalloffEndScale"] or 0)),
             falloffEndScale = -100 + (100 * (data["Weapon>FalloffEndScale"] or 0)),
             altFalloffStartRange = data["Weapon>AltFire>FalloffStartRange"] or 0,
             altFalloffStartRange = data["Weapon>AltFire>FalloffStartRange"] or 0,
             altFalloffEndRange = data["Weapon>AltFire>FalloffEndRange"] or 0,
             altFalloffEndRange = data["Weapon>AltFire>FalloffEndRange"] or 0,
             altExplosionRadius = data["Weapon>AltFire>ExplosionRadius"] or 0
             altExplosionRadius = 0,
            altExplosionEndScale = (100 * (data["Weapon>AltFire>ExplosionDamageScaleAtMaxRadius"] or 0))
         })
         })
   
        local altFalloffStartRange = data["Weapon>AltFire>FalloffStartRange"]
        local altFalloffEndRange = data["Weapon>AltFire>FalloffEndRange"]
        local altExplosionRadius = data["Weapon>AltFire>ExplosionRadius"] or 0
        local altExplosionEndScale = (100 * (data["Weapon>AltFire>ExplosionDamageScaleAtMaxRadius"] or 0))
        if altFalloffStartRange and altFalloffStartRange ~= 0 then
            table.insert(rows, {
                name = name,
                sortName = name .. " (alt fire)",
                nameSuffix = " (alt fire)",
                falloffStartRange = altFalloffStartRange,
                falloffEndRange = altFalloffEndRange,
                altExplosionRadius = data["Weapon>AltFire>ExplosionRadius"] or 0,
                falloffEndScale = -100 + (100 * (data["Weapon>FalloffEndScale"] or 0))
            })
        end
     end
     end
     sortHeroes(rows)
     sortHeroes(rows)
Line 418: Line 484:
                 { label = "Maximum Range (m)", field = "falloffEndRange"  },
                 { label = "Maximum Range (m)", field = "falloffEndRange"  },
                 { label = "Damage Falloff (%)", field = "falloffEndScale"  },
                 { label = "Damage Falloff (%)", field = "falloffEndScale"  },
            }
        } ,
    {
            title  = "Base Alt-Fire Falloff Range",
            columns = {
                { label = "Minimum Range (m)", field = "altFalloffStartRange"  },
                { label = "Maximum Range (m)", field = "altFalloffEndRange"  },
                 { label = "Explosion Radius (m)", field = "altExplosionRadius"  },
                 { label = "Explosion Radius (m)", field = "altExplosionRadius"  },
             }
             }
Line 453: Line 512:
             bulletDamagePerShot = ((data["Weapon>BulletDamage"] or 0) * (data["Weapon>BulletsPerShot"] or 0) * (data["Weapon>BulletsPerBurst"] or 0)),
             bulletDamagePerShot = ((data["Weapon>BulletDamage"] or 0) * (data["Weapon>BulletsPerShot"] or 0) * (data["Weapon>BulletsPerBurst"] or 0)),
             scalingDamage = "+" .. data["LevelScaling>BulletDamage"] or 0,
             scalingDamage = "+" .. data["LevelScaling>BulletDamage"] or 0,
             maxScalingDamage =  tonumber(roundValue(data["Weapon>BulletDamage"] + data["LevelScaling>BulletDamage"] * soul_unlock.get_max("PowerIncrease"))) or 0,
             maxScalingDamage =  (roundValue(data["Weapon>BulletDamage"] + data["LevelScaling>BulletDamage"] * soul_unlock.get_max("PowerIncrease"))) or 0,
             altBulletDamage = data["Weapon>AltFire>BulletDamage"] or 0,
             altBulletDamage = data["Weapon>AltFire>BulletDamage"] or 0,
             spiritScalingDamage = "+" .. (data["SpiritScaling>BulletDamage"] or 0),
             spiritScalingDamage = "+" .. (data["SpiritScaling>BulletDamage"] or 0),
         })
         })
        -- Secondary fire is listed as its own row, right under the hero's main row
        local altDamage = data["Weapon>AltFire>BulletDamage"]
        if altDamage and altDamage ~= 0 then
            local altScaling = data["LevelScaling>BulletDamageAltFire"] or 0
            table.insert(rows, {
                name = name,
                sortName = name .. " (alt fire)",
                nameSuffix = " (alt fire)",
                bulletDamage = altDamage,
                scalingDamage = "+" .. altScaling,
                maxScalingDamage = roundValue(altDamage + altScaling * soul_unlock.get_max("PowerIncrease")),
                spiritScalingDamage = "+0",
            })
        end
     end
     end
     sortHeroes(rows)
     sortHeroes(rows)
Line 472: Line 546:
     }
     }


    local output = {}
    for _, def in ipairs(tableDefs) do
        local t = buildTable(frame, rows, def, def.options)
        if t ~= "" then
            table.insert(output, t)
        end
    end
    return table.concat(output, "\n\n")
end
p.heroMeleeTable = function(frame)
    -- Pull data
    local heroMeleeData = heroDataArray({"Name", "LightMeleeDamage", "LevelScaling>LightMeleeDamage", "HeavyMeleeDamage", "LevelScaling>HeavyMeleeDamage", "SpiritScaling>HeavyMeleeDamage"})
    local rows = {}
    for name, data in pairs(heroMeleeData) do
        table.insert(rows, {
            name = name,
            lightMeleeDamage = data["LightMeleeDamage"] or 0,
            lightScalingDamage = "+" .. data["LevelScaling>LightMeleeDamage"] or 0,
            lightMaxScalingDamage = (roundValueFour(data["LightMeleeDamage"] + data["LevelScaling>LightMeleeDamage"] * soul_unlock.get_max("PowerIncrease"))) or 0,
            heavyMeleeDamage = data["HeavyMeleeDamage"] or 0,
            heavyScalingDamage = "+" .. data["LevelScaling>HeavyMeleeDamage"] or 0,
            heavyMaxScalingDamage =  (roundValueFour(data["HeavyMeleeDamage"] + data["LevelScaling>HeavyMeleeDamage"] * soul_unlock.get_max("PowerIncrease"))) or 0,
            heavySpiritScalingDamage = "+" .. (data["SpiritScaling>HeavyMeleeDamage"] or 0),
        })
    end
    sortHeroes(rows)
    local tableDefs = {
    {
            title  = "Base Light & Heavy Melee Stats",
            columns = {
                { label = "Starting Light", field = "lightMeleeDamage"  },
                { label = "Added per Boon (L)", field = "lightScalingDamage"  },
                { label = "At Max Boon (L)", field = "lightMaxScalingDamage"  },
                { label = "Starting Heavy", field = "heavyMeleeDamage"  },
                { label = "Added per Boon (H)", field = "heavyScalingDamage"  },
                { label = "At Max Boon (H)", field = "heavyMaxScalingDamage"  },
                { label = "Spirit Scaling (H)", field = "heavySpiritScalingDamage"  },
               
            }
        }
    }
   
     local output = {}
     local output = {}
     for _, def in ipairs(tableDefs) do
     for _, def in ipairs(tableDefs) do
Line 493: Line 613:
             lightMeleeDamage = data["LightMeleeDamage"] or 0,
             lightMeleeDamage = data["LightMeleeDamage"] or 0,
             scalingDamage = "+" .. data["LevelScaling>LightMeleeDamage"] or 0,
             scalingDamage = "+" .. data["LevelScaling>LightMeleeDamage"] or 0,
             maxScalingDamage =  tonumber(roundValue(data["LightMeleeDamage"] + data["LevelScaling>LightMeleeDamage"] * soul_unlock.get_max("PowerIncrease"))) or 0,
             maxScalingDamage =  (roundValueFour(data["LightMeleeDamage"] + data["LevelScaling>LightMeleeDamage"] * soul_unlock.get_max("PowerIncrease"))) or 0,
         })
         })
     end
     end
Line 530: Line 650:
             heavyMeleeDamage = data["HeavyMeleeDamage"] or 0,
             heavyMeleeDamage = data["HeavyMeleeDamage"] or 0,
             scalingDamage = "+" .. data["LevelScaling>HeavyMeleeDamage"] or 0,
             scalingDamage = "+" .. data["LevelScaling>HeavyMeleeDamage"] or 0,
             maxScalingDamage = tonumber(roundValue(data["HeavyMeleeDamage"] + data["LevelScaling>HeavyMeleeDamage"] * soul_unlock.get_max("PowerIncrease"))) or 0,
             maxScalingDamage = (roundValueFour(data["HeavyMeleeDamage"] + data["LevelScaling>HeavyMeleeDamage"] * soul_unlock.get_max("PowerIncrease"))) or 0,
             spiritScalingDamage = "+" .. (data["SpiritScaling>HeavyMeleeDamage"] or 0),
             spiritScalingDamage = "+" .. (data["SpiritScaling>HeavyMeleeDamage"] or 0),
         })
         })
Line 697: Line 817:


p.heroMoveSpeedTable = function(frame)
p.heroMoveSpeedTable = function(frame)
     local heroMoveSpeedData = heroDataArray({"Name", "MaxMoveSpeed", "SprintSpeed", "SpiritScaling>MaxMoveSpeed", "SpiritScaling>SprintSpeed"})
     local heroMoveSpeedData = heroDataArray({"Name", "MaxMoveSpeed", "SprintSpeed", "Weapon>ShootMoveSpeed", "SpiritScaling>MaxMoveSpeed", "SpiritScaling>SprintSpeed"})


     local rows = {}
     local rows = {}
Line 706: Line 826:
             sprintSpeed = data["SprintSpeed"] or 0,
             sprintSpeed = data["SprintSpeed"] or 0,
             totalSpeed = data["MaxMoveSpeed"] + data["SprintSpeed"] or 0,
             totalSpeed = data["MaxMoveSpeed"] + data["SprintSpeed"] or 0,
            shootSpeed = (data["Weapon>ShootMoveSpeed"] or 0) * 100,
            totalShootingSpeed = roundValue((data["MaxMoveSpeed"] + data["SprintSpeed"] or 0) * (data["Weapon>ShootMoveSpeed"] or 0)),
             spiritMoveSpeed = "+" .. (data["SpiritScaling>MaxMoveSpeed"] or 0),
             spiritMoveSpeed = "+" .. (data["SpiritScaling>MaxMoveSpeed"] or 0),
             spiritSprintSpeed = "+" .. (data["SpiritScaling>SprintSpeed"] or 0),
             spiritSprintSpeed = "+" .. (data["SpiritScaling>SprintSpeed"] or 0),
Line 719: Line 841:
                 { label = "Sprint Speed (m/s)", field = "sprintSpeed"  },
                 { label = "Sprint Speed (m/s)", field = "sprintSpeed"  },
                 { label = "Total Speed (m/s)", field = "totalSpeed"  },
                 { label = "Total Speed (m/s)", field = "totalSpeed"  },
                { label = "Shooting Speed (m/s)", field = "totalShootingSpeed"  },
                { label = "Shooting Mult (%)", field = "shootSpeed"  },
                 { label = "MS Spirit Scaling", field = "spiritMoveSpeed"  },
                 { label = "MS Spirit Scaling", field = "spiritMoveSpeed"  },
                 { label = "SS Spirit Scaling", field = "spiritSprintSpeed"  },
                 { label = "SS Spirit Scaling", field = "spiritSprintSpeed"  },
Line 747: Line 871:
             bulletResist  = data["BulletResist"] or 0,
             bulletResist  = data["BulletResist"] or 0,
             bulletResistScaling = "+".. (data["LevelScaling>BulletResist"] or 0),
             bulletResistScaling = "+".. (data["LevelScaling>BulletResist"] or 0),
             bulletResistScalingMax = (tonumber(roundValue((data["BulletResist"] or 0) + (data["LevelScaling>BulletResist"] or 0) * soul_unlock.get_max("PowerIncrease"))) or 0),
             bulletResistScalingMax = ((roundValue((data["BulletResist"] or 0) + (data["LevelScaling>BulletResist"] or 0) * soul_unlock.get_max("PowerIncrease"))) or 0),
             bulletResistSpiritScaling = "+".. (data["SpiritScaling>BulletResist"] or 0),
             bulletResistSpiritScaling = "+".. (data["SpiritScaling>BulletResist"] or 0),
             spiritResist  = data["TechResist"] or 0,
             spiritResist  = data["TechResist"] or 0,
             spiritResistScaling = "+".. (data["LevelScaling>TechResist"] or 0),
             spiritResistScaling = "+".. (data["LevelScaling>TechResist"] or 0),
             spiritResistScalingMax = (tonumber(roundValue((data["TechResist"] or 0) + (data["LevelScaling>TechResist"] or 0) * soul_unlock.get_max("PowerIncrease"))) or 0),
             spiritResistScalingMax = ((roundValue((data["TechResist"] or 0) + (data["LevelScaling>TechResist"] or 0) * soul_unlock.get_max("PowerIncrease"))) or 0),
             spiritResistSpiritScaling = "+".. (data["SpiritScaling>TechResist"] or 0),
             spiritResistSpiritScaling = "+".. (data["SpiritScaling>TechResist"] or 0),
             meleeResist  = data["MeleeResist"] or 0,
             meleeResist  = data["MeleeResist"] or 0,
Line 843: Line 967:
             name = name,
             name = name,
             spiritScaling  = "+".. data["LevelScaling>TechPower"] or 0,
             spiritScaling  = "+".. data["LevelScaling>TechPower"] or 0,
             maxSpiritScaling = tonumber(data["LevelScaling>TechPower"] * soul_unlock.get_max("PowerIncrease")) or 0,
             maxSpiritScaling = (data["LevelScaling>TechPower"] * soul_unlock.get_max("PowerIncrease")) or 0,
         })
         })
     end
     end
Line 888: Line 1,012:
             }
             }
         }     
         }     
    }
    local output = {}
    for _, def in ipairs(tableDefs) do
        local t = buildTable(frame, rows, def, def.options)
        if t ~= "" then
            table.insert(output, t)
        end
    end
    return table.concat(output, "\n\n")
end
p.bulletGravityTable = function(frame)
    local heroGravityData = heroDataArray({"Name", "Weapon>BulletGravityScale", "Weapon>AltFire>BulletGravityScale"})
    local rows = {}
    for name, data in pairs(heroGravityData) do
        table.insert(rows, {
            name = name,
            gravityScale  = (data["Weapon>BulletGravityScale"] or 0),
            altGravityScale  = (data["Weapon>AltFire>BulletGravityScale"] or 0),
        })
    end
    sortHeroes(rows)
    local tableDefs = {
    {
            title  = "Base Bullet Gravity Scale Stats",
            columns = {
                { label = "Gravity Scale", field = "gravityScale"  },
            }
        },
        {
            title  = "Base Alt-fire Bullet Gravity Scale Stats",
            columns = {
                { label = "Gravity Scale", field = "altGravityScale"  },
            }
        }
    }
    local output = {}
    for _, def in ipairs(tableDefs) do
        local t = buildTable(frame, rows, def, def.options)
        if t ~= "" then
            table.insert(output, t)
        end
    end
    return table.concat(output, "\n\n")
end
p.bulletRadiusTable = function(frame)
    local heroBulletRadiusData = heroDataArray({"Name", "Weapon>BulletRadius", "Weapon>AltFire>BulletRadius"})
    local rows = {}
    for name, data in pairs(heroBulletRadiusData) do
        table.insert(rows, {
            name = name,
            bulletRadius  = (data["Weapon>BulletRadius"] or 0) * 100,
            bulletRadiusInches  = roundValueInteger((data["Weapon>BulletRadius"] or 0) * 100 * 0.394),
            altBulletRadius  = (data["Weapon>AltFire>BulletRadius"] or 0) * 100,
            altBulletRadiusInches  = roundValueInteger((data["Weapon>AltFire>BulletRadius"] or 0) * 100 * 0.394),
        })
       
        local altBulletRadius = (data["Weapon>AltFire>BulletRadius"] or 0) * 100
        local altBulletRadiusInches  = roundValueInteger((data["Weapon>AltFire>BulletRadius"] or 0) * 100 * 0.394)
        if altBulletRadius and altBulletRadius ~= 0 then
            table.insert(rows, {
                name = name,
                sortName = name .. " (alt fire)",
                nameSuffix = " (alt fire)",
                bulletRadius = altBulletRadius,
                bulletRadiusInches = altBulletRadiusInches
            })
        end
    end
    sortHeroes(rows)
    local tableDefs = {
    {
            title  = "Base Bullet Radius Stats",
            columns = {
                { label = "Bullet Radius (cm)", field = "bulletRadius"  },
                { label = "Bullet Radius (in)", field = "bulletRadiusInches"  },
            }
        }
     }
     }