Trihan's lunatic notetag workshop (MV)

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
1,869
Reaction score
1,219
First Language
English
Primarily Uses
RMMV
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.
 

BCj

Veteran
Veteran
Joined
Jun 19, 2014
Messages
1,704
Reaction score
904
First Language
Dutch
Primarily Uses
N/A
Are you also going to do a VX Ace version, perhaps?
I find there's not a lot of info about that.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
1,869
Reaction score
1,219
First Language
English
Primarily Uses
RMMV
Could do actually, good shout.
 

Eliaquim

Raze: The Rakuen Zero's Guardian!
Veteran
Joined
May 22, 2018
Messages
1,375
Reaction score
623
First Language
Portuguese - Br
Primarily Uses
RMMV
That is a nice thing to do. It will be really helpful for the community. Thanks and congratulations :D
 

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
1,954
Reaction score
647
First Language
Dutch
Primarily Uses
RMMV
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:

type notetag: item/skill, actor
type state: skill, passive etc

code here to copy paste into item, skill or actor notetag
 

PauloHPBender

Veteran
Veteran
Joined
Oct 16, 2015
Messages
46
Reaction score
8
First Language
Portuguese
Primarily Uses
N/A
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.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
1,869
Reaction score
1,219
First Language
English
Primarily Uses
RMMV
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'?
 

Yegitu

artistic goofball
Veteran
Joined
May 7, 2020
Messages
43
Reaction score
71
First Language
German
Primarily Uses
RMMV
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
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
1,869
Reaction score
1,219
First Language
English
Primarily Uses
RMMV
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?
 

Yegitu

artistic goofball
Veteran
Joined
May 7, 2020
Messages
43
Reaction score
71
First Language
German
Primarily Uses
RMMV
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
 

PauloHPBender

Veteran
Veteran
Joined
Oct 16, 2015
Messages
46
Reaction score
8
First Language
Portuguese
Primarily Uses
N/A
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.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
1,869
Reaction score
1,219
First Language
English
Primarily Uses
RMMV
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)
 

PauloHPBender

Veteran
Veteran
Joined
Oct 16, 2015
Messages
46
Reaction score
8
First Language
Portuguese
Primarily Uses
N/A
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 :)
 

Yegitu

artistic goofball
Veteran
Joined
May 7, 2020
Messages
43
Reaction score
71
First Language
German
Primarily Uses
RMMV
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. :D
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
1,869
Reaction score
1,219
First Language
English
Primarily Uses
RMMV
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. :D
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.
 

PauloHPBender

Veteran
Veteran
Joined
Oct 16, 2015
Messages
46
Reaction score
8
First Language
Portuguese
Primarily Uses
N/A
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.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
1,869
Reaction score
1,219
First Language
English
Primarily Uses
RMMV
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.
 

PauloHPBender

Veteran
Veteran
Joined
Oct 16, 2015
Messages
46
Reaction score
8
First Language
Portuguese
Primarily Uses
N/A
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?
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
1,869
Reaction score
1,219
First Language
English
Primarily Uses
RMMV
Exactly, yeah. Having a think just now to see what the best way would be to keep that updated.
 

PauloHPBender

Veteran
Veteran
Joined
Oct 16, 2015
Messages
46
Reaction score
8
First Language
Portuguese
Primarily Uses
N/A
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.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Automatic level scaling without an option to turn it off can be a very bad choice for a game. The worst I've ever seen was in Nightmare of Druaga, where if a power outage made your system turn off, the game detects it as an attempted cheat and overwrites your save while taking away your best gear, leaving you unable to progress at the late stages of the game, and unable to recover.
Problem with sequels: Heroes getting rid of all their items and forgets all of their skills within the span of a year without explanation. :kaomad3:
I can see the end of my prologue. Perfect time to decide to pull everything over into MZ, right? Right?!
Excited to be nearing the end of setting up my own custom Point-And-Click system template! Just need to iron out some kinks, get an input text system going, add animations to buttons, and then finalize my button-mashing event system and it'll be complete >:3c
AlcTheHero wrote on Mystic_Enigma's profile.
hi.

Forum statistics

Threads
99,643
Messages
967,616
Members
131,312
Latest member
jacob_rev
Top