ShiningPhoibe

Veteran
Veteran
Joined
May 12, 2020
Messages
131
Reaction score
44
First Language
French
Primarily Uses
RMMZ
Hello,
I'm trying to make a skill that displays the max HP of an enemy. I tried to follow the Libra tips & tricks video by Yanfly, but unfortunately it didn't work in MZ.
Here is what I wrote in the notetag of the skill:
Code:
<Before Eval>
if (target.isEnemy()) {
  var id = target._enemyId;
  $gameSystem.addHpGaugeEnemy(id);
}
</Before Eval>
How do I make a skill that displays max HP? Or alternatively, is it possible to display max HP as a number using VisuStella plugins? Maybe I just missed it in settings.
Thanks for reading.
 

ShiningPhoibe

Veteran
Veteran
Joined
May 12, 2020
Messages
131
Reaction score
44
First Language
French
Primarily Uses
RMMZ
I tried JS Pre-Damage and JS Pre-Apply, but it doesn't do anything either. There's no error message, and there's no effect.
 

NaosoX

Veteran
Veteran
Joined
Feb 28, 2013
Messages
172
Reaction score
104
First Language
English
Primarily Uses
RMMZ
Which Plugins are you using currently?
What are you using in the notebox?
What do you want the outcome to actually be?
 

ShiningPhoibe

Veteran
Veteran
Joined
May 12, 2020
Messages
131
Reaction score
44
First Language
French
Primarily Uses
RMMZ
Which Plugins are you using currently?
What are you using in the notebox?
What do you want the outcome to actually be?
My list of plugins is in the screenshots below.
I used

Code:
<JS Pre-Apply>
if (target.isEnemy()) {
  var id = target._enemyId;
  $gameSystem.addHpGaugeEnemy(id);
}
</JS Pre-Apply>

and
Code:
<JS Pre-Damage>
if (target.isEnemy()) {
  var id = target._enemyId;
  $gameSystem.addHpGaugeEnemy(id);
}
</JS Pre-Damage>

I'd like to make a skill that displays the enemy's HP as a number.
 

Attachments

  • Plugin list 1.png
    Plugin list 1.png
    285.9 KB · Views: 5
  • Plugin list 2.png
    Plugin list 2.png
    134.5 KB · Views: 5

NaosoX

Veteran
Veteran
Joined
Feb 28, 2013
Messages
172
Reaction score
104
First Language
English
Primarily Uses
RMMZ
Ok, I may have a solution for you.
EndResult.png

Required Plugins:
Visustella
-VisuMZ_0_CoreEngine
-VisuMZ_1_BattleCore

Plugins.png

Step 0: Open plugins
-Double-click VisuMZ_0_BattleCore
-Double-click "Action Sequence Settings"
BattleCore.png
-Set "Auto Notetag" to true.
ActSeqSet.png
-Click OK to accept this change.


Step 1: Create a Common Event; let's name it Libra.
MenuCE.png
-Add new Event Command.
-Page 3, Script.
-Within Script add the following:
Code:
var target = BattleManager._target;
$gameVariables.setValue(1, target.mhp);
-This will set the target's Max HP to a Variable, in this example it is set to 1.
-Press OK.

ComEv.png
You should end up with something like this.

Step 2: Add new Event Command.
-Page 3, Plugin Command.
-Select VisuMZ_1_BattleCore, press OK.
-From the Plugin Command, under Command Name(top-right drop down menu), select MECH: Variable Popup.
-Double-click Targets option and select "current target".
-Set Variable ID to whichever you decided(Example 1).
-Customize the other setting to whatever you like, for this example, leave at default.

Step 3: *This step is optional* Add new Event Command.
-Page 3, Plugin Command.
-Select VisuMZ_1_BattleCore, press OK.
-From the Plugin Command, under Command Name(top-right drop down menu), select MECH: Text Popup.
-Double-click Targets option and select "current target".
-Set Text to whatever you like, for this example, type "Maximum HP!".
-Customize the other setting to whatever you like, for this example, leave at default.

STEP 4: Create a new Skill; let's name it Libra.
MenuSK.png
-Change setting to your liking.
-Be sure to change Skill Type to match your character's capability.
-Be sure to change Scope to 1 Enemy.
-Be sure to change Occasion to Battle Screen.
-In the Note box, type this:
Code:
<Common Event: Libra>
-This will call the Common Event we created named "Libra".

Skill.png



Step 5: Add the skill Libra to your character class.
-Save project.
-Test with a variety of enemies.
-You can add more BattleCore Plugin Commands to Action Sequence the execution of this skill.

Step 6: Enjoy! :)

Hope this helps!
 
Last edited:

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
43,742
Reaction score
15,312
First Language
English
Primarily Uses
RMMV

I've moved this thread to Plugin Support. Thank you.

 

ShiningPhoibe

Veteran
Veteran
Joined
May 12, 2020
Messages
131
Reaction score
44
First Language
French
Primarily Uses
RMMZ
I can't seem to make it work. There's still no effect in battle. I checked that the common event was called by the skill and it is, but nothing happens. Did I miss something?
 

Attachments

  • Common event.png
    Common event.png
    52.9 KB · Views: 4
  • Skill.png
    Skill.png
    90.2 KB · Views: 4
Last edited:

NaosoX

Veteran
Veteran
Joined
Feb 28, 2013
Messages
172
Reaction score
104
First Language
English
Primarily Uses
RMMZ
in the plugin command.. change target to "current target"
Help.png
 
Last edited:

Latest Threads

Latest Posts

Latest Profile Posts

I'm so annoyed with myself...I can't get this code to work so it looks like I'm going the plugin route for a problem I should be able to do myself :kaolivid:Great. Now I get to murder save file compatibility. Again.
Can't believe my code from four years ago is still working! Did some expansions, and...
1635194553179.png
In related news, I may have an update for my old Extra status window plugin ready. That is, once I manage to sit down and update the documentation... and the demo project... :kaoswt:
How does one pronounce Godot? I've heard it pronounced a couple of different ways, and I genuinely don't know the proper way.
March 2020 ...
1635188823939.jpeg
... vs October 2021
You look like you had a rough day...Here, have a Baby Panda!

Forum statistics

Threads
116,077
Messages
1,095,540
Members
151,440
Latest member
VoodooFox22
Top