So I've gotten quite bored of my CBS I've been using, and I've decided to change to a side view. I've been told by many of my testers to make this change, so I've decided, "What the heck?"
Whilst on google trying to find a nice ATB/Side View script I found this:
http://www.hbgames.org/forums/viewtopic.php?f=11&t=24608
I actually found another page, and on that page this one was referred. The previous one would have probably been decent, but this one has a nicer battle UI. The problem I'm having is supposedly there is a "Attack Option Hide" or something, but I can't figure it out. I have very little knowledge of scripting.
I was wondering if there was any way of editing this script or adding an addon to make it ATB? I don't want Limit Breaks, or anything. ATB is my favourite battle style, so having an ATB in my project would be perfect. This CBS is bery pretty. The only thing it's lacking is an ATB system.
Can anyone help me?
I need some help on this too, I'm trying to make a final fantasy game and I can't seem too find a better cbs with a load bar when its a players turn plz help.. :-[
Kaboth and I found this :
ATB Addon (http://translate.google.com/translate?hl=en&sl=es&u=http://mundo-maker.forumn.net/scripts-f10/rmxp-atb-t330.htm&ei=PT7zTOvICoGKlwe9zZyADQ&sa=X&oi=translate&ct=result&resnum=10&ved=0CGkQ7gEwCTgo&prev=/search%3Fq%3Dactive%2Btime%2Bbattle%2Bscript%2Brpg%2Bmaker%2Bxp%26start%3D40%26hl%3Den%26sa%3DN%26biw%3D1280%26bih%3D820%26prmd%3Dv)
however I dont have the script knowledge to move the atb bars to align witht he side view's script.
can anyone do this?
Move the bars as in shift them up or down? that can be done by shifting the x and y coordinates XD
I'll do it i suppose
yes, please do and the bars under each name of the character's
yeah cuz they are aligned with the default battle script not that side view battle script that i want to use
so yeah just to move em to align them with the names for that script mentioned in the first post D:
i wouldnt know which to move or what to change it to to move em
SO which one am I editing?
Can you make a project with the two scripts in it and upload it here XD
the first one if you can just add ATB to it.
http://www.hbgames.org/forums/viewtopic.php?f=11&t=24608
the other one was an atb addon. i looked through it but i couldnt find the X Y thing to move it myself so D:
this covers the script here
http://translate.google.com/translate?hl=en&sl=es&u=http://mundo-maker.forumn.net/scripts-f10/rmxp-atb-t330.htm&ei=PT7zTOvICoGKlwe9zZyADQ&sa=X&oi=translate&ct=result&resnum=10&ved=0CGkQ7gEwCTgo&prev=/search%3Fq%3Dactive%2Btime%2Bbattle%2Bscript%2Brpg%2Bmaker%2Bxp%26start%3D40%26hl%3Den%26sa%3DN%26biw%3D1280%26bih%3D820%26prmd%3Dv
Well I don't have rmxp atm but looking at the script, it seems that this is what controls the location of the bar.
#--------------------------------------------------------------------------
# œ ƒŠƒtƒŒƒbƒVƒ...
#--------------------------------------------------------------------------
alias xrxs_bp1_refresh refresh
def refresh
if @update_cp_only == false
xrxs_bp1_refresh
end
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
actor_x = i * 160 + 4
draw_actor_cp_meter(actor, actor_x, 96, 120, 0)
end
end
specifically this line
draw_actor_cp_meter(actor, actor_x, 96, 120, 0)
explanation
looking at the code in the code box, i is the number of actors.
the way it generates this is by taking the actors party slot(so from 1 to 4), multiplies it by 160 and adds 4 to get the location to use as a reference (actor_x)
the line below draws the meter using actor_x as a reference, at the coordinates
draw_actor_cp_meter(actor, actor_x, 96, 120, 0)
what this means?
- it means that by playing with the numbers to calculate actor_x and the third and fourth numbers in the above code, you can change the location of the bar.
to find this line, press control F and search "œ ƒŠƒtƒŒƒbƒVƒ..." in the script
sorry i can't be of any more constructive help :/
so if i change the 96, and 120 itll move the bar?
I believe so yes
So i played around witht he 96 and the 120. It seems the 96 sets the position of ALL FOUR ATB bars moving them either up or down. Higher the number the lower it goes the lower the number the higher it goes. The 120 seems to be the width of the bar, and doesnt affect the position. Higher the number the wider it is the lower the number the slimmer it is. Here is a megaupload link that has both scripts. The one i am currently editting is labeled ATB. The other one with ATB in the name is a bar graphic addon.
ive included the the .dlls to run it, as well as the full RTP Standard has been uploaded into my folders, so it should run fine.
imma see what i can do on my end.
http://www.megaupload.com/?d=GRZ25YQ1
EDIT:
#--------------------------------------------------------------------------
# œ ƒŠƒtƒŒƒbƒVƒ...
#--------------------------------------------------------------------------
alias xrxs_bp1_refresh refresh
def refresh
if @update_cp_only == false
xrxs_bp1_refresh
end
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
actor_x = i * 160 + 4
draw_actor_cp_meter(actor, actor_x, 96, 120, 0)
end
end
if you look above "draw_actor_cp_meter" there is a 160 + 4. The 160 is where the bar is located on the X Axis. the 96 in "draw_actor_cp_meter(actor, actor_x, 96, 120, 0)" is the positon on the 7 Axis. However. its still moving all four. imma keep playing with it
EDIT2:
So this is what I have so far. The bar position is pretty much perfect except for the fact that all four bars are ontop of each other.
#--------------------------------------------------------------------------
# œ ƒŠƒtƒŒƒbƒVƒ...
#--------------------------------------------------------------------------
alias xrxs_bp1_refresh refresh
def refresh
if @update_cp_only == false
xrxs_bp1_refresh
end
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
actor_x = i * 0 + 4
draw_actor_cp_meter(actor, actor_x, 1, 120, 0)
end
end
You might not want to change the 160, instead try changing the 0 right after the last two numbers
draw_actor_cp_meter(actor, actor_x, 96, 120, 0)
editting the 0 doesnt seem to do anything D:
ack damn
the 120 will change the y then
just don't mess with the 160, thats your reference point
what you did is use 0 as a reference point, only problem, it referenced all of them from the 0
well i fixed the 160 and i unno i cant figure out how to move them to be vertical D:
the 120 baka, change the 120? does it work?
the 120 makes the bars either thinner or wider the 96 changes the veritcal position but it changes it for all four
okay, forgive me XD i will look at this tommorow
damn
please and thank you :3
Well, everything is in there, just as Forte said. BUT you're confusing one thing:
draw_actor_cp_meter(actor, actor_x, 96, 120, 0)
The parameters are as follows... actor is... the actor id (using the party index as reference). actor_x, the x where it will be. 96 is y, the latter ones are possibly width and *another non-important parameter by now*.
Here's the solution:
actor_x = i * 32 + 4
draw_actor_cp_meter(actor, 4, actor_x, 120, 0)
You can also rename that variable (actor_x) if you it get too confusing, but it doesn't matter (just changing the actor_x by actor_y as example).
What I did here is just using the actor_x for defining the y-position. The y-position needs to be "calculated" depending on the actor's party index, so that will do it.
Well good luck :zwink:,
Orochii Zouveleki
PD.: How do I love that emoticon :3.
oh jeez
i just put int he paramaters you said to and it ALMOST fixed it D:
[spoiler](https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg.photobucket.com%2Falbums%2Fv107%2Framenuzumaki%2Fomgsoclosebars.jpg&hash=bd555cff1e6457c915742b84bc6eefbb62356202)[/spoiler]
D: the bottom bar is cut off! /cry
EDIT:
so i played with the 32 to 28, and 30. I think the names are off or something. Cuz the bars arent lining up below the names the same. with 30 the first two bars are ok but the bottom bar overlaps the name
hmmm, maybe shifting the names up as well might help ?
Well, that's something I forgot xD, since I didn't cosidered the window's size.
Anyway, the 32 isn't the thing you have to change. You need to vary the "offset" for the bars, and change the font size as well for the character names.
First part...
actor_y = i * 32 + 4
In my testing, since I reduced the font 4pixels, I moved the bar 4pixels up too, so I removed the red coloured part.
And for the font size...
-Search the following in the ATB script:
def draw_actor_name(actor, x, y)
self.contents.font.color = normal_color
self.contents.font.size = 24
self.contents.draw_text(x, y, 120, 32, actor.name)
end
-Change it to:
def draw_actor_name(actor, x, y)
self.contents.font.color = normal_color
self.contents.font.size -= 4 #this and
self.contents.draw_text(x, y, 120, 32, actor.name)
self.contents.font.size += 4 #this have to be equal
end
That would solve the problem :zwink:, good luck again :),
Orochii Zouveleki
Edit: Also Forte is right. You can also change the name's position, at least for that 4 pixels.
Locate the following in BattleStatusMod script:
actor_y = i * 32 + 4
draw_actor_name(actor, 0, actor_y)
...and do the same like the past one. But REMEMBER!, if you change the 4 to a negative, it will be off from the window's content space (it will be cut D:!).
i like that you're actually making me play around with stuff myself :3
SO THATS FIXED!
now one last problem D:
my menu script renders bars for HP and MP and such on it's own. However the bar addon for the battle script that renders the hp/mp of the player and the hp of the mob also renders bars in the menu. I dont think i can edit the battle addon cuz it says it renders all the bars at once. i tried hiding stuff in the menu but i ended up breaking the menu which crashed the game [hearty laughter]
EDIT:
forgot to add a screenshot XD
[spoiler](https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg.photobucket.com%2Falbums%2Fv107%2Framenuzumaki%2Fstupidbrokenmenulawl.jpg&hash=6ef837a4b613f7b4e667f1a6bf92043530d67d9d)[/spoiler]
Well making you play around with it lets you learn new things : 3
how else do you think i learned this stuff XD
You've encouraged me to start scripting Forte >>
Here is the HP Bar AddOn Script :3
[spoiler]#===========================================================================
# *** HP/MP/ATB/LimitBreak bar Slanted Style Compatible with RTAB ***
# *** Version 2.1
#---------------------------------------------------------------------------
# by Clive
# based on Cogwheel's Bars and Sephiroth Spawn's Slanted Bars.
#---------------------------------------------------------------------------
# ----- GREAT THANKS to DerVVulfman for solving the lag problem
#------This is a plug and play script so it should work without any problem!
#=============================================================================
# If using with Limit Break, must paste BELOW the Limit Break script as it re-
# writes the 'Gauge drawing' system. Will cause an error if not properly put.
# If used with Trickster's STEAL SCRIPT version 6 R1 (revision 1), then the
# height of RTAB's AT Bar (Draw Actor ATG) may not be smaller than 5 pixels
# due to a float-to-float error. A height of 6 pixels is the smallest.
#==============================================================================
# ** Game_Actor
#------------------------------------------------------------------------------
# This class handles the actor. It's used within the Game_Actors class
# ($game_actors) and refers to the Game_Party class ($game_party).
#==============================================================================
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# * Get the current EXP
#--------------------------------------------------------------------------
def now_exp
return @exp - @exp_list[@level]
end
#--------------------------------------------------------------------------
# * Get the next level's EXP
#--------------------------------------------------------------------------
def next_exp
return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
end
end
#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
# This class is for all in-game windows.
#==============================================================================
class Window_Base < Window
#==========================================================================
# * 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
#==========================================================================
# * Draw EXP
# actor : actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
#==========================================================================
alias raz_bars_base_exp draw_actor_exp
def draw_actor_exp(actor, x, y)
if actor.level == 99
draw_slant_bar(x, y + 18, 1, 1, 190, 6, bar_color = Color.new(0, 100, 0, 255), end_color = Color.new(0, 255, 0, 255))
else
draw_slant_bar(x, y + 18, actor.now_exp, actor.next_exp, 190, 6, bar_color = Color.new(0, 100, 0, 255), end_color = Color.new(255, 255, 255, 255))
end
raz_bars_base_exp(actor, x, y)
end
#==========================================================================
# * Draw Parameter
# actor : actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
# type : parameter type (0-6)
#==========================================================================
alias raz_bars_base_parameter draw_actor_parameter
def draw_actor_parameter(actor, x, y, type)
case type
when 0
para_color1 = Color.new(100,0,0)
para_color2 = Color.new(255,0,0)
para_begin = actor.atk
when 1
para_color1 = Color.new(100,100,0)
para_color2 = Color.new(255,255,0)
para_begin = actor.pdef
when 2
para_color1 = Color.new(100,0,100)
para_color2 = Color.new(255,0,255)
para_begin = actor.mdef
when 3
para_color1 = Color.new(50,0,100)
para_color2 = Color.new(50,0,255)
para_begin = actor.str
when 4
para_color1 = Color.new(0,100,0)
para_color2 = Color.new(0,255,0)
para_begin = actor.dex
when 5
para_color1 = Color.new(50,0,50)
para_color2 = Color.new(255,0,255)
para_begin = actor.agi
when 6
para_color1 = Color.new(0,100,100)
para_color2 = Color.new(0,255,255)
para_begin = actor.int
end
draw_slant_bar(x, y + 18, para_begin, 999, 155, 4, bar_color = para_color1,
end_color = para_color2)
raz_bars_base_parameter(actor, x, y, type)
end
#=========================================================================
# * Draw Actor ATG
# actor : Actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
# width : draw spot width
#=========================================================================
def draw_actor_atg(actor, x, y, width = 144, height = 6)
if @at_gauge == nil
# plus_x: revised x-coordinate
# rate_x: revised X-coordinate as (%)
# plus_y: revised y-coordinate
# plus_width: revised width
# rate_width: revised width as (%)
# height: Vertical width
# align1: Type 1 ( 0: left justify 1: center justify 2: right justify )
# align2: Type 2 ( 0: Upper stuffing 1: Central arranging 2:Lower stuffing )
# align3: Gauge type 0:Left justify 1: Right justify
@plus_x = 0
@rate_x = 0
@plus_y = 16
@plus_width = 0
@rate_width = 100
@width = @plus_width + width * @rate_width / 100
@height = 6
@align1 = 0
@align2 = 1
@align3 = 0
# Gradation settings: grade1: Empty gauge grade2:Actual gauge
# (0:On side gradation 1:Vertically gradation 2: Slantedly gradation?
grade1 = 1
grade2 = 0
# Color setting. color1: Outermost framework, color2: Medium framework
# color3: Empty framework dark color, color4: Empty framework light/write color
color1 = Color.new(0, 0, 0)
color2 = Color.new(255, 255, 192)
color3 = Color.new(0, 0, 0, 192)
color4 = Color.new(0, 0, 64, 192)
# Color setting of gauge
# Usually color setting of the time
color5 = Color.new(0, 64, 80)
color6 = Color.new(255, 255, 255)#(0, 128, 160)
# When gauge is MAX, color setting
color7 = Color.new(80, 0, 0)
color8 = Color.new(255, 255,255) #(240,0,0)
# Color setting at time of cooperation skill use
color9 = Color.new(80, 64, 32)
color10 = Color.new(255, 255, 255) #(240, 192, 96)
# Color setting at time of skill permanent residence
color11 = Color.new(80, 0, 64)
color12 = Color.new(255,255, 255) #(240, 0, 192)
# Drawing of gauge
gauge_rect_at(@width, @height, @align3, color1, color2, color3, color4,
color5, color6, color7, color8, color9, color10, color11, color12,
grade1, grade2)
end
# Variable at substituting the width of the gauge which is drawn
if actor.rtp == 0
at = (width + @plus_width) * actor.atp * @rate_width / 10000
else
at = (width + @plus_width) * actor.rt * @rate_width / actor.rtp / 100
end
# AT Width Check
if at > width
at = width
end
# Revision such as the left stuffing central posture of gauge
case @align1
when 1
x += (@rect_width - width) / 2
when 2
x += @rect_width - width
end
case @align2
when 1
y -= @height / 2
when 2
y -= @height
end
# Draw Border
for i in 0..height
self.contents.fill_rect(x + 1.5 + i, y + 12 + height - i, width - 2 , 3,
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 + 1.5 + i, y + 12 + height - i, width - 3, 3,
Color.new(r, b, g, a))
end
# Rect_X control
if @align3 == 0
rect_x = 0
else
x += @width - at - 1
rect_x = @width - at - 1
end
# Color setting of gauge
if at == width
#Gauge drawing at the time of MAX
for i in 0..height
self.contents.blt(x + i + @plus_x + @width * @rate_x / 100, y -i +
@plus_y, @at_gauge, Rect.new(rect_x, @height * 2, at, @height))
end
else
if actor.rtp == 0
for i in 0..height
# Usually gauge drawing of the time
self.contents.blt(x + i + @plus_x + @width * @rate_x / 100, y- i +
@plus_y, @at_gauge,Rect.new(rect_x, @height, at, @height))
end
else
if actor.spell == true
for i in 0..height
#Gauge drawing at time of cooperation skill use
self.contents.blt(x + i + @plus_x + @width * @rate_x / 100, y - i +
@plus_y, @at_gauge, Rect.new(rect_x, @height * 3, at, @height))
end
else
for i in 0..height
# Gauge drawing at time of skill permanent residence
self.contents.blt(x + i + @plus_x + @width * @rate_x / 100, y - i +
@plus_y, @at_gauge, Rect.new(rect_x, @height * 4, at, @height))
end
end
end
end
end
end[/spoiler]
EDIT:
ive been checking this thread for a few days and I am just NOW noticing theres a second page...
Well heres an update! I am waiting for someone to help with the HP bar problem. I think Ike is working on it cuz its his Menu script that I'm using. However, one of my team members had an amazing idea as either an AddOn or a small edit to the CBS. Would it be possbible to add images the battle. There is a lot of white space, and since it uses the overworld sprite as a battle graphic you cant really get a feel for the characters looks. With this little addition I'm hoping itll bring a whole new horizon to the battles!
Here is the current look of what the system looks like now
[spoiler](https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg.photobucket.com%2Falbums%2Fv107%2Framenuzumaki%2FCBSImageMockUp1.png&hash=601f0c7cbcc384c465c73b63351aae9f7a12e572)[/spoiler]
I have with me a little mock up my teammate made in photoshop. Obviously the images used are just ones from google. I would be using real art custom made for the game in the actual make up.
[spoiler](https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg.photobucket.com%2Falbums%2Fv107%2Framenuzumaki%2FCBSImageMockUp.png&hash=6b5e89e4b0f3f2cefa6048cf9b94febcd8b504fd)[/spoiler]
if anyone could do this that would be SIQ
one OPTIONAL thing that my teammate thought would be kewl is if you could make it so the person who's ATB is full/turn to make action if theirs was in colour and the rest were saturated like in the screenshot above. However, that is completely optional that he thought would be a kewl idea. if you dont want to do that portion thats fine! :3
Bump?
shameless bump D:
bump D:
so with the help of Dragon324 from RMXPUnlimited we have solved the hp bar problem. Now I just need to know if its possible to have the battle screen look like the image bellow. Just to add an image to the screen to fill up the dead space, and add some depth.
[spoiler](https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg.photobucket.com%2Falbums%2Fv107%2Framenuzumaki%2FCBSImageMockUp.png&hash=6b5e89e4b0f3f2cefa6048cf9b94febcd8b504fd)[/spoiler]
I wonder if anyone would get mad if I came here and said that I wish I checked this thread again. Hope the game kept going forward. Putting an image is easy, however it depends on where you place it.
An approach is to use the Pictures folder. You can use subfolders to keep things clean too. So for example:
# The image will be in a folder inside Pictures called BattleBars,
# and the name of the file will be the actor's ID. This is because
# the actor's name can be changed ingame so I've always thought it's
# safer to use the ID, which never changes ingame.
# I'll assume you got a variable called actor
# You'll also need to figure out what the right x/y are, however uh...
back_x = 0
back_y = 5 + actor.index * 32
bmp = RPG::Cache.picture("BattleBars/%03d" % actor.id)
self.contents.blt(x,y,bmp,bmp.rect)
Place that above whatever draws the name and the bar.
I'm talking to the void but I don't care. Take care everyone.