[XP] Blizz-ABS weapon equip HUD for Z-HUD

Started by RPGManiac3030, March 24, 2011, 10:51:11 pm

Previous topic - Next topic

RPGManiac3030

True, it's with every other method in the script that calls for the weapon icon graphic. Sorry if I wasn't clear about that.


Official Gio website:
gioadventures.freehostingcloud.com (under construction)

ForeverZer0

You should be able to do the tiny little edit the above method throughout the script. Just do a "if weapon != nil" branch before tou try to actually reference any parameters of the weapon. You can have the "else" branches draw a default graphic, like fists or something to that it is not empty.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

RPGManiac3030

Well since the weapon icons should be the same size anyway, I don't see how it would really make a difference to keep changing the icon graphic used to set up the dimensions...

What if I use the fist icon as the graphic that sets up the bitmap, and only draw it if the actor has no weapon equipped?


Official Gio website:
gioadventures.freehostingcloud.com (under construction)

ForeverZer0

I am not talking about the icon dimensions. That's not what is crashing your game. Traditionally icon graphics are the same size anyway. You need to make sure that the weapon is never nil when you try to reference it. You are literally trying to invoke these calls:

nil.width
nil.name
nil.icon_name


That doesn't work obviously.

But anyways, "No", you should attempt to draw the weapon first. It is going to be more common to have a weapon equipped. If you draw the fist first, 99% of the time you will be drawing the bitmap twice, which is not very efficient coding. If it is only an alternative branch after first attempting the weapon, then no matter what, the bitmap will only be drawn once.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

RPGManiac3030

May 05, 2011, 01:58:41 am #24 Last Edit: May 05, 2011, 02:05:44 am by RPGManiac3030
Well I checked it, and it works perfectly fine. The fist shows up when I have no weapon equipped, and it's not there when I have my weapons equipped. Since I'm new to coding, I'm guessing that the first fill_rect line sets up the position where the graphic will be drawn. Then the blt actually draws the graphic.

For drawing the actual weapon sprite, I'm using the weapon icon graphic, and drawing it if the weapon is equipped. If there's no weapon, the fist graphic is drawn. I'm then using the fist graphic as a reference to place the spell and item hotkey graphics, since it should be located in the same spot always whether or not it's actually drawn.


Official Gio website:
gioadventures.freehostingcloud.com (under construction)

ForeverZer0

A lot of the being highly efficient with coding comes with experience. It is important, but when you are learning, it is much more important to learn how to code something that actually works. Worry about making it better after that.

Anyways, good job! I'm glad you got if figured out. Its always a good feeling when you get a script you've been working on to run without bugs.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

RPGManiac3030

Thanks! I really appreciate your help and suggestions. I believe that's key in getting better.


Official Gio website:
gioadventures.freehostingcloud.com (under construction)

Boba Fett Link

Hey for a next version, could you make it like the Z-hud where the skill icon is placed over another icon, like in Loz Ocarina of Time, where the sword graphic is centered in front of the B-button icon?
This post will self-destruct in 30 seconds.

RPGManiac3030

So you want the weapon icon in the center of the 3 icons? Yeah, I think I can get that done, and I'll provide a config where you can set which order you want them in.


Official Gio website:
gioadventures.freehostingcloud.com (under construction)

RPGManiac3030

Updated to 1.4

Now you can change the layout of the HUD. I only have 2 options, either having the weapon first and skill second, or skill first and weapon second (The item stays third). I might add more options later, though.

I just finished it and don't have time to test it, so if anyone runs into problems please let me know!


Official Gio website:
gioadventures.freehostingcloud.com (under construction)

Boba Fett Link

August 30, 2011, 04:57:46 pm #30 Last Edit: August 30, 2011, 05:29:27 pm by Boba Fett Link
 :facepalm: Sorry for confusing you, I probably should have been more specific. Like this is what I mean (link), like a sword in the center of the B-button image on the N64 controller, like so that the icon of the sword is placed on top of a separate picture of the B-button in the graphic picture folder. I wanted you to create the option for an "icon-back". I meant centered like centered vertically or like having the ability to set up x and y coordinates instead of being right up to the top of the screen.

The order was fine, but the option to change it is a nice touch and I may use it in my game.

follow this link

http://ui22.gamefaqs.com/821/gfs_14052_1_2.jpg
This post will self-destruct in 30 seconds.

RPGManiac3030

 :^_^': Ok, I understand now. As for the option to move the actual HUD...I'm going to look into that for a future update. I think I know how to do it, but I won't have time to try it until tonight.

Update to v.1.5.


Official Gio website:
gioadventures.freehostingcloud.com (under construction)

Boba Fett Link

Hey thanks, this looks sounds exactly what I wanted!



There is a syntax error on line 206.
This post will self-destruct in 30 seconds.

RPGManiac3030

Ok, I'll look into it. Bear with me, since I'll probably update it tomorrow  :D


Official Gio website:
gioadventures.freehostingcloud.com (under construction)

RPGManiac3030

Ok, everything's updated and it worked fine when I tested it with only Blizz-ABS and the Z-HUD, so it should work.


Official Gio website:
gioadventures.freehostingcloud.com (under construction)

Boba Fett Link

This post will self-destruct in 30 seconds.

Boba Fett Link

December 31, 2011, 02:54:46 pm #36 Last Edit: January 03, 2012, 05:34:16 pm by Boba Fett Link
Hey, I've noticed if the weapon back graphic is larger than 24x24 it gets cut off.

Here's an example:



The weapon back is the same exact picture as the skill and item backs.
This post will self-destruct in 30 seconds.

RPGManiac3030

January 02, 2012, 10:04:28 pm #37 Last Edit: January 02, 2012, 10:14:23 pm by RPGManiac3030
I'll see what I can do about that.


EDIT: Ok, I fixed it. It was an error on my part: I set the size of the drawing region to 24x24, instead of the graphic's width - which is how the others are set up. I think it should work now.


Official Gio website:
gioadventures.freehostingcloud.com (under construction)

Boba Fett Link

January 03, 2012, 08:10:46 am #38 Last Edit: January 03, 2012, 05:34:00 pm by Boba Fett Link
Thanks, works great now!

EDIT: I now notice that the weapon graphic is not centered over the weapon back.
This post will self-destruct in 30 seconds.

RPGManiac3030

Should be fixed. If it's not, I think I know what else is wrong.


Official Gio website:
gioadventures.freehostingcloud.com (under construction)