Repository navigation
feat(notability): Add config for NotabilityChecker for PUBG #8134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
6db7e2d
config.lua for pubg notability checker
GeneralHuber 22b05b9
space
GeneralHuber 1099899
remove linebreak and move indents
GeneralHuber b636bcb
Merge branch 'main' into pubg-notability
Rathoz 253ecd4
Update lua/wikis/pubg/NotabilityChecker/config.lua
GeneralHuber 7ada96a
Update lua/wikis/pubg/NotabilityChecker/config.lua
GeneralHuber File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 = {} | ||
|
|
||
| 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) | ||
|
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 | ||
|
|
||
|
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 | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.