Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

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
expreset.png

Script
Code:
 

#===============================================================================

# Exp Level Reset

# Author game_guy

# Version 1.0

#-------------------------------------------------------------------------------

# 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

#

# Instructions:

# Place below Scene_Debug but above everything else.

#

# Compatability:

# Not tested with SDK.

# Will work with any battle system.

# Overwrites Game_Actor's exp and level method.

#

# Credits:

# game_guy ~ for making it

# Branden ~ for testing it and listening to me blab on about the script

#===============================================================================

class Game_Actor

  def exp=(exp)

    @exp = exp

    while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0

      @exp = @exp - @exp_list[@level+1]

      @level += 1

    end

    for j in $data_classes[@class_id].learnings

      if j.level == @level

        learn_skill(j.skill_id)

      end

    end

    @hp = [@hp, self.maxhp].min

    @sp = [@sp, self.maxsp].min

  end

  def level=(level)

    level = [[level, $data_actors[@actor_id].final_level].min, 1].max

    @exp = 0

  end

end

 

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
 

Jason

Awesome Bro

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?
 
Haha, I did the exact same thing a few years ago, but you did it 10 times better than I did.

Congrats, nice script.
- Dargor
 
The thing with this script, while well executed definately, is that I don't see a valid appliance... modifying the factors in the EXP curve can get you the exact same effect without loosing the data on how much EXP you ever collected. Some people might however prefer it, though, so yeah - as I said before, well executed :p
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top