[XP] Exp Level Reset

Started by G_G, April 20, 2010, 11:11:52 pm

Previous topic - Next topic

G_G

Exp Level Reset
Authors: game_guy
Version: 1.0
Type: Exp Add-On
Key Term: Actor Add-on



Introduction

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

Spoiler: ShowHide



Demo

N/A


Script

:O More Comments then Code
30 lines of Comments
20 lines of Code
Spoiler: ShowHide

#===============================================================================
# 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



Instructions

Place below Scene_Debug but above everything else.


Compatibility

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


Credits and Thanks


  • game_guy ~ for making it
  • Branden ~ for testing it and listening to me blab on about the script



Author's Notes

Enjoy!

Spaceman McConaughey

It's a very nice script. :) *levels up*

elmangakac

 8) Awesome men! Great Script.... but..... maybe can be selected the old and new way at the beginning of a game.... in that way this could be a "Difficult Script" too o_O

G_G

Well either you want this way or the old way. THe developer chooses whether or not they want it.

elmangakac

 :huh: keeeeeey...... well..... in fact its a great script !!

Jragyn

Its things like this that can add just the kind of requirement for grinding in an ABS that a game needs :D

Excellent work, Game_Guy.
A bright light can either illuminate or blind, but how will you know which until you open your eyes?

Holyrapid

Nice. When i a) get my computer to function properly or b) get a new computer i might use this in my project.