RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
[Solved] Experience needed to level

0 Members and 1 Guest are viewing this topic.

**
Rep: +0/-0Level 76
Allons-y, Alonso!
Is there a script that lets you pick exactly how much exp is needed to level at each level?

Like at level 1 you need 500
at 2 you need 750
at 3 you need 1000
and so on...

Anyone either know of one or know how to make it?
« Last Edit: July 04, 2010, 03:43:43 AM by Kenpachi11 »

****
Rep:
Level 83
here its a quick small code, let me know if you want anything added to it. Just paste it above main and bellow the default scripts. The way it works is that in order to get to say, level 2 you need this much exp.

Code: [Select]
class Game_Actor < Game_Battler 
  def actor_exp_rates(level, actor = 0)
    case actor
#==============================================================================
#   ** Config **
#==============================================================================
# Follow this template for your actors in your game to set their exp.
    when 1 # Actor ID
      exp = { # Exp for levels
      2 => 30,  # A => B
      3 => 40,  # A is level
      4 => 50   # B is EXP needed
      }
      return exp[level]
    when 2
      exp = {   # Because the levels 3 and 5 are not set here, the script will
      2 => 45,  # get the default values from the default settings.
      4 => 73,  # if the default setting is not set it will return 0 and the
      6 => 83   # actor will not be allowed to level up past that point.
      }
      return exp[level]
    else # These are the default exp requirements, if the actor id is not set
      # the required exp will be set to these values.
      exp = {
      2 => 30,
      3 => 50,
      4 => 65,
      5 => 70,
      6 => 90
      }
      return exp[level]
#==============================================================================
#   ** End Config **
#==============================================================================
    end
  end
 
  def get_exp_needed(level)
    exp = actor_exp_rates(level, @actor_id)
    exp = actor_exp_rates(level) if exp == nil
    exp = 0 if exp == nil
    return exp
  end

  def make_exp_list
    actor = $data_actors[@actor_id]
    @exp_list[1] = 0
    for i in 2..100
      if i > actor.final_level
        @exp_list[i] = 0
      else
        @exp_list[i] = get_exp_needed(i)
      end
    end
  end
end
« Last Edit: July 02, 2010, 07:42:05 PM by Mr_Wiggles »
Spoiler for:
METALFRESH is a paint contractor that specializes in refinishing metal and vinyl siding. We paint metal buildings as well as siding on homes.

We also

    Refinish decks
    Do custom interior painting
    Strip wallpaper
    Refinish cedar siding
    Metal front doors and sidelights
    Metal garage and service doors
    Grained fiberglass doors

    If your structure is *RUSTED *FADED *CHALKING *IN NEED OF COLOR CHANGE, we can fix it with a guarentee!

northern Illinois and southern Wisconsin.

http://metalfreshcoatings.com


**
Rep: +0/-0Level 76
Allons-y, Alonso!
Wow! Thank you so much this is exactly what I need.
Quick question though, how do I just make it all the same for everyone?

****
Rep:
Level 83
To make it easy for you just replace your code with this edited one.
Code: [Select]
class Game_Actor < Game_Battler 
  def actor_exp_rates(level, actor = 0)
#==============================================================================
#   ** Config **
#==============================================================================
# Follow this template for your actors in your game to set their exp.

# These are the default exp requirements, if the actor id is not set
# the required exp will be set to these values.
      exp = {
      2 => 30,
      3 => 50,
      4 => 65,
      5 => 70,
      6 => 90
      }
      return exp[level]
#==============================================================================
#   ** End Config **
#==============================================================================
  end
 
  def get_exp_needed(level)
    exp = actor_exp_rates(level, @actor_id)
    exp = actor_exp_rates(level) if exp == nil
    exp = 0 if exp == nil
    return exp
  end

  def make_exp_list
    actor = $data_actors[@actor_id]
    @exp_list[1] = 0
    for i in 2..100
      if i > actor.final_level
        @exp_list[i] = 0
      else
        @exp_list[i] = get_exp_needed(i)
      end
    end
  end
end
Spoiler for:
METALFRESH is a paint contractor that specializes in refinishing metal and vinyl siding. We paint metal buildings as well as siding on homes.

We also

    Refinish decks
    Do custom interior painting
    Strip wallpaper
    Refinish cedar siding
    Metal front doors and sidelights
    Metal garage and service doors
    Grained fiberglass doors

    If your structure is *RUSTED *FADED *CHALKING *IN NEED OF COLOR CHANGE, we can fix it with a guarentee!

northern Illinois and southern Wisconsin.

http://metalfreshcoatings.com


**
Rep: +0/-0Level 76
Allons-y, Alonso!
Thank you

**
Rep: +0/-0Level 76
Allons-y, Alonso!
Actually the change you made causes an error because there is nothing before the actually exp definitions....

Spoiler for:
#==============================================================================
# Follow this template for your actors in your game to set their exp.
    when 1 # Actor ID
      exp = { # Exp for levels
      2 => 30,  # A => B
      3 => 40,  # A is level
      4 => 50   # B is EXP needed
      }
      return exp[level]
    when 2
      exp = {   # Because the levels 3 and 5 are not set here, the script will
      2 => 45,  # get the default values from the default settings.
      4 => 73,  # if the default setting is not set it will return 0 and the
      6 => 83   # actor will not be allowed to level up past that point.
      }
      return exp[level]
    else # These are the default exp requirements, if the actor id is not set
      # the required exp will be set to these values.
      exp = {
      2 => 30,
      3 => 50,
      4 => 65,
      5 => 70,
      6 => 90
      }
      return exp[level]
Spoiler for:
{Something should be here right?}   
      exp = {
      2 => 30,
      3 => 50,
      4 => 65,
      5 => 70,
      6 => 90
      }
      return exp[level]

****
Rep:
Level 83
no, script works fine as is.. your missing the bigger picture..
Code: [Select]
  def actor_exp_rates(level, actor = 0)
      exp = {
      2 => 30,
      3 => 50,
      4 => 65,
      5 => 70,
      6 => 90
      }
      return exp[level]
  end
« Last Edit: July 03, 2010, 08:53:29 PM by Mr_Wiggles »
Spoiler for:
METALFRESH is a paint contractor that specializes in refinishing metal and vinyl siding. We paint metal buildings as well as siding on homes.

We also

    Refinish decks
    Do custom interior painting
    Strip wallpaper
    Refinish cedar siding
    Metal front doors and sidelights
    Metal garage and service doors
    Grained fiberglass doors

    If your structure is *RUSTED *FADED *CHALKING *IN NEED OF COLOR CHANGE, we can fix it with a guarentee!

northern Illinois and southern Wisconsin.

http://metalfreshcoatings.com


**
Rep: +0/-0Level 76
Allons-y, Alonso!
It was the case actor thing that was giving me a syntax error, ok thanks sorry
this is exactly what I want

***
Rep:
Level 82
We learn by living...
*Casts Animate Zombie Thread*

This is a hash right? How do you get the tables to change when you change character classes, like from fighter to Mage?

****
Rep:
Level 83
here you are.

Code: [Select]
class Game_Actor < Game_Battler
  def actor_exp_rates(level)
    case @class_id
#==============================================================================
#   ** Config **
#==============================================================================
# Follow this template for your actors in your game to set their exp.
    when 0 # Class ID
      exp = { # Exp for levels
      2 => 30,  # A => B
      3 => 40,  # A is level
      4 => 50   # B is EXP needed
      }
      return exp[level]
    when 1
      exp = {   # Because the levels 3 and 5 are not set here, the script will
      2 => 45,  # get the default values from the default settings.
      4 => 73,  # if the default setting is not set it will return 0 and the
      6 => 83   # actor will not be allowed to level up past that point.
      }
      return exp[level]
    else # These are the default exp requirements, if the actor id is not set
      # the required exp will be set to these values.
      exp = {
      2 => 30,
      3 => 50,
      4 => 65,
      5 => 70,
      6 => 90
      }
      return exp[level]
#==============================================================================
#   ** End Config **
#==============================================================================
    end
  end
 
  def get_exp_needed(level)
    exp = actor_exp_rates(level)
    exp = actor_exp_rates(level) if exp == nil
    exp = 0 if exp == nil
    return exp
  end

  def make_exp_list
    actor = $data_actors[@actor_id]
    @exp_list[1] = 0
    for i in 2..100
      if i > actor.final_level
        @exp_list[i] = 0
      else
        @exp_list[i] = get_exp_needed(i)
      end
    end
  end
 
  def class_id=(class_id)
    if $data_classes[class_id] != nil
      @class_id = class_id
      make_exp_list
      unless equippable?($data_weapons[@weapon_id])
        equip(0, 0)
      end
      unless equippable?($data_armors[@armor1_id])
        equip(1, 0)
      end
      unless equippable?($data_armors[@armor2_id])
        equip(2, 0)
      end
      unless equippable?($data_armors[@armor3_id])
        equip(3, 0)
      end
      unless equippable?($data_armors[@armor4_id])
        equip(4, 0)
      end
    end
  end
 
end
Spoiler for:
METALFRESH is a paint contractor that specializes in refinishing metal and vinyl siding. We paint metal buildings as well as siding on homes.

We also

    Refinish decks
    Do custom interior painting
    Strip wallpaper
    Refinish cedar siding
    Metal front doors and sidelights
    Metal garage and service doors
    Grained fiberglass doors

    If your structure is *RUSTED *FADED *CHALKING *IN NEED OF COLOR CHANGE, we can fix it with a guarentee!

northern Illinois and southern Wisconsin.

http://metalfreshcoatings.com


***
Rep:
Level 82
We learn by living...
here you are.

Code: [Select]
class Game_Actor < Game_Battler
  def actor_exp_rates(level)
    case @class_id
#==============================================================================
#   ** Config **
#==============================================================================
# Follow this template for your actors in your game to set their exp.
    when 0 # Class ID
      exp = { # Exp for levels
      2 => 30,  # A => B
      3 => 40,  # A is level
      4 => 50   # B is EXP needed
      }
      return exp[level]
    when 1
      exp = {   # Because the levels 3 and 5 are not set here, the script will
      2 => 45,  # get the default values from the default settings.
      4 => 73,  # if the default setting is not set it will return 0 and the
      6 => 83   # actor will not be allowed to level up past that point.
      }
      return exp[level]
    else # These are the default exp requirements, if the actor id is not set
      # the required exp will be set to these values.
      exp = {
      2 => 30,
      3 => 50,
      4 => 65,
      5 => 70,
      6 => 90
      }
      return exp[level]
#==============================================================================
#   ** End Config **
#==============================================================================
    end
  end
 
  def get_exp_needed(level)
    exp = actor_exp_rates(level)
    exp = actor_exp_rates(level) if exp == nil
    exp = 0 if exp == nil
    return exp
  end

  def make_exp_list
    actor = $data_actors[@actor_id]
    @exp_list[1] = 0
    for i in 2..100
      if i > actor.final_level
        @exp_list[i] = 0
      else
        @exp_list[i] = get_exp_needed(i)
      end
    end
  end
 
  def class_id=(class_id)
    if $data_classes[class_id] != nil
      @class_id = class_id
      make_exp_list
      unless equippable?($data_weapons[@weapon_id])
        equip(0, 0)
      end
      unless equippable?($data_armors[@armor1_id])
        equip(1, 0)
      end
      unless equippable?($data_armors[@armor2_id])
        equip(2, 0)
      end
      unless equippable?($data_armors[@armor3_id])
        equip(3, 0)
      end
      unless equippable?($data_armors[@armor4_id])
        equip(4, 0)
      end
    end
  end
 
end

Worked like magic for both my game and my roomate's game. Awesome!