REMOVING THE LEVEL CAP

Posts

Pages: 1
So, I've looked into this quite a bit before, and what I want to do is to make ONE character higher than level 99, while the others stay below 99. This sounds easy with a script - but I can't find any that have built in options where you can simply choose the xp curve like I can on the Rpgmaker database.

I'm using RPGMaker XP if that matters much, and I tried out this one script:

This is what I understand:
" $FINAL_LVL = 100
$MAX_HP = 99999
$MAX_SP = 99999
$MAX_STR = 9999
$MAX_DEX = 9999
$MAX_AGI = 9999
$MAX_INT = 9999

class Game_Actor

#--------------------------------------------------------------------------
# setting the levels...
#--------------------------------------------------------------------------
def final_level

# here you can set the max level for your characters based on their ID's...
# i set it so that 3 characters have different levels and the rest
# have max lvl of 9999
#
# this settings is only to show you how to change the max setting for your
# characters... same thing is for the parameters -> hp,sp,str,dex.agi,int

case self.id
when 1
level = 80
when 2
level = 60
when 3
level = 60
when 4
level = 150

else
level = $FINAL_LVL
end
return level
end"

So I made 4 levels work the way I want to, meaning that The first character levels up to 80 max, the next 2 only go to 60, and the last character goes to 150.

What puzzles me is this:

" def make_exp_list
actor = $data_actors
@exp_list = Array.new(final_level + 2)
@exp_list = 0
pow_i = 2.4 + actor.exp_inflation / 1000.0
for i in 2..final_level + 1
if i > final_level
@exp_list = 0
else
n = actor.exp_basis * ((i + 3) ** pow_i) / (5 ** pow_i)
@exp_list = @exp_list + Integer(n)
end
end
end"

This is the XP curve. I cannot modify it so that all skills have a different xp curve. It's built in to make all characters use the same xp curve, and that's why I need help.

If there is any way I could change the script to use more than one xp curve for the characters, that would be fantastic!

Thank you for your time.
Each character has their own defined experience curve - it's set using two numbers, Basis and Inflation, that can be set on their Actors page in the database. If the actor's final level isn't reached yet, it will continue to use those two numbers in the formula to continue to expand their experience list beyond that point. The script just uses a standard formula that's based off those two numbers to generate the individual experience curves of the actors - the parts you actually need to change are in the database itself beyond the changes you've already made.

However, if you need to mess with the formula in the script for just one character...

Replace:
n = actor.exp_basis * ((i + 3) ** pow_i) / (5 ** pow_i)

with:
if self.id == X # replace x with the character's id
n = # your new carefully crafted experience curve calculator
else
n = actor.exp_basis * ((i + 3) ** pow_i) / (5 ** pow_i)

As a word of warning - when you set your character level higher than 99, be aware that the editor can't be used to set it to anything higher than 100 for testing - all levels beyond that for testing have to be setup by hand through events/scripts.
LockeZ
I'd really like to get rid of LockeZ. His play style is way too unpredictable. He's always like this too. If he ran a country, he'd just kill and imprison people at random until crime stopped.
5958
Well, scripts don't have point and click interfaces, obviously, so being able to change it right in the database like you can with the default XP curves is out - you need a formula. You can see in the default script that the default XP formula is:

actor.exp_basis * ((i + 3) ** pow_i) / (5 ** pow_i)

Where i is the character's current level, actor.exp_basis is the "basis" you chose for that character's experience curve in the database, and pow_i is the "inflation" you chose. (Well, actually pow_i is 2.4 plus 0.1% of the "inflation", just to be obtuse)

And ** means "to the power of". It's the exponent symbol in Ruby.

So what formulas do you want for each character?
Yeah, if you describe the type of experience curve you're looking for, I can try to help you figure out the kind of formula you need - for the most part, however, the existing formula should pretty much cover everything you need by tweaking basis and inflation to your liking. This can be used to generate everything from extremely quick leveling (like current World of Warcraft) to painful, grind your ass for a year leveling (like vanilla World of Warcraft). It is, however, limited to a bit of a range simply because it's just plugging a couple variables into what appears to otherwise be a static equation...
First character:
Basis: 10; Inflation:33
Hits 487,445 XP at level 80 (cap)

Second character:
Basis: 25; Inflation:35
Hits 459,248 XP at level 60 (cap)

Third character:
Basis: 25; Inflation:35
Hits 459,248 XP at level 60 (cap)

Fourth character:
Basis: 50; Inflation:35
Hits 5,533,005 XP at level 99 (cap)

Fifth character:
Basis: 10; Inflation:50
Hits 258,597 XP at level 60 (cap)

Sixth character:
Basis: 25; Inflation:35
Hits 459,248 XP at level 60 (cap)

Again, thanks for all your help.
... before I begin, are you looking at total experience being those numbers? Because if so, you only need to use the game's default curve formula to generate them. Those numbers are generated by the default curve, so what exactly is it you're aiming to do?
Those are the curves that I was using before I used the script.

The script only starts with the basic exp curve, and I wanted to use multiple so that it could be just like how it was before using the script.

My intentions are simply to raise the level cap from 99 to 150 - which I cannot do without this script.
You don't need to alter the existing curve if you're lifting the level cap; the existing curve equation doesn't in any way limit the maximum level - it's the maximum level cap that defines it.

Basically, though, you're just handling the array wrong. The corrected code is below.

You also might want to look at your inflation generation equation - I left it as it was in the script you posted, but compare yours:
2.4 + actor.exp_inflation / 1000.0

to the original:
2.4 + actor.exp_inflation / 100.0

It'll make a large difference at later levels as to the difference between what your original settings are using and what this script generates.

def make_exp_list 
actor = $data_actors[@actor_id]
@exp_list = Array.new(actor.final_level + 2)
@exp_list[1] = 0
pow_i = 2.4 + actor.exp_inflation / 1000.0
for i in 2..actor.final_level + 1
if i > actor.final_level
@exp_list[i] = 0
else
n = actor.exp_basis * ((i + 3) ** pow_i) / (5 ** pow_i)
@exp_list[i] = @exp_list[i - 1] + Integer(n)
end
end
end

I'll explain what the code does, line by line. I've used { and } in place of in here, otherwise the board assumes it's bbcode and I go blegh.

First, it generates the actor from the database information, so we make sure we're referring to the right actor. Then, it generates an array with a number of spaces equal to the character's final_level + 2 - it calls your final_level method so if your final_level method is already working correctly, then we're good. For your level 150 character, it will generate a 153 (0 - 152) slot array. Next, it assigns a value of 0 to the first level - @exp_list{1} - to make sure that the first level requires no experience to reach.

After that, it generates the inflation of experience - the true power inflation becomes the inflation from the actor on the database, divided by 1000 (100 in the original script) and then adds 2.4 - so pretty much all characters will have a power of inflation in the 2.40 to 2.41 range (unless you give the characters an insane inflation rate).

After that comes the real meat of the function. It counts through the numbers from 2 to your final_level (because of the way the for...in... structure works, it counts one less than the final number you give it, hence the +1). It then double checks to make sure that you're inside the right limit again - if the i value somehow manages to be higher than the final_level, it associates that level value to 0. Just catching a potential error, that's all.

The next set is the main meat: n is the experience difference that will be required. First, it takes the current level and adds two, then takes that to the power of what pow_i was calculated out to be and divides that by 5 to what pow_i was calculated out to be. After that, it multiplies the whole thing by your basis number. Essentially what this does is make it so that, to get to level 2, you require an amount of experience equal to your basis number and it will grow exponentially beyond that. Finally, it takes that number and adds it to the total experience required from the last level (@exp_list{i-1}), assigning it to this level's spot in the array - giving you the current experience total required.

By all accounts, this should work, as it's just a very, very slight edit of the default script.
Pages: 1