+ rbahamut 8 Posted August 11, 2012 (edited) EXP Gauges V1.4 by Rbahamut IntroductionThis script will add an EXP Gauge to the Menu status as well as replace the exp info with a EXP Gauge in the Status windowFeatures-Plug n Play-Customizable ( if you know what to look for)-Will make exp info more accessible-With V 1.4 Gauges are now accurate after level 2!!! Never noticed anything was wrong with it beforeScreenshots Showing exp gauges on Menu statusShowing exp gauge in Status windowShowing exp gauges in Menu status after a battleShowing exp gauge in Status window after leveling How to Install-place under Materials, above Main ProcessDemoV1.0 Without RTP http://www.mediafire...lokcdrddjy36xkd <=== out of dateV1.0 With RTP http://www.mediafire...u9ordj1r9tc29t5 <=== out of dateScript #---------------------------------------------------------------------------- # EXP gauges by Rbahamut #---------------------------------------------------------------------------- # v1.4 #---------------------------------------------------------------------------- # Changes in 1.4 - EXP Gauges now work properly passed level 2! (There was a # problem with the gauge not filling all the way past level 2) # Changes in v1.3 - Adjusted ui to fit gauges properly in "Skills" window and # other variations of the same window such as YEA Class changing window, etc # Changes in v1.2 - Added another customizing capability of changing the # gauge back color when empty! # Changes in v1.1 - No more exp clearing on leveling! #---------------------------------------------------------------------------- # RGSS3 only Plug n Play #---------------------------------------------------------------------------- #*This script will add exp gauges to both the menu status and status windows #---------------------------------------------------------------------------- # Edit below at own risk! #---------------------------------------------------------------------------- class Window_Base < Window #-------------------------------------------------------------------------- # * Get Text Colors #-------------------------------------------------------------------------- def exp_gauge_color1; text_color(11); end; # EXP gauge added lower half def exp_gauge_color2; text_color(3); end; # EXP gauge added upper half def exp_gauge_back_color; text_color(19); end; # EXP Gauge background #-------------------------------------------------------------------------- # * Draw exp Gauge # rate : Rate (full at 1.0) # color1 : Left side gradation # color2 : Right side gradation #-------------------------------------------------------------------------- def draw_expgauge(x, y, width, rate, color1, color2) fill_w = (width * rate).to_i gauge_y = y + line_height - 8 contents.fill_rect(x, gauge_y, width, 6, exp_gauge_back_color) contents.gradient_fill_rect(x, gauge_y, fill_w, 6, color1, color2) end #-------------------------------------------------------------------------- # * Draw EXP This is the exp info to be drawn on the "menu" status #-------------------------------------------------------------------------- def draw_exp(actor, x, y, width = 124) s1 = actor.max_level? ? "---------" : actor.exp s2 = actor.max_level? ? "0" : actor.next_level_exp - actor.exp if actor.max_level? ? draw_expgauge(x, y, width, 1, exp_gauge_color1, exp_gauge_color2) : draw_gauge(x, y,width,((((actor.exp - actor.current_level_exp).to_f/100) / ((actor.next_level_exp.to_f - actor.current_level_exp.to_f)/100))), exp_gauge_color1, exp_gauge_color2) end change_color(system_color) draw_text(x, y, 30, line_height, "EXP") change_color(normal_color) if actor.max_level? ? draw_text(x + width - 72, y, 72, line_height, "------------", 2) : draw_text(x + width - 72, y, 72, line_height, actor.next_level_exp.to_i - actor.exp.to_i, 2) end end #-------------------------------------------------------------------------- # * Draw Simple Status #-------------------------------------------------------------------------- def draw_actor_simple_status(actor, x, y) draw_actor_name(actor, x, y + line_height * -0.3) draw_actor_level(actor, x, y + line_height * 0.7) draw_actor_icons(actor, x, y + line_height * 1.7) draw_actor_class(actor, x + 120, y + line_height * -0.3) draw_actor_hp(actor, x + 120, y + line_height * 0.7) draw_actor_mp(actor, x + 120, y + line_height * 1.7) draw_exp(actor, x + 120, y + line_height * 2.7) #<== This line adds the exp gauge to "menu" status end end class Window_Status < Window_Selectable #-------------------------------------------------------------------------- # * Draw New Experience Information This is the exp info to be drawn in the "status" window #-------------------------------------------------------------------------- def draw_exp_info(x, y) s1 = @actor.max_level? ? "-------" : @actor.exp s2 = @actor.max_level? ? "0" : @actor.next_level_exp - @actor.exp if @actor.max_level? ? draw_gauge(x, y + line_height * 3, 130, 1, exp_gauge_color1, exp_gauge_color2) : draw_gauge(x, y + line_height * 3, 130,((((@actor.exp - @actor.current_level_exp).to_f/100) / ((@actor.next_level_exp.to_f - @actor.current_level_exp.to_f)/100))), exp_gauge_color1, exp_gauge_color2) end s_next = sprintf(Vocab::ExpNext, Vocab::level) change_color(system_color) draw_text(x, y + line_height * 3, 30, line_height, "EXP") draw_text(x, y + line_height * 2, 180, line_height, s_next) draw_text(255, y + line_height * 3, 180, line_height, s2, 2) change_color(normal_color) if @actor.max_level? ? draw_text(x + width - 72, y, 72, line_height, "------------", 2) : draw_text(x + width - 72, y, 72, line_height, @actor.next_level_exp.to_i - @actor.exp.to_i, 2) end end end FAQQ: Does the exp I gain carry over into the next level?A: Yes it does!!! Thanks to Xypher, whom had a great catch with the line of code!Credit and ThanksTo my lil bro who was whining about all the other exp gauges not working this way and pushing me to get it out there.BIG thanks to Xypher for figuring out how to not need to wipe exp every level to ensure the exp gauge empties upon leveling!Author's NotesThis is my first standalone script and though it is not all that advanced or anything, I would like ppl to be honest about how it is, let me know of any bugs and credit if you plan on usin for commercial game. Edited April 25, 2013 by rbahamut 2 PhoenixSoul and oriceles reacted to this Share this post Link to post Share on other sites
tbdragon3 0 Posted August 11, 2012 Works well for me, good job. Share this post Link to post Share on other sites
+ rbahamut 8 Posted August 13, 2012 Thanks look for more stuff from me hope to have some good scripts in the future Share this post Link to post Share on other sites
Xypher 176 Posted August 13, 2012 Why didn't you just draw_gauge(x, y + line_height * 3, 130,((((@actor.exp - @actor.current_level_exp).to_f/100) / (@actor.next_level_exp.to_f/100))), exp_gauge_color1, exp_gauge_color2) No need to reset exp every level that way. 1 rbahamut reacted to this Share this post Link to post Share on other sites
Tsukihime 1,487 Posted August 13, 2012 I thought this was pretty amusing though change_exp(self.exp - self.exp, true) 1 rbahamut reacted to this Share this post Link to post Share on other sites
+ rbahamut 8 Posted August 13, 2012 Why didn't you just draw_gauge(x, y + line_height * 3, 130,((((@actor.exp - @actor.current_level_exp).to_f/100) / (@actor.next_level_exp.to_f/100))), exp_gauge_color1, exp_gauge_color2) No need to reset exp every level that way. Thanks Xypher... i swear i tried that before and it failed... prolly had the current exp part in wrong area.. thanks man ill edit u into the credits Share this post Link to post Share on other sites
+ rbahamut 8 Posted August 13, 2012 I thought this was pretty amusing though change_exp(self.exp - self.exp, true) You like that? lol seriously is my first script I have VERY little programming experience in VB and C++ and never touched RGSS at all so i think i did ok butobviously need to learn moar before im any REAL good. Share this post Link to post Share on other sites
DisturbedInside 2 Posted August 18, 2012 nice work! Will it work with yanfly status window? Share this post Link to post Share on other sites
+ rbahamut 8 Posted August 18, 2012 (edited) Ok after testing compatability with Yanfly's Status Screen I have found a working method!!!! Step 1 Take my Custom EXP Gauges V1.2 script and put it BELOW Yanfly's Status Screen script Step 2 Copy these line of codes and paste them in yanflys status script in the area marked "DRAW GENERAL EXPERIENCE" ( line 562 ish just put it under the draw text but above the end ) draw_gauge(dx, dy + line_height * 3, 130, 1, exp_gauge_color1, exp_gauge_color2) draw_gauge(dx, dy + line_height * 3, 130,((((@actor.exp - @actor.current_level_exp).to_f/100) / (@actor.next_level_exp.to_f/100))), exp_gauge_color1, exp_gauge_color2) Edited August 18, 2012 by rbahamut 1 DisturbedInside reacted to this Share this post Link to post Share on other sites
Chantal 21 Posted October 9, 2012 Hmm, I get an error as soon as I try to enter the menu: Script 'EXP Gauges by Rbahamut' line 44: NoMethedError occurred. undefined method 'next_level_EXP' for#<Game_Actor:0x6984a08> Tested it in a completely new, blank game. So it's not conflicting with other scripts. Share this post Link to post Share on other sites
+ rbahamut 8 Posted October 10, 2012 I am not getting that error in a fresh new game without extra scripts, nor with other scripts... Im thinking re copy and paste or somethings wrong with ur client. It literally takes the built in exp requirements and just draws a gauge. I will continue to try and reproduce that error in the meantime. Share this post Link to post Share on other sites
Xypher 176 Posted October 10, 2012 @Chantal why is your method next_level_EXP and not next_level_exp 1 rbahamut reacted to this Share this post Link to post Share on other sites
Chantal 21 Posted October 10, 2012 (edited) All right, the problem seems to have fixed itself O.o I feel like a real tool now, because honest to God I can't recreate the error either. Even though I got it several times yesterday. So, never mind. It was probaly an error on my part. Sorry for the trouble. Thank you for this script. It's really something that should've been included in the maker in the first place Edited October 10, 2012 by Chantal 1 rbahamut reacted to this Share this post Link to post Share on other sites
Ocedic 249 Posted October 11, 2012 Very cool script. If you are doing compatibility requests, I would love if it worked with KMS's Generic Gauge as well (which is compatible with Yanfly's Status menus through a compatibility patch.) Found here: http://forums.rpgmakerweb.com/index.php?/topic/1934-kms-generic-gauge/ One thing to note is that KMS's gauges are larger, so a third exp bar would not fit on the status menu (perhaps just make it not appear on the status menu since there's already exp bars there.) Either way, good job with the script! Share this post Link to post Share on other sites
ravrax 0 Posted March 11, 2013 (edited) Never mind. Edited March 21, 2013 by ravrax Share this post Link to post Share on other sites
anavn1 9 Posted March 11, 2013 Great script I will use it in my game. Sadly it is not compatible with menu scripts. Share this post Link to post Share on other sites
+ rbahamut 8 Posted April 2, 2013 nice lil update. I noticed that the exp gauge was getting cut off in the skills menu and class changing menu of YEA Class System, which I use. So a little shifting things up was quite easy Share this post Link to post Share on other sites
+ rbahamut 8 Posted April 8, 2013 Ok so nice update with 1.4 it actually works now!!!! Had a problem with the gauge not filling all the way passed level 2 but its fixed!! Ty again Xypher Share this post Link to post Share on other sites
Ocedic 249 Posted April 8, 2013 Your script pasted on one line unfortunately. Share this post Link to post Share on other sites
+ rbahamut 8 Posted April 9, 2013 Your script pasted on one line unfortunately. Fixed that as well... i updated from my phone... that might be why the straight line ty and its normal now Share this post Link to post Share on other sites
Corey Zamora 5 Posted April 18, 2013 Changing the color of the gauge doesn't seem to work Share this post Link to post Share on other sites
+ rbahamut 8 Posted April 18, 2013 Changing the color of the gauge doesn't seem to work It does for me, I have tried pasting it in new game and all current existing games. Do you have any other scripts that may be conflicting with it? also here is the color references http://www.rpgmakervxace.net/topic/4001-text-color-quick-reference/ Share this post Link to post Share on other sites
Corey Zamora 5 Posted April 19, 2013 Changing the color of the gauge doesn't seem to work It does for me, I have tried pasting it in new game and all current existing games. Do you have any other scripts that may be conflicting with it? also here is the color references http://www.rpgmakervxace.net/topic/4001-text-color-quick-reference/ bah I didn't try it in a new game, was being lazy >.< it must be conflicting with another script. It's alright though, nothing wrong with the default. Share this post Link to post Share on other sites
Firecat1311 1 Posted July 28, 2014 Thanks a ton, this is the exact thing I needed. However, if you don't mind, I made a slight modification to the script to get it to suit my needs a bit better. As you can see, I changed the color to match the exp bar on Yanfly's victory script, and moved it over to that empty space under the level. Obviously this won't work for all setups, but I think it looks a bit more space efficient than having three bars stacked on top of each other next to empty space. Here's the modified script so nobody gets mad at me for keeping it to myself or something #---------------------------------------------------------------------------- # EXP gauges by Rbahamut, very slightly tweaked by Firecat1311 (VERY slightly)#----------------------------------------------------------------------------# v1.4#----------------------------------------------------------------------------# Changes in 1.4 - EXP Gauges now work properly passed level 2! (There was a# problem with the gauge not filling all the way past level 2)# Changes in v1.3 - Adjusted ui to fit gauges properly in "Skills" window and# other variations of the same window such as YEA Class changing window, etc# Changes in v1.2 - Added another customizing capability of changing the# gauge back color when empty!# Changes in v1.1 - No more exp clearing on leveling!#----------------------------------------------------------------------------# RGSS3 only Plug n Play#----------------------------------------------------------------------------#*This script will add exp gauges to both the menu status and status windows#----------------------------------------------------------------------------# Edit below at own risk!#----------------------------------------------------------------------------class Window_Base < Window#--------------------------------------------------------------------------# * Get Text Colors#--------------------------------------------------------------------------def exp_gauge_color1; text_color(12); end; # EXP gauge added lower halfdef exp_gauge_color2; text_color(4); end; # EXP gauge added upper halfdef exp_gauge_back_color; text_color(19); end; # EXP Gauge background#--------------------------------------------------------------------------# * Draw exp Gauge# rate : Rate (full at 1.0)# color1 : Left side gradation# color2 : Right side gradation#--------------------------------------------------------------------------def draw_expgauge(x, y, width, rate, color1, color2)fill_w = (width * rate).to_igauge_y = y + line_height - 8contents.fill_rect(x, gauge_y, width, 6, exp_gauge_back_color)contents.gradient_fill_rect(x, gauge_y, fill_w, 6, color1, color2)end#--------------------------------------------------------------------------# * Draw EXP This is the exp info to be drawn on the "menu" status#--------------------------------------------------------------------------def draw_exp(actor, x, y, width = 112)x += 5s1 = actor.max_level? ? "---------" : actor.exps2 = actor.max_level? ? "0" : actor.next_level_exp - actor.expif actor.max_level? ?draw_expgauge(x, y-1, width, 1, exp_gauge_color1, exp_gauge_color2) :draw_gauge(x, y-1,width,((((actor.exp - actor.current_level_exp).to_f/100) / ((actor.next_level_exp.to_f - actor.current_level_exp.to_f)/100))),exp_gauge_color1, exp_gauge_color2)endchange_color(system_color)draw_text(x, y-1, 60, line_height, "Next")change_color(normal_color)if actor.max_level? ?draw_text(x + width - 72, y-1, 72, line_height, "------------", 2) :draw_text(x + width - 72, y-1, 72, line_height, actor.next_level_exp.to_i - actor.exp.to_i, 2)endend#--------------------------------------------------------------------------# * Draw Simple Status#--------------------------------------------------------------------------def draw_actor_simple_status(actor, x, y)draw_actor_name(actor, x, y + line_height * -0.3)draw_actor_level(actor, x, y + line_height * 0.7)draw_actor_icons(actor, x, y + line_height * 1.7)draw_actor_class(actor, x + 120, y + line_height * -0.3)draw_actor_hp(actor, x + 120, y + line_height * 0.7)draw_actor_mp(actor, x + 120, y + line_height * 1.7)draw_exp(actor, x + 120 -124, y-2 -21 + line_height * 2.7) #<== This line adds the exp gauge to "menu" statusendendclass Window_Status < Window_Selectable#--------------------------------------------------------------------------# * Draw New Experience Information This is the exp info to be drawn in the "status" window#--------------------------------------------------------------------------def draw_exp_info(x, y)s1 = @actor.max_level? ? "-------" : @actor.exps2 = @actor.max_level? ? "0" : @actor.next_level_exp - @actor.expif @actor.max_level? ?draw_gauge(x, y + line_height * 3, 130, 1, exp_gauge_color1, exp_gauge_color2) :draw_gauge(x, y + line_height * 3, 130,((((@actor.exp - @actor.current_level_exp).to_f/100) / ((@actor.next_level_exp.to_f - @actor.current_level_exp.to_f)/100))),exp_gauge_color1, exp_gauge_color2)ends_next = sprintf(Vocab::ExpNext, Vocab::level)change_color(system_color)draw_text(x, y + line_height * 3, 30, line_height, "EXP")draw_text(x, y + line_height * 2, 180, line_height, s_next)change_color(normal_color)draw_text(255, y + line_height * 3, 180, line_height, s2, 2)if @actor.max_level? ?draw_text(x + width - 72, y, 72, line_height, "------------", 2) :draw_text(x + width - 72, y, 72, line_height, @actor.next_level_exp.to_i - @actor.exp.to_i, 2)endendend 1 rbahamut reacted to this Share this post Link to post Share on other sites
pparke2 0 Posted January 20, 2015 (edited) Is there any way to change the value on the Exp Bar to read RELATIVE experience and not TOTAL? The bar itself fills as you progress from the level you're currently on to the next but the numerical readout just shows the total experience needed to get to the next level (counting previous levels too). Any chance you can get it to read the amount needed to get to the next level only. Thanks. Edited January 20, 2015 by pparke2 Share this post Link to post Share on other sites