-
-
Notifications
You must be signed in to change notification settings - Fork 10
feat: add CPM data generation and related functionality #124
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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]>
|
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. |
|
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." |
|
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? |
|
I've done some testing and my numbers and formula looks correct. https://docs.google.com/spreadsheets/d/1Ls6ilzggAECDXsunCmfR3G686ncR0EYgsVOhk7QMCgk/edit?usp=sharing |
No description provided.