MV Help with creating status effect through YEP_Buffs&StatsCore + AutoPassiveStats

After not finding any other way to achieve it, I have given in to using the two plug ins in the title to create buffs for when a play has a certain state + weapontype combination.

Setting up the condition inside of a states notetag is simple enough, but I struggle to figure out how create a variety off buff effects.

This is the +40% damage notetag from the Truthseeker tips&tricks

<Custom Confirm Effect>
if (this.isHpEffect() && value > 0) {
var bonus = Math.ceil(value * 0.40);
value += bonus;
}
</Custom Confirm Effect>

This works well enough for my swordmastery state, but for my daggermastery state I want to add attacktimes +1 and for my axemastery I want to increase the chance of causing bleed on attack by 30% while shield mastery should go as far as exchanging the guard skill with something more powerful.
Yeah, I have no idea how to set any of these up...

This is kind of why I am so reluctant to to use more popular plug ins. I sometimes want very specific things out of them that is nowhere explained how to do if it is even possible and if I try to do it with another one, they will break each other
This works well enough for my swordmastery state, but for my daggermastery... and for my axemastery...
then you can make separate states for each weapon type and either -
make them all passives on the actor/class/we with a condition that checks if they have the state active and have the corresponding weapon type equipped

or

you set the states as passives on all of the relevant weapons so that all axes give you axe master etc and then you just have the conditions for each passive state being you have that other state mentioned.

I sometimes want very specific things out of them that is nowhere explained how to do if it is even possible
then you refer to any available documentation you have and either do some trial and error or ask someone else about it as youve done if your trial and error is more error than trial. sometimes yanfly's plugins might not mention something they can do, but enough people use them that someone could chime in with an implementation.
I have no problem setting up the condition or getting a stat to work. I simply have no idea where to even look for the input make the state give the effects I want.

I really only need to know how to do this, if possible

<Custom Confirm Effect>
if (this.isHpEffect() && value > 0) {
[Attack amount +1]
}
</Custom Confirm Effect>

<Custom Confirm Effect>
if (this.isHpEffect() && value > 0) {
[Attack State (x) + 30%]
}
</Custom Confirm Effect>
then you can make separate states for each weapon type and either -
make them all passives on the actor/class/we with a condition that checks if they have the state active and have the corresponding weapon type equipped

or

you set the states as passives on all of the relevant weapons so that all axes give you axe master etc and then you just have the conditions for each passive state being you have that other state mentioned.


then you refer to any available documentation you have and either do some trial and error or ask someone else about it as youve done if your trial and error is more error than trial. sometimes yanfly's plugins might not mention something they can do, but enough people use them that someone could chime in with an implementation.
I really only need to know how to do this, if possible
As i said, theyd be different passive states entirely and youd be limiting which one is active based on what weapon the actor is using.
That way, youd just use the attack param trait and the attack times state traits on the individual states instead of making a single state that tries to conditionally do everything
They are meant to be different states, but actors can have the state independently from weaponry, thus I only want it active if the fitting weapon is equipped
As i said, theyd be different passive states entirely and youd be limiting which one is active based on what weapon the actor is using.
That way, youd just use the attack param trait and the attack times state traits on the individual states instead of making a single state that tries to conditionally do everything
Okay, from what I understand, you need to know how to do the following:

1. A state that adds an additional attack
2. A state that adds a 30% bleed chance to attacks
3. A state the replaces the Guard skill with a stronger skill

Is that correct?

And you're using Yanfly's plugins, because these states should only be active if the character both has the state and also has the right type of weapon equipped (like in the Truthseeker Tips & Tricks).

For 1, you don't need to use a custom confirm effect - just use the trait box in the state to add the trait Attack Times +1. Then have the <Custom Passive Condition> in the note box check for the right weapon being equipped, like in the tips & tricks.

Same for 2, just use the the trait box to add Attack State Bleed + 30%. (Make sure your attack skill has an Add State Normal Attack 100% so that it is able to inherit the additional traits from your states).

For 3, the easiest way is probably to also use Yanfly's Weapon Unleash plugin. Then you could give the State a Custom Replace Guard, like this:

Code:
 <Custom Replace Guard>
if ($gameParty.inBattle()) {
  // Check if the user is an actor.
  if (user.isActor()) {
    // Get the sword weapon-type ID
    var swordTypeId = 2;
    // get the user's currently equipped weapons.
    var weapons = user.weapons();
    // Loop through each weapon
    for (var i = 0; i < weapons.length; ++i) {
      // Get the currently looped weapon
      var weapon = weapons[i];
      // Check if the weapon exists and if the weapon's type is a sword
      if (weapon && weapon.wtypeId === swordTypeId) {
        id = 50;
      }
    }
  }
} else {
    id = 0;
  }
  </Custom Replace Guard>

Where 50 is the id of what you want to change the skill to. (And change all that sword stuff and the sword type ID to the shield version!)
Well, I just did some texting and it seems the condition part does not even work...
Using the Truthseeker example:
<Custom Passive Condition>
// Set the default condition to false.
condition = false;
// Check if the party is in battle.
if ($gameParty.inBattle()) {
// Check if the user is an actor.
if (user.isActor()) {
// Get the sword weapon-type ID
var swordTypeId = 2;
// get the user's currently equipped weapons.
var weapons = user.weapons();
// Loop through each weapon
for (var i = 0; i < weapons.length; ++i) {
// Get the currently looped weapon
var weapon = weapons[i];
// Check if the weapon exists and if the weapon's type is a sword
if (weapon && weapon.wtypeId === swordTypeId) {
// Set the condition to true
condition = true;
}
}
}
}
</Custom Passive Condition>

<Custom Confirm Effect>
// Check if the action dealt HP damage
if (this.isHpEffect() && value > 0) {
// Calculate the amount of bonus damage dealt
var bonus = Math.ceil(value * 0.40);
// Add that to the finalized damage
value += bonus;
}
</Custom Confirm Effect>

My character gets the bonus damange regardless of if a sword is a equipped or not...
Okay, from what I understand, you need to know how to do the following:

1. A state that adds an additional attack
2. A state that adds a 30% bleed chance to attacks
3. A state the replaces the Guard skill with a stronger skill

Is that correct?

And you're using Yanfly's plugins, because these states should only be active if the character both has the state and also has the right type of weapon equipped (like in the Truthseeker Tips & Tricks).

For 1, you don't need to use a custom confirm effect - just use the trait box in the state to add the trait Attack Times +1. Then have the <Custom Passive Condition> in the note box check for the right weapon being equipped, like in the tips & tricks.

Same for 2, just use the the trait box to add Attack State Bleed + 30%. (Make sure your attack skill has an Add State Normal Attack 100% so that it is able to inherit the additional traits from your states).

For 3, the easiest way is probably to also use Yanfly's Weapon Unleash plugin. Then you could give the State a Custom Replace Guard, like this:

Code:
 <Custom Replace Guard>
if ($gameParty.inBattle()) {
  // Check if the user is an actor.
  if (user.isActor()) {
    // Get the sword weapon-type ID
    var swordTypeId = 2;
    // get the user's currently equipped weapons.
    var weapons = user.weapons();
    // Loop through each weapon
    for (var i = 0; i < weapons.length; ++i) {
      // Get the currently looped weapon
      var weapon = weapons[i];
      // Check if the weapon exists and if the weapon's type is a sword
      if (weapon && weapon.wtypeId === swordTypeId) {
        id = 50;
      }
    }
  }
} else {
    id = 0;
  }
  </Custom Replace Guard>

Where 50 is the id of what you want to change the skill to. (And change all that sword stuff and the sword type ID to the shield version!)
Well, I just did some texting and it seems the condition part does not even work...

My character gets the bonus damange regardless of if a sword is a equipped or not...

Hm, that's interesting. How about if you just set the condition to always false, to test it? So,

Code:
<Custom Passive Condition>
condition = false;
</Custom Passive Condition>
Same result
Hm, that's interesting. How about if you just set the condition to always false, to test it? So,

Code:
<Custom Passive Condition>
condition = false;
</Custom Passive Condition>
Same result
Its worth noting, i assumed you were using yanfly's passive plugin from the start from:
Setting up the condition inside of a states notetag is simple enough, but I struggle to figure out how create a variety off buff effects.

But if you arent then none of these passive ideas would work.

Besides the shield effect and yanfly's weapon unleash, i dont know of an easy way to have the states be active but only take effect off of some condition other than by making them passives or by not making the player able to give actors that state if they dont have the right gear equipped in the first place. Someone else may have a bettter idea
Its worth noting, i assumed you were using yanfly's passive plugin from the start from:


But if you arent then none of these passive ideas would work.

Besides the shield effect and yanfly's weapon unleash, i dont know of an easy way to have the states be active but only take effect off of some condition other than by making them passives or by not making the player able to give actors that state if they dont have the right gear equipped in the first place. Someone else may have a bettter idea
I am trying to use YEP_AutoPassiveStates and YEP_BuffsStatsCore

The idea is that actors can obtain certain states and if they have the fitting weaponType (or shield) equipped, they get a specific buff

I used the Tips & Tricks about Truthseeker as an example and tried using the exact notetag from it for my state related to sword usage. However, if the state is applied, the 40% damage increase will be there regardless of what weapon or even if no weapon is equipped.
clarification is needed then. are these passive states yore making or are these regular states?

Setting up the condition inside of a states notetag is simple enough
However, if the state is applied, the 40% damage increase will be there regardless of what weapon or even if no weapon is equipped
because if you are making passives, you would have been able to just use
Code:
<Custom Passive Condition>
condition = user.isWtypeEquipped(x);
</Custom Passive Condition>
(or any condition really) to restrict the effect to only being active when the condition is true, the case above being when the actor has a weapon of wtype x equipped.

when a state is a passive, it only counts as being a passive if its on the battler through any variation of the <passive state: x> tag. if youre applying it to a battler through an add state effect then it wont be a passive and the conditions will be ignored

please show screenshots of the state and either the actor, class, equipment, or skill youve put the <passive state: x> notetag into just to make sure its set up correctly
Oh, now I see. So the plug ins are straight up useless for me then!
I need the state to be applied directly by an event or my entire system does not work.
Meaning I cannot have a weapon, armor, skill or class cause the application of the skill!

What is the point of adding a "if sword equipped" condition to a sword?
Creating an actor for every combination of these is far too much!
Tying them to a skill is pointless as you don't need a plug-in to pull that off! (Add Skill to weapon/armor, force skill use in turn 0 to add state, have state be removed by end of battle)

Guess I have to search for a plug in that is actually useful for what I want to do...


Thanks for explaining to me how these plug-ins actually work^^
clarification is needed then. are these passive states yore making or are these regular states?



because if you are making passives, you would have been able to just use
Code:
<Custom Passive Condition>
condition = user.isWtypeEquipped(x);
</Custom Passive Condition>
(or any condition really) to restrict the effect to only being active when the condition is true, the case above being when the actor has a weapon of wtype x equipped.

when a state is a passive, it only counts as being a passive if its on the battler through any variation of the <passive state: x> tag. if youre applying it to a battler through an add state effect then it wont be a passive and the conditions will be ignored

please show screenshots of the state and either the actor, class, equipment, or skill youve put the <passive state: x> notetag into just to make sure its set up correctly
Oh, now I see. So the plug ins are straight up useless for me then!
I need the state to be applied directly by an event or my entire system does not work.
Meaning I cannot have a weapon, armor, skill or class cause the application of the skill!
not necessarily. its a little convoluted, but it goes back to what i said earlier.

then you can make separate states for each weapon type and either -
make them all passives on the actor/class/we with a condition that checks if they have the state active and have the corresponding weapon type equipped

or

you set the states as passives on all of the relevant weapons so that all axes give you axe master etc and then you just have the conditions for each passive state being you have that other state mentioned.

i could have been more specific about it, but what i was getting at was that you could make each of these effects a hidden passive (i.e. Truthseeker-passive), and then use a separate non-passive state to activate them (Truthseeker-active). so you'd either -

- give Truthseeker-passive to all your actors and then make the state have a condition that the actor must have a sword and the Truthseeker-active state.
- or give each sword the Truthseeker-passive state and make the condition be that the wielder has Truthseeker-active

and youd repeat for every weapon type.
Now the passive only takes effect when whatever system you have grants the active version of the state and when the actor has a particular weapon type.
I see, so passive states an entirely separate from regular states! I thought it would change an existing state into a passive state!

Wait, then how does the Truthseeker state in the Trips&Tricks even work? There is no set up shown for the passive, it is just a condition and effect put into a state. The entire set up in the video is just that and it is shown to work! No notetags on weapons , armor, actors or skills involved!

It literally has this on the site for the truthseeker thing

Instructions​


Follow video instructions.

You can grab the copy/paste code here:

Insert the following Lunatic Mode code into your passive state’s notebox. Change the values to reflect your game’s settings.


<Custom Passive Condition>
// Set the default condition to false.
condition = false;
// Check if the party is in battle.
if ($gameParty.inBattle()) {
// Check if the user is an actor.
if (user.isActor()) {
// Get the sword weapon-type ID
var swordTypeId = 2;
// get the user's currently equipped weapons.
var weapons = user.weapons();
// Loop through each weapon
for (var i = 0; i < weapons.length; ++i) {
// Get the currently looped weapon
var weapon = weapons[i];
// Check if the weapon exists and if the weapon's type is a sword
if (weapon && weapon.wtypeId === swordTypeId) {
// Set the condition to true
condition = true;
}
}
}
}
</Custom Passive Condition>

<Custom Confirm Effect>
// Check if the action dealt HP damage
if (this.isHpEffect() && value > 0) {
// Calculate the amount of bonus damage dealt
var bonus = Math.ceil(value * 0.40);
// Add that to the finalized damage
value += bonus;
}
</Custom Confirm Effect>


Enjoy!

And the video does not offer any further instructions either... I don't get it...


Anyway, how would I set up the passive state in a sword's notetag for state (in this case) 12 being on the actor? Thanks in advance^^

not necessarily. its a little convoluted, but it goes back to what i said earlier.



i could have been more specific about it, but what i was getting at was that you could make each of these effects a hidden passive (i.e. Truthseeker-passive), and then use a separate non-passive state to activate them (Truthseeker-active). so you'd either -

- give Truthseeker-passive to all your actors and then make the state have a condition that the actor must have a sword and the Truthseeker-active state.
- or give each sword the Truthseeker-passive state and make the condition be that the wielder has Truthseeker-active

and youd repeat for every weapon type.
Now the passive only takes effect when whatever system you have grants the active version of the state and when the actor has a particular weapon type.
Wait, then how does the Truthseeker state in the Trips&Tricks even work? There is no set up shown for the passive, it is just a condition and effect put into a state. The entire set up in the video is just that and it is shown to work! No notetags on weapons , armor, actors or skills involved!
if you only did what yanfly had explicitly shown, then the state wouldnt be on the battler at all. if you noticed, he didnt apply the state to the battler either. no troop event, no skill, or anything of the sort. all he had shown was how to set up the state itself. just setting up a state doesnt suddenly put it on battlers.

I see, so passive states an entirely separate from regular states! I thought it would change an existing state into a passive state!
a passive state is still just a state and can be applied normally, which would make it not a passive in that instance. the presence of passive state tags within a state isnt what makes it a passive state. its what the <passive state: x> tags on actors, weapons, etc. does that makes it a passive. the passive condition tag doesnt do anything if the state is not on the battler as a passive and the confirm your effect would just run.

Anyway, how would I set up the passive state in a sword's notetag for state (in this case) 12 being on the actor? Thanks in advance^^
the same way both i and the passive state plugin described
<passive state: x> in the notebox of the sword, replace the x for the id of the state.

by technicality, truthseeker doesnt need to have a <custom passive condition> at all since its effect is entirely in the confirm effect and you could use JS right there to check if it should cause increased damage. but since state traits are always active when the battler has the state, you will have to use conditions for the axe and dagger master states.
if you only did what yanfly had explicitly shown, then the state wouldnt be on the battler at all. if you noticed, he didnt apply the state to the battler either. no troop event, no skill, or anything of the sort. all he had shown was how to set up the state itself. just setting up a state doesnt suddenly put it on battlers.
So the tutorial is just kinda false?

Anyway. so the notetag for a sword would then look something like:

<passive state: 12>

<Custom Confirm Effect>
if (this.isHpEffect() && value > 0) {
var bonus = Math.ceil(value * 0.40);
value += bonus;
}
</Custom Confirm Effect>

and then if that weapon is equipped and the state is applied it should give a 40% damage boost?
So the tutorial is just kinda false?
i wouldnt say that. that is how you'd set up that state, and the page just shows you how to make the effect. the page also says that it makes use of the buffs and states core and the passive plugin. Yanfly probably made the assumption that the reader either knows or will read up on the basic functionality of both of those plugins (or forgot, but the passive plugin does say a passive isnt a passive without the tag and you dont see him applying the state to the battler).

Anyway. so the notetag for a sword would then look something like:
...
and then if that weapon is equipped and the state is applied it should give a 40% damage boost?
all the weapon needs is <passive state: 12>. the confirm effect goes into the state that you gave the weapon alongside the condition.
all the weapon needs is <passive state: 12>. the confirm effect goes into the state that you gave the weapon alongside the condition.
So for my case of needing the State on the character, I'd have to create another State as the passive state and then ass into that passive state the effect and the condition of requiring the original state?

Like say, I put <passive state: 20> into the weapon notetag and then in the notetag of state 20, I put the condition of state 12 being applied?

Also, can I used the normal Traits box instead of adding the effect into the notetag of state 20?
So for my case of needing the State on the character, I'd have to create another State as the passive state and then ass into that passive state the effect and the condition of requiring the original state?

Like say, I put <passive state: 20> into the weapon notetag and then in the notetag of state 20, I put the condition of state 12 being applied?
yes. now that the weapon has <passive state: 20> in it, you go over to state 20 and make its passive requirement that the user has state 12. state 12 wont have anything in it except for a duration and an icon if you want, but it only exists to help restrict the passive. the confirm effect stays in state 20 so that it can be "turned off" by either not having the active buff or the weapon equipped

Also, can I used the normal Traits box instead of adding the effect into the notetag of state 20?
what do you mean by this?

you cant make the initial version of the effect with just traits. for your other effects like the atk + 30% and the attack times + 1 youll have to use the traits, but directly increasing damage by 40% requires the confirm effect.

Original thread: https://forums.rpgmakerweb.com/threads/help-with-creating-status-effect-through-yep_buffs-statscore-autopassivestats.176741/