Jump to content

Recommended Posts

Angelo Vertical HUD v1.2

 

This script is a massive edit of the default Angelo HUD (

Click here to see Angelo HUD topic) and the main change is the position of bars, they are vertical!

 

 

angelovhud.jpg

 

 

This is the last time I create HUDs, at least until I'm done with

Angelo Menu I.

 

 

 

A last version is expected for Angelo HUD and Vertical HUD, and it will features dynamic and animated bars and other things. All the instructions are on the script, read carefully.

 

Script

 

Download File (.txt)

 

Credits and Thanks

Author: Brandon (Me)

Constructive criticism and Help:

  • MISTER BIG T
  • YF
  • Valiant
  • Amy Pond
  • Jet
  • Anderson Porto

Creative Commons License

 

88x31.png

The Sequel of ANGELO Systems by Brandon Ferraz e Sousa is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

Based on a work at www.rpgmakervxace.net.

Permissions beyond the scope of this license may be available at www.mundorpgmaker.com.

Edited by burandon

Share this post


Link to post
Share on other sites

Looks good. But I think the method that checks if the stats change is screwed.

Add a line like

 

print 'refreshing'

 

in the refresh method to see what I mean.

 

I hope that helps.

Edited by Valiant

Share this post


Link to post
Share on other sites

Looks good. But I think the method that checks if the stats change is screwed.

Add a line like

 

print 'refreshing'

 

in the refresh method to see what I mean.

 

I hope that helps.

 

I think I don't see what you're trying to show. Can you explain better?

Share this post


Link to post
Share on other sites

When I copy the script into a new project and add that line to the refresh method, the console displays the message all the time, so it is being updated all the time.

Share this post


Link to post
Share on other sites

Can I post on a Forum called Master Maker? http://www.mastermaker.forumeiros.com

Yes, but remember, you must attribute the work in the manner specified by the author, you may not use this work for commercial purposes, you may not alter, transform, or build upon this work. Give the right credits.

 

 

When I copy the script into a new project and add that line to the refresh method, the console displays the message all the time, so it is being updated all the time.

Oh, now I get it. I tried to change somethings and increase others but it doesn't change, do you have any ideas?

Share this post


Link to post
Share on other sites

Hmm your update method is refreshing even if the hud isn't changing. If you do it like this it only refresh once the hp/mp has changed:

def update
	super
	if @hp != $game_party.members[0].hp &&  @mp != $game_party.members[0].mp
	  print "Test"
	  refresh
	end
  end
end

You can see that Test only occurs once if one of these values are changed whereas your method keeps spamming Test. Try with the Debug window and you will see:

def update
  super
  if hud_changed
	print "test"
	refresh
  end
end
 end

Edited by Niclas

Share this post


Link to post
Share on other sites

yes, rgss3 scenes by default update ALL windows present, so do not update it twice. also, this means any exclusions of updating will have to be written into the window's update method manually.

Share this post


Link to post
Share on other sites

but I can't only update when HP or MP changes because of the SWITCHES that I have to put in this method too, or else the HUD won't be displayed.

Share this post


Link to post
Share on other sites

Then call refresh only if hp/mp change and ifswitches values change, this means that you would have to create other variables to storage the value of the switches by the time the hud is created. (initialize method maybe)

 

For example,

 

if (@hpswitch != $game_switches[HP_SWITCH]) && ($game_switches[HP_SWITCH] == "OFF")

Share this post


Link to post
Share on other sites

I still having trouble, because this way you said makes the HUD appears only if the switches are ON and the stats changed. I do as you said, it works correctly but the HUD don't appear unless the stats changes. Remember: I have a masterswitch (HUD_VISIBLE_SWITCH) that can turn ON or OFF the entirely HUD. I have stats switches (HP_SWITCH, MP_SWITCH) that makes only the designated part of the HUD appear if the masterswitch is ON. I have the info switch (WEAPON_AND_NAME_SWITCH) that makes a little window appear with the icon of the currently equipped weapon and the name of character if the masterswitch is ON.

 

I tried all the conditions that comes to my head, but when the hud appeared properly, it was refreshing all the time; and when it only refresh if the stats changed the HUD don't appear right after turning the proper switches ON.

 

If only there's a way to stop the refreshing, making the window refresh only one time by scripts. I know its possible, but I don't know how to do.

Share this post


Link to post
Share on other sites

I have written it for you, but I highly recommend you to dispose the hud when the visible switch is off instead of making it not show its contents..

Why having something in screen that is not actually in screen?

 

I added a few lines in the refresh method to store the switches values and I also modified the hud_changed method to check also for changes on those variables.

 

Check it out.

 

 

 

#==============================================================================
# â–  Angelo Vertical HUD v1.0
#------------------------------------------------------------------------------
#  Created by Brandon ***  *** Plug N' Play!
#==============================================================================
#------------------------------------------------------------------------------
# â–¼ Customization Options
#----------------------------#-------------------------------------------------
#   â— HUD_VISIBLE_SWITCH	#
#- - - - - - - - - - - - - #
#  Define the switch that you want to use to turn the HUD 'ON' or 'OFF', by de-
#  fault it's 1. When the switch is turned 'ON' the HUD will be turned 'ON' too,
#  and when the switch is turned 'OFF' the HUD is turned 'OFF' too.
#------------------------------#-----------------------------------------------
#   â— FONT_NAME & FONT_SIZE   #
#- - - - - - - - - - - - - - #
#  In FONTNAME you define the font that you want to use with the HUD information.
#  In FONTSIZE you define the size of the font you've decided in FONTNAME.
#-------------------#----------------------------------------------------------
#   â— HP_SWITCH	#
#- - - - - - - - -#
#  Define the switch that you want to use to turn the HP Display 'ON' or 'OFF',
#  by default it's 2. When the switch is turned 'ON' the HP Display will be
#  turned 'ON' too, and when the switch is turned 'OFF' the HP Display is turned
#  'OFF' too.
#-------------------#----------------------------------------------------------
#   â— MP_SWITCH	#
#- - - - - - - - -#
#  Define the switch that you want to use to turn the MP Display 'ON' or 'OFF',
#  by default it's 3. When the switch is turned 'ON' the MP Display will be
#  turned 'ON' too, and when the switch is turned 'OFF' the MP Display is turned
#  'OFF' too.
#------------------------------#-----------------------------------------------
#   â— WEAPON_AND_NAME_SWITCH  #
#- - - - - - - - - - - - - - #
#  Define the switch that you want to use to turn the Currently Equipped Weapon
#  Display and Actor Name 'ON' or 'OFF', by default it's 4. When the switch is
#  turned 'ON' this option will be turned 'ON' too, and when the switch is
#  turned 'OFF' this option is turned 'OFF' too.
#---------------------#--------------------------------------------------------
#   â— R, G, B _BLA   #
#- - - - - - - - - -#
#  Define the amount of each color(Red, Green, Blue) presented in the lighter a-
#  rea of the Back of the HUD. By default it's black which means that R, G and B
#  are setted to '0'.
#---------------------#--------------------------------------------------------
#   â— R, G, B _BDA   #
#- - - - - - - - - -#
#  Define the amount of each color(Red, Green, Blue) presented in the darker a-
#  rea of the Back of the HUD. By default it's black which means that R, G and B
#  are setted to '0'.
#------------------------------------------------------------------------------
# â–¼ Post Scriptum
#------------------------------------------------------------------------------
#   â— "I want to turn all the HUD or only some part of her at the same time with
#	  the same switch, it's possible?"
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#			  Yes, just set the parts you wanted in the same
#			  switch as the HUD_VISIBLE_SWITCH.
#------------------------------------------------------------------------------
#   â— "Which values you recommend to use in FONT_SIZE?"
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#			  Use between 8 and 18, or the text will be too
#			  small or too bigger. But some times it depends
#			  on your FONT_NAME.
#------------------------------------------------------------------------------
#   â— "Which values you recommend to use in R, G, B _BLA and _BDA?"
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#			  You MUST use ONLY values between 0 and 255.
#------------------------------------------------------------------------------
module ANGELO
 HUD_VISIBLE_SWITCH = 1
 FONT_NAME = "Times New Roman"
 FONT_SIZE = 16
 HP_SWITCH = 2
 MP_SWITCH = 3
 WEAPON_AND_NAME_SWITCH = 4

 R_BLA = 0
 G_BLA = 0
 B_BLA = 0
 R_BDA = 0
 G_BDA = 0
 B_BDA = 0

#=======IMPORTANT=======IMPORTANT=======IMPORTANT=======IMPORTANT=======IMPORTANT
#	   * * *  IF YOU ARE USING OTHER ANGELO SCRIPTS, ENABLE THIS  * * *
#=======IMPORTANT=======IMPORTANT=======IMPORTANT=======IMPORTANT=======IMPORTANT

 ENABLE_ANGELO_LINK = false
end
#------------------------------------------------------------------------------
#	  !!!!DO NOT EDIT FROM HERE UNLESS YOU KNOW WHAT YOU'RE DOING!!!!
#------------------------------------------------------------------------------
include ANGELO
class AngeloVHUD < Window_Base
 def initialize
	super(-16, -16, Graphics.width + standard_padding * 3, Graphics.height + standard_padding * 3)
	self.opacity = 0
	$AngeloHUD = true
	refresh
end
 def refresh
print 'refreshing'
self.contents.clear
self.contents.font = Font.new(FONT_NAME, FONT_SIZE)
actor = $game_party.members[0]
@hp = actor.hp
@mp = actor.mp
@mhp = actor.mhp
@mmp = actor.mmp

@visible_switch = $game_switches[HUD_VISIBLE_SWITCH]
@mp_switch = $game_switches[MP_SWITCH]
@hp_switch = $game_switches[HP_SWITCH]
@weapon_and_name_switch = $game_switches[WEAPON_AND_NAME_SWITCH]

index = 0
colorback = Color.new(R_BLA, G_BLA, B_BLA, 150)
colorback2 = Color.new(R_BDA, G_BDA, B_BDA, 190)

#=======================================
# ANGELO VERTICAL BARS
#=======================================
 def draw_vertical(x, y, height, rate, color1, color2)
fill_h = (height * rate).to_i
contents.fill_rect(x, y, 6, height, gauge_back_color)
contents.gradient_fill_rect(x, y, 6, fill_h, color1, color2)
 end

if $game_switches[HUD_VISIBLE_SWITCH] == true
	unless $game_switches[HP_SWITCH] == false
	  self.contents.fill_rect(Graphics.width - 32, (standard_padding / 2) + 3, 35, 24, colorback2)
	  self.contents.fill_rect(Graphics.width - 32, (standard_padding / 2) + 6, 35, 18, colorback)
	  self.contents.fill_rect(Graphics.width - 12, (standard_padding / 2) - 2, 18, Graphics.height / 2, colorback)
	  self.contents.fill_rect(Graphics.width - 8, (standard_padding / 2) - 2, 10, Graphics.height / 2, colorback2)
	  draw_vertical(Graphics.width - 6, (standard_padding / 2) - 2, Graphics.height / 2, actor.hp_rate, hp_gauge_color1, hp_gauge_color2)
	  draw_text(Graphics.width - 32, standard_padding / 2, 100, 32, Vocab::hp_a)
	end
	unless $game_switches[MP_SWITCH] == false
	  self.contents.fill_rect(Graphics.width - 32, Graphics.height - 26, 35, 24, colorback2)
	  self.contents.fill_rect(Graphics.width - 32, Graphics.height - 23, 35, 18, colorback)
	  self.contents.fill_rect(Graphics.width - 12, (standard_padding / 2) - 2 + (Graphics.height / 2), 18, Graphics.height / 2, colorback)
	  self.contents.fill_rect(Graphics.width - 8, (standard_padding / 2) - 2 + (Graphics.height / 2), 10, Graphics.height / 2, colorback2)
	  draw_vertical(Graphics.width - 6, (standard_padding / 2) - 2 + (Graphics.height / 2), Graphics.height / 2, actor.mp_rate, mp_gauge_color1, mp_gauge_color2)
	  draw_text(Graphics.width - 32, Graphics.height - 29, 100, 32, Vocab::mp_a)
	end
	unless $game_switches[WEAPON_AND_NAME_SWITCH] == false
	  self.contents.fill_rect(-64 + 80, 386, 125, 19, colorback)
	  self.contents.fill_rect(-64 + 85, 386, 115, 19, colorback2)
	  draw_actor_name(actor,  -40 + 87, 383, 100)
		  return unless actor.equips[index]
	  draw_icon(actor.equips[index].icon_index, -64 + 87, 382, true)#(actor.equips[index], -64 + 92, 376, true)
	end

  end

  def hud_changed
	return (@hp != $game_party.members[0].hp ||
	@mp != $game_party.members[0].mp ||
	@visible_switch != $game_switches[HUD_VISIBLE_SWITCH] ||
	@mp_switch != $game_switches[MP_SWITCH] ||
	@hp_switch != $game_switches[HP_SWITCH] ||
	@weapon_and_name_switch != $game_switches[WEAPON_AND_NAME_SWITCH])
	end	
  end

def update
	super
	refresh if hud_changed	
  end
end
class Scene_Map
  alias hud_main create_all_windows

  def create_all_windows
	create_hud_window
	hud_main
  end
  def create_hud_window
	@hud = AngeloVHUD.new
	if ENABLE_ANGELO_LINK && $Menu_Angelo == true
	 @gold = Window_Gold.new
	 @gold.opacity = 0
	 @gold.x = 146 - @gold.contents.width - 10
	 @gold.y = Graphics.height - 68
	end
  end
end

 

 

Edited by Valiant

Share this post


Link to post
Share on other sites

One day I loaded up my game, worked wonders with this awesome script but then I opened my game again on another day and I got this error whenever I open my game with your script - No edits to the script have been made.

 

Script 'Angelo Vertical HUD' line 178:NameError occurred.

undefined local variable or method 'hud_changed' for #<AngeloVHUD:0x36c7570>

Share this post


Link to post
Share on other sites

Try using the new version

 

Download File

 

I don't know why I didn't release it!

I'm forgetting every thing these days (even forget to feed my cat, poor kitty)

Edited by burandon

Share this post


Link to post
Share on other sites

hehe, it's settled them!

we have a deal! ;)

 

EDIT:

There's one diferencial in the way the script works, so in order to hide the HUD you'll have to turn ON the switches.

I forget about editing this in the script comments ^_^ My forgetfulness it's starting to get serious .

Edited by burandon

Share this post


Link to post
Share on other sites

Yea its not working and I have all the switches on,

its stopped crashing but no visuals -_-

 

Look what I said:

 

 

hehe, it's settled them!

we have a deal! ;)

 

There's one diferencial in the way the script works, so in order to hide the HUD you'll have to turn ON the switches.

I forget about editing this in the script comments ^_^ My forgetfulness it's starting to get serious .

So you turn the switches ON, then the HUD disappeared :lol:

Share this post


Link to post
Share on other sites

oh so does that mean I have to turn them off...

edit

i turned off all the HUD switches and the error came up again...

Edited by Rosenblack

Share this post


Link to post
Share on other sites

See if this happens in a fresh project, if so then must be a incompatibility issue, then try changing the order of the script.

Share this post


Link to post
Share on other sites

I'll check now

edit

works in a fresh project but no matter where i put in it my existing project it now comes up with

 

SystemStackError occurred

stack Level too deep

i am the destroyer of all scripts, i seem to kill them all in one way or another <_<

Edited by Rosenblack

Share this post


Link to post
Share on other sites

try adding

unless $@

 

to the line 189

  alias hud_angelo_vertical create_all_windows

 

Like that:

  alias hud_angelo_vertical create_all_windows unless $@

Share this post


Link to post
Share on other sites

Looks good. But I think the method that checks if the stats change is screwed.

Add a line like

 

print 'refreshing'

 

in the refresh method to see what I mean.

 

I hope that helps.

Just a small correction: in RMVXA they changed print to msgbox.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted