The RPG Maker Resource Kit

RMRK RPG Maker Creation => VX Ace => VXA Scripts Database => Topic started by: pacdiggity on February 12, 2012, 04:37:25 AM

Title: Enemy HUD
Post by: pacdiggity on February 12, 2012, 04:37:25 AM
Enemy HUD
Version: 1.1
Author: Pacman
Date: 10/4/2012

Version History



Planned Future Versions


Description


This script displays enemy stats (HP, MP, TP, stat icons) in the battle screen whilst selecting which enemy to target. It also includes special tags to prevent any of these stats from being drawn. And yes, enemies do have TP. New in 1.1, you can make the numbers of the enemy’s gauges hidden. This would be specifically useful for boss battles.

Features


Screenshots

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FQSAhP.jpg&hash=f9c495c3132a5fd273a147fcf89aad160c58a9f2)
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi.imgur.com%2F5FS4P.jpg&hash=1b07bdecdcd9e54532669811d41ade0133ca5ee9)
Some demonstrations of the differing displays of each of the enemies. Too lazy to put the boss feature in a screenshot :)

Instructions

Paste above main, at the top of your custom scripts list. Follow instructions in script header.

Script


Get it at Pastebin (http://pastebin.com/8uaRqEBx).

Credit



Thanks


Support


Just post here or PM me if your problem is embarrassing.

Known Compatibility Issues

I overwrote a method in Scene_Battle, so for extra caution make sure it's near the top of your custom script list.

Demo


Nah.

Author's Notes


Check out my blag (http://pacmanvx.wordpress.com/)! It has blue! BLUE!
This will probably work well with Change Gauge Display (http://rmrk.net/index.php/topic,44968.0.html).

Restrictions

Free for use in non-commercial projects, with credit. For commercial projects (seriously?) contact me.
Title: Re: Enemy HUD
Post by: modern algebra on February 12, 2012, 04:56:57 AM
Nice idea - it is good to have a little more information on enemies in battle.
Title: Re: Enemy HUD
Post by: yuyu! on February 12, 2012, 04:57:53 AM
Just post here or PM me if your problem is embarrassing.

People on forums get embarrassed? :0

Anyways, I like this script. I'm not just saying that to fill up your topic with posts or anything. Nope, not at all! ;8 It's one step closer to Ace having all those awesome VX scripts. I wish I knew how to script without copying your sandwitch script. ;9

Good job, Pacman! :V
Title: Re: Enemy HUD
Post by: pacdiggity on April 10, 2012, 04:41:13 AM
UPDATED.
You can now have enemies' gauges drawn, but not the numbers they are representing, i.e., hiding the exact amount of HP, MP or TP they have. Also works on actors, because I put the code in Game_Battler which effects both Game_Actor and Game_Enemy.
Title: Re: Enemy HUD
Post by: Wiimeiser on April 10, 2012, 05:24:25 AM
Would it be possible to make an addon so that the stats only display if you've scanned an enemy(with MA's Monster Catalogue)?
Title: Re: Enemy HUD
Post by: pacdiggity on April 10, 2012, 05:26:56 AM
I guess. Do you mean the name, the gauges or the numbers?
Title: Re: Enemy HUD
Post by: Wiimeiser on April 11, 2012, 02:27:55 PM
The Numbers, at least.
Title: Re: Enemy HUD
Post by: pacdiggity on April 11, 2012, 04:02:30 PM
Updated the Pastebin link, I'll update the topic soon. Kinda can't be bothered right now ^_^

Also if you use the addon that blocks out the enemy name, I suggest this snippet to make selecting enemies easier.
Code: [Select]
module WHITEN_ENEMY
  FLICKER = true
  FLICKER_RATE = 45
end

class Window_EnemyHUD < Window_BattleStatus
  def update
    super
    return unless active
    type = :whiten
    if WHITEN_ENEMY::FLICKER
      @last_sprite_effect_type = enemy.sprite_effect_type
      @change_counter = 0 if @change_counter.nil? or @change_counter >
       WHITEN_ENEMY::FLICKER_RATE
      @change = @change_counter > (WHITEN_ENEMY::FLICKER_RATE / 2)
      type = @last_sprite_effect_type
      type = :whiten if @change
    end
    enemy.sprite_effect_type = type
    @change_counter += 1 if WHITEN_ENEMY::FLICKER
  end
end
Title: Re: Enemy HUD
Post by: pacdiggity on April 15, 2012, 10:38:32 AM
Fixed a bug with detecting the presence of MA's Monster Catalogue. I was careless in the previous update.

EDIT:: Even more fixed now.