- Joined
- Nov 3, 2017
- Messages
- 114
- Reaction score
- 14
- First Language
- English
- Primarily Uses
- RMMV
Hi all,
I’m looking for something pretty simple. I’m going to be using it along with some Yanfly Plugin functionality to have the battlers “roll initiative” like in D&D to set their action order at the beginning of each round in battle. I’m pretty sure I can make it happen once I have a few lines of script I can insert into an event (I shouldn't need a full plugin).
The script will run on "Turn 0" of a Battle Event, and then again each turn on "Turn End." The script should perform the following action on each battler, whether party member or enemy:
Set the value of their CRI (xparam[2]) to = Math.randomInt(20) + 1 + Math.floor((BATTLER.def-10)/2)
Each battler’s CRI should be set individually, so the random component will be different for each of them.
I've freed CRI from it's normal usage via plugins, and will be able to have a formula reference each battler's CRI as the value of "Action Speed" in this Yanfly Battle System STB plugin that I'm using.
I just need that bit of code to actually get the right values into each battler's CRI with a script in the Battle Events.
Can anyone help with that?
I’m looking for something pretty simple. I’m going to be using it along with some Yanfly Plugin functionality to have the battlers “roll initiative” like in D&D to set their action order at the beginning of each round in battle. I’m pretty sure I can make it happen once I have a few lines of script I can insert into an event (I shouldn't need a full plugin).
The script will run on "Turn 0" of a Battle Event, and then again each turn on "Turn End." The script should perform the following action on each battler, whether party member or enemy:
Set the value of their CRI (xparam[2]) to = Math.randomInt(20) + 1 + Math.floor((BATTLER.def-10)/2)
Each battler’s CRI should be set individually, so the random component will be different for each of them.
I've freed CRI from it's normal usage via plugins, and will be able to have a formula reference each battler's CRI as the value of "Action Speed" in this Yanfly Battle System STB plugin that I'm using.
I just need that bit of code to actually get the right values into each battler's CRI with a script in the Battle Events.
Can anyone help with that?