EXP Bar Addon

Caz

Green Eyes Blonde Dragon
Moderator
Joined
Oct 15, 2012
Messages
856
Reaction score
1,775
First Language
English
Primarily Uses
RMMV
Hi guys!

Archeia's internet isn't behaving at the moment, so she's asked me to share her and Yami's newest script addon with you guys: the EXP Bar Addon.​

DOWNLOAD SCRIPT HERE
(place me below all Luna Menu scripts)
Code:
#==============================================================================
# ■ MenuLuna: EXP Bar Configuration
#==============================================================================

module MenuLuna
  module MainMenu
    BATTLER_STATUS[:exp_bar] = {
      :enable   =>  true, # Enable EXP Bars? True/False
      # -----------------------------------------------------------------
      # Offset Values refer to how much you want to nudge the window display
      # without affecting its base x, y and z.
      # -----------------------------------------------------------------
      :offset_x =>  228,
      :offset_y =>  55,
      :offset_z =>  0,
      # -----------------------------------------------------------------
      # Type allows you to set the type of graphic you want to use.
      # 0 - Default bar; 1 - Custom bar; 2 - Custom animated bar.
      # -----------------------------------------------------------------
      :type     =>  0,
      :vertical =>  false,# Display vertically? True/False
                          # Works for type 0 and 1.
      :ani_rate =>  0.02, # Max is 1.00. Refers to animate speed/rate.
      #---
      :type_0   =>  {
      # -----------------------------------------------------------------
      # Set the color for the bar background. [R,G,B,A]
      # You can also use normal_color to use the default windowskin colors.
      # -----------------------------------------------------------------
        :back_color =>  [0, 0, 0, 255],
      # -----------------------------------------------------------------
      # color1 = refers to the first color of the gradient. ([R,G,B,A])
      # color2 = refers to the second color of the gradient. ([R,G,B,A])
      # normal_color refers to the color of your default windowskin.
      # -----------------------------------------------------------------
        :color1     =>  [7, 101, 58, 255],
        :color2     =>  [84, 194, 144, 255],
      # -----------------------------------------------------------------
      # Set the outline color for the name display. [R,G,B,A]
      # You can also use normal_color to use the default outline color.
      # -----------------------------------------------------------------
        :outline    =>  [0, 0, 0, 255],
        :length     =>  220, # Width/Length of the bar.
        :height     =>  12,  # Height of the bar.

      # -----------------------------------------------------------------
      # This section allows you to customize the "EXP" Vocab display.
      # -----------------------------------------------------------------
      # -----------------------------------------------------------------
      # Offset Values refer to how much you want to nudge the window display
      # without affecting its base x, y and z.
      # -----------------------------------------------------------------
        :offset_x =>  232,
        :offset_y =>  32,
        :offset_z =>  1,
      # -----------------------------------------------------------------
      # Set the color for the name display. [R,G,B,A]
      # You can also use normal_color to use the default font color.
      # -----------------------------------------------------------------
        :tcolor   =>  [255, 255, 255, 255],
      # -----------------------------------------------------------------
      # Set the outline color for the name display. [R,G,B,A]
      # You can also use normal_color to use the default outline color.
      # -----------------------------------------------------------------
        :toutline =>  [0, 0, 0, 128],
        :bold     =>  false, # Enable Bold? True/False
        :italic   =>  false, # Enable Italic? True/False
      # -----------------------------------------------------------------
      # Set alignment settings.
      # 0 = Left/Default, 1 = Center, 2 = Right
      # -----------------------------------------------------------------
        :align    =>  0,
        :font     =>  "VL Gothic", # Set Font type.
        :size     =>  24,          # Set Font Size
        :text     =>  "EXP",        # Change "EXP" Vocab.
      },
      #---
      :type_1   =>  {
        :filename =>  "EXP_Bar",    # Custom EXP Bar Filename.
      },
      #---
      :type_2   =>  {
        :filename =>  "Btskin_EXP", # Custom Frame-based EXP Bar Filename.
        :frames   =>  10,          # Amount of animation frames.
      },
    } # End exp_bar.
  end

  module ItemMenu
    BATTLER_STATUS[:exp_bar] = {
      :enable   =>  false, # Enable EXP Bars? True/False
      # -----------------------------------------------------------------
      # Offset Values refer to how much you want to nudge the window display
      # without affecting its base x, y and z.
      # -----------------------------------------------------------------
      :offset_x =>  228,
      :offset_y =>  48,
      :offset_z =>  0,
      # -----------------------------------------------------------------
      # Type allows you to set the type of graphic you want to use.
      # 0 - Default bar; 1 - Custom bar; 2 - Custom animated bar.
      # -----------------------------------------------------------------
      :type     =>  0,
      :vertical =>  false,# Display vertically? True/False
                          # Works for type 0 and 1.
      :ani_rate =>  0.02, # Max is 1.00. Refers to animate speed/rate.
      #---
      :type_0   =>  {
      # -----------------------------------------------------------------
      # Set the color for the bar background. [R,G,B,A]
      # You can also use normal_color to use the default windowskin colors.
      # -----------------------------------------------------------------
        :back_color =>  [0, 0, 0, 255],
      # -----------------------------------------------------------------
      # color1 = refers to the first color of the gradient. ([R,G,B,A])
      # color2 = refers to the second color of the gradient. ([R,G,B,A])
      # normal_color refers to the color of your default windowskin.
      # -----------------------------------------------------------------
        :color1     =>  [7, 101, 58, 255],
        :color2     =>  [84, 194, 144, 255],
      # -----------------------------------------------------------------
      # Set the outline color for the name display. [R,G,B,A]
      # You can also use normal_color to use the default outline color.
      # -----------------------------------------------------------------
        :outline    =>  [0, 0, 0, 255],
        :length     =>  220, # Width/Length of the bar.
        :height     =>  12,  # Height of the bar.

      # -----------------------------------------------------------------
      # This section allows you to customize the "EXP" Vocab display.
      # -----------------------------------------------------------------
      # -----------------------------------------------------------------
      # Offset Values refer to how much you want to nudge the window display
      # without affecting its base x, y and z.
      # -----------------------------------------------------------------
        :offset_x =>  232,
        :offset_y =>  32,
        :offset_z =>  1,
      # -----------------------------------------------------------------
      # Set the color for the name display. [R,G,B,A]
      # You can also use normal_color to use the default font color.
      # -----------------------------------------------------------------
        :tcolor   =>  [255, 255, 255, 255],
      # -----------------------------------------------------------------
      # Set the outline color for the name display. [R,G,B,A]
      # You can also use normal_color to use the default outline color.
      # -----------------------------------------------------------------
        :toutline =>  [0, 0, 0, 128],
        :bold     =>  false, # Enable Bold? True/False
        :italic   =>  false, # Enable Italic? True/False
      # -----------------------------------------------------------------
      # Set alignment settings.
      # 0 = Left/Default, 1 = Center, 2 = Right
      # -----------------------------------------------------------------
        :align    =>  0,
        :font     =>  "VL Gothic", # Set Font type.
        :size     =>  24,          # Set Font Size
        :text     =>  "EXP",        # Change "EXP" Vocab.
      },
      #---
      :type_1   =>  {
        :filename =>  "EXP_Bar",    # Custom EXP Bar Filename.
      },
      #---
      :type_2   =>  {
        :filename =>  "Btskin_EXP", # Custom Frame-based EXP Bar Filename.
        :frames   =>  10,          # Amount of animation frames.
      },
    } # End exp_bar.
  end

  module SkillMenu
    BATTLER_STATUS[:exp_bar] = {
      :enable   =>  false, # Enable EXP Bars? True/False
      # -----------------------------------------------------------------
      # Offset Values refer to how much you want to nudge the window display
      # without affecting its base x, y and z.
      # -----------------------------------------------------------------
      :offset_x =>  228,
      :offset_y =>  48,
      :offset_z =>  0,
      # -----------------------------------------------------------------
      # Type allows you to set the type of graphic you want to use.
      # 0 - Default bar; 1 - Custom bar; 2 - Custom animated bar.
      # -----------------------------------------------------------------
      :type     =>  0,
      :vertical =>  false,# Display vertically? True/False
                          # Works for type 0 and 1.
      :ani_rate =>  0.02, # Max is 1.00. Refers to animate speed/rate.
      #---
      :type_0   =>  {
      # -----------------------------------------------------------------
      # Set the color for the bar background. [R,G,B,A]
      # You can also use normal_color to use the default windowskin colors.
      # -----------------------------------------------------------------
        :back_color =>  [0, 0, 0, 255],
      # -----------------------------------------------------------------
      # color1 = refers to the first color of the gradient. ([R,G,B,A])
      # color2 = refers to the second color of the gradient. ([R,G,B,A])
      # normal_color refers to the color of your default windowskin.
      # -----------------------------------------------------------------
        :color1     =>  [7, 101, 58, 255],
        :color2     =>  [84, 194, 144, 255],
      # -----------------------------------------------------------------
      # Set the outline color for the name display. [R,G,B,A]
      # You can also use normal_color to use the default outline color.
      # -----------------------------------------------------------------
        :outline    =>  [0, 0, 0, 255],
        :length     =>  220, # Width/Length of the bar.
        :height     =>  12,  # Height of the bar.

      # -----------------------------------------------------------------
      # This section allows you to customize the "EXP" Vocab display.
      # -----------------------------------------------------------------
      # -----------------------------------------------------------------
      # Offset Values refer to how much you want to nudge the window display
      # without affecting its base x, y and z.
      # -----------------------------------------------------------------
        :offset_x =>  232,
        :offset_y =>  32,
        :offset_z =>  1,
      # -----------------------------------------------------------------
      # Set the color for the name display. [R,G,B,A]
      # You can also use normal_color to use the default font color.
      # -----------------------------------------------------------------
        :tcolor   =>  [255, 255, 255, 255],
      # -----------------------------------------------------------------
      # Set the outline color for the name display. [R,G,B,A]
      # You can also use normal_color to use the default outline color.
      # -----------------------------------------------------------------
        :toutline =>  [0, 0, 0, 128],
        :bold     =>  false, # Enable Bold? True/False
        :italic   =>  false, # Enable Italic? True/False
      # -----------------------------------------------------------------
      # Set alignment settings.
      # 0 = Left/Default, 1 = Center, 2 = Right
      # -----------------------------------------------------------------
        :align    =>  0,
        :font     =>  "VL Gothic", # Set Font type.
        :size     =>  24,          # Set Font Size
        :text     =>  "EXP",        # Change "EXP" Vocab.
      },
      #---
      :type_1   =>  {
        :filename =>  "EXP_Bar",    # Custom EXP Bar Filename.
      },
      #---
      :type_2   =>  {
        :filename =>  "Btskin_EXP", # Custom Frame-based EXP Bar Filename.
        :frames   =>  10,          # Amount of animation frames.
      },
    } # End exp_bar.

    CURRENT_ACTOR_STATUS[:exp_bar] = {
      :enable   =>  true, # Enable EXP Bars? True/False
      # -----------------------------------------------------------------
      # Offset Values refer to how much you want to nudge the window display
      # without affecting its base x, y and z.
      # -----------------------------------------------------------------
      :offset_x =>  228,
      :offset_y =>  48,
      :offset_z =>  0,
      # -----------------------------------------------------------------
      # Type allows you to set the type of graphic you want to use.
      # 0 - Default bar; 1 - Custom bar; 2 - Custom animated bar.
      # -----------------------------------------------------------------
      :type     =>  0,
      :vertical =>  false,# Display vertically? True/False
                          # Works for type 0 and 1.
      :ani_rate =>  0.02, # Max is 1.00. Refers to animate speed/rate.
      #---
      :type_0   =>  {
      # -----------------------------------------------------------------
      # Set the color for the bar background. [R,G,B,A]
      # You can also use normal_color to use the default windowskin colors.
      # -----------------------------------------------------------------
        :back_color =>  [0, 0, 0, 255],
      # -----------------------------------------------------------------
      # color1 = refers to the first color of the gradient. ([R,G,B,A])
      # color2 = refers to the second color of the gradient. ([R,G,B,A])
      # normal_color refers to the color of your default windowskin.
      # -----------------------------------------------------------------
        :color1     =>  [7, 101, 58, 255],
        :color2     =>  [84, 194, 144, 255],
      # -----------------------------------------------------------------
      # Set the outline color for the name display. [R,G,B,A]
      # You can also use normal_color to use the default outline color.
      # -----------------------------------------------------------------
        :outline    =>  [0, 0, 0, 255],
        :length     =>  220, # Width/Length of the bar.
        :height     =>  12,  # Height of the bar.

      # -----------------------------------------------------------------
      # This section allows you to customize the "EXP" Vocab display.
      # -----------------------------------------------------------------
      # -----------------------------------------------------------------
      # Offset Values refer to how much you want to nudge the window display
      # without affecting its base x, y and z.
      # -----------------------------------------------------------------
        :offset_x =>  232,
        :offset_y =>  32,
        :offset_z =>  1,
      # -----------------------------------------------------------------
      # Set the color for the name display. [R,G,B,A]
      # You can also use normal_color to use the default font color.
      # -----------------------------------------------------------------
        :tcolor   =>  [255, 255, 255, 255],
      # -----------------------------------------------------------------
      # Set the outline color for the name display. [R,G,B,A]
      # You can also use normal_color to use the default outline color.
      # -----------------------------------------------------------------
        :toutline =>  [0, 0, 0, 128],
        :bold     =>  false, # Enable Bold? True/False
        :italic   =>  false, # Enable Italic? True/False
      # -----------------------------------------------------------------
      # Set alignment settings.
      # 0 = Left/Default, 1 = Center, 2 = Right
      # -----------------------------------------------------------------
        :align    =>  0,
        :font     =>  "VL Gothic", # Set Font type.
        :size     =>  24,          # Set Font Size
        :text     =>  "EXP",        # Change "EXP" Vocab.
      },
      #---
      :type_1   =>  {
        :filename =>  "EXP_Bar",    # Custom EXP Bar Filename.
      },
      #---
      :type_2   =>  {
        :filename =>  "Btskin_EXP", # Custom Frame-based HP Bar Filename.
        :frames   =>  10,          # Amount of animation frames.
      },
    } # End exp_bar.
  end
end

#==============================================================================
# ■ SpriteMenu_Bar
#==============================================================================

class SpriteMenu_Bar < Sprite

  #--------------------------------------------------------------------------
  # alias method: real_rate
  #--------------------------------------------------------------------------
  alias luna_exp_bar_real_rate real_rate
  def real_rate
    case @symbol
    when :exp_bar
      return exp_rate
    else
      return luna_exp_bar_real_rate
    end
  end

  #--------------------------------------------------------------------------
  # exp_rate
  #--------------------------------------------------------------------------
  def exp_rate
    floor_exp = @battler.exp - @battler.current_level_exp
    ceil_exp  = @battler.next_level_exp - @battler.current_level_exp
    return floor_exp.to_f / ceil_exp.to_f
  end

end # SpriteMenu_Bar

#==============================================================================
# ■ Spriteset_MenuStatus
#==============================================================================

class Spriteset_MenuStatus

  #--------------------------------------------------------------------------
  # alias method: create_bars
  #--------------------------------------------------------------------------
  alias luna_exp_bar_create_bars create_bars
  def create_bars
    luna_exp_bar_create_bars
    exp_bar = SpriteMenu_Bar.new(@viewport, self, :exp_bar, @setting)
    @sprites.push(exp_bar)
  end

end # Spriteset_MenuStatus
This lets you put EXP bars in the menu, as well as allowing you to customise them! She's tested the script, but please feel free to report any issues here and I'll feed them back to her so they can be fixed.
 
Last edited:

Capitán

kind of a big deal
Veteran
Joined
Jul 9, 2013
Messages
572
Reaction score
145
First Language
Engilsh
Primarily Uses
RMMV

Halfmoon Media

Illustrator, Eventer, Writer
Veteran
Joined
Aug 17, 2014
Messages
61
Reaction score
9
First Language
English
Primarily Uses
Thank you so much Archeia!! And anyone else who happened to contribute!
 

Dr.Yami

。◕‿◕。
Developer
Joined
Mar 5, 2012
Messages
1,003
Reaction score
757
First Language
Vietnamese
Primarily Uses
Other
I did this script without RMVXA for testing so there might be issues, please do report if you find any problem :o
 

Halfmoon Media

Illustrator, Eventer, Writer
Veteran
Joined
Aug 17, 2014
Messages
61
Reaction score
9
First Language
English
Primarily Uses
It's been working great so far!
 

RoooodWorks

Devil King
Veteran
Joined
Jan 24, 2015
Messages
352
Reaction score
279
First Language
english
Primarily Uses
N/A
Is there a way to put 'EXP Text' or 'exp numbers' on top of the bars like u can do with HP and MP. Because I want to Add EXP text on top of the Bar's :

Thanks
 
Last edited by a moderator:

RoooodWorks

Devil King
Veteran
Joined
Jan 24, 2015
Messages
352
Reaction score
279
First Language
english
Primarily Uses
N/A
Not working any more for me, the spoiler broke it and i am no scripter so i don't know how to fix it . I get this kind of error :
this is the line it is referencing so i dunno what is exactly wrong :
 

Caz

Green Eyes Blonde Dragon
Moderator
Joined
Oct 15, 2012
Messages
856
Reaction score
1,775
First Language
English
Primarily Uses
RMMV
Apologies - I've create a Pastebin version of the script and updated the main post to avoid something like that happening again. :eswt:
 

RoooodWorks

Devil King
Veteran
Joined
Jan 24, 2015
Messages
352
Reaction score
279
First Language
english
Primarily Uses
N/A
Oh i didn't realise XD My bad. I don't really open that folder, i just get the base engine and work from there, i don't open any other folders. I stil ldon't see it i searched High and low, I do have steam version tho so maybe its very behind on updates.
 
Last edited:

Archeia

Level 99 Demi-fiend
Developer
Joined
Mar 1, 2012
Messages
15,141
Reaction score
15,473
First Language
Filipino
Primarily Uses
RMMZ
Oh i didn't realise XD My bad. I don't really open that folder, i just get the base engine and work from there, i don't open any other folders. I stil ldon't see it i searched High and low, I do have steam version tho so maybe its very behind on updates.
That's very interesting. Thank you for telling me about it!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,868
Messages
1,017,066
Members
137,576
Latest member
SadaSoda
Top