“True” random multihit Targeting

Status
Not open for further replies.

Lonewulf123

Veteran
Veteran
Joined
Oct 13, 2014
Messages
300
Reaction score
89
First Language
Enlish
Hi,

I’m looking for a code or plugin that will help me replicate how multihit skills work in the persona series.

Basically, this is the scenario:

You’re facing three enemies in combat. You use skill multihit 3. This skill will hit a total of 3 times, but the targets are random. Basically, it could hit enemy a twice and enemy b once. Or it could hit enemy a, b, and c. Or it could hit enemy a 3 times. Basically, three hits are guaranteed, but the targets are always random.

Currently, I’ve tried to do this with the default rpg maker functionality, but even with random repeats and random targets only one target will take the brunt of the damage.

Thank you!!
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,351
Reaction score
7,665
First Language
German
Primarily Uses
RMMV
how have you tried? That should be simply done by selecting "3 random enemies"?

If you have some battleplugins that change the behaviour of the battlesystem, you need to specify this for compatibility.
 

Lonewulf123

Veteran
Veteran
Joined
Oct 13, 2014
Messages
300
Reaction score
89
First Language
Enlish
how have you tried? That should be simply done by selecting "3 random enemies"?

If you have some battleplugins that change the behaviour of the battlesystem, you need to specify this for compatibility.
Using my example, If you select “three random enemies” and put the repeats on three, each enemy will be hit 3 times (for a total of 9 hits).

If you use two random enemies in that instance, two of those enemies would get hit three times( for a total of 6 hits).

I’m looking for 3 hits total across all enemies.

Does that help?


No major plugins that effect the dynamics of the battle systems aside from the Yanfly library and Mog’s Battle HUD.
 

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
5,624
Reaction score
5,102
First Language
English
Primarily Uses
RMVXA
When you select "3 random foes" and have the repeats on 1, you will see it hit three random foes, exactly like you're looking for.

The behavior you're seeing is because you're using the "Repeats" function; the spell will repeatedly hit the same target 3 times when repeats is set to 3 (then it will move on to another random foe 3 times, etc.).

If you want each proc to hit a different random foe, don't use "Repeats". If you're trying to get beyond the editor's limit of 4 random hits, get Yanfly's Target Core and make use of the <Target: x Random Foes> notetag.
 

Lonewulf123

Veteran
Veteran
Joined
Oct 13, 2014
Messages
300
Reaction score
89
First Language
Enlish
When you select "3 random foes" and have the repeats on 1, you will see it hit three random foes, exactly like you're looking for.

The behavior you're seeing is because you're using the "Repeats" function; the spell will repeatedly hit the same target 3 times when repeats is set to 3 (then it will move on to another random foe 3 times, etc.).

If you want each proc to hit a different random foe, don't use "Repeats". If you're trying to get beyond the editor's limit of 4 random hits, get Yanfly's Target Core and make use of the <Target: x Random Foes> notetag.
The repeats were actually a bad example. I shouldn’t have used them, but was just trying to make a point.

Basically, my only question is if I use the yanfly target core notetag, can the same enemy be hit more than once with a skill proc?

That’s what I’m asking really. Everytime I’ve done this using the default method, it doesn’t work.
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
The same enemy can be hit, but that is also truly random, as it just selects a random target each time for each hit. So for example, say you have enemies A B and C and the skill is 3 hits. That means there is a 1/3 chance for it to select each enemy, and a 1/27 chance (1/3 * 1/3 * 1/3) chance it will select the same target for all 3. But by definition of truly random the same target can be selected as before.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,351
Reaction score
7,665
First Language
German
Primarily Uses
RMMV
Everytime I’ve done this using the default method, it doesn’t work.
then you have done something wrong. That is why I asked.
As said above you ONLY need yanfly's plugin if you want more than 4 random hits.

For 1 to 4 random hits you set the scope to the wished-fore number of random hits and keep the repeat at 1. That is actually extremely important because 1 random enemy and 3 repeats would hit the same random enemy three times.

Only if you want the skill to have 5 or more random hits, then you need the plugin because there is no default scope with more than 4 random enemies.

In fact some people have exactly the other problem - since the "4 random enemies" can hit the same enemy multiple times they seek plugins to prevent those multiple hits on the same target, but you are one of those who want multiple hits that are there by default.

Actually - that could be the problem. If you added a plugin that was written exactly to prevent multiple hits on the same enemy, that would explain your problem. And such plugins do exist.
So again, please give a screenshot of your plugin manager to see if we can find a plugin that disables those default multiple hits.
Just because you do not remember installing one such plugin does not mean that it is not included - especially yanfly has the tendency to have his plugins do multiple things that then surprise people who made mistakes configuring them.
 

Lonewulf123

Veteran
Veteran
Joined
Oct 13, 2014
Messages
300
Reaction score
89
First Language
Enlish
The same enemy can be hit, but that is also truly random, as it just selects a random target each time for each hit. So for example, say you have enemies A B and C and the skill is 3 hits. That means there is a 1/3 chance for it to select each enemy, and a 1/27 chance (1/3 * 1/3 * 1/3) chance it will select the same target for all 3. But by definition of truly random the same target can be selected as before.
Thanks! That’s all I needed to know. I’ll do clean sweep of my plugins and see if anything is causing an erratic behavior.

Thanks for the help everyone .
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
If you don't see anything you can also post a screenshot of the skill that is behaving oddly. Sometimes a 2nd set of eyes spots things you've missed.
 

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
15,351
Reaction score
8,532
First Language
English
Primarily Uses
RMMV

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

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

Latest Threads

Latest Profile Posts

It's Saturday already. Last Saturday felt just like yesterday. o_o
I really need to stop adding more levels to this thing already...
My computer is now on the dead list. Parts and Services stopped two days ago for this type.
someone help my thread has been silent since the initial post I just wanna make a goddamn game
People3_6 and People3_7 added!

Forum statistics

Threads
105,838
Messages
1,016,870
Members
137,539
Latest member
Monsterwave18
Top