[RESOLVED][XP]Blizzard ABS Custom HUD Request

Started by Andreavnn, April 18, 2012, 08:05:10 pm

Previous topic - Next topic

Andreavnn

April 18, 2012, 08:05:10 pm Last Edit: April 20, 2012, 06:50:16 pm by Andreavnn
Platform: RPG Maker XP
Scripts: Blizzard's Z-HUD, Blizzard's ABS 2.84

I am looking a custom HUD made for Blizzard's ABS. I've included a picture I wiped up in MS paint, however I am wanting the black bar to be gold and the text to be white. Also and this isn't important, but would be awesome if do-able for as the health bar gets lower for the color to change from green (full) to orange (half) then to red (low). The same with the MP bar, blue (full) dark purple (half) light purple (low). Again, something that might come later; if a player's status increases the HP and MP bars will grow in size too. The three small boxes will be able to host small icon images of "linked" to a weapon, or skill. The dash box I will get appropriate image for. I want to use images and Blizzard's Z-HUD script. If anyone needs more detail please let me know and thanks to anyone that can help me. I appreciate it very much.

Mock-Up
Spoiler: ShowHide


HUD_Background Image
Spoiler: ShowHide


HP_BAR_Full
Spoiler: ShowHide


MP_BAR_FUll
Spoiler: ShowHide


BARS_Empty
Spoiler: ShowHide


Image of what I want it to look like in game. (Obviously the boxes would need to be slightly bigger to fit the text)
Spoiler: ShowHide


*EDIT* Add some images for HP, MP and HUD backgrounds. I am a novice at Photoshop so they are very good, open to help with those too.
**EDIT** Add scripts being used.
***EDIT*** Fixed grammar and cleaned up request.
****EDIT**** Added new image of in-game "look" & design

AJNR95

April 18, 2012, 09:53:07 pm #1 Last Edit: April 18, 2012, 09:57:25 pm by AJNR95
The color changing in the Health and Mana bars I can't help.
But the basics can be done with Blizzard's Z-HUD. You just need to change the x and y coordinates
of the Health and Mana along with RPGManiac's Script that displays the weapon equip in HUD, that will
also need changing of the x and y coordinates. If you would like to use a better program than Microsoft Paint
(everything is better than MS Paint, FYI) then consider Paint .Net or some other Art Programs
As for a "Dash" Icon, if it's a running man, I have an image I can give you.

Edit:
This is a running man icon, you can't see it because it's a .gif only with a white color.
You can copy and paste the image to edit it, I don't think MS Paint recognizes transparency though.
Spoiler: ShowHide

^ Right Click above the arrow to Save or Copy the Image
Spoiler: ShowHide


by Blizz: Spoilered, because image is 2.6 MB.
by AJNR95: Unspoilered, because fuck you - ¡Viva la Revolución!
by Blizz: Spoilered again, and Banned.

Andreavnn

April 18, 2012, 10:53:52 pm #2 Last Edit: April 19, 2012, 12:36:41 am by Andreavnn
Oh, true me I know MS paint is terrible. I didn't plan on using it at all, I was at work and only program I had "nearby". I am not very good with scripts at all so doing edits I very limited. I can move things around and play with stuff, but I can never get anything to function or placed right. :/  

*EDIT* I made some mock-up images for my HUD if anyone could edit the script for me so that everything was lined up right I would be greatly appreciated.

Calintz

you want the HUD scripted entirely without the use of photos, eh?

Andreavnn

April 19, 2012, 10:10:53 am #4 Last Edit: April 19, 2012, 05:51:56 pm by Andreavnn
@Calintz Oh no, I think that would be rather difficult. I made some mock-ups that can be used with Blizzard's Z-HUD script and I will have to practice at images until I get them how I want them.  Unless you think you can do it without the used of photos which would be awesome and save room.

*EDIT* Added to post
**EDIT** Really all I need is some one to help me change the coordinates of the HUD to the low part of the screen like in my example image. I can only seem to find the Height of the HUD which I can't ever, not matter what number I put in, get it to move where I want it to be.  Or even give my the line of code that changes that controls that and I can play with it myself. I just can't seem to find the right line. HUD_HEIGHT for some reason doesn't move it where I can see it and doesn't move the HUD_Background. Any help would be greatly appreciated.

AJNR95

Quote from: Andreavnn on April 18, 2012, 08:05:10 pm
HUD_Background Image
Spoiler: ShowHide



This can be done with an image you can place to the bottom right with X and Y coordinates.
You won't get it immediately, but after tweaks and continuously pressing Test Play, you'll get it.

Z-Hud Technique: ShowHide

class Hud
 
  attr_reader :hotkey_sprite
 
  alias init_zhud_later initialize
  def initialize(viewport = nil)
    init_hotkey_sprite(viewport)
    init_zhud_later(viewport)
    self.x, self.y = 5, 420
    @hotkey_sprite.z = self.z
  end


Line 102 of Blizzard's Z-Hud, on Line 110, you can use the self.x, self.y = x, y
This will determine the Health Bar position


    @hud_width = 500
    @hud_height = 200
    @hp_x, @hp_y, @sp_x, @sp_y = 0, 0, 30, 18
    update_sp_y
    b = RPG::Cache.picture(BlizzCFG::Z_ITEM_BACK)
    @left_x = b.width
    @left_y = b.height
    @hot_x = b.width
  end


Line 130 of Blizzard's Z-Hud, on Line 132:
@hp_x, @hp_y, @sp_x, @sp_y = [HP Bar's X], [HP Bar's Y], [SP Bar's X], [SP Bar's Y]
Keep the HP Bar's X and Y '0', because it will be the self.x and self.y from line 110.
The value of SP Bar's X and Y will determine the distance the SP Bar is from the HP Bar.

Be sure to change the HUD Width and Height to your new HUD so that it will not crop
it nor go transparent inaccurately. Hud Width and Height is at Line 130 and 131.

I haven't changed my Hotkey x and y coordinates, but since that is what you're doing,
you will need to start at Line 239: "def draw_hskill"

You will need to maintain that the x and y coordinates correspond with one another in
their own category. Skill and Item Categories. I can't help you specifically with them
at the moment, sorry, but once you figure it out, easy-peasy-lemon-squeezy.

Fortunately, the Weapon Equip HUD for Z-HUD By RPGManiac3030 comes with easy
to use X and Y coordinate you can easily place in the game's screen at the very
beginning of the script.
Spoiler: ShowHide


by Blizz: Spoilered, because image is 2.6 MB.
by AJNR95: Unspoilered, because fuck you - ¡Viva la Revolución!
by Blizz: Spoilered again, and Banned.

Andreavnn

April 20, 2012, 03:44:44 pm #6 Last Edit: April 20, 2012, 04:14:33 pm by Andreavnn
Thank you very much, I will give it a shot tonight. I will let you know what happenes  :facepalm:

*EDIT* The second code you gave me is that a replacement? My lines seem to be off a few numbers from yours. The second code in my script reads this.
Spoiler: ShowHide
    @hud_width = w if @hud_width < w
   @hud_height = BlizzCFG::Z_HUD_HEIGHT
   @hp_x, @hp_y, @sp_x, @sp_y = 0, 0, 0, b1.height + 4
   update_sp_y
   b = RPG::Cache.picture(BlizzCFG::Z_ITEM_BACK)
   @left_x = b.width
   @left_y = b.height
   @hot_x = b.width
 end


**EDIT** I think I figured it out I have the HP lined up, but SP isn't even showing up. (Might be graphical issue) The HUD background won't move I changed the X and Y to all cause of numbers and it doesn't move maybe I am doing something wrong. I am going to keep trying.
***EDIT*** Fixed the problem with the SP and HP bar. Graphic issues there, still can't get the HUD-Background to move around the field.

AJNR95

April 20, 2012, 04:18:11 pm #7 Last Edit: April 20, 2012, 04:30:46 pm by AJNR95
Quote from: Andreavnn on April 20, 2012, 03:44:44 pm
***EDIT*** Fixed the problem with the SP and HP bar. Graphic issues there, still can't get the HUD-Background to move around the field.


What do you mean, "get the HUD-Background to move around the field"?
Are you trying to make an animated background, or still trying to set the x and y coordinates?

FYI, the HP and SP Bars are my custom coordinates, so the Bars are already set to the bottom left
of the screen, but you have already past that phase.




Edit:

For your images, they're off for Z-Hud. If you want your Health and Stamina/Special Bar to increase
while the value increases:
Z_HP_TILING = true

You'll have to enable Tiling, this is found in Line 54 of the Z-Hud Script

Spoiler: ShowHide
Z_HP_TILE_COLUMNS = 25 # Example for Very High Health Integer

Z_HP_TILE_COLUMNS = 10 # Example for High Health Integer

Z_HP_TILE_COLUMNS = 3 # Example for Low Health Integer


You'll also need to adjust the value of the Health Bar Scale, the more Health an Actor has,
the higher the number of the column.
Eg. Lv1:500-Lv20:3500 will need a 25ish value for the column
Your scale will fluctuate to the dimension of that Value.

Your current Health Bar is 114 Pixels Wide and 7 Pixels Tall
  Your column of Health is recommended to have a Width of 1-5 Pixels, the Height does not matter
However, for this to happen, you sacrifice the unique Health Bar and the Bar will be the same all the way.
Spoiler: ShowHide


by Blizz: Spoilered, because image is 2.6 MB.
by AJNR95: Unspoilered, because fuck you - ¡Viva la Revolución!
by Blizz: Spoilered again, and Banned.

Andreavnn

April 20, 2012, 04:27:45 pm #8 Last Edit: April 20, 2012, 04:40:57 pm by Andreavnn
No it isn't a animated background, when I change the X and Y coordinates the background doesn't change with it. I have the HP and SP bars in place already.

*EDIT* I am not going to have levels, I just maxed out the playable character so I won't need to tile the bars. The background won't move when I change the coordinates for it. :/

This is the problem I have
Spoiler: ShowHide

AJNR95

Quote from: Andreavnn on April 20, 2012, 04:27:45 pm
No it isn't a animated background, when I change the X and Y coordinates the background doesn't change with it. I have the HP and SP bars in place already.


You're background is NOT part of the script. I don't know if you know this or not, but I will tell you now.
You will need a Switch that turns on at the beginning of the game, this is usually my first switch (Switch[001]:"Game Structure")
that will associate with Common Events and Processes that will last the length of the game.

Your HUD Background is a picture that is summoned by the "Show Picture" Command.
In the "Show Picture", you are able to set the Origin to Center or Upper Left. In this case, you want Upper Left.
Spoiler: ShowHide
The 0,0 (x,y) will start at the top left of the image if set to Upper Left
The 0,0 (x,y) will start at the center of the image if set to Upper Left


Your top priority, however, is the constant of the X and Y. This can be done simply with testing out with
the coordinates until you set it right in place. I'll guess your Y value will be around 300+ and your X below 50.

If you're unsure about "Numbers" in the Show Picture, it is simply a type of collage layer where the 1
is the first image, then the second images (2) is layered over it. If you wish for your HUD Background to be
behind other images, place it as a very low number (1...3), if you want to be ahead of other images
place it as a high number (45...50). Your HUD Background will never be on top of your HP and SP Bars.
Spoiler: ShowHide


by Blizz: Spoilered, because image is 2.6 MB.
by AJNR95: Unspoilered, because fuck you - ¡Viva la Revolución!
by Blizz: Spoilered again, and Banned.

Andreavnn

April 20, 2012, 05:04:07 pm #10 Last Edit: April 20, 2012, 06:51:31 pm by Andreavnn
Didn't know that. Okay I will give that a try. Thanks.

*EDIT* Will I need to call the event on every map?
**EDIT**
Here is what I got, looking and feeling right. Just need to upgrade my graphics for everything to feel "better".
Spoiler: ShowHide


***EDIT** I got it figured out now, thanks for your help. I would give you a +1, but I can't figure out how to do it. :/

AJNR95

April 20, 2012, 11:12:30 pm #11 Last Edit: April 21, 2012, 06:24:05 pm by AJNR95
In reply to your Private Message, Yes, you can make the image mimic Z-Hud's Fading Effect.
Note that my HUD Background is larger than my Z-Hud's Bars, meaning my range will be larger
than yours, so the Background will fade before the Z-Hud's Bars.

This is what it should look like after I give you the instructions:
Spoiler: ShowHide


Here's the instructions:

Note You must have 2 Variables, one will continously record the Player's X Screen, while the other
records the Player's Y Screen. The Player's Screen, not the Player's Map.
These variables should be put in another Common Event that runs with the "Game's Structure" Switch.
In my project, this is the 002: Constant Record Common Event where things are recorded instantly all the time.

My Game's Variables are named Flashlight Y and Flashlight X, don't be fooled, these are the Player's Screen X and Screen Y.


Step i Create the Screen Y Check
Conditional Branch: Variable "Player Screen Y" is Greater than or Equal to Constant
The constant will be the where the top of your HUD Background is. Your Y's 0 starts at the top, the higher the
Y, the more further down the screen you are calibrating. In this quick instance, try 350.


Step ii Create the Screen X Check, inside the Screen Y Check
Conditional Branch: Variable "Player Screen X" is Less than or Equal to Constant
This constant will be where the right end of your HUD Background is. Your X's 0 starts at the left, the higher the
X, the more further right of the screen you are calibrating. In this quick instance, try 250


Step iii Show the "Faded Image", inside the Screen X Check
Show Picture: #2 "HUD Background" | Opacity: 75
This show picture will be the same number as your HUD Background, this way, the pictures will replace one
another rather than erasing and displaying. The "Faded Image" will be the same, but it's Opacity will be set to 75.


Step iv Show the Image, inside the "Else" Results of both Conditional Branches
Show Picture: #2 "HUD Background" | Opacity: 255
This show picture will be your prior HUD Background, in fact, it's the same. This is simple, copy and paste your
original HUD Background's Show Picture into both "Else" Results of each Conditional Branch. This way, the image
will not fade if only X is less than, or only Y is over than. This means if the player is above but not within the image
it will not fade, and if the player is to the side but not within the image, it will not fade. It will only fade if the player
is within the image.


Step v Pinpoint your constant variables
If you don't want me to do this, you will need to change the constants of the Player's Screen X and Y,
until the Image fades exactly when the Player touches it.

EDIT

The borders around your HP and SP Bar will not move along with the increase of the bars, you will need
to remove them for Graphic Quality. Z-Hud's Tiling Effect does not support a whole border. Meaning that
the border will not follow the entire edge of the bar, only the column itself.

EDIT 2

Here's some graphics I'd uploaded for your HUD. The background's height is changed. The HP and SP are
fit for Z-Hud's Tiling Function.
Spoiler: ShowHide


by Blizz: Spoilered, because image is 2.6 MB.
by AJNR95: Unspoilered, because fuck you - ¡Viva la Revolución!
by Blizz: Spoilered again, and Banned.

Andreavnn

April 21, 2012, 01:12:16 am #12 Last Edit: April 21, 2012, 01:22:45 am by Andreavnn
OMG  :naughty: That is awesome thanks for the help. However, I've ran into a problem I can't seem to solve myself. I loaded your images, thank you for those by the way, and I can't get everything to line up right now. Here is what I have.

Image of problem
Spoiler: ShowHide


HUD_Background Image: X, 200 / Y,430

Z_HUD:

# maximum height of the HUD
Spoiler: ShowHide
Z_HUD_HEIGHT = 125


class Hud
Spoiler: ShowHide
self.x, self.y = 200, 430


HP & SP Coordinates
Spoiler: ShowHide
 @hud_width = 500
@hud_height = 300
@hp_x, @hp_y = 9,0
@sp_x, @sp_y = 9,0


*EDIT* Fixed it myself, I cleared out the code and "reinstalled" it added my changes and they lined up perfectly.

AJNR95

No problem  :)

I hope that the images in the spoiler of "Image of problem" aren't the final coordinates,
I think the HUD should be placed all the way to the bottom left so that the left fading
line touches the edge of the screen and the bottom of the [three] boxes touch the
edge of the bottom of the screen.

But either way it's great. Glad to have helped.
Spoiler: ShowHide


by Blizz: Spoilered, because image is 2.6 MB.
by AJNR95: Unspoilered, because fuck you - ¡Viva la Revolución!
by Blizz: Spoilered again, and Banned.

Andreavnn

April 21, 2012, 01:57:02 am #14 Last Edit: April 21, 2012, 01:58:36 am by Andreavnn
+1

Thanks for those images again and I am still playing with where I want the HUD I think I going to lower it into the bottom corner. Still playing with it. I can't seem to get the HUD_Background to fade however. :/ What I have so far, I think I followed your instructions right. >.<

Game_Structure
Spoiler: ShowHide


HUD_Background
Spoiler: ShowHide


*EDIT* Fixed image link

AJNR95

Yup Yup. I got every answer to that problem.

Remove the Show picture in your "Game Structure" Common Event [001]. It's
interrupting the fade process by constantly showing it in 255 Opacity.

DO NOT DELETE THE COMMON EVENT

Instead, create 2 variables in the common event that set to the Player's Screen
X and Y. You need this variable to constantly record for the fade process to work.
Spoiler: ShowHide


by Blizz: Spoilered, because image is 2.6 MB.
by AJNR95: Unspoilered, because fuck you - ¡Viva la Revolución!
by Blizz: Spoilered again, and Banned.

Andreavnn

April 21, 2012, 02:13:20 am #16 Last Edit: April 21, 2012, 02:23:33 am by Andreavnn
I did that and now the HUD_Background image doesn't even show up in game close or not. Here is what I did

Spoiler: ShowHide


*EDIT* I put Y twice darn it. Fail
**EDIT** Nevermind, still didn't work :(
***EDIT** I found a few errors, but I fixed them and still having the same problem the image isn't showing up at all.

Structure
Spoiler: ShowHide


HUD_Background
Spoiler: ShowHide

AJNR95

Don't make the variable set to a constant.
Edit it and choose the Player column in the columns below Constant.
There, it shows Map X, Map Y, Screen X, Screen Y and Terrain Tag.
Set the Screen coordinates according to the variable. If you're still having
Trouble, I will show you in 7 hours (the morning for me, I need to go to sleep)
Spoiler: ShowHide


by Blizz: Spoilered, because image is 2.6 MB.
by AJNR95: Unspoilered, because fuck you - ¡Viva la Revolución!
by Blizz: Spoilered again, and Banned.

Andreavnn

No problem, I had to go to bed too. I will give it a shot later today. Probably around the time you get up so hopefully we can get it working. Thanks again for the help.
+1

AJNR95

This is how you record the Screen Coordinates via Control Variables.

Spoiler: ShowHide


This is what it should look like when done.

Spoiler: ShowHide
Spoiler: ShowHide


by Blizz: Spoilered, because image is 2.6 MB.
by AJNR95: Unspoilered, because fuck you - ¡Viva la Revolución!
by Blizz: Spoilered again, and Banned.

Andreavnn

I am still having a problem, I can't seem to get the HUD to fade correctly, I am going to upload a demo and PM it to you. I made a second common event called 'setting' to help me move the HUD round you can just delete that, it is a place holder.   :facepalm:

AJNR95

Quote from: Andreavnn on April 21, 2012, 11:44:51 am
I am still having a problem, I can't seem to get the HUD to fade correctly, I am going to upload a demo and PM it to you. I made a second common event called 'setting' to help me move the HUD round you can just delete that, it is a place holder.   :facepalm:


Alright, No Problem

Spoiler: ShowHide


by Blizz: Spoilered, because image is 2.6 MB.
by AJNR95: Unspoilered, because fuck you - ¡Viva la Revolución!
by Blizz: Spoilered again, and Banned.

Andreavnn

Thanks for all your help AJNR95 :evil: You must of had a bowl of Badass for breakfast this morning. :)

AJNR95

Quote from: Andreavnn on April 21, 2012, 02:12:52 pm
Thanks for all your help AJNR95 :evil: You must of had a bowl of Badass for breakfast this morning. :)


Actually, just a cold cut with a 600mg Ibuprofen and a new episode of Legend of Korra :D

I was in a car crash yesterday, to explain the Ibuprofen
Spoiler: ShowHide


by Blizz: Spoilered, because image is 2.6 MB.
by AJNR95: Unspoilered, because fuck you - ¡Viva la Revolución!
by Blizz: Spoilered again, and Banned.

Andreavnn

Quote600mg Ibuprofen


Quotenew episode of Legend of Korra


Both very good things  :haha: