Main Menu
  • Welcome to The RPG Maker Resource Kit.

[RMXP] CBS Edit/Help

Started by Ramenuzumaki, November 26, 2010, 08:24:02 AM

0 Members and 5 Guests are viewing this topic.

Ramenuzumaki

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?
[spoiler][/spoiler]

kaboth

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 (a.k.a. Ic3ByTE)


Ramenuzumaki

Kaboth and I found this :

ATB Addon

however I dont have the script knowledge to move the atb bars to align witht he side view's script.
can anyone do this?
[spoiler][/spoiler]

IAMFORTE

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

kaboth

yes, please do and the bars under each name of the character's
kaboth (a.k.a. Ic3ByTE)


Ramenuzumaki

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
[spoiler][/spoiler]

IAMFORTE

SO which one am I editing?

Can you make a project with the two scripts in it and upload it here XD

Ramenuzumaki

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:
[spoiler][/spoiler]

IAMFORTE

#8
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 :/

Ramenuzumaki

so if i change the 96, and 120 itll move the bar?
[spoiler][/spoiler]

IAMFORTE


Ramenuzumaki

#11
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
[spoiler][/spoiler]

IAMFORTE

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)

Ramenuzumaki

editting the 0 doesnt seem to do anything D:
[spoiler][/spoiler]

IAMFORTE

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

Ramenuzumaki

well i fixed the 160 and i unno i cant figure out how to move them to be vertical D:
[spoiler][/spoiler]

IAMFORTE

the 120 baka, change the 120? does it work?

Ramenuzumaki

the 120 makes the bars either thinner or wider the 96 changes the veritcal position but it changes it for all four
[spoiler][/spoiler]

IAMFORTE

okay, forgive me XD i will look at this tommorow
damn

Ramenuzumaki

[spoiler][/spoiler]

orochii

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.
Calm down, the only thing I ask in exchange is your soul >: D.

Ramenuzumaki

#21
oh jeez
i just put int he paramaters you said to and it ALMOST fixed it D:

[spoiler][/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
[spoiler][/spoiler]

IAMFORTE

hmmm, maybe shifting the names up as well might help ?

orochii

#23
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:!).
Calm down, the only thing I ask in exchange is your soul >: D.

Ramenuzumaki

#24
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][/spoiler]
[spoiler][/spoiler]