Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
264 changes: 264 additions & 0 deletions lua/wikis/pubg/NotabilityChecker/config.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,264 @@
---
-- @Liquipedia
-- page=Module:NotabilityChecker/config
--
-- Please see https://github.com/Liquipedia/Lua-Modules to contribute
--

---@class PubgNotabilityCheckerConfig: NotabilityCheckerConfig
local Config = {}
Comment thread
GeneralHuber marked this conversation as resolved.

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 NotabilityCheckerDropOffFunction
function Config.placementDropOffFunction(tier, tierType)
Comment thread
GeneralHuber marked this conversation as resolved.
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

Comment thread
GeneralHuber marked this conversation as resolved.
elseif (tier == 1 and placement <= 8) then
return (score - 5)

elseif (tier == 1 and placement <= 12) then
return (score - 7)

elseif (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
Loading