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..
Skill that make user cast random skill
RPG Maker MV Supportyou 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)
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)
Or if you'd rather not check every actor in a large common event, use this instead:
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.
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.
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:
Is there's something wrong?
Here's one of them:
Is there's something wrong?
Here's the enemy's stats:
There's no such parameter as mtk, it's mat.
Oh, yes. I forgot.. :V
Thanks a lot man...
Thanks a lot man...
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?
Original thread: https://forums.rpgmakerweb.com/threads/skill-that-make-user-cast-random-skill.75529/