States' Auto Trigger

Yes. Simply add this condition (via && key):  $gameTroop.turnCount() >= 2
Thank you Lecode, thank you so much. I'm getting a hang of these 😀
Yes. Simply add this condition (via && key):  $gameTroop.turnCount() >= 2

You're not using the right tag. Please see the in-game help interface and make you are using the last version.

@GutshotStr8: It's because my plugin is updated in the refresh() function of Game_Battler.

If you want to force that refresh, try to add +1 HP via an event command (and -1HP after) to concerned battlers.

It should work. But you give me an idea. I'll create a way to control the occasions to update the plugin.

Thanks, that would be great and I imagine would help a lot of users! In the meantime, do you know if there's a script call that would refresh all battlers? I'm thinking that would be a more elegant solution than adding HP, though I appreciate the suggestion. I'm really loving the stuff you do with your plugins, keep up the good work!
@GuthotStr8: Sorry for the delay, I did not have much time.
If you want to refresh a particular actor:

$gameActors.actor(ID).refresh();Or a particular enemy:

$gameTroop.members()[INDEX].refresh();Then, if you want to refresh all actors:

$gameParty.members().forEach(function(member) { member.refresh();});And all enemies:

Code:
$gameTroop.members().forEach(function(member) {    member.refresh();});
Brilliant, thank you! Nothing to apologize for, I really appreciate your taking the time to help me (and to write the script in the first place!).
New version:

# - 1.3 : New tag: <remove_auto_states># : New tag: <auto_remove># : New tag: <auto_trigger_occasion># : Bugfix: Remaining auto states applied via an equipment# are still checkedMake sure to update also LeUtilities.
So I'm trying to use this plugin, but it will not work.

I turned off all plugins except this and the Utilities plugin.

The notetag setup in my Actor box:

<auto_states:193>

<auto_trigger>

a.hpRate() <= 0.5

</auto_trigger>

His HP is way below half, and nothing happens.
<auto_trigger>a.hpRate() <= 0.5</auto_trigger>This tag should be in the state ID 193 box.

It's explained in the help.
Ahhh. Alright.

Two more questions then:

1) Can you put multiple triggers in the <auto_trigger> tag? I ultimately want 3 conditions: low HP, high TP, and a switch to be on.

2) Is there a way to make the state only be on during battle?
1) Can you put multiple triggers in the <auto_trigger> tag? I ultimately want 3 conditions: low HP, high TP, and a switch to be on.
Yup, you can use multiple conditions. Each condition should be separated by "&&".

Example:

<auto_trigger>a.hpRate() <= 0.5 && a.tpRate() >= 0.7 && s[2] === true</auto_trigger>
2) Is there a way to make the state only be on during battle?
Simply add the condition $gameParty.inBattle().

<auto_trigger>a.hpRate() <= 0.5 && a.tpRate() >= 0.7 && s[2] === true && $gameParty.inBattle()</auto_trigger>For example 🙂
Works like a charm!! Thanks!
I set up a state with the following notetags:

<auto_trigger>

a.tp == 0

</auto_trigger>

<auto_remove>

a.tp >= 0

</auto_remove>

And in the effects tab I have it set so that the player learns a skill.

I'm basically trying to set it up so that, when the player's tp is at 0, they can use the skill and see it in their skills menu. However, once they have more tp than that, they can no longer a) see the skill in their skill menu or 😎 use the skill.

I set up an actor so that they can use the skill type (Special), but I left out the skill itself. However, when the actor is at 0 tp, they still don't have access to the skill.

Is there a way I can set it up so that the actor learns the skill while the state is applied to them, but once it's not applied they no longer have that skill?

Thank you for your time.
@GameFire,

I can't promise this is the only issue, but it seems like the remove condition should be a.tp>0, not >= as you have now.
I guess that wasn't the only problem. Still isn't working.

Hm, what else could I be doing wrong?
I want to use this plugin to add a Water Resist state at turn start when a specific character has chosen a water skill in battles. Do the notetags allow for that?
I set up a state with the following notetags:

<auto_trigger>

a.tp == 0

</auto_trigger>

<auto_remove>

a.tp >= 0

</auto_remove>

And in the effects tab I have it set so that the player learns a skill.

I'm basically trying to set it up so that, when the player's tp is at 0, they can use the skill and see it in their skills menu. However, once they have more tp than that, they can no longer a) see the skill in their skill menu or 😎 use the skill.

I set up an actor so that they can use the skill type (Special), but I left out the skill itself. However, when the actor is at 0 tp, they still don't have access to the skill.

Is there a way I can set it up so that the actor learns the skill while the state is applied to them, but once it's not applied they no longer have that skill?

Thank you for your time.
As GutShotStr8 said, replace >= with >.

I tested and it's working 🙂

Have you put <auto_states:ID> in the actor notebox ?

I want to use this plugin to add a Water Resist state at turn start when a specific character has chosen a water skill in battles. Do the notetags allow for that?
Not easily. But you can do that without losing your mind with my Side Effect Control plugin. (See plugins in development)

EDIT: You can also do it with a common event.
Have you put <auto_states:ID> in the actor notebox ?
I had not. Once I did it was working perfectly! 😀

(I was worried it wouldn't since I'm using Quasi's ABS, but yay it worked!)

Thank you so much!
Hello, is this plug-in compatible with Qabs?

Original thread: https://forums.rpgmakerweb.com/threads/states-auto-trigger.49753/