States' Auto Trigger

Discussion in 'JS Plugin Releases (RMMV)' started by Lecode, Nov 8, 2015.

  1. Lecode

    Lecode (─‿‿─) Veteran

    Messages:
    490
    Likes Received:
    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: Nov 30, 2015
    #1
    Fernyfer775, lolshtar, gokuby and 2 others like this.
  2. Sol Rising

    Sol Rising Veteran Veteran

    Messages:
    162
    Likes Received:
    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?
     
    #2
    Lecode likes this.
  3. LynX

    LynX Veteran Veteran

    Messages:
    81
    Likes Received:
    7
    Location:
    Poland
    First Language:
    Polish
    thanks gonna check it
     
    #3
    Lecode likes this.
  4. Lecode

    Lecode (─‿‿─) Veteran

    Messages:
    490
    Likes Received:
    646
    First Language:
    French
    Primarily Uses:
    N/A
    I don't have that issue. Do you have the last version ?

    Please respond to me in the proper topic :)
     
    #4
  5. Sol Rising

    Sol Rising Veteran Veteran

    Messages:
    162
    Likes Received:
    21
    First Language:
    English
    just updated the latest version no longer having that problem thanks!

    Also really looking forward to your battle formation plugin :D
     
    #5
    Lecode likes this.
  6. Joronjo

    Joronjo Veteran Veteran

    Messages:
    155
    Likes Received:
    29
    First Language:
    English Spanish
    Can this be used on  weapon and armor?
     
    #6
    Lecode likes this.
  7. gokuby

    gokuby Veteran Veteran

    Messages:
    96
    Likes Received:
    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 ;(
     
    #7
    Lecode likes this.
  8. Lecode

    Lecode (─‿‿─) Veteran

    Messages:
    490
    Likes Received:
    646
    First Language:
    French
    Primarily Uses:
    N/A
    For what purpose ? Can you explain ?

    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 :)
     
    #8
  9. gokuby

    gokuby Veteran Veteran

    Messages:
    96
    Likes Received:
    14
    First Language:
    German
    Primarily Uses:
    N/A
    Thanks for the answer, I will try it out next day. ;)
     
    #9
  10. Neo Soul Gamer

    Neo Soul Gamer Veteran Veteran

    Messages:
    614
    Likes Received:
    332
    Location:
    Nova Scotia, Canada
    First Language:
    English
    Primarily Uses:
    N/A
    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: Nov 8, 2015
    #10
    Lecode likes this.
  11. LynX

    LynX Veteran Veteran

    Messages:
    81
    Likes Received:
    7
    Location:
    Poland
    First Language:
    Polish
    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?
     
    #11
    Lecode likes this.
  12. junglechief

    junglechief Veteran Veteran

    Messages:
    46
    Likes Received:
    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: Nov 10, 2015
    #12
  13. Black Noise

    Black Noise Veteran Veteran

    Messages:
    94
    Likes Received:
    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?
     
    #13
  14. gokuby

    gokuby Veteran Veteran

    Messages:
    96
    Likes Received:
    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.
     
    #14
  15. junglechief

    junglechief Veteran Veteran

    Messages:
    46
    Likes Received:
    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: Nov 10, 2015
    #15
  16. Lecode

    Lecode (─‿‿─) Veteran

    Messages:
    490
    Likes Received:
    646
    First Language:
    French
    Primarily Uses:
    N/A
    That's true, I'll update it.

    Use a.tp instead of a.tp();

    Yup :)

    Yup, it's possible. Use:

    Code:
    <auto_trigger:a.result().critical>
     
    #16
  17. gokuby

    gokuby Veteran Veteran

    Messages:
    96
    Likes Received:
    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) ;)
     
    #17
  18. gamerxp

    gamerxp Veteran Veteran

    Messages:
    30
    Likes Received:
    5
    Location:
    Russia
    First Language:
    Russian
    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.
     
    #18
  19. Lecode

    Lecode (─‿‿─) Veteran

    Messages:
    490
    Likes Received:
    646
    First Language:
    French
    Primarily Uses:
    N/A
    Yup, you can use:

    result().missedor, btw:result().evaded
    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>
     
    #19
    junglechief and Neo Soul Gamer like this.
  20. Neo Soul Gamer

    Neo Soul Gamer Veteran Veteran

    Messages:
    614
    Likes Received:
    332
    Location:
    Nova Scotia, Canada
    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.
     
    #20

Share This Page