Xyzoxious

Villager
Member
Joined
Oct 11, 2017
Messages
12
Reaction score
1
First Language
English
Primarily Uses
RMVXA
Hey guys!
I'm currently making an attack that hits really hard! The downside to using it is that it targets a random enemy OR ally... But I'm having trouble figuring out how to do that.

I also have Yanfly's Battle Engine Core and Action Sequence Packs 1, 2 and 3. I just haven't figured out how to target a random enemy or ally with the base RPG Maker or Action Sequence Pack. Any solutions?
 

Mystic_Enigma

A scattered memory, hoping to be recalled...
Veteran
Joined
Mar 7, 2018
Messages
334
Reaction score
1,730
First Language
English
Primarily Uses
RMMV
You could have the skill apply an "invisible" state that forces the user to attack randomly before an attack is launched. I'm not too versed in the Action Sequences, but that's a start.
 

Silva

Scoobityboo
Veteran
Joined
Nov 5, 2018
Messages
408
Reaction score
235
First Language
English
Primarily Uses
RMMV

Terozu

That guy who started two years ago. (wow O:)
Veteran
Joined
Mar 3, 2019
Messages
60
Reaction score
39
First Language
English
Primarily Uses
RMMV
If you'd prefer to not use plugins, make it so a dummy skill the player can select activates a common event, then have that common event make the actor use the actual skill on a random target, via the third page's Force Action command, you can select "Random" from the target drop down menu.

I don't know for sure if this is truly random though tbh.
 
Last edited:

Xyzoxious

Villager
Member
Joined
Oct 11, 2017
Messages
12
Reaction score
1
First Language
English
Primarily Uses
RMVXA
You could have the skill apply an "invisible" state that forces the user to attack randomly before an attack is launched. I'm not too versed in the Action Sequences, but that's a start.

I hadn't thought of that, but unfortunately, it doesn't work. The skill's "Scope" overrides the state that the character receives through Action Sequences...

I'd advise looking at Yanfly's Target Core, specifically this notetag:

<Target: x Random Any>

This worked great! Unfortunately, it also targets the user, which is what I do not want... Any way to exclude the user of the skill?

If you'd prefer to not use plugins, make it so a dummy skill the player can select activates a common event, then have that common event make the actor use the actual skill on a random target, via the third page's Force Action command, you can select "Random" from the target drop down menu.

I don't know for sure if this is truly random though tbh.
Would that not be the same as using the Target Core plugin? I feel like this would also make the user a target.

EDIT: Also, any monster/actor in my game is going to be able to use this skill. Where it asks for the "Subject" to use the skill, I'd have to just pick the actor OR make 300+ common events for each monster/actor that can use the skill, if I'm seeing this correctly.
 
Last edited:

Terozu

That guy who started two years ago. (wow O:)
Veteran
Joined
Mar 3, 2019
Messages
60
Reaction score
39
First Language
English
Primarily Uses
RMMV
If you want enemies to function like this, just make 2 copies of the spell where one targets random allies and the other targets random enemies, then give them equal priority.
 

Silva

Scoobityboo
Veteran
Joined
Nov 5, 2018
Messages
408
Reaction score
235
First Language
English
Primarily Uses
RMMV
This worked great! Unfortunately, it also targets the user, which is what I do not want... Any way to exclude the user of the skill?

I don't see an option in the plugin help but you could just use a custom js eval instead:

Code:
<Custom Target Eval>
choices = foes.aliveMembers();
for (var i = 0; i < allies.aliveMembers().length; i++) {
   member = allies.aliveMembers()[i];
   if (a !== member) {
      choices.push(member);
   }
}
var t = Math.randomInt(choices.length);
targets.push(choices[t]);
</Custom Target Eval>

This should make choices equal to all alive enemies then uses a loop to add every ally that isn't the user. It will then pick a random member of the choices group and make that the target.

EDIT: Original eval would have targeted everyone but the user, not one random target. Updated.
 
Last edited:

jhuetter

Warper
Member
Joined
May 31, 2022
Messages
2
Reaction score
0
First Language
English
Primarily Uses
RMMV
If you want enemies to function like this, just make 2 copies of the spell where one targets random allies and the other targets random enemies, then give them equal priority.
That's genius.
 

Latest Threads

Latest Posts

Latest Profile Posts

By far, the weirdest flex I've ever seen on the internet is "I don't have the attention span to read what you wrote, but I REALLY want the world to know I don't have that attention span!".
Why... the FACK... do I work in customer service?!?!
Excuse me while I go question allllll my life choices.
DamageEvil_6.png added!
index.php

Sometimes I wonder why I still try and recruit others to help with my games. It never works.

Forum statistics

Threads
125,777
Messages
1,173,418
Members
164,930
Latest member
alantangyl
Top