Hit a random character on the field

Hi,


I'm trying to work on a "randomizer" tool that will deal a random amount of damage to a random character on the field.


I have the "extra scopes" plugin, but it doesn't have anything like that. Does a plugin exist that can do such a thing?


Speaking of which, what kind of formula do I have to input for a random amount of damage?

help2.png
bump
Please explain in more detail what you want.


What is the "field"? are you talking about the battlescreen? then simply use "random enemy" as the scope and a javascript code for a random number in the damage formula.


If you're talking about the map, then you need to tell us how do you identify "enemy events" as opposed to mapping events, and how such a hit should affect the game, because the events have no HP that could be reduced.
It's the battlescreen, yes, but I want to have it so that it has the possibility to attack an ally as well.
look for a target manager or scope manager plugin - that can't be done any other way.


I've moved this thread to Plugin Request. Please be sure to post your threads in the correct forum next time. Thank you.
I believe Yanfly has a script that can handle this pretty easily.


http://yanfly.moe/2016/02/26/yep-74-target-core/


Which has a notetag <Target: x Random Any> that allows you to target x amount of any ally or foe.


As for the damage, you could simply use Math.randomInt(x) in the damage formula replacing x with the max number you want to do. Eg. If you use Math.randomInt(100) it will deal between 0 and 99 damage, randomized each time.


Edit: Plus using the variance drop down menu can randomize a little more.

Original thread: https://forums.rpgmakerweb.com/threads/hit-a-random-character-on-the-field.68428/