[HELP] how to have an attack have multiple outcomes and statuses

chrimp

Villager
Member
Joined
Jul 29, 2020
Messages
13
Reaction score
1
First Language
English
Primarily Uses
N/A
So for my game, i want one of the enemies do an attack that has a sort of gamble effect. I have 5 effects that could pop up, Poison 30%, Hypnotized 25%, Sleep, 20%, Crying 15%, or Healing 10%. How could I do this? Also, each one will have custom diolague so it will have to be an event
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
33,300
Reaction score
8,367
First Language
German
Primarily Uses
RMMV
two ways depending on what you want.

the simple way would be to have all those effects on the skill and each one will have its own chance - but this can result in multiple effects and won't have a dialogue either.

the other way is to attach a common event to the skill and that event will then run.
however depending on which maker and how you want it to affect the battle the event can get rather complex and you might need a plugin to change timing (by default all common events are executed last on the turn)
 

chrimp

Villager
Member
Joined
Jul 29, 2020
Messages
13
Reaction score
1
First Language
English
Primarily Uses
N/A
yes, i will iron out the details... but exactly how what do i actually put in the common event?
 

Muk adel heid

Veteran
Veteran
Joined
Aug 3, 2013
Messages
44
Reaction score
50
First Language
Spanish
Primarily Uses
I think you could do something like this
result of rand(20) stored in a variable (we call it '5%').
grouping 20 conditionals* each checking from 1 to 20 against the '5%'(variable)
if the result is 1...or 4 (whatever result) cast this spell, then anything you want.

Every spell will have 5% of showing up. So you could stack more than 1 result to 'add' more chances.
Like

1 , 2, 3 and 4 will cast 'Fire'. That would be 20% of casting that one.
5, 6 , 7 will cast 'Tornado'. That would be 15%.
8 to 14 will cast 'Heal'. That would be 35%.
and go on.

If you want to be more specific or short you should use a plugin instead of event.


*You can set more variables by using script calls.
 
Last edited:

Latest Threads

Latest Posts

Latest Profile Posts

I kinda spent the day having my own little gamejam and came up with this Catastrophe!

GZOq45s.png
Have Defeated Enemy Join Party as Actor, Show Passage Status, & MZ-Chan Art | RPG Maker News #107

My outfit at Metrocon. It was fun.
Manafinder got featured in an Upcoming Indie RPGs video alongside other great RPG Maker (and not RPG Maker) games!

Frostorm wrote on Pharonix's profile.
Hey bro, hmu if you're around...I really need your help. >.<

Forum statistics

Threads
113,624
Messages
1,076,281
Members
147,638
Latest member
Zachimera
Top