Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

HP/MP/ATB/OVERDRIVE Bars Slanted style for RTAB V.2

To adjust the position of the HP, SP, and ATB bar, you have to edit the def refresh of the Window_DetailsStatus in RTAB (roughly line 3830 to find it) or in the BattleStatus Modification script (around line 250).

To adjust the position of the OD bar (if using the overdrive script), then you adjust the def refresh (geez... shoulda known) in class Window_BattleStatus... not DetailStatus... around line 300 (for version 1.1 - default version) or line 323 (for Version 2.1 - Battlestatus Mod. Script version)

While the X and Y positions of the draw_actor... hp and sp values are pretty static, the OD bar uses a formula to control its placement.

Example:
Code:
draw_actor_hp(actor, 4, 0, 120)
...default value.
Code:
draw_actor_hp(actor, 16, 4, 80)
New edit... adjusts the x position by 12 more to the left, the y position 4 down... and makes the HP bar only 80 pixels wide instead of 120 pixels.

WARNING: Watch those borders. Though you can't see 'em, going outside the borders may cut-off and/or hide your features. Smaller fonts could help. :D
 
Add...
Code:
    self.contents.font.color = normal_color
    self.contents.draw_text(x, y, 120, 32, "Your Text String")
in the appropriate defs (draw_actor_atg and draw_actor_od. As it is now, it'll put the text right behind the bar, like the HP and SP bars...(just by the x & y values) and the 120 is how wide your text 'CAN' get (doesn't have to be that big for just 3 letters :D)

Also note, you can also add self.contents.font.size=whateversize to control the size.

Hi, Clive!
 
Sorry to necro post this thread but, there's a very little thing annoying me: the ATB gauge doesn't look like the other bars do.
At first it seemed as if the colored part's heigth (not the bar background) was just a little to big. So I changed that but now the bar seemes to be disarranged from its background and I can't rearrange it back into the proper position.
furthermore the righthanded edge of the barbackground seems to be cut...

Does anyone else noticed this or am I the only one stupid enough not to be able to solve this thing?

Thanks in advance!
Viv
 
Hi there, just like to start off by saying excellent work. I never realised how something as simple as the way a bar looks can change a game's overall appearance^^

Anyway, two quick questions;
1) How can I change the bar size? I wanted to make the bar a little thinner and shorter.
2) Is it possible to only make the hero status only appear when they have a status effect for example, poisoned?

Sorry about the noob questions, just started RMXP a few days ago ><
 
Well, you can't make it shorter than 6 pixel in height due to circumstances, but in the actual call ( def draw_actor_hp (actor, x, y, width = 120)... you change the 120. Actually, I don't know if it 'IS' 120 'cause I'm at work right now (not looking at the script in general). But that's how you change the left/right width.
 
I am not sure if this question has already been asked or not; how how can you make it look like it does in the sample pic? Well, just the way the bars are aligned with the words and stuff (i'd like to fiddle around with it a bit more, but getting them into that position comes first).

Also, I was wondering what active time battle systems are compatible with this and possibly where the overdrive script is? Maybe even Sephiroth Spawn's battle system... since I assume they are all compatible with one another.

(and I totally sound like a n00b... it really has been a long time since I have worked on RMXP... too long...)

Thanks in advance!
 
The alignment of the bars for the HP, SP and EXP requires you to edit the script itself. There's no config section as it was meant to be plug-n-play.

Look for the def draw_actor_hp, def draw_actor_sp, and def draw_actor_exp routines and look at the draw_slant_bar statement itself.
Code:
draw_slant_bar(x, y [B]+ 12[/B], actor.hp, actor.maxhp, width, 6, 
      bar_color = Color.new(150, 0, 0, 255), 
      end_color = Color.new(255, 255, 60, 255))
You can see from the 'bolded' +12 for the y value. This raises the bar 12 pixels above the expected position. Changing the x value into (x - 4, ....) allows you to move the bar to the left 4 pixels. Heck, the width = 144 in the drawing call allows you to change the width of the bar.

NOTE: Do not change the height of the bar below '6' can't make it thinner.

As far as battlesystems, the HP, SP and EXP bars should work with nearly any battlesystem. The AT bars are made strictly for the RTAB system so they won't replace the AT bars in Trickster's systems... you'll wanna use his bars then. Other than that, the bars will work nearly anywhere.
 
Oooh, I see, i see. Thank's a lot! I'll go about messing with that then!

Just one question: is there a way to impliment these bars into Paradog's CTB? I believe you are the one who post up all those RTABs and I decided to use his (though, i want to also find a way to combine the overlimit script with that battle system... somehow... but, one thing at a time!). I put this script after all the scripts for the battle system, but nothing changed. Maybe I did something wrong... or maybe it doesnt work with that battle system. Not sure. But i might as well ask since you'd be the one to know!

Thanks again!
 
First off, you'll DEFINITELY wanna use the LimitBreak(DVV) script and the SephSlanted bars therein. My LimitBreak script can permit you to position the LimitBreak bars where the OverDrive script by KGC doesn't have a bar positioning system. You'll be using the battle positioning system (in Limitbreak) that is designed for RTAB so the bars can move properly for HIS battlestatus Window.

Also... (looking up the ParaDog system)...

'Kay... ParaDog's HP and SP drawing routines are built into its Window_BattleStatus code. This means that you need to create an extra few lines of code for the Seph Bar script.

Code:
class Window_BattleStatus < Window_Base
.....
....
....
end
And have copies of the def SephBars, def actorHP and actorSP routines within 'em.

Finally, go into the ParaDog battlesystem, and remove the draw_meter statements on lines 869 and 874. Dunno 'bout editing the CT bar. Done differently than RTAB, though potentially easier.
 
Where exactly do I place the new 'class Window_BattleStatus < Window_Base...end'? If i am reading you correctly, I am adding this to Seph's script. I tried making a new 'class Window_BattleStatus... end' and placing it within that (at the very bottom of Seph's script), tried placing it within the one that is already made at the end (Draw Overdrive Meter), and even tried placing it within Paradog's script (both at the bottom of the script and at the bottom, before the last 'end' of his HP and SP bars) just incase I was reading you wrong. But all of them give me an error. I am probably doing something really simple wrong... but before I give you an error report, I'd like to know if I am even placing them in the right area so i can give you the correct error if i recieve one.

And I'll definately work with your limit break script. Easy moving stuff around is just what i'm looking for. Thanks for the suggestions! And of course, again, thanks for your help!
 
I just tacked it to the very end of the script, below the last class. But instead of that, just paste this BELOW the Seph script.

[/code]#==============================================================================
# ** Window_BattleStatus
#------------------------------------------------------------------------------
# This window displays the status of all party members on the battle screen.
#==============================================================================

class Window_BattleStatus < Window_Base

#==========================================================================
# * Draw Slant Bar(by SephirothSpawn)
#==========================================================================
def draw_slant_bar(x, y, min, max, width = 152, height = 6,
bar_color = Color.new(150, 0, 0, 255),
end_color = Color.new(255, 255, 60, 255))
# Draw Border
for i in 0..height
self.contents.fill_rect(x + i, y + height - i, width + 1, 1, Color.new(50, 50, 50, 255))
end
# Draw Background
for i in 1..(height - 1)
r = 100 * (height - i) / height + 0 * i / height
g = 100 * (height - i) / height + 0 * i / height
b = 100 * (height - i) / height + 0 * i / height
a = 255 * (height - i) / height + 255 * i / height
self.contents.fill_rect(x + i, y + height - i, width, 1, Color.new(r, b, g, a))
end
# Draws Bar
for i in 1..( (min.to_f / max.to_f) * width - 1)
for j in 1..(height - 1)
r = bar_color.red * (width - i) / width + end_color.red * i / width
g = bar_color.green * (width - i) / width + end_color.green * i / width
b = bar_color.blue * (width - i) / width + end_color.blue * i / width
a = bar_color.alpha * (width - i) / width + end_color.alpha * i / width
self.contents.fill_rect(x + i + j, y + height - j, 1, 1, Color.new(r, g, b, a))
end
end
end

#==========================================================================
# * Draw HP
# actor : actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
# width : draw spot width
#==========================================================================
alias :draw_actor_hp_hpsp :draw_actor_hp
def draw_actor_hp(actor, x, y, width = 144)
draw_slant_bar(x, y + 12, actor.hp, actor.maxhp, width, 6,
bar_color = Color.new(150, 0, 0, 255),
end_color = Color.new(255, 255, 60, 255))
draw_actor_hp_hpsp(actor, x, y, width)
end
#==========================================================================
# * Draw SP
# actor : actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
# width : draw spot width
#==========================================================================
alias :draw_actor_sp_hpsp :draw_actor_sp
def draw_actor_sp(actor, x, y, width = 144)
draw_slant_bar(x, y + 12, actor.sp, actor.maxsp, width, 6,
bar_color = Color.new(0, 0, 155, 255),
end_color = Color.new(255, 255, 255, 255))
draw_actor_sp_hpsp(actor, x, y, width)
end
end[/code]
And remember to remove the the draw_meter statements on lines 869 and 874 of the ParaDog system so they don't overlap.
 
I wonder what mistake i made... but just making a new script like you said worked perfectly! Thank's a bunch man! I really appreciate your kindness and willing to help.

Now, I just need to figure out why the limit break bar is not appearing in either the menu nor the battle system (your limit break script) and how to make the CT bar slanted...

EDIT: Just messing with the HP and SP bars for the moment (since the Limit Break bar doesnt show up and I want to get the CT bar slanted) and I was wondering, how do i move the words (HP, the amount of HP etc)? The bar moves and what not, but the words dont seem to follow, heh heh... (so much i need to relearn here...)
 
Words don't follow??? Well.. they 'stay' put. Ne'er heard of one that doesn't. But any other changes or questions not 'Seph Bar' related may be put in the "Script Requests" forum so this topic isn't filled.
 
Right! Sorry about that. I'll go about that. But maybe you could take a look in the request forum, there is a particular thing I think you might be able to help with. Its my only request right now... it changed since i believe i figured out what was wrong. Anyways! Shutting up! Thanks a BUNCH for your help!

And yeah, i find it odd too that the words arent following the bars... maybe I am doing something stupid again,,, heh, heh...

EDIT: I have to ask, is there some command in ParaDog's script or something that would make the words not follow the bars? I mean, the HP and the number doesnt follow, no matter where i move or how i shorten the bars. Its like, they stay where the bar used to be. So I begin to wonder it has something to do with how i had to remove the draw bar from the other script *confusing self* *falls over*
 
They 'don't follow. That's the point. Never heard of 'em following or adjusting their position to match the bar in any system.

Bars are attached to the HP drawing routine, not the reverse.
 

Anonymous

Guest

sorry if i'm necromancing this thread but anyone know why the overdrive bar doesn't show up using RTAB + DerVVulfman's(?) overdrive script and this? placed the script in the right location below rtab and above OD as instructed earlier but still the OD bar doesn't show, but the others are fine..

also how can I get the layout to look like the screenshot in the original post? is the script for that available anywhere?
 
The copy of the slanted bars that is included with the Limit Break and RTAB with Extras demos have been updated for use with Limit Break (DVV). The topic post's version is still for use with KGC's OverDrive script.

Ah, Clive's battlestatus clip... that's a custom one for his game. Sorry dude, but we all like to keep a few personal system tweaks to ourselves... even me.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top