XP Needed Cap

platyping

Sleeping Dragon
Joined
Oct 22, 2010
Messages
4,626
Location
Emerald Dreams
XP Needed Cap

Background:
The current XP system uses the following formula:
iExperienceNeeded = (iLevel ^ 2) + 1

Because of the square function, the amount of XP needed to reach next level just keeps increasing.
At high levels, like after 15 or 20, amount of XP needed becomes ridiculously high.

Thus, initially I set up this file for my own Promotion Pack as it has "too many" promotions.
But I decided to release it as a standalone for whoever finds it useful.

Features
A new XP system applied after a certain level, which will be constant XP needed.
The amount of constant XP needed will be similar to the amount of XP needed to reach that defined level, from the previous level.
Too wordly? Numbers will be better.

Initially, if your unit is at level 10,
Amount of XP needed to reach level 10 was 9 x 9 + 1 = 82
Amount of XP needed to reach level 11 was 10 x 10 + 1 = 101
Thus, amount of XP needed to progress from 10 to 11 = 101 - 82 = 19

If I set the defined level to be 11, this means that from 11 to 12, 12 to 13 and so on, the extra XP will be capped at 19.

Thus, by right XP for level 12 should be 11 x 11 + 1 = 122
But due to the new system, it will be simply 101 + 19 = 120
And level 13 will require another constant 19 XP, 120 + 19 = 139
And it will be forever kept at 19 to reach next level.

Charismatic Trait or any other modified trait with XP modifier taken care of

How to edit
I set up the formula in such a way that it is (should be) idiot-proof to change it to work at any level you want for yourself.
There is only ONE variable to change, which defines the level you want this new XP system to kick in.
 
Thanks :D

@The_J
You can define the level to cap at any lvl, even lvl 2 will work, though that sounds dumb :D

@modifieda4
If you want it to kick in only after you obtain a certain tech, you can add in a "and team has xxx tech requirement" to the if statement.
Shouldn't be hard for you given your past works :D
 
Thanks :D
@modifieda4
If you want it to kick in only after you obtain a certain tech, you can add in a "and team has xxx tech requirement" to the if statement.
Shouldn't be hard for you given your past works :D

Ok I created a standalone BUG 4.4 modcomp for us :)

link to file - Basic Unit Experience Limit

I left your code in which can be uncommented out. In a separate section I added the military science tech prerequisite.

Also I changed the functionality:

Once you get military science experience needed = iLevel*(iLevel*0.9)+1 (rounded up)
for the first few levels there is no change. then is becomes easier to get to the next level.

at level 20 the lines cross. :eek:

what this means is that if someone gets military science and has a unit > ~level 20 it will get a free promotion. no change large enough to get a free promotion below level 20. the next free promotion level would be around 39.

i am ok with this as far as playability. some examples:
level/xp old/xp new
3/10/10 ----- no change to here
10/101/91 --- some benefit of 10 xp
18/325/293 -- larger benefit of 32 xp
20/401/361 -- larger benefit of 40 xp plus free promotion if level 20 when military science aquired
the last happens because to get to level 19 in the old system you need 362 xp. 361<362 => free promotion.

let me know what you think and thanks for the great idea! :goodjob:
 
If you intend to apply to all lvls, an easier way out may be to to edit the modifier rather than the iexperience formula.

Something similar for an old wonder i did:
Arc De Triomph

Although of course, 15% will affect even low lvls.
 
Actually, it no longer has anything to do with this mod comp lol.

By implementing a % XP cut, it applies to all levels, whether it is lvl 3 or lvl 30.
Also, it only reduces the XP for each lvl, but it does not "cap" the XP needed to reach the next lvl.
XP needed from lvl 15 to 16 for instance will be lower compared to old values, but it will still be bigger than from lvl 14 to 15.

On the other hand, what this mod comp does is
1) It only affects XP needed above a user defined lvl, anything below is not affected at all.
2) XP needed to reach the next lvl above that defined lvl is kept constant.
Whether it is from 13 to 14 or 33 to 34, the amount of XP needed is the same.

In other words, the one you modified is a modified version of the wonder, but not really doing what this mod comp is doing.
 
Actually, it no longer has anything to do with this mod comp lol.

By implementing a % XP cut, it applies to all levels, whether it is lvl 3 or lvl 30.
Also, it only reduces the XP for each lvl, but it does not "cap" the XP needed to reach the next lvl.
XP needed from lvl 15 to 16 for instance will be lower compared to old values, but it will still be bigger than from lvl 14 to 15.

On the other hand, what this mod comp does is
1) It only affects XP needed above a user defined lvl, anything below is not affected at all.
2) XP needed to reach the next lvl above that defined lvl is kept constant.
Whether it is from 13 to 14 or 33 to 34, the amount of XP needed is the same.

In other words, the one you modified is a modified version of the wonder, but not really doing what this mod comp is doing.

yes, i know, i've taken a different course. (and changed the name and description of the download as well)

though both methods have a delayed effect and make promotions cheaper.

thanks again for the ideas and tips!
 
Top Bottom