Skill that make user cast random skill

cpt_ariadi

Villager
Member
Joined
Oct 29, 2016
Messages
9
Reaction score
1
Primarily Uses
So, I want to make a skill that make the user to cast a random skill. I already search on this forum and found one, (this is the thread that i'm talking about ). This may look like solved my problem, but I have another problem, by using this way, I can only force a specific character instead of the caster him/herself. How can I make the caster/user of the skill to be the one who cast random skill instead of specific character? If I need plugin, what plugin that I need? I'm currently using yanfly's plugins..
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,355
Reaction score
7,669
First Language
German
Primarily Uses
RMMV
you don't need a plugin, but you'll have to use a large common event that checks every actor as to who cast the original skill and then use that actor as the actor in force action.

Basically you have the original skill put a state on the skill user and then the common event checks which actor has the state and selects that actor for the force action commands (removing the state so that the next skill use can be done by another actor)
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,959
First Language
English
Primarily Uses
RMMV
Or if you'd rather not check every actor in a large common event, use this instead:

Code:
var possibleSkills = [8, 9, 10]; // IDs of the skills that might be cast when you use the random spell skill
var index = Math.randomInt(possibleSkills.length);
var skillId = possibleSkills[index];
BattleManager._subject.forceAction(skillId, -2);
The only quirk right now is that because the original skill that calls the common event does not itself do anything, you get the "No effect" message on your target. However, if you're chaining from a damage-dealing skill this shouldn't be an issue.
 

cpt_ariadi

Villager
Member
Joined
Oct 29, 2016
Messages
9
Reaction score
1
Primarily Uses
Ok. The casting mechanic is work. but I encounter another problem, the problem is the skill that the user use deal 0 damage to the enemy even if there's a formula.

Here's one of them:
temp.png
Is there's something wrong?
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,959
First Language
English
Primarily Uses
RMMV
There's no such parameter as mtk, it's mat.
 

cpt_ariadi

Villager
Member
Joined
Oct 29, 2016
Messages
9
Reaction score
1
Primarily Uses
Oh, yes. I forgot.. :V
Thanks a lot man...
 

cpt_ariadi

Villager
Member
Joined
Oct 29, 2016
Messages
9
Reaction score
1
Primarily Uses
So far, the skill is working, but when i change the game mode into atb(action turn based i believe(yanfly plugins)), the skill didn't work. How to make the skill work in atb?
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,853
Messages
1,016,986
Members
137,561
Latest member
visploo100
Top