I have sorted my problem with the Cleric Stance. The problem was exactly as ATT_Turan suggested it could be, which was I had added the Add State trait as an effect as well.
How to implement every possible Yanfly Tips & Tricks effect in MZ with VisuStella plugins
RMMZ TutorialsDid you ever get around to the injury system?
You're going to have to remind me of what I hadn't gotten around to, I don't have anything in my memory banks for outstanding work in this thread. XD
I'm talking about this one: http://www.yanfly.moe/wiki/Death_Injuries_(MV_Plugin_Tips_&_Tricks)
Is that not already there?
How to implement every possible Yanfly Tips & Tricks effect in MZ with VisuStella plugins
Hi all. This is by far one of the biggest topics I've seen people asking about, to the point where I've been commissioned twice to make an MZ project containing all of the T&T effects. So I figured I'd make a topic about how to implement them all yourselves. If no other plugins are specified...
forums.rpgmakerweb.com
You might have missed it because it was quite small.
oh doh, it's because the injuries themselves are not there, thanks!
As requested all effects are now in spoiler tags so that they're easier to scroll through and find what you need.
I try to edit the code with my lack skill of JS but the code doesnt work
. I want to make an actor gain a bonus mat based on stockpile stacks as a passive and it doesnt consuming stockpile (and stockpile stack increased every 3 turns.can anyone help me to achieve it?
What code have you tried and what is it not doing?
This is the code 😅
Code:
<JS On Add State>
target._stockpile = target._stockpile || 0;
target._stockpile += 1;
target._stockpile = Math.min(target._stockpile, 3);
target.setStateDisplay(state.id, target._stockpile);
</JS On Add State>
<JS Pre-Damage As User>
if ($gameParty.inBattle()) {
const turns = user.turnCount();
let target._stockpile = Math.floor(turns / 3);
target._stockpile = target._stockpile.clamp(0, 3);
target.mat = 10 * target._stockpile;
}
</JS Pre-Damage As User>
<JS On Erase State>
target._stockpile = 0;
target.setStateDisplay(state.id, target._stockpile);
</JS On Erase State>
This is embarrassing, I just put my logic, and edit the code as I thought it will work 😅
Okay, so the issue is that you're trying to set .mat directly. That won't work, the property doesn't have an integer value you can modify.
What you would need to do is edit the param formula so that if the param ID is 4 (mat), it adds the user's _stockpile value to the result.
What you would need to do is edit the param formula so that if the param ID is 4 (mat), it adds the user's _stockpile value to the result.
Thanks for this. So, I was wondering, if I make a mana burn that hurts all 3 of the stats (HP, MP AND TP) would it look a bit like this?
JavaScript:
<Bypass Armor Scaling>
<Damage Formula>
// Calculate 10% of target's current MP.
let mp = Math.ceil(b.mp * 0.1);
let tp = Math.ceil(b.tp * 0.1);
// Calculate the cap: 20% of user's MaxMP.
const cap = Math.ceil(a.mmp * 0.2);
const cap = Math.ceil(a.100 * 0.2);
// Determine if the MP cap is to be used.
mp = Math.min(mp, cap);
// Target loses MP.
b.gainMp(-mp);
b.gainTp(-tp)
// Damage is equal to 50% of MP + TP damage dealt.
value = Math.ceil((mp + TP) * 0.50);
</Damage Formula>
This won't work. You can't declare a const twice, and even if you could you'd just be replacing the first one with the second because it uses the same identifier.
I see, no wonder it didn't work. Can you declare two different const values?
What do you need the second one for? You're not using it for anything.
Aside from the invalid syntax of declaring a variable with the same name twice (how would the computer know which one you're talking about later?), there's no such thing as
a.100. It's just 100. Y'know, when you're in a battle and your TP gauge can't fill up any more, it's at 100? 😛So unless you're using a plugin to modify that, 20% of any actor's max TP is always just the number 20.
Actually my problem is the same like HiddenAlchemist
I want stockpile can stack the parameter
I mean to do the same effect as manaburn but as a result of burning MP and TP together.
The "Jump" spell doesn't seem to work for me, my character stays stuck in the air and never falls...
(After 2 turns he can act again but does not come back)
And the target is affected by the jump state, that doesn't seem normal to me x)
(After 2 turns he can act again but does not come back)
And the target is affected by the jump state, that doesn't seem normal to me x)
Original thread: https://forums.rpgmakerweb.com/threads/how-to-implement-every-possible-yanfly-tips-tricks-effect-in-mz-with-visustella-plugins.143816/