[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,319
Reaction score
8,379
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 Profile Posts

Who here knows of the hidden laws of this multiverse? Such as the law of attraction
Exploding Fruits and Rasaks Pixelfarm Assets | RPG Maker News #108

So ghosts can go through walls and stuff, and depending their type (according to fantasy media) they can or can't interact with objects to a certain degree...

So why they don't always fall through floors? Do they always float and sometimes simulate walking? If things go through them how can they hear/see? And why sometimes they have clothing? Do clothes die as well?
my birthday was yesterday...
i feel closer 2 being able 2 get a discount on the kids menu than i do being able to buy booze1627428008986.png
Getting to play your RM game on Steam Deck? How cool is that?

Forum statistics

Threads
113,704
Messages
1,076,773
Members
147,726
Latest member
Switchboy0815
Top