Skip to content

Conversation

@captbunzo
Copy link

No description provided.

Copilot AI review requested due to automatic review settings December 17, 2025 23:23
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds CPM (Combat Power Multiplier) data generation functionality to the Pogo Data Generator. CPM values are essential for calculating Pokémon stats at different levels in Pokémon GO.

Key Changes

  • Implemented CPM data extraction from game master files
  • Added automatic calculation of half-level CPM values using the formula: sqrt((CPM(n)^2 + CPM(n+1)^2) / 2)
  • Integrated CPM generation into the main data generation pipeline

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/classes/Cpm.ts New class that processes playerLevel data and calculates CPM values for whole and half levels
src/typings/dataTypes.ts Added AllCpm interface for CPM data structure
src/typings/inputs.ts Added CpmTemplate interface and cpm configuration to FullTemplate
src/typings/general.ts Added playerLevel interface to NiaMfObj for game master data
src/index.ts Integrated Cpm class into data generation pipeline
src/base.ts Added default configuration for CPM data generation
tests/cpm.test.js Comprehensive test suite for CPM generation and validation
README.md Updated example configuration to include CPM feature
docs/devWrapper-outline.md Added documentation outline for the development wrapper script

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <[email protected]>
@Mygod
Copy link
Collaborator

Mygod commented Dec 19, 2025

What's the use case? Also the formula is wrong. See ohbem.

@captbunzo
Copy link
Author

What's the use case? Also the formula is wrong. See ohbem.

I'm building a discord bot / web app for Pokémon Go that needs lots of data from the game master and want to be able to source this in a data load process. Yes, I know I could get this in many places, but I'm using pogo data generator as my primary data provider and I'd like to be able to pull CPM data directly from it as well.

I figure it's an easy addition and doesn't really hurt to have as part of pogo data generator.

As per the formula being wrong, I'm happy to fix that of course. What is ohbem? I'll Google more and see if I can find what you're referring to.

@captbunzo
Copy link
Author

I found this formula. Is this correct?

"In order to calculate the half-level CPM, sum the current and next level, and divide by two."

https://db.pokemongohub.net/tools/cp-calculator

@Mygod
Copy link
Collaborator

Mygod commented Dec 19, 2025

Until new levels are added, I think currently all downstream users just use a hardcoded cpm. Ohbem hardcodes cpm and Golbat hardcodes a reverse cpm lookup formula.

@captbunzo
Copy link
Author

Until new levels are added, I think currently all downstream users just use a hardcoded cpm. Ohbem hardcodes cpm and Golbat hardcodes a reverse cpm lookup formula.

I hear you, but does it hurt to add to the app?

@captbunzo
Copy link
Author

I've done some testing and my numbers and formula looks correct.

https://docs.google.com/spreadsheets/d/1Ls6ilzggAECDXsunCmfR3G686ncR0EYgsVOhk7QMCgk/edit?usp=sharing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants