Trihan's lunatic notetag workshop (MV)

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,616
Reaction score
1,978
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,734
Reaction score
931
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
2,616
Reaction score
1,978
First Language
English
Primarily Uses
RMMV
Could do actually, good shout.
 

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,778
Reaction score
1,206
First Language
Portuguese - Br
Primarily Uses
RMMZ
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
3,192
Reaction score
1,189
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

Delirious Storyteller
Veteran
Joined
Oct 16, 2015
Messages
92
Reaction score
25
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
2,616
Reaction score
1,978
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
73
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
2,616
Reaction score
1,978
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
73
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

Delirious Storyteller
Veteran
Joined
Oct 16, 2015
Messages
92
Reaction score
25
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
2,616
Reaction score
1,978
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

Delirious Storyteller
Veteran
Joined
Oct 16, 2015
Messages
92
Reaction score
25
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
73
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
2,616
Reaction score
1,978
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

Delirious Storyteller
Veteran
Joined
Oct 16, 2015
Messages
92
Reaction score
25
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
2,616
Reaction score
1,978
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

Delirious Storyteller
Veteran
Joined
Oct 16, 2015
Messages
92
Reaction score
25
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
2,616
Reaction score
1,978
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

Delirious Storyteller
Veteran
Joined
Oct 16, 2015
Messages
92
Reaction score
25
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.
 

Latest Threads

Latest Posts

Latest Profile Posts

I find great satisfaction in smiting spambots. I'm not really sure why.
I finally added my newly updated demo back to the website! It only took like 4 weeks of work...
Where is the "world-weary sigh" comment response when you need it? I need that one more than anything, but the closest we have is "wow" or "angry".
My apologies if it's out-of-place for my goyim-lookin' ass to be the one to say it, but the mythology of "Golems" is that they were created by Rabbis to protect Jewish villages from Anti-semetic attacks.

Forum statistics

Threads
107,775
Messages
1,032,064
Members
139,918
Latest member
Sianar
Top