From 6db7e2d11f2c41c824f496a3ab3e6d3207558c8c Mon Sep 17 00:00:00 2001 From: GeneralHuber <61513963+GeneralHuber@users.noreply.github.com> Date: Sun, 27 Sep 2026 18:50:07 +0200 Subject: [PATCH 1/5] config.lua for pubg notability checker --- lua/wikis/pubg/NotabilityChecker/config.lua | 264 ++++++++++++++++++++ 1 file changed, 264 insertions(+) create mode 100644 lua/wikis/pubg/NotabilityChecker/config.lua diff --git a/lua/wikis/pubg/NotabilityChecker/config.lua b/lua/wikis/pubg/NotabilityChecker/config.lua new file mode 100644 index 00000000000..f1152ab7a2c --- /dev/null +++ b/lua/wikis/pubg/NotabilityChecker/config.lua @@ -0,0 +1,264 @@ +--- +-- @Liquipedia +-- page=Module:NotabilityChecker/config +-- +-- Please see https://github.com/Liquipedia/Lua-Modules to contribute +-- + +local Config = {} + +Config.TIER_TYPE_GENERAL = 'general' +Config.TIER_TYPE_QUALIFIER = 'qualifier' +Config.TIER_TYPE_WEEKLY = 'weekly' +Config.TIER_TYPE_MONTHLY = 'monthly' +Config.TIER_TYPE_SHOW_MATCH = 'showmatch' +Config.TIER_TYPE_MISC = 'misc' +Config.MAX_NUMBER_OF_COACHES = 6 + +-- How many placements should we retrieve from LPDB for a team/player? +Config.PLACEMENT_LIMIT = 2000 + +-- These are the notability thresholds needed by a team/player +Config.NOTABILITY_THRESHOLD_MIN = 15 +Config.NOTABILITY_THRESHOLD_NOTABLE = 15 + +-- Weights used for tournaments +Config.weights = { + { + tier = 1, + options = { + dateLossIgnored = true, + }, + tiertype = { + { + name = Config.TIER_TYPE_GENERAL, + points = 10, + }, + { + name = Config.TIER_TYPE_MONTHLY, + points = 0, + }, + { + name = Config.TIER_TYPE_WEEKLY, + points = 0, + }, + { + name = Config.TIER_TYPE_QUALIFIER, + points = 0, + }, + { + name = Config.TIER_TYPE_SHOW_MATCH, + points = 0, + }, + { + name = Config.TIER_TYPE_MISC, + points = 0, + }, + }, + }, + { + tier = 2, + options = { + dateLossIgnored = true, + }, + tiertype = { + { + name = Config.TIER_TYPE_GENERAL, + points = 7, + }, + { + name = Config.TIER_TYPE_MONTHLY, + points = 0, + }, + { + name = Config.TIER_TYPE_WEEKLY, + points = 0, + }, + { + name = Config.TIER_TYPE_QUALIFIER, + points = 0, + }, + { + name = Config.TIER_TYPE_SHOW_MATCH, + points = 0, + }, + { + name = Config.TIER_TYPE_MISC, + points = 0, + }, + }, + }, + { + tier = 3, + options = { + dateLossIgnored = true, + }, + tiertype = { + { + name = Config.TIER_TYPE_GENERAL, + points = 3, + }, + { + name = Config.TIER_TYPE_MONTHLY, + points = 0, + }, + { + name = Config.TIER_TYPE_WEEKLY, + points = 0, + }, + { + name = Config.TIER_TYPE_QUALIFIER, + points = 0, + }, + { + name = Config.TIER_TYPE_SHOW_MATCH, + points = 0, + }, + { + name = Config.TIER_TYPE_MISC, + points = 0, + }, + }, + }, + { + tier = 4, + options = { + dateLossIgnored = true, + }, + tiertype = { + { + name = Config.TIER_TYPE_GENERAL, + points = 2, + }, + { + name = Config.TIER_TYPE_MONTHLY, + points = 0, + }, + { + name = Config.TIER_TYPE_WEEKLY, + points = 0, + }, + { + name = Config.TIER_TYPE_QUALIFIER, + points = 0, + }, + { + name = Config.TIER_TYPE_SHOW_MATCH, + points = 0, + }, + { + name = Config.TIER_TYPE_MISC, + points = 0, + }, + }, + }, + { + tier = 5, + options = { + dateLossIgnored = true, + }, + tiertype = { + { + name = Config.TIER_TYPE_GENERAL, + points = 1, + }, + { + name = Config.TIER_TYPE_MONTHLY, + points = 0, + }, + { + name = Config.TIER_TYPE_WEEKLY, + points = 0, + }, + { + name = Config.TIER_TYPE_QUALIFIER, + points = 0, + }, + { + name = Config.TIER_TYPE_SHOW_MATCH, + points = 0, + }, + { + name = Config.TIER_TYPE_MISC, + points = 0, + }, + }, + }, +} + +--- This function adjusts the score for the placement, e.g. +--- a first placement should score more than a 10th placement. +---@param tier string|integer +---@param tierType string +---@return fun(number, number): number +function Config.placementDropOffFunction(tier, tierType) + + return function(score, placement) + if (tierType == Config.TIER_TYPE_QUALIFIER + or tierType == Config.TIER_TYPE_MISC + or tierType == Config.TIER_TYPE_WEEKLY + or tierType == Config.TIER_TYPE_MONTHLY + or tierType == Config.TIER_TYPE_SHOW_MATCH) then + return score + else + if (tier == 1 and placement <= 3) then + return score + + elseif (tier == 1 and placement <= 8) then + return (score - 5) + + elseif (tier == 1 and placement <= 12) then + return (score - 7) + + else if (tier == 1) then + return (score - 9) + + elseif (tier == 2 and placement <= 3) then + return (score) + + elseif (tier == 2 and placement <= 4) then + return (score - 4) + + elseif (tier == 2 and placement <= 8) then + return (score - 5) + + elseif (tier == 2) then + return (score - 7) + + elseif (tier == 3 and placement <= 3) then + return (score) + + elseif (tier == 3 and placement <= 4) then + return (score - 1) + + elseif (tier == 3) then + return (score - 3) + + elseif (tier == 4 and placement == 1) then + return (score) + + elseif (tier == 4 and placement <= 2) then + return (score - 1) + + elseif (tier == 4) then + return (score - 2) + + elseif (tier == 5 and placement == 1) then + return (score) + + elseif (tier == 5) then + return (score - 1) + end + end + + return 0 + end +end + +-- Adjusts the score to compensate for the mode, you might +-- want to decrease the points given for a certain mode +function Config.adjustScoreForMode(score, mode) + return score +end + +return Config From 22b05b9c4793b5315768df8606a7e8f680fd7d8c Mon Sep 17 00:00:00 2001 From: GeneralHuber <61513963+GeneralHuber@users.noreply.github.com> Date: Sun, 27 Sep 2026 19:05:27 +0200 Subject: [PATCH 2/5] space --- lua/wikis/pubg/NotabilityChecker/config.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/wikis/pubg/NotabilityChecker/config.lua b/lua/wikis/pubg/NotabilityChecker/config.lua index f1152ab7a2c..d1bf4e97495 100644 --- a/lua/wikis/pubg/NotabilityChecker/config.lua +++ b/lua/wikis/pubg/NotabilityChecker/config.lua @@ -210,7 +210,7 @@ function Config.placementDropOffFunction(tier, tierType) elseif (tier == 1 and placement <= 12) then return (score - 7) - else if (tier == 1) then + elseif (tier == 1) then return (score - 9) elseif (tier == 2 and placement <= 3) then From 1099899d7b0975cb83042532f9c3f753b9ad4c3a Mon Sep 17 00:00:00 2001 From: GeneralHuber <61513963+GeneralHuber@users.noreply.github.com> Date: Tue, 29 Sep 2026 19:40:08 +0200 Subject: [PATCH 3/5] remove linebreak and move indents --- lua/wikis/pubg/NotabilityChecker/config.lua | 87 ++++++++++----------- 1 file changed, 43 insertions(+), 44 deletions(-) diff --git a/lua/wikis/pubg/NotabilityChecker/config.lua b/lua/wikis/pubg/NotabilityChecker/config.lua index d1bf4e97495..ca2fe897a6d 100644 --- a/lua/wikis/pubg/NotabilityChecker/config.lua +++ b/lua/wikis/pubg/NotabilityChecker/config.lua @@ -192,67 +192,66 @@ Config.weights = { ---@param tierType string ---@return fun(number, number): number function Config.placementDropOffFunction(tier, tierType) + return function(score, placement) + if (tierType == Config.TIER_TYPE_QUALIFIER + or tierType == Config.TIER_TYPE_MISC + or tierType == Config.TIER_TYPE_WEEKLY + or tierType == Config.TIER_TYPE_MONTHLY + or tierType == Config.TIER_TYPE_SHOW_MATCH) then + return score + else + if (tier == 1 and placement <= 3) then + return score - return function(score, placement) - if (tierType == Config.TIER_TYPE_QUALIFIER - or tierType == Config.TIER_TYPE_MISC - or tierType == Config.TIER_TYPE_WEEKLY - or tierType == Config.TIER_TYPE_MONTHLY - or tierType == Config.TIER_TYPE_SHOW_MATCH) then - return score - else - if (tier == 1 and placement <= 3) then - return score + elseif (tier == 1 and placement <= 8) then + return (score - 5) - elseif (tier == 1 and placement <= 8) then - return (score - 5) + elseif (tier == 1 and placement <= 12) then + return (score - 7) - elseif (tier == 1 and placement <= 12) then - return (score - 7) + elseif (tier == 1) then + return (score - 9) - elseif (tier == 1) then - return (score - 9) + elseif (tier == 2 and placement <= 3) then + return (score) - elseif (tier == 2 and placement <= 3) then - return (score) + elseif (tier == 2 and placement <= 4) then + return (score - 4) - elseif (tier == 2 and placement <= 4) then - return (score - 4) + elseif (tier == 2 and placement <= 8) then + return (score - 5) - elseif (tier == 2 and placement <= 8) then - return (score - 5) + elseif (tier == 2) then + return (score - 7) - elseif (tier == 2) then - return (score - 7) + elseif (tier == 3 and placement <= 3) then + return (score) - elseif (tier == 3 and placement <= 3) then - return (score) + elseif (tier == 3 and placement <= 4) then + return (score - 1) - elseif (tier == 3 and placement <= 4) then - return (score - 1) + elseif (tier == 3) then + return (score - 3) - elseif (tier == 3) then - return (score - 3) + elseif (tier == 4 and placement == 1) then + return (score) - elseif (tier == 4 and placement == 1) then - return (score) + elseif (tier == 4 and placement <= 2) then + return (score - 1) - elseif (tier == 4 and placement <= 2) then - return (score - 1) + elseif (tier == 4) then + return (score - 2) - elseif (tier == 4) then - return (score - 2) + elseif (tier == 5 and placement == 1) then + return (score) - elseif (tier == 5 and placement == 1) then - return (score) - - elseif (tier == 5) then - return (score - 1) - end + elseif (tier == 5) then + return (score - 1) end - - return 0 end + + return 0 + end end -- Adjusts the score to compensate for the mode, you might From 253ecd45282b50f2ca1760f64f8229e70eac4381 Mon Sep 17 00:00:00 2001 From: GeneralHuber <61513963+GeneralHuber@users.noreply.github.com> Date: Thu, 1 Oct 2026 13:39:35 +0200 Subject: [PATCH 4/5] Update lua/wikis/pubg/NotabilityChecker/config.lua Co-authored-by: ElectricalBoy <15651807+ElectricalBoy@users.noreply.github.com> --- lua/wikis/pubg/NotabilityChecker/config.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/wikis/pubg/NotabilityChecker/config.lua b/lua/wikis/pubg/NotabilityChecker/config.lua index ca2fe897a6d..8a3791091a8 100644 --- a/lua/wikis/pubg/NotabilityChecker/config.lua +++ b/lua/wikis/pubg/NotabilityChecker/config.lua @@ -5,6 +5,7 @@ -- Please see https://github.com/Liquipedia/Lua-Modules to contribute -- +---@class PubgNotabilityCheckerConfig: NotabilityCheckerConfig local Config = {} Config.TIER_TYPE_GENERAL = 'general' From 7ada96a156f9f89210d7b77d84045eb45f239ecc Mon Sep 17 00:00:00 2001 From: GeneralHuber <61513963+GeneralHuber@users.noreply.github.com> Date: Thu, 1 Oct 2026 13:39:43 +0200 Subject: [PATCH 5/5] Update lua/wikis/pubg/NotabilityChecker/config.lua Co-authored-by: ElectricalBoy <15651807+ElectricalBoy@users.noreply.github.com> --- lua/wikis/pubg/NotabilityChecker/config.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/wikis/pubg/NotabilityChecker/config.lua b/lua/wikis/pubg/NotabilityChecker/config.lua index 8a3791091a8..c01fa834d1f 100644 --- a/lua/wikis/pubg/NotabilityChecker/config.lua +++ b/lua/wikis/pubg/NotabilityChecker/config.lua @@ -191,7 +191,7 @@ Config.weights = { --- a first placement should score more than a 10th placement. ---@param tier string|integer ---@param tierType string ----@return fun(number, number): number +---@return NotabilityCheckerDropOffFunction function Config.placementDropOffFunction(tier, tierType) return function(score, placement) if (tierType == Config.TIER_TYPE_QUALIFIER