MRD256

Veteran
Veteran
Joined
Jan 5, 2014
Messages
128
Reaction score
18
First Language
English
Primarily Uses
RMMV
In my project, I'm using Yanfly's Buff&States core plugin and I have a state that acts like poison to an actor's MP, but I also want this state to possibly kill the actor based on a random interval.

Say for example, it generates a random number between 1-50 and if the number is >= 40, it kills the actor.

Does anyone know how I can do this with the Lunatic Mode?
 

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
6,114
Reaction score
5,879
First Language
English
Primarily Uses
RMVXA
You will need to use one of the notetags listed here or in the plugin's help file. I recommend doing an effect like this on Turn Start - so use the
<Custom Turn Start Effect> notetag on your State. (Turn End could also be fine.)

I think the notetag would go something like this:
<Custom Turn Start Effect>
var ko_pick = Math.random() * 50;
if (ko_pick >= 40) {
self.addState(1);
}
</Custom Turn Start Effect>

This assumes your KO/Death State is 1. If not, replace "1" with the State ID of the KO State.
 

MRD256

Veteran
Veteran
Joined
Jan 5, 2014
Messages
128
Reaction score
18
First Language
English
Primarily Uses
RMMV
sounds good, although the game also uses the ATB battle system and has a Tick-based regen system. I was more thinking it would do it on Regeneration.
<Custom Regenerate Effect>
You think this could work?
 

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
6,114
Reaction score
5,879
First Language
English
Primarily Uses
RMVXA
sounds good, although the game also uses the ATB battle system and has a Tick-based regen system. I was more thinking it would do it on Regeneration.
<Custom Regenerate Effect>
You think this could work?
Maybe! I've never done a deep dive on the way that Yanfly's core scripts handle the timing of Regeneration. Try it for yourself and see what happens!
 

MRD256

Veteran
Veteran
Joined
Jan 5, 2014
Messages
128
Reaction score
18
First Language
English
Primarily Uses
RMMV
I tried inputting the code into the notebox of the state, but it doesn't appear to be doing anything. I even set it to just add the state upon regen and it's not doing anything. Is there something I'm missing?
 

Latest Threads

Latest Posts

Latest Profile Posts

uOy9Wjc.png

Something something.
Dev be like: "I'll make the character goes amnesia so I could explain the world and the lore better and immersive to the players"
Whoever decided that the 5th area of Xenoblade 3 had to be THAT big and be explored in the manner it does needs to be shot. My OCD cannot leave a tiny shard of the map hidden and those controls can go right on and f*** themselves. -.-

/rant off
Raggon wrote on NoPatience's profile.
:kaohi:

Forum statistics

Threads
124,435
Messages
1,163,622
Members
163,247
Latest member
renice
Top