I'm trying to give players a choice when they level up to invest in certain points, which end up increasing various things like atk, hp, mag def, etc. I'm assuming others have played around with this, would anyone be able to give some advice?
I had initially thought it would be as simple as adding to a variable for atk or def for an actor, but it seems more difficult now that I look into it. It looks like the parameters are kept track of in the BattlerBase script, and are calculated in the param() method I think, but I'm having trouble understanding the logic of it.
What I've tried:
-editing the BattlerBase script as below, attempting to add 50 hp for every point invested, on top of normal hp:
This gives me the following error: Script 'Game_BattlerBase' line 69: NoMethodError occured. undefined method '*' for nil:NilClass
Additionally, I think adding the amount as I did in the mhp method might cause issues, since I've noticed that parameters are not always called by using those named methods. Sometimes the paramters are accessed in other scripts by their param id, in which case they will bypass my additions and simply return their normal values.
I'm also concerned that once I actually manage to increase a parameter for an actor, that it will be reset by the character leveling up. If that happens, I might have to disable the normal leveling up.
I had initially thought it would be as simple as adding to a variable for atk or def for an actor, but it seems more difficult now that I look into it. It looks like the parameters are kept track of in the BattlerBase script, and are calculated in the param() method I think, but I'm having trouble understanding the logic of it.
What I've tried:
-editing the BattlerBase script as below, attempting to add 50 hp for every point invested, on top of normal hp:
def mhp; param(0)+@hp_points*50; endThis gives me the following error: Script 'Game_BattlerBase' line 69: NoMethodError occured. undefined method '*' for nil:NilClass
Additionally, I think adding the amount as I did in the mhp method might cause issues, since I've noticed that parameters are not always called by using those named methods. Sometimes the paramters are accessed in other scripts by their param id, in which case they will bypass my additions and simply return their normal values.
I'm also concerned that once I actually manage to increase a parameter for an actor, that it will be reset by the character leveling up. If that happens, I might have to disable the normal leveling up.