Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

> Bar O Meter, A meter(-HUD) that's filled by a amount
SojaBird
post May 4 2008, 10:56 AM
Post #1


Level 51
Group Icon

Group: Revolutionary
Posts: 1,573
Type: Scripter
RM Skill: Advanced




Bar O Meter

Version v2.2
Author SojaBird
Release Date 19-06-'08


Introduction
I'm realy proud on this script of mine.
It's the best I've ever done so far (3th hehe).

I spend a lot of time finding out how some scriptings works.
For example I had a hard time figuering out how to draw a picture.
Also the way to fill de bar was very hard to get.
Though I knew how I wanted to do it but I just couldn't get it working.

I started scripting this since I found some question on this forum.
First one was from JamesBlackwing who requested a "Basic hud addon, a bar", what didn't seemd so basic at all.
Second was from Neclords who also had a "HUD request"

However, I took the challenge and did it!! biggrin.gif
It's finaly complete and perhaps I'll use it in my own game as well now I know it's just awsome and mine. cool.gif


Hopefully it's worth your while trying.
HAVE FUN




Features
v1.0
- Draw a bar useing 2 images. One for a empty bar, a second one (same size) for the filling.
- You can use just a 50%-gray fill and change the tone in the script self (optional).
- Set the amount that causes the bar to be totaly filled.
- Show or hide the amountnumber.
- Change the place of the hud to show.
- Super Easy Setup.
v1.5
- Four different fillstyles (Left>Right, Right>Left, Bottom>Top, Top>Bottom)
v1.7
- Chose the fill to by variable or item
- Show hud directly when swich turned on (but when turned off again, it only turns of numbers and bar after open>close a window)
- Chose to use or don't use the tone instead of changing it back to [0,0,0,0]
v1.8
- Enable to changes the huds opacity.
- Smooth fill animation.
v2.0
- Use variable/item/hp/mp to fill the bar.
- Problem fixed with show and hide the amount.
- Blendingmode of the bar and the fill added.
v2.0.1
- Use exp as value to fill the bar with.
v2.1
- Fixed lag thanks to Puppeto!
v2.2
- More easy setup than before.
- And more...

To come features
- Show/hide total hud (getting it working properly)
- Call script functions.
- Disable count up the variable when bar is full (when using variables).
- Enable to changes place of number to show.
- Get the use time working to fill the bar.

Script
Attached File  Bar_O_Meter_v2.2.txt ( 10.86K ) Number of downloads: 791




Customization
The whole setup is in the script self.
All you have to do is change it to your own style.

the setup in the script starts from
CODE
#############
# Start SETUP #
#############


and ends with
CODE
############
# End SETUP #
############



Compatibility
VX only.
Needs a picture of a empty bar and the filling (or a full bar) in the picturefolder of your game.


Screenshot



DEMO

v1.0 DEMO FILE HERE
The demo contains the project wich include some examplebars.
Sorry for the missing ingame info but talk to the butterfly to changes the show or hide of the number (do a window open>close to update it).
Talk to the fairy to get the bar filled and use the fire to empty the bar a little (sorry again for, this time, the missing of the amount input when empty the bar).



Installation
Put the script above main.
Set the script up by changing it to your project.
Put a empty and a filling or full bar picture in the picturefolder of your game (same size).
Credit me pls.
When you get an item that is tracked by the bar, change the in the script set up variable with the amount of that item that you get.
Also do this when you use or lose that item.
When you have reached the max amout of items, make sure the variable doesn't get over that item, it'll cause a uncorect display of the tracked amount.


FAQ
Non jet...

Terms and Conditions
Credit me pls with site, and the script is yours.
If anyone want some changes, pls pm me or post it here, I'll track the topic.

This post has been edited by SojaBird: Apr 30 2010, 07:41 AM


__________________________
Art from the highest shelf?

Scriptology, scripting podcast



HUD's Request Lobby (multiple hud-scripts)


------------------------------------------------------------------

Random Stuff
OMG, it's Hab!!


This is a crazy drawing application! (by me)

How did I learned to script
QUOTE
Hey pim! I'm the Law G14!

For the past couple of months I've been learning RGSS and I've got the basic stuff down such windows, variables, conditional statements, ect. But, I can't see myself making big scripts such as a jumping system or a side view battle system. I was wondering how you learned to script because I really want to know how to script really well.

Thanks in advance.


Hey there,

Well I don't make battle neither though I can still teach you some things :)...
The way I've learned to script is by reading other scripts for the most part.
I've allways been interested in other peoples work but this time I though I had to try to make something myself...and it worked!!
The most importand thing when you go scripting is (at least in my case) that you want to make something to help an other wich can't script.
You also need to feel the competition that's around in the scripting-community.
Cause, I have to say, if you get pushed to get a sertain request done before an other scripter does, you feel POWERFULL!! :P
So that's an other thing...
You also don't need to be afraid to learn from others or helpfiles.
When I write my scripts, I actualy always have the helpfiles open to look things up I don't know or remember.
Then, you must be calm, cause you need to try the script a lot of times.
When I write a script, I test it after almost every changes.
First I set up the major structure.
Like when I make a window-script or part of a script I start with something like this:
CODE
class Window_Name < Window_Base
def initialize(x,y,width,height)
super(x,y,width,height)
refresh
end

def refresh
self.contents.clear
draw_contents
end

def draw_contents
draw_something(with, some, parameters)
end

def update
refresh if @something != @what_it_should_be
end
end
So that's also very important.
Then, the biggest thing I learned scripting from is TRIAL AND ERROR.
That's the most irritating way to learn something, cause it's more ERROR than TRIAL, but it does the trick realy good.

So that's it how I did it.
Now it's up to you.
Do some requests (if I didn't do it allready :P) and learn from them.

Hope that helped you out a little.
If not, keep your eye on the Scriptology-topic (see my sig) where I'll be updating for my scripting(video)tutorials.
Perhaps they're going to be usefull for you one day ;)


Greatzz,
SojaBird.
Go to the top of the page
 
+Quote Post
   

Posts in this topic
- pim321   Bar O Meter   May 4 2008, 10:56 AM
- - puppeto4   Well,nice HUD script,kinda different snce most scr...   May 4 2008, 11:13 AM
- - pim321   Well actualy I just want it to apear when a swich ...   May 4 2008, 11:17 AM
- - puppeto4   Well,first,in the HUd class,set this : CODEself.v...   May 4 2008, 11:22 AM
|- - neclords   Thank you Pim321.. For the "HUD script"   May 5 2008, 05:44 AM
- - pim321   ya're welcome, hopfully your sister find is us...   May 5 2008, 09:10 AM
- - Jirachiwish   How do you get the bar to fill horozontally   May 6 2008, 01:51 PM
- - pim321   changes the fillstyle to 3(bottom to top) or 4(top...   May 7 2008, 05:30 AM
- - pim321   bump   May 12 2008, 06:56 AM
- - pim321   Update!!   May 13 2008, 02:37 AM
- - demonicblade   I love it! So far it shows HP, am I right? Wou...   May 15 2008, 07:31 AM
- - pim321   ya mean with the button or with the switch? well ...   May 15 2008, 09:12 AM
- - pim321   Update to v2.0 The script allready has Exp and Tim...   May 19 2008, 09:20 AM
- - pim321   update v2.0.1 sorry for the fast reply but I fixed...   May 19 2008, 09:34 AM
- - pim321   hehe bump and sorry for the many times I used ...   May 21 2008, 08:43 AM
- - Apkx24   does it show HP and MP and EXP or just HP? i red...   May 21 2008, 02:04 PM
- - pim321   well it's just one bar so you can choose what ...   May 21 2008, 03:32 PM
- - pim321   UPDATE to v2.1 NO LAG ANYMORE!!   May 26 2008, 06:51 AM
- - rebirth2life   Thank you for the script, pim321!   Jun 9 2008, 07:04 AM
- - Sycoslicer   Lol... Very nice. I suck at scripting myself, so I...   Jun 18 2008, 05:24 AM
|- - pim321   QUOTE (Sycoslicer @ Jun 18 2008, 02:38 PM...   Jun 18 2008, 03:04 PM
- - Sycoslicer   Well... I had it working at first, but now Im not ...   Jun 19 2008, 02:01 AM
- - pim321   update to v2.2 @sycoslicer make sure you have s...   Jun 19 2008, 03:59 AM
- - BlasterBoy   Can this substitute for HP?   Jun 19 2008, 09:36 AM
- - pim321   @BlasterBoy pls read the feature list, it says tha...   Jun 19 2008, 01:23 PM
- - Sycoslicer   Forgot to say thanks. I got the script working for...   Jun 21 2008, 02:37 AM
- - pim321   im still working on that problem...ill try to fix ...   Jun 21 2008, 03:27 PM
- - Sycoslicer   Nvm, I fixed it. I tryed using variables and hp to...   Jun 23 2008, 09:06 PM
- - pim321   Well I'm not sure what you meen with the use o...   Jun 24 2008, 12:45 AM
- - Sycoslicer   Yeah, I saw something on a different post about ra...   Jun 24 2008, 01:28 AM
- - pim321   hey i'm kind a back again uhm...sycoslicer, ...   Jul 30 2008, 02:31 PM
- - Ataris   do you have a bar picture so I can just use ur hp ...   Jul 31 2008, 10:43 PM
- - pim321   well that's actualy all up to you, it depends ...   Aug 1 2008, 01:25 AM
- - VampireLordAlucard   QUOTE (pim321 @ Jun 24 2008, 01:07 AM) We...   Aug 1 2008, 10:01 PM
- - pim321   well i allready have made the heart thing, you can...   Aug 2 2008, 12:53 AM
- - Zandalar   The demo is no longer on the site. How bad, I want...   Aug 4 2008, 03:20 PM
- - pim321   Well you could just take the script and look at it...   Aug 5 2008, 08:09 AM
- - Shadonn   Sorry to bug you guys but i have a point system se...   Aug 23 2008, 01:59 PM
- - Shadonn   (bump)   Aug 23 2008, 02:29 PM
|- - Shadonn   QUOTE (Shadonn @ Aug 23 2008, 02:51 PM) (...   Aug 23 2008, 07:11 PM
- - pim321   All you do is spamming...pls read the rules before...   Aug 24 2008, 07:24 AM
- - The Shadow   You can only bump a topic after 32 hours, so stop ...   Aug 24 2008, 10:00 AM
- - Shadonn   sorrry i figured it out i just got really aggravat...   Aug 24 2008, 10:08 AM
- - pim321   sorry for that... not sure if i still have the dem...   Aug 27 2008, 12:03 PM
- - pim321   Oke, I shall make a new demo for that   Sep 1 2008, 12:03 AM
- - Misterzeno   Ah, I can't get this to work, I can get the ba...   Sep 25 2008, 01:20 AM
- - pim321   Mmmm...could ya pls sent ya settings along so that...   Sep 25 2008, 02:29 AM
- - link5001   I can't dowload the example it takes me to and...   Sep 25 2008, 08:40 PM
- - pim321   Well it seems that MassMirror is doing some weird ...   Sep 26 2008, 12:12 AM
- - Omegas7   Hey nice script! Hm, but how about being able...   Nov 28 2008, 09:24 PM
- - pim321   hey omegas, thanks for the comment. a way to show...   Nov 29 2008, 02:51 AM
- - celinhow   HI, i think your script is very good, but i dont k...   Dec 9 2008, 07:03 AM
- - pim321   he he, sry for the inconvience, but the script is...   Dec 9 2008, 10:12 AM
- - Zarvix   How do you change a script into a project?   Jan 4 2009, 08:46 PM
- - pim321   You don't. Start a new project, go to the scr...   Jan 5 2009, 12:56 AM
- - celinhow   Hey Pim, do you have a clue on that issue with the...   Jan 6 2009, 04:56 AM
- - pim321   Not realy actualy. I'll try to make a newer, ...   Jan 6 2009, 10:03 AM
|- - killerrin   QUOTE (pim321 @ Jan 6 2009, 11:03 AM) Not...   Jan 8 2009, 08:09 PM
- - pim321   Sure. Greatzz, SojaBird.   Jan 9 2009, 12:57 AM
- - celinhow   Is there a script to type your name for the chacac...   Jan 28 2009, 12:58 PM
- - pim321   What are you talking about? What this script does ...   Jan 29 2009, 02:41 AM
- - skulper34   Hello I added the script, I get no error or anythi...   Feb 9 2009, 12:21 PM
- - pim321   To let the pictures show (I guess it's still b...   Feb 9 2009, 03:11 PM
- - Surichi   Thank you for this script! But I was wondering...   Apr 4 2010, 03:30 PM
- - SojaBird   Uhm... Only in menu? Like instead of the usual hea...   Apr 18 2010, 02:05 AM
- - ian0310   dude it didnt work for me.. I think I do the right...   Sep 6 2010, 06:32 AM
- - Sir_Reaver   QUOTE (ian0310 @ Sep 6 2010, 07:32 AM) du...   Sep 17 2010, 11:16 AM


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 19th June 2013 - 02:57 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker