States' Auto Trigger

Lecode

(─‿‿─)
Veteran
Joined
Dec 18, 2013
Messages
490
Reaction score
646
First Language
French
Primarily Uses
N/A
States' Auto Trigger 1.3
By Lecode

Introduction
Adds states automatically to battlers when a condition is met.

For example adds "Wounded" state to a chosen battler if his HP is under 30%.

Version History

# - 1.0 : Initial release# - 1.1 : Improved auto_trigger tag#         <auto_states:x> can be now applied on classes and equipements.#         New Parameter: Global Auto States#         Can now play an animation#         Can now start a common event# - 1.2 : Fix of a bug that prevent the code to read multiple#         lines in the <auto_trigger> tag# - 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 checkedHow to Use

-See in-game help

-Make sure to save the plugin as LeStateAutoTrigger.js.

Plugin

Download it from my google drive.

Dependencies

My Utility Plugin.

Insert LeStateAutoTrigger below that plugin.

Credit and Thanks
- Lecode

Free for commercial use.

Author's Notes
Feel free to suggest anything.
 
Last edited by a moderator:

Sol Rising

Veteran
Veteran
Joined
Oct 25, 2015
Messages
162
Reaction score
21
First Language
English
this looks awesome...

one thing also lecode, your auto target for last monster also auto heals the same target for the actor when there's more than 1 actor in battle, anyway to fix that?
 

LynX

Veteran
Veteran
Joined
Jan 6, 2014
Messages
81
Reaction score
7
First Language
Polish
Primarily Uses
thanks gonna check it
 

Lecode

(─‿‿─)
Veteran
Joined
Dec 18, 2013
Messages
490
Reaction score
646
First Language
French
Primarily Uses
N/A
one thing also lecode, your auto target for last monster also auto heals the same target for the actor when there's more than 1 actor in battle, anyway to fix that?
I don't have that issue. Do you have the last version ?

Please respond to me in the proper topic :)
 

Sol Rising

Veteran
Veteran
Joined
Oct 25, 2015
Messages
162
Reaction score
21
First Language
English
I don't have that issue. Do you have the last version ?

Please respond to me in the proper topic :)
just updated the latest version no longer having that problem thanks!

Also really looking forward to your battle formation plugin :D
 

Joronjo

Veteran
Veteran
Joined
Sep 17, 2015
Messages
155
Reaction score
29
First Language
English Spanish
Primarily Uses
Can this be used on  weapon and armor?
 

gokuby

Veteran
Veteran
Joined
Nov 2, 2015
Messages
96
Reaction score
14
First Language
German
Primarily Uses
N/A
Nice script, no need flooding the troop scene for enrage modes!

Is it possible to set more states with different conditions?

<auto_states: 12>

<auto_trigger: a.hpRate() <= 0.5>

<auto_trigger: 0.25 < a.hpRate()>

<auto_trigger_remove>

<auto_states: 13>

<auto_trigger: a.hpRate() <= 0.25>

The enemie will gain state 12 when under 50% HP, and then state 12 will be removed and state 13 added, once the HP go down to 25%

Sorry, can't test it out right now myself ;(
 

Lecode

(─‿‿─)
Veteran
Joined
Dec 18, 2013
Messages
490
Reaction score
646
First Language
French
Primarily Uses
N/A
Can this be used on  weapon and armor?
For what purpose ? Can you explain ?

Nice script, no need flooding the troop scene for enrage modes!

Is it possible to set more states with different conditions?

<auto_states: 12>

<auto_trigger: a.hpRate() <= 0.5>

<auto_trigger: 0.25 < a.hpRate()>

<auto_trigger_remove>

<auto_states: 13>

<auto_trigger: a.hpRate() <= 0.25>

The enemie will gain state 12 when under 50% HP, and then state 12 will be removed and state 13 added, once the HP go down to 25%

Sorry, can't test it out right now myself ;(
Yes.

Inside actor's note:

<auto_states:12,13>Inside state ID 12's note:

<auto_trigger: a.hpRate() > 0.25 && a.hpRate() <= 0.5><auto_trigger_remove>Inside state ID 13's note:

<auto_trigger: a.hpRate() <= 0.25>I think it should work :)
 

gokuby

Veteran
Veteran
Joined
Nov 2, 2015
Messages
96
Reaction score
14
First Language
German
Primarily Uses
N/A
Thanks for the answer, I will try it out next day. ;)
 

Neo Soul Gamer

Veteran
Veteran
Joined
Aug 10, 2012
Messages
625
Reaction score
343
First Language
English
Primarily Uses
N/A
For what purpose ? Can you explain ?
I think Joronjo means to have a piece of equipment to have the same effect. For example, you have a cursed weapon that triggers a state when HP is below a certain amount.

EDIT: Great plugin, btw. :)
 
Last edited by a moderator:

LynX

Veteran
Veteran
Joined
Jan 6, 2014
Messages
81
Reaction score
7
First Language
Polish
Primarily Uses
Hi it's working really nice, I have a question is there a way that You will add possiblity to add sound effects. flash or battle animation?
 

junglechief

Veteran
Veteran
Joined
Nov 9, 2015
Messages
46
Reaction score
3
First Language
English
I am trying to run this on an enemy with the following.

Inside enemy notes:

<auto_states: 11>

inside state:

<auto_trigger: a.tp() >= 100>

nothing is happening no matter what I do.

For more information, what I am trying to do is use the enemy tp gauge as a break meter and institute a paralytic state when the tp meter hits max. I have the tp meter displaying and can see it is full on the enemy but nothing is happening to the enemy state. Thanks in advanced for any help.
 
Last edited by a moderator:

Black Noise

Veteran
Veteran
Joined
Aug 23, 2012
Messages
94
Reaction score
18
First Language
English
Primarily Uses
RMMV
Hey. What I have in mind for my game is that any battler who gets hit with a Critical attack (No matter how much damage is dealt or how much HP he/she has left)

suffers a "Crippled" state which severely reduces their stats. Is it possible to code in such a condition?
 

gokuby

Veteran
Veteran
Joined
Nov 2, 2015
Messages
96
Reaction score
14
First Language
German
Primarily Uses
N/A
@Black Noise: Don't think so, but it is definitly possible with Yanflys Damage Core! Maybe you want to check this out.

@junglechief: don't use space! The command should look like that:

<auto_states:11>

I had the same problem first. 

Would be nice to update the example in the help file, since there is a space <auto_states: ID,ID,ID>

guess it will confuse a lot of people^^

Other then that, very nice plugin!

Everthing is working as inftended, thanks a bunch ;)

Maybe a little suggestion: Let a SE play, when a state is applied.
 

junglechief

Veteran
Veteran
Joined
Nov 9, 2015
Messages
46
Reaction score
3
First Language
English
@gokuby

Thanks for the info, still doesn't appear to be working though.

I know I must be doing something silly.

<auto_states:11>

<auto_trigger:a.tp()>=100>

if I try and launch I get an error:'member type is not a function. I figure there is an issue with a.tp() but this is a function of battler, i've dug through that file a lot. Not sure what it doesn't like.

Edit:

I tried using function from battler, tpRate()[<auto_trigger:a.tpRate()>=1> and it launched but when the enemy tp is full I still do not get a state transition.

Also unrelated to my question but something that would be cool. It would be awesome if you could build in functionality with your plugin for state end conditions. For instance, if I want a state to trigger at 100 tp and end when tp goes back to 0, but I don't want it to trigger between 0 and 100 I just want a new end condition upon state activation. Not sure how difficult that would be, but I thought I would toss the idea your way. Once I get this working I am sure it will be an awesome plugin. Thanks for the hard work.
 
Last edited by a moderator:

Lecode

(─‿‿─)
Veteran
Joined
Dec 18, 2013
Messages
490
Reaction score
646
First Language
French
Primarily Uses
N/A
I had the same problem first. 

Would be nice to update the example in the help file, since there is a space <auto_states: ID,ID,ID>

guess it will confuse a lot of people^^
That's true, I'll update it.

I am trying to run this on an enemy with the following.

Inside enemy notes:

<auto_states: 11>

inside state:

<auto_trigger: a.tp() >= 100>

nothing is happening no matter what I do.
Use a.tp instead of a.tp();

Hi it's working really nice, I have a question is there a way that You will add possiblity to add sound effects. flash or battle animation?
Yup :)

Hey. What I have in mind for my game is that any battler who gets hit with a Critical attack (No matter how much damage is dealt or how much HP he/she has left)

suffers a "Crippled" state which severely reduces their stats. Is it possible to code in such a condition?
Yup, it's possible. Use:

Code:
<auto_trigger:a.result().critical>
 

gokuby

Veteran
Veteran
Joined
Nov 2, 2015
Messages
96
Reaction score
14
First Language
German
Primarily Uses
N/A
<auto_trigger:a.result().critical>uhh, that means, it should be possible with evasion as well?

<auto_trigger:a.result().evasion>Applying a state that reduces evasion for balancing after one dodges an attack.

That would be a cool mechanic, every second attack misses ;D

Also, nice that you will implement a notification(e.g. SE) ;)
 

gamerxp

Veteran
Veteran
Joined
Oct 28, 2015
Messages
30
Reaction score
5
First Language
Russian
Primarily Uses
Neat. Yanfly do not want to make some state-related system for some reason, so this is mostly what I wanted. He got auto-passive script, but it's really limited - your plugin provides much more control.

Got suggestion though. Support for notetags in classes, equipment and skills. 

Classes - pretty oblivious. Not like I need it right now, but it may be pretty useful for some people.

Skills - to have auto-state activate when character learnt specific skill. Still possible to make by adding some condition that checks if battler got that skill, but that require a lot of copy-paste and extra work.

Equipment - was mentioned above. Same reason.
 

Lecode

(─‿‿─)
Veteran
Joined
Dec 18, 2013
Messages
490
Reaction score
646
First Language
French
Primarily Uses
N/A
uhh, that means, it should be possible with evasion as well?
Yup, you can use:

result().missedor, btw:result().evaded
Got suggestion though. Support for notetags in classes, equipment and skills.
That's a nice idea.

Also I think I'll change the notetag for more flexibility.

Like:

Code:
<auto_trigger>a.isLearnedSkill(10) && a.result().evaded&& v[10] === 5</auto_trigger>
 

Neo Soul Gamer

Veteran
Veteran
Joined
Aug 10, 2012
Messages
625
Reaction score
343
First Language
English
Primarily Uses
N/A
It would be great if you added support for Classes, equipment, and skills. That makes three requests in this thread between myself, Joronjo, and GamerXP. If you do that, I think this will be one of the top plugins available.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

suspended on twitter for calling an ahole an ahole & appealing the tweet; furious at myself for being even slightly upset with my suspension: oh no, you've been temporarily banned from hell. GET OVER IT, me.
how can you download the tiles from a forum post here? HELP
That moment when you post the wrong download link to your game and wonder why it got so few downloads... :mad:
Trying to make it so my map is cleared of "random" events after the player leaves the map... to little success >.< I think I might need to ask help for this.
Had my first interaction with a legit homophobe concerning one of my games today. Tempting to engage, but pointless.

Forum statistics

Threads
94,245
Messages
919,368
Members
123,959
Latest member
CecilGP
Top