Exp Level Reset

Exp Level Reset


Intro
After an actor levels up their experience goes back to 0 making it more  challenging to level up.
Example:
Old Way: Level 2 requires 25 exp. You get to level 2 and you keep that 25 experience.
This Way: Level 2 requires 25 exp. You get to level 2 but you go back to 0 exp making you get more experience until your next level up.


Features
  • Resets Exp after Level Up
  • Adds some challenge to your game


Screenshots
Content Hidden Spoiler
Image



Script
  1.  
  2. #===============================================================================
  3. # Exp Level Reset
  4. # Author game_guy
  5. # Version 1.0
  6. #-------------------------------------------------------------------------------
  7. # Intro:
  8. # After an actor levels up their experience goes back to 0 making it more
  9. # challenging to level up.
  10. # Example:
  11. # Old Way: Level 2 requires 25 exp. You get to level 2 and you keep that
  12. # 25 experience.
  13. # This Way: Level 2 requires 25 exp. You get to level 2 but you go back to 0
  14. # exp making you get more experience until your next level up.
  15. #
  16. # Features:
  17. # Resets Exp after Level Up
  18. # Adds some challenge to your game
  19. #
  20. # Instructions:
  21. # Place below Scene_Debug but above everything else.
  22. #
  23. # Compatability:
  24. # Not tested with SDK.
  25. # Will work with any battle system.
  26. # Overwrites Game_Actor's exp and level method.
  27. #
  28. # Credits:
  29. # game_guy ~ for making it
  30. # Branden ~ for testing it and listening to me blab on about the script
  31. #===============================================================================
  32. class Game_Actor
  33.   def exp=(exp)
  34.     @exp = exp
  35.     while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0
  36.       @exp = @exp - @exp_list[@level+1]
  37.       @level += 1
  38.     end
  39.     for j in $data_classes[@class_id].learnings
  40.       if j.level == @level
  41.         learn_skill(j.skill_id)
  42.       end
  43.     end
  44.     @hp = [@hp, self.maxhp].min
  45.     @sp = [@sp, self.maxsp].min
  46.   end
  47.   def level=(level)
  48.     level = [[level, $data_actors[@actor_id].final_level].min, 1].max
  49.     @exp = 0
  50.   end
  51. end
  52.  
Expand to see the code.



Compatibility
Not tested with SDK.
Will work with any battle system.
Overwrites Game_Actor exp and level method.


Credits
  • game_guy ~ for making it
  • Branden ~ for testing it and listening to me blab on about the script
It's a pretty simple script, and yet I don't think I've seen anyone do it before, lol... not too bad.

I assume it will, but I'll ask anyway,

Say you have 21 EXP, you need to get to 25 EXP to level up, the next fight gives you 9 EXP, does the EXP roll over so you'll end up being the next level with 5 EXP?
Yup. Rollover experience still works :3.
Thanks for the comment!

Original thread: https://www.hbgames.org/forums/viewtopic.php?t=71249