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
● ARCHIVED · READ-ONLY
-
-
Did 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. XDDid you ever get around to the injury system?
-
I'm talking about this one: http://www.yanfly.moe/wiki/Death_Injuries_(MV_Plugin_Tips_&_Tricks)
-
Is that not already there?I'm talking about this one: http://www.yanfly.moe/wiki/Death_Injuries_(MV_Plugin_Tips_&_Tricks)
How to implement every possible Yanfly Tips & Tricks effect in MZ with VisuStella plugins
You might have missed it because it was quite small.
-
oh doh, it's because the injuries themselves are not there, thanks!You might have missed it because it was quite small.
-
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.Stockpile state:
JavaScript:<JS On Add State> // Default the stockpile stacks to 0. target._stockpile = target._stockpile || 0; // Increase the stockpile stack by 1 target._stockpile += 1; // Cap the stockpile stack at 3 target._stockpile = Math.min(target._stockpile, 3); // Update the state counter for the stockpile stack target.setStateDisplay(state.id, target._stockpile); </JS On Add State> <JS On Erase State> // Set the user's stockpile stack to 0 target._stockpile = 0; // Update the state counter for the stockpile stack target.setStateDisplay(state.id, target._stockpile); </JS On Erase State>
can anyone help me to achieve it? -
What code have you tried and what is it not doing?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? -
This is the code :kaoswt:What code have you tried and what is it not doing?
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 :rswt -
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. -
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?Just change the letter in all places in the formula. The only difference is there's no such thing as "mtp," it's just 100.
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.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> -
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.I see, no wonder it didn't work. Can you declare two different const values?
-
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 asconst cap = Math.ceil(a.100 * 0.2);
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? :stickytongue:
So unless you're using a plugin to modify that, 20% of any actor's max TP is always just the number 20. -
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.
Actually my problem is the same like HiddenAlchemist
I used your Stockpile code exactly as you have it. I tested this with an Attack Buff state set to * 200% and used it an enemy with 10 ATK, which Libra then shows it has grown to 20 ATK as expected. However, subsequent applications of the state keeps the ATK at 20 (should be 40) even though the state counter goes up.
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.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? :stickytongue:
So unless you're using a plugin to modify that, 20% of any actor's max TP is always just the number 20. -
Yes, and I'm telling you thatActually my problem is the same like HiddenAlchemist
I want stockpile can stack the parameter
target.mat = whatever
Won't do anything. -
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)