Thread Tools Display Modes
09/14/20, 03:09 PM   #1
Mitaa
AddOn Author - Click to view addons
Join Date: Oct 2019
Posts: 3
API function for CP cap?

Hi all,

I have been working on an addon that tries to predict the date on which CP810 is reached. Today I wanted to replace some hard-coded stuff like the formula from uesp.net and the CP cap. I did succeed in replacing the formula with an API function (see below) but for the love of Mara I have no idea how to get the lower/upper CP limits (currently 10 and 810). I searched the function page until my eyes started hurting but to no avail. Any suggestion would be much appreciated.

Code:
GetNumChampionXPInChampionPoint(cp)
Regards,
Rene
  Reply With Quote
09/14/20, 03:29 PM   #2
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,566
GetChampionPointsPlayerProgressionCap is the function for getting the current upper limit. For the lower bound there isn't really anything, but since it won't ever change you can just hardcode it.

EDIT: the lower bound of 10 CP also only applies to item requirement levels. Players start at CP 1 after reaching level 50.

Last edited by sirinsidiator : 09/14/20 at 03:33 PM.
  Reply With Quote
09/14/20, 03:55 PM   #3
Mitaa
AddOn Author - Click to view addons
Join Date: Oct 2019
Posts: 3
Thank you for replying so quickly. However...

/script d(GetChampionPointsPlayerProgressionCap())
160

This is one of the many functions I tried today. About the lower level, I distinctly remember starting at CP10. Although at this point I could be wrong because my brain is fried.
  Reply With Quote
09/14/20, 04:07 PM   #4
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,566
Ah right, that's just the cap for the item requirements.
For the level cap you could try GetMaxSpendableChampionPointsInAttribute() and multiply it by 3?
As for why you started with CP 10, that's because nowadays you only need very few xp to earn the first few CP levels. If you get to level 50 with just 1 xp, you should still start at CP 1.
  Reply With Quote
09/14/20, 10:32 PM   #5
Marazota
AddOn Author - Click to view addons
Join Date: Sep 2015
Posts: 257
Originally Posted by sirinsidiator View Post
Ah right, that's just the cap for the item requirements.
For the level cap you could try GetMaxSpendableChampionPointsInAttribute() and multiply it by 3?
As for why you started with CP 10, that's because nowadays you only need very few xp to earn the first few CP levels. If you get to level 50 with just 1 xp, you should still start at CP 1.
no, its not
first 10 CP granted for free to any account who reach cp1

and its 368085 exp for free, instant
  Reply With Quote
09/16/20, 10:08 AM   #6
zelenin
AddOn Author - Click to view addons
Join Date: Nov 2018
Posts: 7
https://github.com/esoui/esoui/blob/...nkutils.lua#L2
  Reply With Quote
09/16/20, 12:23 PM   #7
Mitaa
AddOn Author - Click to view addons
Join Date: Oct 2019
Posts: 3
Thx
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » API function for CP cap?

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off