Hi there, I'd like to make a skill which has a 50% chance of processing for the duration of the state applied. So let's say the state lasts 5 turns, for each of those turns there's 50% chance the effect will apply. I'm not a coder so I've no idea how to do it with script, is there any chance for someone to tell me how to do it? Or if there's a plugin for it, I might as well use that. Thank you.
How to make a state with proc chance every turn for the duration?
RPG Maker MZ SupportYou would need to actually explain what you're asking for.
Processing what? What effect?
It sounds like something you could do with my Eval Tags plugin or one of VisuStella's, but I have no idea what you actually want to do.
Processing what? What effect?
It sounds like something you could do with my Eval Tags plugin or one of VisuStella's, but I have no idea what you actually want to do.
Ah, sorry for being unclear, I want a skill to have a 50% chance of enemy attacking his ally instead of the actors in the party. The state would last 3-5 turns, and every turn there would be a 50% chance for the state to trigger and he'd just attack a random enemy.
The easiest way to implement this would be:
- Have your state that lasts 3-5 turns
- Make a second state that lasts 1 action and has the Attack Anyone restriction
Get my Eval Tags plugin from the link in my signature and give your first state this notetag:
where 69 is the ID of your second state.
If you're already using VisuStella plugins, you'd use the appropriate notetag from their Battle Core instead.
- Have your state that lasts 3-5 turns
- Make a second state that lasts 1 action and has the Attack Anyone restriction
Get my Eval Tags plugin from the link in my signature and give your first state this notetag:
Code:
<Turn Start Eval>
if (Math.random()<.5)
user.addState(69);
</Turn Start Eval>
where 69 is the ID of your second state.
If you're already using VisuStella plugins, you'd use the appropriate notetag from their Battle Core instead.
I will try this out, thank you !
EDIT:
Works perfectly, you're awesome!
EDIT:
Works perfectly, you're awesome!
This thread is being closed due to being solved. If you need it reopened, report it to let us know why. Thank you!
Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-a-state-with-proc-chance-every-turn-for-the-duration.167442/