Single/Multiple target switch (requires Yanfly's Battle Core; version 0.6)

HeroicJay

Veteran
Veteran
Joined
Jun 23, 2014
Messages
322
Reaction score
177
First Language
English
Primarily Uses
RMMV
http://pastebin.com/v4DCjbRc


So here's something I threw together when I realized Yanfly's Target Core didn't do one of the things I was hoping it would do.


This script will let you switch between targeting one enemy/ally and targeting multiple enemies/allies for any skill marked with <OneOrAll>. It will even let you split the damage between multiple targets with <SplitMulti> (which divides damage by the number of targets) or <DivideMulti: x> (which divides damage by x so long as there are at least two targets), even if the skill isn't marked with <OneOrAll>!


You can control which keys/buttons switch the targeting with the parameters.


The plugin itself is compatible with Target Core, but any Target Core tag will override <OneOrAll> (except <Repeat: x>), so don't bother putting both on the same skill, at least not with this version.


That said, this IS compatible with Yami's Invert Target.


Place this below Battle Core.


UPDATE:


0.5b: Better counting of targets for <DivideMulti> and SplitMulti>.


0.6: Now you can define which keys switch the targeting - though "shift" (which should translate to the X button) doesn't seem to work with my Logitech (note: not Xbox) controller. Huh. It works on my keyboard, and other buttons work with my controller... Anyway, at this point I'm tempted to move the plugin to the completed plugins page, but I can still look into single-targeting Target Core tags. No guarantees though.
 
Last edited by a moderator:

Roguedeus

It's never too late to procrastinate...
Veteran
Joined
Mar 19, 2013
Messages
542
Reaction score
111
First Language
English
Primarily Uses
N/A
Just to be clear. This will target only one selected target, or all possible targets?


Edit:


Does that include any other filters applied through Target Core? Such as the lunatic modes?
 
Last edited by a moderator:

HeroicJay

Veteran
Veteran
Joined
Jun 23, 2014
Messages
322
Reaction score
177
First Language
English
Primarily Uses
RMMV
If it's unclear, it's a toggle between one target and all targets, like in some Final Fantasy games or the SNES Mana series.


I have not tested this plugin against Target Core yet or added any special functionality for it. I'd be stunned if <SplitMulti> and <DivideMulti> were incompatible with Target Core (they almost certainly SHOULD work), but I'm not sure what will happen right now if you try to use <OneOrAll> with the Target Core plugin installed at all, much less one of the actual tags from Target Core set up. Count that as yet another reason why it's on the Development page.
 
Last edited by a moderator:

Roguedeus

It's never too late to procrastinate...
Veteran
Joined
Mar 19, 2013
Messages
542
Reaction score
111
First Language
English
Primarily Uses
N/A
I have not tested this plugin against Target Core yet or added any special functionality for it. Count that as yet another reason why it's on the Development page.


Oh then I misunderstood. I thought you were saying it was an add-on to the Target Core plugin. :)
 

HeroicJay

Veteran
Veteran
Joined
Jun 23, 2014
Messages
322
Reaction score
177
First Language
English
Primarily Uses
RMMV
Okay, it's been tested against Target Core with a spell that had <OneOrAll> set but no Target Core note tags at all. No problem. Worked perfectly.


Next, we'll see if it's so perfect once Target Core tags enter the mix.
 

Roguedeus

It's never too late to procrastinate...
Veteran
Joined
Mar 19, 2013
Messages
542
Reaction score
111
First Language
English
Primarily Uses
N/A
I was sort of hoping Target Core had baked in conditional selection, rather than conditional targeting (all or none)... It would be nice to be able to have a skill limited to only selecting possible targets by condition (such as having less then 50% health, etc...) but Target Core targets ALL possible targets (no manual selection).


I would settle for a single conditional that filtered possible targets like a lunatic mode note tag. That way you wouldn't need to try and support every possible combination with specific note tags for each. That is, if what I've described is something you're interested in. :)
 

HeroicJay

Veteran
Veteran
Joined
Jun 23, 2014
Messages
322
Reaction score
177
First Language
English
Primarily Uses
RMMV
I'm not sure if I'll support it (is it really worth doing <OneOrAll> for a skill that normally targets everything on the field?) but I figure I should at least do some sanity checking to make sure a. I'm not breaking Target Core, b. Target Core isn't breaking me (which it doesn't seem to be), and c. what happens when you combine <OneOrAll> with a Target Core tag. I do see where you're coming from, though, and will consider it once I get the toggle buttons sorted out (I don't think the toggle buttons will be hard, I just haven't done it yet.)


Anyway, Target Core test results: Any Target Core tags that affected targeting completely overrode OneOrAll. Doesn't seem to matter which plugin I put above the other. Repeat worked fine, though (I would have been surprised if it hadn't.) Honestly? I'm just glad the two didn't have any major conflicts though.


However, there was something didn't consider before: <SplitMulti> and <DivideMulti> would always count up the total number of actors (for any marked "Allies") or monsters (for any marked with any other tag, even "Everybody") for determining whether the damage was split and how. That doesn't seem right; it should only count up the number of actual targets, and should include allies for "Everybody". That is a thing I'd like to fix, so let me see if I can pull the number of valid targets out of Target Core.


EDIT: Huh. Yanfly doesn't set "isForFriends" as true when enemies can be targeted. I expected otherwise. Well, let me still see if I can get a target count out of Target Core.


FURTHER EDIT: Yes, I can. In fact, even without Target Core, it's probably better to do it that way than the way I had been doing it. I'll update the pastebin link momentarily.
 
Last edited by a moderator:

Nina888

Veteran
Veteran
Joined
Feb 28, 2016
Messages
79
Reaction score
0
First Language
French
Primarily Uses
It's possible to have a target plugin where you select single and multi target with the same skill but to select ally or enemy with the same skill (like make a heal on a zombi for kill him ) ?
 

HeroicJay

Veteran
Veteran
Joined
Jun 23, 2014
Messages
322
Reaction score
177
First Language
English
Primarily Uses
RMMV
Yami's Invert Target does that.

this IS compatible with Yami's Invert Target.
 
Last edited by a moderator:

killerfer

Veteran
Veteran
Joined
Nov 4, 2015
Messages
198
Reaction score
50
First Language
Portuguese
@HeroicJay


You really are heroic :D this is so nice. Although this is indeed compatible with YED - Invert Target, that plugin has not been updated in ages, and it has some serious problems with skills that target all enemies/all allies and skills that target only the user (even with the not invert notetag it stays bugged). Do you have the intention of implementing that feature on your plugin as well? (as to it have the invert target feature too without needing another plugin)
 

HeroicJay

Veteran
Veteran
Joined
Jun 23, 2014
Messages
322
Reaction score
177
First Language
English
Primarily Uses
RMMV
Oh, yeah, that's right, I actually have my own personal fixed version of Invert Target that fixes "all allies/enemies" targeting and "No invert", though the all targeting would require Battle Core (just like this plugin does and for similar reasons). The issue with self-targeting skills is still there, but since No Invert works now it's not so relevant. I've alerted Yami on how I fixed them - whether she actually has or not is on her.


To include Yami's efforts in this plugin would involve a lot of duplicated work, and it might be a little morally sketchy to give you my modified version unless Yami okays it. Hmmm... perhaps I could make my own patch for it? That's maybe a bit of a gray area...


Well, for now, I put a patch in Yami's topic. If Yami has no issues with it, you can use that.
 
Last edited by a moderator:

Nina888

Veteran
Veteran
Joined
Feb 28, 2016
Messages
79
Reaction score
0
First Language
French
Primarily Uses
It's good if the <no Target> of yami work, i place invert target plugin and i have place the invert target but the no invert don't work .
 

HeroicJay

Veteran
Veteran
Joined
Jun 23, 2014
Messages
322
Reaction score
177
First Language
English
Primarily Uses
RMMV
I have a patch in Yami's topic to fix No Invert.
 

Roguedeus

It's never too late to procrastinate...
Veteran
Joined
Mar 19, 2013
Messages
542
Reaction score
111
First Language
English
Primarily Uses
N/A
I'm not sure if I'll support it (is it really worth doing <OneOrAll> for a skill that normally targets everything on the field?) but I figure I should at least do some sanity checking to make sure a. I'm not breaking Target Core, b. Target Core isn't breaking me (which it doesn't seem to be), and c. what happens when you combine <OneOrAll> with a Target Core tag. I do see where you're coming from, though, and will consider it once I get the toggle buttons sorted out (I don't think the toggle buttons will be hard, I just haven't done it yet.)


I'm not sure if I understand what you mean.

With VXAce, I wrote a conditional target plugin that I never released publicly, that allowed me to select for an action, only the in scope targets that met a condition. Such as being next to the actor in formation, or having a certain state active. I was hoping that Yanfly's Target Core, included similar functionality. But instead, it alters the scope of the action entirely. Where all targets with a certain state are always targeted. No individual selection is possible.


I'll give you an example of what I am hoping to accomplish.


An actor in a party has the ability to heal another actor within the same row. (using Yanfly's Row Formations) When the action is selected, the scope is single target, but the available targets are only other actors in the same row. This could be abstracted in other ways, such as only enemies with less than 50% health... etc... The scope remains normal, but the possible selections are conditional.


If you still think this would be unnecessary I understand. //rmwforums.s3.amazonaws.com/emoticons/default_smile.gif
 

killerfer

Veteran
Veteran
Joined
Nov 4, 2015
Messages
198
Reaction score
50
First Language
Portuguese
@HeroicJay


Hello! Little issue I found. When using YEP Battle Engine Core, the All Enemies/All Allies skills that have single target animations play the animation instantly on all enemies at once (the same with the damage pop ups and the life loss etc). When using this plugin to invert the scope of a single target skill, that is not what happens. The animation plays one at a time (like the original effect without YEP Battle Engine Core). That's not the case for skills that are set in the database to target "all enemies".
 

HeroicJay

Veteran
Veteran
Joined
Jun 23, 2014
Messages
322
Reaction score
177
First Language
English
Primarily Uses
RMMV
Are you using Yanfly's skill animations? I had some odd results when I didn't define Whole Actions with those. I'll check it out though.


EDIT: Yeah, no repro. I'd check the skill animations.
 
Last edited by a moderator:

killerfer

Veteran
Veteran
Joined
Nov 4, 2015
Messages
198
Reaction score
50
First Language
Portuguese
@HeroicJay


So I need to use the <whole action> tag in all those? I didn't use any tag in my "magic" skills.


Also, I tried setting the 3 action sequence packs plugins to off, the same thing happens, only when the default skill is set to single target in the database.


Guess I'm on to adding tags to all those :rswt:
 

HeroicJay

Veteran
Veteran
Joined
Jun 23, 2014
Messages
322
Reaction score
177
First Language
English
Primarily Uses
RMMV
Hm, you had no animation tags? That's odd. I'll check a different project.


EDIT: Oh, I get it. I didn't really understand what your issue was from your earlier post. I do see it. Correct me if I'm wrong, but it seems the issue is:


1. Multitarget skills with singletarget animations normally just play the animation on everything at once with Battle Engine Core.


2. The same thing does not happen with OneOrAll skills set to "1 Enemy" in the database; instead, it plays one-at-a-time.


Battle Animations could fix it, but I'm not sure at this point that this will be an easy fix from the plugin's point of view - and over so minor a thing at that. I'll see what I can do, though.
 
Last edited by a moderator:

killerfer

Veteran
Veteran
Joined
Nov 4, 2015
Messages
198
Reaction score
50
First Language
Portuguese
@HeroicJay


Yes that's it. And yes, if I set a <whole action> to the skill the problem does not occur. I think it's no biggie, I will just set it all my skills to have a action tag. But if someone doesn't use the Action Sequence Pack plugin, their skills will become "different" from the rest of skills (by using the Battle Engine Core default setting).


Thanks HeroicJay.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,863
Messages
1,017,053
Members
137,571
Latest member
grr
Top