@ATT_Turan, @Robro33, thanks again for your help!
How to implement every possible Yanfly Tips & Tricks effect in MZ with VisuStella plugins
● ARCHIVED · READ-ONLY
-
-
I'm having a lot of trouble getting the Jump skill to work, basically the same issue as the previous user to post about it in this thread (i.e. the character jumps up in the air successfully, but after a couple of turns the Land skill doesn't go off and the character just returns to their normal state but is now invisible).
I've gone over the instructions multiple times and have definitely followed them correctly. I wondered if it was a conflict with another plugin (I'm using the STB battle system) but after some testing I don't think that's the case either. -
You would have to provide a link - the last three pages of this thread have no discussion of Jump :stickytongue:I'm having a lot of trouble getting the Jump skill to work, basically the same issue as the previous user to post about it in this thread
Please provide screenshots of all skills/states/notetags so we can verify that.I've gone over the instructions multiple times and have definitely followed them correctly.
I'm confused by this, because the same action sequence brings the user back onto the screen (the first one had them jump off) and restores their opacity.the character jumps up in the air successfully, but after a couple of turns the Land skill doesn't go off and the character just returns to their normal state but is now invisible
So are they invisible but you have reason to believe they're on the screen? That means the Land skill did go off, but the Opacity command didn't work correctly. -
Please provide screenshots of all skills/states/notetags so we can verify that.
Skills
States
Copypasted the notetags because getting screenshots was already a bit of a pain
Jump Skill<Cast Animation: 0>
<Cooldown: 5>
<Custom Action Sequence>
<JS Post-Apply>
$gameTroop.aliveMembers().forEach(member => member.addState(28));
</JS Post-Apply>
(the Cast Animation and Cooldown notetags aren't the issue, I've tested it)
Jump State<JS On Add State>
target._jumpTurns = 2;
</JS On Add State>
<JS Pre-Damage As Target>
target.clearResult();
</JS Pre-Damage As Target>
<JS Pre-Regenerate>
target._jumpTurns--;
if (target._jumpTurns <= 0) {
const skill = 11;
const target = -2;
user.forceAction(skill, target);
BattleManager.forceAction(user);
}
</JS Pre-Regenerate>
Jump Target Redirect State<JS Pre-Start Action>
if (this.isForOpponent() && this.isForOne()) {
const possibleTargets = user.opponentsUnit().members().filter(member => !member.isStateAffected(18));
const target = possibleTargets[Math.randomInt(possibleTargets.length)];
if (target) {
this._targetIndex = target.index();
} else {
this.setSkill(95);
}
}
</JS Pre-Start Action>
("95" is a completely empty skill, as per the instructions)
I'm confused by this, because the same action sequence brings the user back onto the screen (the first one had them jump off) and restores their opacity.
So are they invisible but you have reason to believe they're on the screen? That means the Land skill did go off, but the Opacity command didn't work correctly.
Yeah, my first thought was that opacity was the issue but that particular part of the Land sequence seems to be fine, so idk what's causing the issue. -
That doesn't really resolve my confusion.Yeah, my first thought was that opacity was the issue but that particular part of the Land sequence seems to be fine, so idk what's causing the issue.
Your first post said the Land skill doesn't go off. But then you said something about being invisible, so I asked if you had a way to know the actor had stopped floating off the screen but still had no opacity, which would mean the Land skill was going off, but incompletely.
So what exactly is happening? -
Basically:That doesn't really resolve my confusion.
Your first post said the Land skill doesn't go off. But then you said something about being invisible, so I asked if you had a way to know the actor had stopped floating off the screen but still had no opacity, which would mean the Land skill was going off, but incompletely.
So what exactly is happening?
The turn where the actor jumps goes off fine.
Two turns later, when the actor is supposed to land back down, the animation doesn't play and instead the now-invisible actor starts a normal turn.
Enemies can still target the actor but no damage popups appear, so the actor is likely still off-screen. -
Okay, perfect. It was the repeated reference to "invisible" that was confusing issues - it has nothing to do with the actor is invisible, it's that they're still entirely off the screen where they jumped to.Basically:
So you need to figure out whether the problem is inside the notetag or the force action.
Change your Jump state Pre-Regenerate notetag to this:
Code:<JS Pre-Regenerate> target._jumpTurns--; console.log("Pre-Regenerate, jumpTurns is ", target._jumpTurns); if (target._jumpTurns <= 0) { const skill = 277; const target = -2; console.log("Pre-Regenerate, forcing action"); user.forceAction(skill, target); BattleManager.forceAction(user); } </JS Pre-Regenerate>
replacing the skill ID as necessary.
Then, add to the top of the action sequence for Land a Show Text command - it can say whatever you want, you just want to know whether the action sequence is happening.
Do the skill, press F8 and go to the Console tab - take a screenshot of what it shows. -
Do the skill, press F8 and go to the Console tab - take a screenshot of what it shows.
OK, here's the screenshot taken after the Land sequence was supposed to activate:
screenshot
The text message at the start of the Land sequence didn't show up at all, and I also noticed while playtesting this time (didn't happen previously for some reason) that even when the Jump state is applied to the actor enemies can still target them - so, full confirmation that the sequence just isn't firing for whatever reason. -
@RobotPolarBear Um...you're running Yanfly plugins in there.
You can't be running plugins for two different engines that modify the same thing, one of them won't function.
Having Yanfly's Skill Core is going to break the notetags from the VisuStella Battle Core. And if you're running Yanfly's Buffs & States, that will break the VisuStella Skills & States notetags, which would explain why the jumpTurns property is never getting created on the target. (NaN means not a number)
You should either be using the Yanfly suite via FOSSIL and using the original version of Yanfly's Tips & Tricks, or using the VisuStella suite by itself. They're not designed to work with each other. -
Um...you're running Yanfly plugins in there.
The Yanfly plugins I'm using (which didn't include Buffs & States) aren't the issue; the problem with the Jump skill occurs even when they're all inactive. -
@RobotPolarBear On the first line of the Pre-Regenerate state, replace target with user.
-
@ATT_Turan So, uh, I finally managed to get it working and I'm quite embarrassed by what the problem was - turns out I forgot to put <Custom Action Sequence> in the Land Skill notes. Still, thank you so much for your help with this.
-
Happens to the best of us! Everything working how you expect?@ATT_Turan So, uh, I finally managed to get it working and I'm quite embarrassed by what the problem was - turns out I forgot to put <Custom Action Sequence> in the Land Skill notes. Still, thank you so much for your help with this.
-
I noticed an issue with the Negative Ions State where if the State killed an enemy they wouldn't collapse. It is a pretty simple fix by adding one line to check if they are dead and collapse them. Here is the amended code:
JavaScript:<JS Post-Damage As Target> const elements = this.elements(); const lightningId = 4; if (elements.contains(lightningId) && value > 0) { let damage = Math.ceil(value * 0.5); const group = target.friendsUnit().aliveMembers(); group.splice(group.indexOf(target), 1); const member = group[Math.randomInt(group.length)]; if (member) { target.removeState(state.id); damage = Math.ceil(damage * member.elementRate(lightningId)); $gameTemp.requestAnimation([member], 77); member.gainHp(-damage); member.startDamagePopup(); if (member.isDead()) member.performCollapse(); } } </JS Post-Damage As Target>
Z -
@Zael That's a good fix.
As a suggestion, it's often better to doif (member.hp <= 0)than to check isDead(), because HP hitting zero doesn't immediately apply the death state; that happens on the next battler refresh. -
Is there any way to turn word wrap off when skill is used and turn it back on after?Love to see this. I can now actually do a project i wanted to do in MZ now thanks to this.
Though in Libra, some of the text & Numbers in libra skill don't line up. (I'm trying to figure that one out currently.)
This is fantastic, Ty for all that.
Edit: Libra is likely a bit messy due to me changing the window & UI size to 1280 x 720 and that's why the text is out of place.
Edit edit: It's the auto message word wrap from Visu Message Core doing it.
Edit: never mind, I solved it. -
I'm trying to modify Healing Link to show an animation before the effect takes place. In the state's notebox I have
JavaScript:<JS Post-Damage As Target> if (value < 0) { $gameTemp.requestAnimation([origin], 345); const heal = Math.floor(value * 0.5); origin.gainHp(-heal); origin.startDamagePopup(); origin.clearResult(); } </JS Post-Damage As Target>
I added the $gameTemp.requestAnimation([origin], 345); everything else is exactly the same. It works in that the effect takes place and the animation also plays, but it shows after the healing numbers pop up instead of before. What would be a better way to do this? -
I'm trying to modify Healing Link to show an animation before the effect takes place. In the state's notebox I have
JavaScript:<JS Post-Damage As Target> if (value < 0) { $gameTemp.requestAnimation([origin], 345); const heal = Math.floor(value * 0.5); origin.gainHp(-heal); origin.startDamagePopup(); origin.clearResult(); } </JS Post-Damage As Target>
I added the $gameTemp.requestAnimation([origin], 345); everything else is exactly the same. It works in that the effect takes place and the animation also plays, but it shows after the healing numbers pop up instead of before. What would be a better way to do this?
Put the animation in "pre-damage as target" -
Put the animation in "pre-damage as target"
Same result: the healing takes place and then the animation occurs. -
Hmmmm cannot get Inject/Collect to work any ideas nothing pops in the Console either.
Code:<JS Pre-Apply> const category = 'Negative'; const states = target.states(); for (let i = 0; i < states.length; ++i) { const state = states[i]; if (state && state.categories.contains(category)) { user._collectedAilment = state.id; target.removeState(state.id); const text = '<CENTER>\\c[6]' + user.name() + '\\c[0] collects \\c[4]' + state.name + '\\c[0] ailment!'; const logWindow = SceneManager._scene._logWindow; logWindow._lines.push(text); break; } } </JS Pre-Apply>
My States in my game are just two Categories " Positive" and "Negative" doesn't seem to collect the ailment though.