Trihan's lunatic notetag workshop (MV)

Hi all!

I've noticed quite a few topics lately from people asking about how to achieve certain effects with Yanfly's plugins, usually involving custom effects and notetags, so I figured I would offer my services in a more centralised thread where anyone can drop in something they're trying to do and I'll see if I can come up with the effect that'll achieve it.

Doesn't necessarily have to be restricted to Yanfly plugins; if you're just struggling to come up with just the right line of code to get a value or property you need for an effect, I can help with that as well.
Are you also going to do a VX Ace version, perhaps?
I find there's not a lot of info about that.
Could do actually, good shout.
That is a nice thing to do. It will be really helpful for the community. Thanks and congratulations 😀
there was 1 for mirror effect to deal 2x dmg to the enemy, If I can find it, I can post a link to it,
here is the link to it that needed it

another nice suggestion is to create spoilers with the effectso they can each copy paste
Example per spoiler would be:

Spoiler: Name of effect
type notetag: item/skill, actor
type state: skill, passive etc

code here to copy paste into item, skill or actor notetag
Any idea on how to make a state that grants a parameter bonus based on another character's, as long as it is on the group?

e.g.: Markus and Paul are on the group. Paul has a passive state that grants (((Markus' Defense × 0.05)/100) × VariableValue) bonus on his defense when they fight together.

I'm working on a "Affinity System" between my character's, and this is the final step that needs to be implemented.
Any idea on how to make a state that grants a parameter bonus based on another character's, as long as it is on the group?

e.g.: Markus and Paul are on the group. Paul has a passive state that grants (((Markus' Defense × 0.05)/100) × VariableValue) bonus on his defense when they fight together.

I'm working on a "Affinity System" between my character's, and this is the final step that needs to be implemented.

Yep, you can absolutely do that. Does it need to detect which character's parameters to use, or will it just always use Markus'?
Is there a way to make the Guard state, or any state really, wear off as soon as the user's next turn begins?
I am using Yanflys Buffs&States Core. Probably super easy but yesterday I just gave up because I had no idea how to do it.

The vanilla options for when states wear off aren't able to do that either. Dx
Is there a way to make the Guard state, or any state really, wear off as soon as the user's next turn begins?
I am using Yanflys Buffs&States Core. Probably super easy but yesterday I just gave up because I had no idea how to do it.

The vanilla options for when states wear off aren't able to do that either. Dx

Doesn't it already? The way Guard is set up in the default system, it's applied when using the Guard command and is set to be removed on action end, so as soon as you choose your action on the turn after it's applied it wears off. Is that not what you're looking for?
Doesn't it already? The way Guard is set up in the default system, it's applied when using the Guard command and is set to be removed on action end, so as soon as you choose your action on the turn after it's applied it wears off. Is that not what you're looking for?
This is how it works, though from the players perspective this is just bad game design, because why would the guard state still be there on the users next turn and then wear off AFTER he uses something else?
I don't know if I'm too nitpicky with my own game, but it just makes me feel weird. The option to just not show the Guard state applied as a state (like it is vanilla) is weird too for me. qUq
I believe there's a notetag for the states that is triggered at the turn's end, I just don't know which one (might take a look as soon as I sit in front of my computer), but you could use this to make the state remove itself.
Code:
<Custom Turn End Effect>

target.removeState(2);

</Custom Turn End Effect>

That should work. (where 2 is the ID of the state you're adding the tag to)
Yep, you can absolutely do that. Does it need to detect which character's parameters to use, or will it just always use Markus'?
I believe that "Always Markus" will suffice for the system 🙂
I believe there's a notetag for the states that is triggered at the turn's end, I just don't know which one (might take a look as soon as I sit in front of my computer), but you could use this to make the state remove itself.
For the sake of "fine tuning" and making it feel right, it would need to be on the next turn's beginning, not the end.

But either way! Thanks for the quick help @Trihan !
Works as I want it to. 😀
For the sake of "fine tuning" and making it feel right, it would need to be on the next turn's beginning, not the end.

But either way! Thanks for the quick help @Trihan !
Works as I want it to. 😀

Unfortunately using a "Custom Turn Start Effect" doesn't work because it activates literally when the turn actually begins, which is *after* you've chosen your party actions for the turn. Custom Turn End is pretty much the only one that does what you're asking for (though you could theoretically add your own notetag that comes in between if you wanted to fine-tune it)

I believe that "Always Markus" will suffice for the system 🙂

Code:
<Custom Passive Condition>
if ($gameParty._actors.contains(id of Markus)) {
  condition = true;
else {
  condition = false;
}
</Custom Passive Condition>
<Custom Apply Effect>
target._paramPlus[3] += ((($gameActors.actor(id of Markus).param(3) * 0.05) / 100) * $gameVariables.value(id of variable));
</Custom Apply Effect>
<Custom Remove Effect>
target._paramPlus[3] -= ((($gameActors.actor(id of Markus).param(3) * 0.05) / 100) * $gameVariables.value(id of variable));
</Custom Remove Effect>

That will do what you're asking for, but are you sure you want to multiply by 0.05 and THEN divide by 100? Multiplying by 0.05 is already giving you 5% of his def, dividing by 100 makes it 0.05% which will barely scratch adding an integer to the stat.
Unfortunately using a "Custom Turn Start Effect" doesn't work because it activates literally when the turn actually begins, which is *after* you've chosen your party actions for the turn. Custom Turn End is pretty much the only one that does what you're asking for (though you could theoretically add your own notetag that comes in between if you wanted to fine-tune it)



Code:
<Custom Passive Condition>
if ($gameParty._actors.contains(id of Markus)) {
  condition = true;
else {
  condition = false;
}
</Custom Passive Condition>
<Custom Apply Effect>
target._paramPlus[3] += ((($gameActors.actor(id of Markus).param(3) * 0.05) / 100) * $gameVariables.value(id of variable));
</Custom Apply Effect>
<Custom Remove Effect>
target._paramPlus[3] -= ((($gameActors.actor(id of Markus).param(3) * 0.05) / 100) * $gameVariables.value(id of variable));
</Custom Remove Effect>

That will do what you're asking for, but are you sure you want to multiply by 0.05 and THEN divide by 100? Multiplying by 0.05 is already giving you 5% of his def, dividing by 100 makes it 0.05% which will barely scratch adding an integer to the stat.
Thanks A LOT for this, you are a life saver!

About the value, yes, I'm sure. The affinity variable goes from 0 to 100, and since Markus' defense (in this example) revolves around the 600s, 5% of his defense with 100 affinity results in a +30 bonus in Paul's Defense. Extrapolate this to every member of the party and you see that this system not only is mathematically relevant, but also robust.
Thanks A LOT for this, you are a life saver!

About the value, yes, I'm sure. The affinity variable goes from 0 to 100, and since Markus' defense (in this example) revolves around the 600s, 5% of his defense with 100 affinity results in a +30 bonus in Paul's Defense. Extrapolate this to every member of the party and you see that this system not only is mathematically relevant, but also robust.

Ah, fair. I wasn't factoring in the effect the variable would have. 🙂

One thing that may need tweaked: you might have to assign the value to target._markusAffinityBonus or something and use that in the += or -=, or you might end up removing more from the bonus than you added.
Ah, fair. I wasn't factoring in the effect the variable would have. 🙂

One thing that may need tweaked: you might have to assign the value to target._markusAffinityBonus or something and use that in the += or -=, or you might end up removing more from the bonus than you added.
Oh, I see, just in case the Affinity grows while that passive is in effect. In this case, the removing value could be bigger than the applying value, is that it?
Exactly, yeah. Having a think just now to see what the best way would be to keep that updated.
Assuming affinities are update only outside of battles, I don't think that would be an issue, but the parameter "provider" could have it's own parameters changed midfight, and THAT could be troublesome. I'm gonna make a few tests and keep the value attached into a handle variable.

Original thread: https://forums.rpgmakerweb.com/threads/trihans-lunatic-notetag-workshop-mv.123457/