Okay... I am a control freak... I totally hate the way RPG Maker chooses how much experience characters need per level. I want to use my own formula, or set it level by level, there *has* to be a way to do this. Can anyone tell me where I can find the class data in the raw code section so that I can bypass the mathematical model included in the default?
More control over Experience needed per level
RPG Maker VXAce SupportPaste the following snippet under Main:
class Game_Actor < Game_Battler def exp_for_level(level) return [0,100,200,300][level-1] endendValues in the first bracket are TOTAL EXP. First value is TOTAL EXP for LEVEL 1. Second value is TOTAL EXP for LEVEL 2. And so on.
Obviously, you'll have to fill it manually, and it will override all experience curves. Furthermore, I don't know how to make it differ for various characters; this curve will affect every actor.
class Game_Actor < Game_Battler def exp_for_level(level) return [0,100,200,300][level-1] endendValues in the first bracket are TOTAL EXP. First value is TOTAL EXP for LEVEL 1. Second value is TOTAL EXP for LEVEL 2. And so on.
Obviously, you'll have to fill it manually, and it will override all experience curves. Furthermore, I don't know how to make it differ for various characters; this curve will affect every actor.
better use a 2-D variable array for that...the first index will be for actor ID or class ID so that you can make the level requirements different per actor or class... the second index will be the level...
for actor ID based,
for actor ID based,
Code:
EXP = { 1 => [0,100,200,300,555,676,999, and so on] , 2 => [0,55,99,121,333, and so on], } class Game_Actor < Game_Battler def exp_for_level(level) return EXP[@actor_id][level] endend
To both of you, thank you so much, though I have a question Love...
In your script are your first set of numbers in your array: 1 => and 2 => your definitions for your actor or your class? And if so do they have to match up to the number in the database editor, for example: 001 (for a class)?
In your script are your first set of numbers in your array: 1 => and 2 => your definitions for your actor or your class? And if so do they have to match up to the number in the database editor, for example: 001 (for a class)?
If you use that code snipped exactly as given, then the number of the array corresponds to the actor-ID of the database.
However basically you can tell the program what line to use by any means, it just has to result in 1, 2 or th line number of the array.
Look at the return line:
return EXP[@actor_id][level]
The number in the first bracket determines which line to use, the number in the second bracket determines which element of that line to use.
return EXP[2][7] would always return the seventh element of the second line (2 =>)
You can experiment at your own risk with other formulas to determine which value to return as the EXP-Value - but expect a lot of trial and error when you don't know what values to use.
However basically you can tell the program what line to use by any means, it just has to result in 1, 2 or th line number of the array.
Look at the return line:
return EXP[@actor_id][level]
The number in the first bracket determines which line to use, the number in the second bracket determines which element of that line to use.
return EXP[2][7] would always return the seventh element of the second line (2 =>)
You can experiment at your own risk with other formulas to determine which value to return as the EXP-Value - but expect a lot of trial and error when you don't know what values to use.
Tsukihime and Dekita have scripts that seem to do what you're looking for.
http://www.rpgmakervxace.net/topic/6494-perfect-exp-curves/
http://www.rpgmakervxace.net/topic/6122-custom-exp-curves/
@adiktuzmiko that's a hash, not an array.
http://www.rpgmakervxace.net/topic/6494-perfect-exp-curves/
http://www.rpgmakervxace.net/topic/6122-custom-exp-curves/
@adiktuzmiko that's a hash, not an array.
@Xypher - yeah, I realized that after posting... Hashes are better to use in this anyway, much easier to write...
Original thread: https://forums.rpgmakerweb.com/threads/more-control-over-experience-needed-per-level.15896/