[XP] Custom Blizz-ABS HUD

Started by winkio, November 23, 2008, 02:38:38 pm

Previous topic - Next topic

winkio

@Metaron: Make sure that in the Blizz-ABS config, your MAX_PARTY is set to the maximum number of actors you will have at once.
@Memor-X:  $game_system.parhud = false

megaman30796

winkio, i have a problem.......the script crashes when i try 2 turn on the minimap.
it says:

script 'custom hud' line 1076: NoMethodError occured
undefined method 'dropped' for #<Game_Event:0x40d88a0>
"You know the world is going crazy," Chris Rock declared in 2003, "when the best rapper [Eminem] is a white guy, the best golfer [Tiger Woods] is a black guy, the tallest guy in the NBA [Yao Ming] is Chinese, the Swiss hold the America's Cup, France is accusing the U.S. of arrogance, Germany doesn't want to go to war, and the three most powerful men in America are named 'Bush,' 'Dick,' and 'Colon.' Need I say more?"

danesopeezy89

hi, i just wanted to know, how do you disable the hud for a cut scene?

WhiteRose

Quote from: danesopeezy89 on January 02, 2011, 06:05:34 pm
hi, i just wanted to know, how do you disable the hud for a cut scene?


Just paste this in a script call. It'll hide the HUD, the hotkeys, and the minimap.


$game_system.hud = false
$game_system.hotkeys = false
$game_system.minimap = 0

danesopeezy89

January 02, 2011, 06:24:36 pm #124 Last Edit: January 02, 2011, 06:27:43 pm by danesopeezy89
Thanks a lot  :haha:

Well it disabled everything but hud

WhiteRose

Quote from: danesopeezy89 on January 02, 2011, 06:24:36 pm
Thanks a lot  :haha:

Well it disabled everything but hud


Hmm, that's odd; it's always worked for me. It might be a compatibility issue with Winkio's HUD, though I'd have thought that it would be compatible with the default Blizz-ABS commands.

winkio

January 02, 2011, 08:08:16 pm #126 Last Edit: January 02, 2011, 08:10:42 pm by winkio
man, i'm getting tired of posting this every page.


$game_system.parhud = false


EDIT: Ironically, all you had to do was scroll to the top of this page.  But I put it on the first post now, so there should be no more confusion.

WhiteRose

Sorry, wink. I should have known better. D:
Out of curiosity, why didn't you just make it use the default Blizz-ABS commands?

winkio

because it's a separate display.  What if you only wanted to turn that part off or on?

RoseSkye

I'm editing your HUD a bit and I've run into a bit of a snag.

1. How do I remove the white borders around the hp/sp bars? (They ruin my bg graphic by being transparent and showing through to the map)
2. How do I ignore game_party.actors[0] and make it just show party members 1 - 4. I want it to act like a party HUD instead of an HUD that includes party members.

winkio

1.  Under draw_basic is where the outlines are drawn (lines 190-191 for example).  Just change them to match the size of the actual bars (should be 100x12), and add 1 to the x and y position.
2.  Pretty much any time you see (0...@psize).each, replace with (1...@psize)each.  You will have to change a few things in the create_positions methods too to keep it centered.

RoseSkye

It errors out now. 190 'no implicit conversion nil to integer'.

winkio

yeah, probably because there isn't a second party member.  just surround with
if @psize > 1
CODE HERE
end

RoseSkye

January 19, 2011, 03:24:31 pm #133 Last Edit: January 19, 2011, 03:27:48 pm by RoseSkye
Same Error. I placed it on line 187 and on line 203.
if @psize > 1
   if color.is_a?(Color)
     (1...@psize).each {|i|
       # draw outlines in color
       self.bitmap.fill_rect(@hp_x[i], @hp_y[i], 102, 14, color)
       self.bitmap.fill_rect(@sp_x[i], @sp_y[i], 102, 14, color)
       # draw actor's names and faces
       self.bitmap.draw_text_full(@name_x[i], @name_y[i], 104, 20, actor(i).name, 1)
       if PARHUD_CONFIG::FACESETS
         self.bitmap.fill_rect(@face_x[i], @face_y[i], 50, 50, color)
         # load bitmap
         bitmap = RPG::Cache.picture("actor"+actor(i).id.to_s+".png")
         # draw bitmap
         self.bitmap.blt(@face_x[i]+1, @face_y[i]+1, bitmap, Rect.new(0, 0, 48, 48))
       end
       }
     end
   end
end

I also tried to isolate that one line and it errored out as soon as it started with a syntax error. I'm sure the syntax error came from two cases of psize... but I'm still learning so I wouldn't trust my own word.

nathmatt

is that the end of a def because after realigning the code im finding 1 end to many

if @psize > 1
  if color.is_a?(Color)
    (1...@psize).each {|i|
    # draw outlines in color
    self.bitmap.fill_rect(@hp_x[i], @hp_y[i], 102, 14, color)
    self.bitmap.fill_rect(@sp_x[i], @sp_y[i], 102, 14, color)
    # draw actor's names and faces
    self.bitmap.draw_text_full(@name_x[i], @name_y[i], 104, 20, actor(i).name, 1)
    if PARHUD_CONFIG::FACESETS
      self.bitmap.fill_rect(@face_x[i], @face_y[i], 50, 50, color)
      # load bitmap
      bitmap = RPG::Cache.picture("actor"+actor(i).id.to_s+".png")
      # draw bitmap
      self.bitmap.blt(@face_x[i]+1, @face_y[i]+1, bitmap, Rect.new(0, 0, 48, 48))
    end}
  end
end
Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


winkio

Now you need to replace all the array indicies with i-1 instead of i, because they don't have the player element anymore.

RoseSkye

Quote from: winkio on January 19, 2011, 07:09:45 pm
Now you need to replace all the array indicies with i-1 instead of i, because they don't have the player element anymore.


All with [i-1]? Every one in the script? I can do it but I want you to be positive it'll work because it'd be a bitch to revert.

winkio

Just inside Parhud, not the whole script.

RoseSkye

Okay what do I change to alter the face positions and such?

Boba Fett Link

I have a question. Can you make it so that you don't have to have the character with ID 1 in the party at all times?
This post will self-destruct in 30 seconds.