Skip to content

Creating New Cups & Rankings

Empoleon_Dynamite edited this page Sep 18, 2023 · 1 revision

Before following the instructions in this article, familiarize yourself with the information on these pages:

  1. Gamemaster
  2. Cups & Formats

For ease of use, ensure your local copy has access to the PvPoke Developer Panel on the right-hand side of the browser window. (This will only appear if your webroot path contains the string "src". You can modify how the PvPoke Developer Panel appears in footer.php.)

Follow these steps to create a new cup and generate rankings for PvPoke.

1. Create Initial Cup Files & Data

In order to support a cup and its rankings on PvPoke, ensure the following files are in place in the directories below. You will need to create these files and directories when you create a new cup. You can copy and paste existing cup files (such as the rankings) to overwrite them later.

Gamemaster Cup File

data/gamemaster/cups/mycup.json should contain your cup rules as described in Cup Data Structure. The file name should match the name property of your cup. You can generate this JSON from the Custom Rankings page. You will need to compile the gamemaster after making any changes to the cup files.

Gamemaster Format Listing

data/gamemaster/formats.json should include a record for your new cup as described Format Data Structure. You will need to compile the gamemaster after making any changes to the format file.

Meta Group File

data/groups/mycup.json should contain the Pokemon and moveset data for your cup's limited meta. This is a group of 30-40 handpicked Pokemon that are used in PvPoke's Multi Battle feature and in the Team Builder's Meta Scorecard. You can generate this JSON by exporting a custom group you create in the site's Multi Battle or Matrix Battle features. The file name should match the name property of your cup. To start, you can copy an existing cup's group and change the file name to match your cup.

Moveset Override File

data/overrides/mycup/xxxx.json should contain the moveset overrides and ranking weights for your cup. You can generate this JSON using the Override Editor page located at data/overrideEditor.php. The file's directory should match the name property of your cup and the file's name should match the CP limit of your cup (1500.json, 2500.json, 10000.json, etc.).

You should leave this file as an empty array to start: []

Visit the Override Editor page, select your cup, and click "Import League Movesets". This will automatically import each eligible Pokemon's recommended moveset from the Great League, Ultra League, or Master League rankings. Copy the JSON data into your moveset override file for your initial moveset overrides. Note: There is currently a bug where league movesets won't correctly import for Ultra League or Master League unless you select Ultra League or Master League from the dropdown first.

Ranking Data Files

data/rankings/mycup/ should contain all of the ranking JSON files for your cup. To start, you can copy an existing cup's ranking files and change the subdirectory to match your cup's name property.

2. Validate Cup Rules & Listings

Check that your cup is now listed in the Rankings dropdown, the Team Builder dropdown, and the Multi Battle dropdown. If it isn't, make sure that you have completed the steps above, that you have compiled the gamemaster file as described in Modifying & Compiling the Gamemaster Files, and that your gamemaster or cup JSON is valid.

You can run your cup in Multi Battle (select the "All Pokemon" option) or in the Team Builder to validate that your cup rules are correct and you are seeing eligible Pokemon in the results.

3. Generate Ranking Data

Visit the Ranker page at ranker.php, open your browser's developer console, and select your cup from the format list. You should see confirmation that your moveset overrides have been loaded. If you don't, check that your moveset overrides are in the correct directory and that they are valid JSON.

Click the "Simulate" button and ranking data will generate for 5 individual ranking categories, beginning with "leads" and ending with "attackers". You will see confirmation in the console after each data file has been generated. Depending on the number of Pokemon eligible in your cup, this step may take 2-5 minutes.

Once the data for each individual category has been generated, visit the Ranker Sandbox page at rankersandbox.php, open your browser's developer console, and select your cup from the format list. This page takes the data from the individual ranking categories and generates the cup's overall rankings. Data for the "consistency" category is also generated in this step.

4. Fine Tune Moveset Overrides

Once you have initial rankings generated, update your moveset overrides with any moveset or weighting tweaks. Ranking weights typically have a value of 0 to 10 and multiply matchup scores against that Pokemon by the assigned weight when calculating individual category scores.

Make any adjustments you want to your moveset overrides, paste the data into your moveset override file, and repeat step #3 until you are satisfied with the results.