DOUBLEX RMVXA ENEMY MP/TP BARS ADDON TO YANFLY ENGINE ACE - ACE BATTLE ENGINE

RPG Maker VX Ace

Displays the enemy mp or/and tp bars

  • DoubleX
  • 08/29/2014 05:35 AM
  • 5567 views
Note
This script is extremely similar to Yanfly Engine Ace - Battle Engine Add-On: Enemy HP Bars so crediting DoubleX or his alias will violate this script's terms of use.

Current Version
v1.03b

Prerequisites
Ace Battle Engine




Features
Almost no scripting knowledge is needed to use this script(some is needed to edit it)

Posts

Pages: 1
This will surely be useful! Now we can tell when the Demon Commander is likely to unleash his mega assault!



But skills that target a range of enemies (such as 2 random enemies, or all enemies), are still showing the MP (and probably TP) bars of hidden enemies. From this screenshot, we can see that Yanfly's HP bars are still hidden on the hidden enemy. I looked through Yanfly's HP Bars script but haven't had any success frankenscripting it into your MP Bars script. There's something missing somewhere.

The apparent solution would be to have the MP bars hidden on such enemies with notetags, but if that is done, the MP Bars continue to be hidden after the enemy has appeared. If you get a minute to look into this I'd appreciate it, thank you!
Hey! I woke up today, had my coffee, and fixed this! Here's what I did:

On Yanfly Channel for his HP Bars, in the comments section there is a post halfway down the page by Shinma with a fix for the HP Bars showing on hidden enemies. I replaced the code at line 315 in your script with the fix. Here's what changed:

Replace:

def gauge_visible?
update_original_hide
return false if @original_hide || case_original_hide?
return true if @visible_counter > 0 || @gauge_width != @target_gauge_width
return false if !SceneManager.scene_is?(Scene_Battle)
enemy_window = SceneManager.scene.enemy_window
!enemy_window.nil? && !@battler.dead? && enemy_window.active && (enemy_window.enemy == @battler || enemy_window.select_all? || highlight_aoe?)
end

With this:

def gauge_visible?
update_original_hide
return false if @original_hide
return false if case_original_hide?
return true if @visible_counter > 0
return true if @gauge_width != @target_gauge_width
if SceneManager.scene_is?(Scene_Battle)
return false if SceneManager.scene.enemy_window.nil?
unless @battler.dead?
if SceneManager.scene.enemy_window.active
return false if @battler.enemy? && @battler.hidden
return true if SceneManager.scene.enemy_window.enemy == @battler
return true if SceneManager.scene.enemy_window.select_all?
return true if highlight_aoe?

end
end
end
return false
end

And now the notetag for the hidden enemy can say <show mp gauge> and AoE spells will not reveal its MP Bar until they are no longer hidden. :D
Updates
v1.01e(GMT 0900 14-2-2014):
- Fixed the mp and tp bars of the hidden enemies being shown bug
- Further increased efficiency and reduced lag
Works great! I had noticed some hiccups before and didn't know what might be causing them, they seem to have been fixed by the new version of this!
Updates
v1.02a(GMT 0200 6-4-2015):
- Added MP_CRISIS_TEXT_COLOR
Updates
v1.03b(GMT 1000 21-5-2023):​
- Fixed not updating the enemy mp and tp bars when their mp and tp becomes 0 respectively
Pages: 1