@waynee95 It does only happen with the addon. The HP gauge stayed even when it was at 0.
waynee95's Plugin Collection [NEWEST: WAY_MenuBackgrounds]
● ARCHIVED · READ-ONLY
-
-
Thanks for all this wonderful work Waynee! However, i came into this when using addon Way_YEP_SkillCore.
Am i doing wrong?
-
@XcodedX Download the WAY_Core plugin again, it should be fixed now.
-
Thanks Waynee!
-
Hey @waynee95 can CustomOnEquipEval run more than one line of code per note box?
For example I want to add +2 to variables A and B when the player equips a certain weapon.
I’ve been using the $gameVariables.setVaulue method.
It works for my first variable but not my second
Edit: Disregard I forgot to put a; between each variable -
Good morrow!WAY_CustomOnEquipEval
Run code when an actor equips or unequips an item.Download: https://raw.githubusercontent.com/waynee95/mv-plugins/master/dist/WAY_CustomOnEquipEval.js
By chance, does this also work with multiclass set ups? -
@Puppet Knight
I don't know. You might have to try it out to see if it works. -
Hey hey, quick question.
If I have Custom on Equip and on Remove Equip on both the old and new weapon. Will On Remove Equip for the old weapon run first and THEN on Equip for the New Weapon? -
@Puppet Knight OnRemove on the old item should run first.
-
Hello Wayne thanks for your work, i'm using "Custom face image eval" but it dindn't work
i put this code in actor note tag :
<Custom Face Image Eval>
if (user.hp / user.mhp <= 0) {
faceName = 'Male1_Face-Set';
faceIndex = 0
} else if (user.hp / user.mhp <= 0.5) {
faceName = 'Male1_blood';
faceIndex = 0;
} else if (user.hp / user.mhp <= 0.75) {
faceName = 'Male1_blood';
faceIndex = 1;
} else if (user.hp / user.mhp <= 1) {
faceName = 'Male1_blood';
faceIndex = 2;
}
</Custom Face Image Eval>
In ANY case the plugin take the second condition, with 100% life or less.. can you help me please ? -
There's an hpRate() method that will save you some typing here. So you'd do, for example,
Code:if (user.hpRate()<=.5)
Also, there's no reason to type out that last conditional (the <= 1) - that's the only remaining possibility, so you don't need to check it. You can just say "else"
Aside from that, the logic looks correct so can you please explain/reword what the problem is?
I'm not sure what this means.In ANY case the take me the second one with 100% life or less.. -
sorry i wrote very wrong.. i want say with this code, automatically takes me the second chance even with 100% hp, so please how can i wrote that ? i make a simple code for dind't make confusion :There's an hpRate() method that will save you some typing here. So you'd do, for example,
Code:if (user.hpRate()<=.5)
Also, there's no reason to type out that last conditional (the <= 1) - that's the only remaining possibility, so you don't need to check it. You can just say "else"
Aside from that, the logic looks correct so can you please explain/reword what the problem is?
I'm not sure what this means.
<Custom Face Image Eval>
if (user.hpRate()<=.5) {
faceName = 'Male1_blood';
faceIndex = 0;
} else {
faceName = 'Male1_Face-Set';
faceIndex = 0;
}
</Custom Face Image Eval>
whit this code the plugin when i have 100% hp it take the first option and the second when the hp are less -
@white90 Are you saying you only want two faces?
- Male1_blood, index 2 at 25% and less health
- Male1_blood, index 1 all the rest of the time?
If that's the case, why bother having all the other options? Just delete them.
If that's not what you mean, maybe type your problem and run it through Google Translate, see if that helps. -
No no : Male1_blood 0 at 75%, Male_blood 1 at 50% and Male_blood 2 at 25% - Male1_Face-Set 0 is normal face with 100% hp@white90 Are you saying you only want two faces?
- Male1_blood, index 2 at 25% and less health
- Male1_blood, index 1 all the rest of the time?
If that's the case, why bother having all the other options? Just delete them.
If that's not what you mean, maybe type your problem and run it through Google Translate, see if that helps.
I simplified the code to understand what happens in the plugin, making various tests to understand how it works -
Then you just have the wrong math. This is what you posted above:No no : Male1_blood 0 at 75%, Male_blood 1 at 50% and Male_blood 2 at 25%
Male1_blood 0 at 75%else if (user.hp / user.mhp <= 0.75) {
faceName = 'Male1_blood';
faceIndex = 1;
}
Male_blood 1 at 50%else if (user.hp / user.mhp <= 0.5) {
faceName = 'Male1_blood';
faceIndex = 0;
}
Male_blood 2 at 25%You have no condition for 25%
Do you see how none of those match? -
@ATT_Turan
Thrust me is not that the problem, check this :
<Custom Face Image Eval>
if (user.hp / user.mhp <= 0.25) {
faceName = 'Male1_blood';
faceIndex = 2
} else if (user.hp / user.mhp <= 0.5) {
faceName = 'Male1_blood';
faceIndex = 1;
} else if (user.hp / user.mhp <= 0.75) {
faceName = 'Male1_blood';
faceIndex = 0;
}
</Custom Face Image Eval>
the plugin take automaticaly the first options and dind't change -
@white90 I'm sorry, I don't know what to tell you.
JavaScript can't just "automatically take an option" if the condition isn't met. And waynee's plugin doesn't do any of this on its own - it just takes the code you type and feeds it into the engine as JavaScript.
Are you making sure you start a new game, not load a save, after putting the notetag in? And you're looking at the correct actor with the correct filenames?
Maybe someone else will have an idea, or waynee will come by for a visit...but he said in his first post he's no longer involved with RPG Maker.
Note that in this last post #176, there's an error in your logic - there's no "else" at the end. So if the actor has 76% health or more, the face won't change from what it was. -
@ATT_Turan beacuse the plugin istruction say :
Yes is every time a new game and all is set fine, if it was not so the plugin did not trigger the first optionIf any of those variables is not set, the default vaules will be used instead. -
Had this set up correctly at one point but for the life of me can't remember how anymore.
I have note tags set up on my actors such as:
<Ricochet: A_LucienSV_Ricochet>
to designate what SV Image that actor will use when equipping that sort of weapon.
I want to use the Custom on Equip Eval note tag to change the SV image of the equipping actor based on the note tag of my choosing.
I've tried
<Custom On Equip Eval> var svImage = a.meta.Ricochet; if (svImage) { a.setBattlerImage(svImage); a.refresh(); } </Custom On Equip Eval>
But its breaking no matter what I put, whether it be `a` `user`, or `actor`.
What am I doing wrong .
Disregard, sorted -
So I am a bit confused as to how the equip plugin works. I want my characters to have the thunder helm and thunder plate removed when the required thunder blade is no longer equipped, but am confused as to what I would put in the code part and whether I put that in the weapon notetag or the armors notetag. Any help is appreciated.