States That Have a Chance of Automatically Using Skills

I had to upload it to mediafire since the zip file was too big to just attach to this post. I hope that's okay. 🙁

https://www.mediafire.com/?qtrevcufxm2t5v2
Ran a battle test with neither of the actors having the state to check what would happen. Once the first turn actually started (i.e. following command input):

I then tried it with only one of them having it, and even with both of them having it, and it gave me the same error.
It turns out the script calls are too long to fix into the script box.

Try this instead:

state = $data_states[state_id]$game_party.alive_members.each { |m| next unless m.states.include?(state) m.exec_state_triggers(state_id, :turn_start)}I've tested and it works in my case 🙂
Yeah, it's working now. There's an odd quirk where it will never activate on the first round, but I can live with that. Thank you so much!

EDIT: What would the script call be for enemies?
Yeah, it's working now. There's an odd quirk where it will never activate on the first round, but I can live with that. Thank you so much!

EDIT: What would the script call be for enemies?
In my case(using your demo), it activates on the 1st round as well 🙂

For enemies, try this:

Code:
state = $data_states[state_id]$game_troop.alive_members.each { |m|  next unless m.states.include?(state)  m.exec_state_triggers(state_id, :turn_start)}
Tried it, that script call works. Strangely, for enemies it DOES activate on the first turn, while for actors it doesn't. It's gotta be something on my end, but I haven't changed anything.
@DoubleX

Are you still planning to update your state trigger script to support both starting turn and end of turn?
@DoubleX

Are you still planning to update your state trigger script to support both starting turn and end of turn?
I think it's already supported. For the timing as the turn start, you can try what I've said in this post; for the timing as the turn end, try using :turn 🙂
I think it's already supported. For the timing as the turn start, you can try what I've said in this post; for the timing as the turn end, try using :turn 🙂
OK I'll give it a try. Great script anyway!

Original thread: https://forums.rpgmakerweb.com/threads/states-that-have-a-chance-of-automatically-using-skills.39489/