Main Menu
  • Welcome to The RPG Maker Resource Kit.

Forget skills if level down

Started by Nexridia, March 26, 2007, 11:35:15 AM

0 Members and 1 Guest are viewing this topic.

Nexridia

is there anybody who knows how to do this? i want my heroes to forget skill if they level down just like they learn them when they level up. i use rpgxp
what!? ur not supposed to see this!

Blizzard

#1
This is simple. Open the scripts editor and open Game_Actor. Now find the method def exp=(exp) and replace it with this one:

  def exp=(exp)
    @exp = [[exp, 9999999].min, 0].max
    while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0
      @level += 1
      for j in $data_classes[@class_id].learnings
        for i in 1..@level
          learn_skill(j.skill_id) if j.level == i
        end
      end
    end
    for j in $data_classes[@class_id].learnings
      for i in 1..99
        forget_skill(j.skill_id) if j.level < i
      end
    end
    @hp = [@hp, self.maxhp].min
    @sp = [@sp, self.maxsp].min
  end


This should work.
Get King of Booze for Android, for iOS, for OUYA or for Windows!
Visit our website.
You can also love/hate us on Facebook or the game itself.



Get DropBox, the best free file syncing service there is!

Nexridia

what!? ur not supposed to see this!