LeaPhant / booba

🧋 osu! processing library for all modes written in pure js
MIT License
10 stars 1 forks source link

Incorrect pp calculation if it isn't a fc in other gamemodes (catch/taiko/mania) #1

Open 7mochi opened 2 years ago

7mochi commented 2 years ago

Example code:

import fetch from 'node-fetch';
import { ctb_ppv2 } from 'booba';

const API_KEY = 'put api key here'; // osu! api v1 key
const USER = '4158549';

(async () => {
  const response = await fetch(`https://osu.ppy.sh/api/get_user_recent?k=${API_KEY}&u=${USER}&limit=1`);
  const json = await response.json();
  const [score] = json;

  const pp = new ctb_ppv2().setPerformance(score);

  console.log(await pp.compute())
  console.log(await pp.compute(true))
  // Both have the same output
})();

To make it simpler in the example code I use api v1 but in my project I'm using api v2

Attachments: Untitled

LeaPhant commented 2 years ago

I have now added fc simulation to catch and taiko in 0.0.15, but it doesn't make much sense for mania since we can't know how much score the player would've gotten without messing up and mania pp is mostly based on score.