Crescent

Controlling EXP/Level Ups [VX ACE]

9 posts in this topic

Hello! So, once again I'm in need for an Ace script :P Hopefully someone would fill this request, it's too important for me at the time.

I'll try to explain simply; I'm requesting a script for VX Ace that simply overwrites the values of EXP (experience) needed for each level, and stores that EXP in a variable or something and level up the actors with a script call or something (of course, determined by the amount of EXP stored) - since default EXP controlling system is way too much complicated for me. I hope I'm not asking for two scripts at once, I really have no idea about that. Because both controlling and storing EXP are important for me, so if these two things are supposed to be separate scripts - please correct me here.

 

What I'm trying to do basically:

I want my leveling system to work like this > The actor have enough EXP to level up, but the actor won't level up (instead their EXP is stored, and the actor cannot gain more EXP until they level up themself) until they upgrade their equipment. (Upgrading their equipment levels them up)

This is supposed to work separately for each actor and not the entire party. And the equipment of one actor is upgraded all at once. (it's not like weapon should be separately upgraded, and bodygear separately; everything in the equipment is upgraded all at once)

 

The levels are 1-5. The max level is 5. And the amount of EXP needed for each level is supposed to be the same value (for example 100 EXP needed for each level up)

Thank you if someone helps me find a solution to this!

 

EDIT so the project I needed this script for is cancelled now, but still it would be awesome to have this script, it will be useful in other projects too.

Edited by Crescent

Share this post


Link to post
Share on other sites

It seems like it'd be easy to do with just events using variables.

 

Make a common event for each enemy you have. Let's take an Orc and let's say you give it 15 EXP. Actor's name is Vectra. The fixed amount needed to level up will be 100. Common Event will be as follows...

variable 1: EXP =+ 15

If EXP > 100

Variable 1: Vectra.Level = Vectra's level

If a.level < 5

Change Level + 1
end

end

 

This goes after every time you use "Battle processing." If there is an "if lose" and "if win" than put it under "if win" if they must win to gain the EXP. Due to the common event I have showed, once ur level goes above 4 (which means if it equals 5 or above it will stop leveling. Since 4 + 1 = 5 and u cant +1 ever again, then that means they wont pass 5. Do you know how to make a variable equal an actor's current level?

Crescent likes this

Share this post


Link to post
Share on other sites

@Lord Vectra Thanks for the solution~ but I wanted to do it with a script since making common events for each enemy would be very time consuming, and I currently needed this script for my IGMC project - that contest has a deadline so I cannot use more time to spend on things :/

 

If it's possible to achieve other than using events, I'll be glad to have any solution in script form. Thanks again for any help ^^

Share this post


Link to post
Share on other sites

This script I wrote does what you want.

# This script removes the auto level up from the game and restricts the exp to 
# 100% (no exp is earned)
#
# -------------------
# Script by: vFoggy

class Game_Actor < Game_Battler
  def change_exp(exp, show)
    @exp[@class_id] = [[exp, 0].max, next_level_exp].min
    level_down while self.exp < current_level_exp
    refresh
  end
  
  def level_up_on_upgrade
    if self.exp == next_level_exp
      level_up
      last_level = @level
      last_skills = skills
      display_level_up(skills - last_skills) if show && @level > last_level
      refresh
    end
  end
end

You will have to call $game_actors[actor_index].level_up_on_upgrade when you upgrade the actor's, with index actor_index, equipment.

Crescent likes this

Share this post


Link to post
Share on other sites

This sounds like a good idea. I'm curious though. My mind has not wrapped around the process of how you would specify leveling up an actor. I see you mention equipment, but how can changing equipment make a level up? Since if I have a hand axe and need a battle axe to level up to 2, but need a crimson axe to go to level 3. If I am level 1 and equip the crimson axe, would I go to level 2 or 3? Then how would you restrict the player from equipping the new equip if the exp is not 100%?

Additionally, if I have exp at 100% and unequip the hand axe, then equip the hand axe, would I not go up a level?

 

Crescent likes this

Share this post


Link to post
Share on other sites
1 minute ago, roninator2 said:

This sounds like a good idea. I'm curious though. My mind has not wrapped around the process of how you would specify leveling up an actor. I see you mention equipment, but how can changing equipment make a level up? Since if I have a hand axe and need a battle axe to level up to 2, but need a crimson axe to go to level 3. If I am level 1 and equip the crimson axe, would I go to level 2 or 3? Then how would you restrict the player from equipping the new equip if the exp is not 100%?

Additionally, if I have exp at 100% and unequip the hand axe, then equip the hand axe, would I not go up a level?

 

Well, this is more of a rough idea - actually at first when I was posting this thread, what I had in my mind was: the equipment is fixed for all actors, you cannot buy new equipment - but you can just upgrade it by some blacksmith or something; upgrading your equipment levels you up if you have enough EXP to do so.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.