ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   General Authoring Discussion (https://www.esoui.com/forums/forumdisplay.php?f=174)
-   -   API function for CP cap? (https://www.esoui.com/forums/showthread.php?t=9380)

Mitaa 09/14/20 03:09 PM

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

sirinsidiator 09/14/20 03:29 PM

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.

Mitaa 09/14/20 03:55 PM

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.

sirinsidiator 09/14/20 04:07 PM

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.

Marazota 09/14/20 10:32 PM

Quote:

Originally Posted by sirinsidiator (Post 42263)
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

zelenin 09/16/20 10:08 AM

https://github.com/esoui/esoui/blob/...nkutils.lua#L2

Mitaa 09/16/20 12:23 PM

Thx :cool:


All times are GMT -6. The time now is 01:06 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI