Module:Sandbox/SamlovesmathGive feedback
Documentation for this module may be created at Module:Sandbox/Samlovesmath/doc
local p = {}
local heroData = mw.loadJsonData("Data:HeroData.json")
local langEn = mw.loadJsonData("Data:Lang_en.json")
-- THEME VARS:
-- color1 << custom color1
-- color1_grad << custom color1 (gradient end)
-- color2 << custom color2
-- text_title << title color for text
-- stats_text << text color for stat/info dropdowns
-- stats_back << background color for stat/info dropdowns
--
-- background_image << background image file (seen in hero roster select)
-- background_height << background image height
-- background_margin << background image margin (for non-whole background) (ex. silver, graves, rem)
--
-- logo_height << height of name (name logos can be very different in sizing because of text "bleeding")
-- logo_bleed << how much the name logo "bleeds" over the supposed padding
--
-- INFO VARS:
-- voice_actor
-- release_date
-- codenames
local infoboxVars = {
-- Default
["default"] = {
["background_image"] = "Default_select_background.png",
["background_height"] = "x700px",
["background_margin"] = "0px",
["logo_height"] = "x35px",
["logo_bleed"] = "0px",
["logo_bottom"] = "0px",
["color1"] = "098959",
["color1_grad"] = "0F6D4C",
["color2"] = "6DD48C",
["text_title"] = "DCFFE7",
["stats_text"] = "bbffbf",
["stats_back"] = "12301aA3"
},
-- Lady Geist
["hero_ghost"] = {
["background_image"] = "Geist_select_background.png",
["background-margin"] = "-118px",
["logo_height"] = "x32px",
["color1"] = "098959",
["color1_grad"] = "0F6D4C",
["color2"] = "6DD48C",
["text_title"] = "DCFFE7",
["stats_text"] = "bbffbf",
["stats_back"] = "12301aA3",
["voice_actor"] = "Abigail Marlowe",
["release_date"] = "April 24, 2024",
["codenames"] = "Geist; Ghost; Spectre"
},
-- Holliday
["hero_astro"] = {
["background_image"] = "Holliday_select_background.png",
["background_margin"] = "-123px";
["logo_height"] = "x42px",
["logo_bottom"] = "2px",
["color1"] = "934D14",
["color1_grad"] = "753D22",
["color2"] = "92CEB5",
["text_title"] = "FFDBBF",
["stats_text"] = "CAF7EF",
["stats_back"] = "382415A3",
["voice_actor"] = "Melanie Minichino",
["release_date"] = "January 17, 2025",
["codenames"] = "Astro"
},
-- Abrams
["hero_atlas"] = {
["background_image"] = "Abrams_select_background.png",
["background_margin"] = "-300px",
["logo_height"] = "x42px",
["logo_bottom"] = "2px",
["color1"] = "264B66",
["color1_grad"] = "264B66",
["color2"] = "AB933C",
["text_title"] = "FFEEB0",
["stats_text"] = "BAE2FF",
["stats_back"] = "11222DA3",
["voice_actor"] = "Samoa Joe",
["release_date"] = "April 24, 2024",
["codenames"] = "Atlas; Bull"
},
-- Bebop
["hero_bebop"] = {
["background_image"] = "Bebop_select_background.png",
["background_margin"] = "-283px",
["logo_height"] = "x42px",
["logo_bottom"] = "2px",
["color1"] = "683931",
["color1_grad"] = "5E3C35",
["color2"] = "D88C70",
["text_title"] = "FFD1D1",
["stats_text"] = "FFC9DB",
["stats_back"] = "2D1611A3",
["voice_actor"] = "JB Blanc",
["release_date"] = "April 24, 2024"
},
-- Paige
["hero_bookworm"] = {
["background_image"] = "Paige_select_background.png",
["background_margin"] = "-152px",
["logo_height"] = "x49px",
["logo_bleed"] = "-4px 0px -4px 0px",
["logo_bottom"] = "2px",
["color1"] = "1C6B4E",
["color1_grad"] = "1A6348",
["color2"] = "67EA8E",
["text_title"] = "C1FFED",
["stats_text"] = "BAFFCD",
["stats_back"] = "0F2822A3",
["voice_actor"] = "Jacqueline Emerson",
["release_date"] = "August 25, 2025",
["codenames"] = "Bookworm; Patience"
},
-- Paradox
["hero_chrono"] = {
["background_image"] = "Paradox_select_background.png",
["background_margin"] = "-218px",
["logo_height"] = "x28px",
["logo_bleed"] = "0px 10px 0px 0px",
["color1"] = "983952",
["color1_grad"] = "7F2B41",
["color2"] = "52B0D8",
["text_title"] = "C9EEFF",
["stats_text"] = "FFD6E8",
["stats_back"] = "2D1127A3",
["voice_actor"] = "Elle Newlands",
["release_date"] = "April 24, 2024",
["codenames"] = "Chrono"
},
-- The Doorman
["hero_doorman"] = {
["background_image"] = "Doorman_select_background.png",
["background_height"] = "x550px",
["background_margin"] = "-216px",
["logo_height"] = "x42px",
["logo_bleed"] = "0px 10px 0px 0px",
["logo_bottom"] = "2px",
["color1"] = "703d06",
["color1_grad"] = "83490A",
["color2"] = "C6A355",
["text_title"] = "FFE9BF",
["stats_text"] = "FFE6BF",
["stats_back"] = "1E1609A3",
["release_date"] = "August 22, 2025"
},
-- Drifter
["hero_drifter"] = {
["background_image"] = "Drifter_select_background.png",
["background_margin"] = "-216px",
["logo_height"] = "x42px",
["logo_bleed"] = "0px 10px 0px 0px",
["color1"] = "510D0D",
["color1_grad"] = "3D0F0F",
["color2"] = "A05653",
["text_title"] = "FFB5B5",
["stats_text"] = "E2CCCC",
["stats_back"] = "161615A3",
["voice_actor"] = "Matt Mercer",
["release_date"] = "August 27, 2025"
},
-- Dynamo
["hero_dynamo"] = {
["background_image"] = "Dynamo_select_background.png",
["background_margin"] = "-250px",
["logo_height"] = "x42px",
["logo_bleed"] = "0px 10px 0px 0px",
["color1"] = "18637F",
["color1_grad"] = "1B4656",
["color2"] = "CC9B28",
["text_title"] = "FFE89E",
["stats_text"] = "FFF3D1",
["stats_back"] = "11262DA3",
["voice_actor"] = "John Patrick Lowrie",
["release_date"] = "April 24, 2024",
["codenames"] = "Prof_dynamo; Prof; Sumo; Jeong"
},
-- Rem
["hero_familiar"] = {
["background_image"] = "Rem_select_background.png",
["background_margin"] = "-207px",
["logo_height"] = "x47px",
["logo_bleed"] = "-1px 0px -1px 0px",
["logo_bottom"] = "2px",
["color1"] = "25497A",
["color1_grad"] = "1F3C66",
["color2"] = "5FB0B7",
["text_title"] = "D8FFFB",
["stats_text"] = "C7E2E5",
["stats_back"] = "111C2DA3",
["release_date"] = "January 26, 2026",
["codenames"] = "Familiar"
},
-- Apollo
["hero_fencer"] = {
["background_image"] = "Apollo_select_background.png"
},
-- McGinnis
["hero_forge"] = {
["background_image"] = "Mcginnis_select_background.png"
},
-- Victor
["hero_frank"] = {
["background_image"] = "Victor_select_background.png"
},
-- Seven
["hero_gigawatt"] = {
["background_image"] = "Seven_select_background.png"
},
-- Haze
["hero_haze"] = {
["background_image"] = "Haze_select_background.png"
},
-- Vindicta
["hero_hornet"] = {
["background_image"] = "Vindicta_select_background.png"
},
-- Infernus
["hero_inferno"] = {
["background_image"] = "Infernus_select_background.png"
},
-- Kelvin
["hero_kelvin"] = {
["background_image"] = "Kelvin_select_background.png"
},
-- Mo & Krill
["hero_krill"] = {
["background_image"] = "Krill_select_background.png"
},
-- Lash
["hero_lash"] = {
["background_image"] = "Lash_select_background.png"
},
-- Sinclair
["hero_magician"] = {
["background_image"] = "Sinclair_select_background.png"
},
-- Mirage
["hero_mirage"] = {
["background_image"] = "Mirage_select_background.png"
},
-- Calico
["hero_nano"] = {
["background_image"] = "Calico_select_background.png"
},
-- Graves
["hero_necro"] = {
["background_image"] = "Graves_select_background.png"
},
-- Grey Talon
["hero_orion"] = {
["background_image"] = "Talon_select_background.png"
},
-- Venator
["hero_priest"] = {
["background_image"] = "Venator_select_background.png"
},
-- Billy
["hero_punkgoat"] = {
["background_image"] = "Billy_select_background.png"
},
-- Shiv
["hero_shiv"] = {
["background_image"] = "Shiv_select_background.png"
},
-- Pocket
["hero_synth"] = {
["background_image"] = "Pocket_select_background.png"
},
-- Ivy
["hero_tengu"] = {
["background_image"] = "Ivy_select_background.png"
},
-- Celeste
["hero_unicorn"] = {
["background_image"] = "Celeste_select_background.png"
},
-- Mina
["hero_vampirebat"] = {
["background_image"] = "Mina_select_background.png"
},
-- Vyper
["hero_viper"] = {
["background_image"] = "Vyper_select_background.png"
},
-- Viscous
["hero_viscous"] = {
["background_image"] = "Viscous_select_background.png"
},
-- Warden
["hero_warden"] = {
["background_image"] = "Warden_select_background.png"
},
-- Silver
["hero_werewolf"] = {
["background_image"] = "Silver_select_background.png",
["logo_height"] = "x60px",
["logo_bleed"] = "-10px 0px -20px 0px"
},
-- Silver (Transformed)
["hero_werewolf_transformed"] = {
["background_image"] = "Silver_select_background.png"
},
-- Wraith
["hero_wraith"] = {
["background_image"] = "Wraith_select_background.png"
},
-- Yamato
["hero_yamato"] = {
["background_image"] = "Yamato_select_background.png"
}
}
-- get list of heroes (debug)
function create_hero_list()
local heroList = {}
for i,v in pairs(heroData) do
table.insert(heroList, i)
end
table.sort(heroList)
return heroList
end
function p.get_value(frame)
local heroName = frame.args[1]
local themeVar = frame.args[2]
if infoboxVars[heroName] ~= nil and infoboxVars[heroName][themeVar] ~= nil then
return infoboxVars[heroName][themeVar]
elseif infoboxVars["default"][themeVar] ~= nil then
return infoboxVars["default"][themeVar]
end
return nil
end
return p