LynX

Veteran
Veteran
Joined
Jan 6, 2014
Messages
83
Reaction score
8
First Language
Polish
Primarily Uses
Lecode is the common event will trigger every turn :p ? Can you se this up to use common event once every activation?

and is there a way to do only auto remove state option?
 
Last edited by a moderator:

Lecode

(─‿‿─)
Veteran
Joined
Dec 18, 2013
Messages
490
Reaction score
674
First Language
French
Primarily Uses
N/A
Lecode is the common event will trigger every turn :p ? Can you se this up to use common event once every activation?
It's supposed to trigger the common event every activation only.  :)

and is there a way to do only auto remove state option?
I don't understand.
 

LynX

Veteran
Veteran
Joined
Jan 6, 2014
Messages
83
Reaction score
8
First Language
Polish
Primarily Uses
ah ok.

I mean is there a way to auto_remove state, without auto_gain xD that state. I mean you got state by using skill, but this state drains MP if your mp is 0 then auto_remove will remove your state :)
 

Lecode

(─‿‿─)
Veteran
Joined
Dec 18, 2013
Messages
490
Reaction score
674
First Language
French
Primarily Uses
N/A
Ho, I see. It's a nice idea. Added to the todo list. :p

Perhaps I'll do a separate plugin for that feature, though.
 

LynX

Veteran
Veteran
Joined
Jan 6, 2014
Messages
83
Reaction score
8
First Language
Polish
Primarily Uses
It's great man :) keep the good work but as I writed earlier, the common event trigger every turn xD (even when the state is already On my actor)

maybe my code is wrong:

<auto_trigger_common:2,true>

<auto_trigger>

a.hpRate() <= 0.3

</auto_trigger>

<auto_trigger_remove>
 
Last edited by a moderator:

Lecode

(─‿‿─)
Veteran
Joined
Dec 18, 2013
Messages
490
Reaction score
674
First Language
French
Primarily Uses
N/A
I just tested and the common event isn't triggered every turn.

Your code is okay, so perhaps something's wrong in the script or there is a compatibility issue.

Are you using some plugins that affect states ?

But, If the hpRate of your battler changes from a lower value than 0.3 to a higher value and vice-versa
every turn, it's normal. ( In this case the state is activated every turn, as for the common event )
 
Last edited by a moderator:

LynX

Veteran
Veteran
Joined
Jan 6, 2014
Messages
83
Reaction score
8
First Language
Polish
Primarily Uses
Yup I when I was copying plugins I put Yur untilities above xD now it's working very good :D !

ah...

I just found

when you use GUARD command the common event repeats.
 
Last edited by a moderator:

PlatypusOfDoom

Villager
Member
Joined
Aug 24, 2012
Messages
24
Reaction score
5
Hey there, awesome plugin!

I noticed something odd when I was using <auto_states:ID> on a piece of armor. When the armor is equipped, the auto states are added and removed correctly. However, the auto state is still on the actor when I remove the armor, then the state will stay applied to them, and will even ignore the normal removal conditions in the notetags. Am I doing something wrong?

Right now I have this on the armor:

<auto_states:48>and this on the state that it applies (state 48):

<auto_trigger>a.hpRate() == 1</auto_trigger><auto_trigger_remove>On a related note, would there be any way to limit the states to only be added during combat? I think having the state conditions be "in-combat-only" would solve my above issue. As of now they are added as soon as the character equips the item out of combat, allowing me to instantly remove the armor but keep the state applied. 

Thanks!
 

Lecode

(─‿‿─)
Veteran
Joined
Dec 18, 2013
Messages
490
Reaction score
674
First Language
French
Primarily Uses
N/A
Updated:

# - 1.2 : Fix of a bug that prevent the code to read multiple# lines in the <auto_trigger> tag 
@Platypus: No, you're not doing something wrong. I didn't thought about that case of figure.
 

On a related note, would there be any way to limit the states to only be added during combat?
Yea, it's a good idea. But for now you can try to add this condition::

LeUtilities.isScene("Scene_Battle")So you'll get:

<auto_trigger>LeUtilities.isScene("Scene_Battle")&& a.hpRate() == 1</auto_trigger>But you'll need to take the latest version before.
 

when you use GUARD command the common event repeats.
I don't notice this issue.
 

LynX

Veteran
Veteran
Joined
Jan 6, 2014
Messages
83
Reaction score
8
First Language
Polish
Primarily Uses
Lecode check this out, my common event make flash of the screen and sound of thunder.

here is the Guard bug
 
Last edited by a moderator:

junglechief

Veteran
Veteran
Joined
Nov 9, 2015
Messages
46
Reaction score
3
First Language
English
I ran into a bug, where I called a common event and my game locks up. It only happens if it triggers during an in battle event. For instance, I have a battle where there is some dialogue and then I force the player to use a move. The move plays and the state triggers, but then the battle freezes before hitting the common event. I have done a lot of trouble shooting. I know it is the common event take from auto states that is causing the lock up. I tried removing the tag and battle progressed fine, I tried changing the common event and it still locked. This command works fine during normal battle just not when being trigged from an in battle event, such as after some dialog or from a forced action.

Actually scrap part of what I said, the bug only occurs when triggers from a battle action that was forced. In this instance I use the force battle action script command in the troop menu and force a battle to use a move that triggers a state. Then the game locks on the common event trigger from auto state. 

Another edit, sorry. I tried forcing the state via other means in the troop scripting window. It appears to only be the force action command causing the issue.
 
Last edited by a moderator:

Lecode

(─‿‿─)
Veteran
Joined
Dec 18, 2013
Messages
490
Reaction score
674
First Language
French
Primarily Uses
N/A
Another edit, sorry. I tried forcing the state via other means in the troop scripting window. It appears to only be the force action command causing the issue.
Thanks. I don't have so much time now but i'll look what's wrong asap.
 

junglechief

Veteran
Veteran
Joined
Nov 9, 2015
Messages
46
Reaction score
3
First Language
English
Thanks. I don't have so much time now but i'll look what's wrong asap.
I don't know if you have Yanfly's atb plugin but it appears to be a reaction between autostates and atb. I tried disabling atb and it worked. Yanfly did have a bug where forced action would lock battle in an early version of atb but that was fixed and it doesn't lock so long as autostates doesn't trigger a common event with a forced action. So it's a bit particular. The factors are: have yanfly atb and auto states running, trigger an autostate with a forced action, and that autostate needs to have a common event in it, add it all together and the battle locks.
 
Last edited by a moderator:

Black Noise

Veteran
Veteran
Joined
Aug 23, 2012
Messages
94
Reaction score
20
First Language
English
Primarily Uses
RMMV
Hello again.

Is it possible to make a trigger based on how much damage an actor takes, again regardless of much HP is left?

That way, I could make a Bleeding status effect that triggers if an actor takes damage equivalent to at least 25% of his/her Max HP.

Thanks.

Edit: By the way, I tried having a State be triggered when an Actor's TP is full.

The problem I'm having is that every time I start the game, while the actor's TP is zero (as it should be), he

has the state triggered anyway (which shouldn't be happening).

Here's the note tags I put in that state.

<auto_trigger>

a.tpRate() <= 1.0

</auto_trigger>

<auto_trigger_remove>
 
Last edited by a moderator:

dragonhart2

Villager
Member
Joined
Oct 5, 2015
Messages
28
Reaction score
4
First Language
English
Hi! How do I auto trigger states randomly during battle? No conditions, just by plain probability. Thanks in advance!
 

Lecode

(─‿‿─)
Veteran
Joined
Dec 18, 2013
Messages
490
Reaction score
674
First Language
French
Primarily Uses
N/A
Is it possible to make a trigger based on how much damage an actor takes, again regardless of much HP is left?

That way, I could make a Bleeding status effect that triggers if an actor takes damage equivalent to at least 25% of his/her Max HP.
It's not possible. Damage values in battle aren't stored in any way. So it's impossible with just

a condition to check the amount of received damage.

Edit: By the way, I tried having a State be triggered when an Actor's TP is full.

The problem I'm having is that every time I start the game, while the actor's TP is zero (as it should be), he

has the state triggered anyway (which shouldn't be happening).

Here's the note tags I put in that state.
Your code is wrong. The condition

a.tpRate() <= 1.0means if the tp rate is lower or equals than 100%.

When the tp is null, it's stil lower to 100%. Obviously the condition is true.

Replace <= with ==.

Hi! How do I auto trigger states randomly during battle? No conditions, just by plain probability. Thanks in advance!
Yup. Use this condition:

Math.random() <= xX is the percentage of chance.

Ex: Math.random() <= 0.5

means 50% of chance.
 
Last edited by a moderator:

dragonhart2

Villager
Member
Joined
Oct 5, 2015
Messages
28
Reaction score
4
First Language
English
Yup. Use this condition:

Math.random() <= xX is the percentage of chance.

Ex: Math.random() <= 0.5

means 50% of chance.

Hi Lecode,

This is awesome, I made it work, thanks! :D Another question, is this possible?

1. The autostate activates at least at the 2nd turn after battle has commenced.
 

KeroTani

Veteran
Veteran
Joined
Oct 9, 2015
Messages
185
Reaction score
15
First Language
English
Lecode i'm having a problem I have <auto_states:57> in the actor's note box and <auto_trigger: a.hpRate() > 0.9 <auto_trigger_remove> in the state note box but nothing is happening. Am I doing something wrong?
 

GutshotStr8

Veteran
Veteran
Joined
Feb 14, 2014
Messages
51
Reaction score
22
First Language
English
Primarily Uses
Very nice work, a lot of potential for cool stuff here, thanks!

I have a question, though: when exactly does the plug-in check whether conditions are met?

The issue I'm having is that I have a skill that puts a state on the caster and also triggers a common event that turns on a switch. The other characters all have automatic states triggered by that switch. When I use the skill, it's cast as normal and the caster gets his state immediately. However, the other characters don't get their auto-states until after their next action. This means that their next attack doesn't benefit from the state they're meant to have at that point.

The same thing happens with a different state, which is triggered by a game variable. Certain enemy troops contain an event that sets the game variable and should also trigger the auto-state. At the start of battle the variable updates right away, but the troops don't get their state until after they either take an action or are targeted by an action.

Does that make sense? Is that working as intended?

Thanks!
 

Lecode

(─‿‿─)
Veteran
Joined
Dec 18, 2013
Messages
490
Reaction score
674
First Language
French
Primarily Uses
N/A
1. The autostate activates at least at the 2nd turn after battle has commenced.
Yes. Simply add this condition (via && key):  $gameTroop.turnCount() >= 2

Lecode i'm having a problem I have <auto_states:57> in the actor's note box and <auto_trigger: a.hpRate() > 0.9 <auto_trigger_remove> in the state note box but nothing is happening. Am I doing something wrong?
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.
 

Latest Threads

Latest Posts

Latest Profile Posts

I drew one of my chars! The man with 100 kids and a lot of love to give :kaopride:
Me: *about to stalk someone's posts*
Forum: "This member limits who may view their full profile."
Me: *bummer*
Also forum: Advanced search > Posted by ...
1B77FB7E-3802-4179-BB2D-F390021512A6.jpeg
Starting a fly by the night dev studio. Anyone want in? Excellent working conditions with onsite lodging. LOL
I finally got all the walk animations done! I mean, I gotta reskin it for the actual characters since this is a character from another project, but still! Doesn't look like a mess now! ;v;
[IMG]https://s3.gifyu.com/images/kalirr-movement-animation-showoff.gif[/IMG]

Forum statistics

Threads
128,545
Messages
1,195,329
Members
169,132
Latest member
veegsredds
Top