RMMV i cant attack a specific # of targets in a specified row(s). Yanfly formation and Target core plugins

boulops1

Veteran
Veteran
Joined
Dec 6, 2020
Messages
64
Reaction score
1
First Language
english
Primarily Uses
RMMV
Using MV and Yanfly's formation and targetcore plugins.
the question is, how do I make a spell that lets me choose 2 targets but is also controlled Yanfly's formation parameters I set. for example, my warrior knows the "cleave" spell that's scope is any 2 targets I pick BUT is limited to the front row only because it is a melee spell. all I'm seeing is spells that hit entire rows, I don't want that. if there are 4 in front and the spell is limited to only being able to hit 2 people I want to be able to select which 2 in that row of 4 i hit.

another is how do I make a range of rows that the spell can hit. for example my mage knows fireball. it should be able to hit anything in the 1st and 2nd row but not the back 3rd row as that would be considered "long range." i see the code for setting specific rows but not ranges of rows.


thanks.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
41,867
Reaction score
14,521
First Language
English
Primarily Uses
RMMV

I've moved this thread to Plugin Support. Please be sure to post your threads in the correct forum next time. Thank you.

 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
708
Reaction score
378
First Language
English
Primarily Uses
RMMV
Using MV and Yanfly's formation and targetcore plugins.
another is how do I make a range of rows that the spell can hit. for example my mage knows fireball. it should be able to hit anything in the 1st and 2nd row but not the back 3rd row as that would be considered "long range." i see the code for setting specific rows but not ranges of rows.
Looking at the Lunatic mode for each of those plugins, I'd go off of the example notetag from Target Core and include the information from Row Formation, thusly:
<Custom Target Eval> for (var i = 0; i < foes.aliveMembers().length; ++i) { var member = foes.aliveMembers()[i]; if (member.row() < 3) targets.push(member); } </Custom Target Eval>

Just eyeballing it, I think that should affect every enemy in rows 1 and 2.

For the first part...using the Selection Control plugin and simply giving the skill the notetag:
<Select Condition>
Front Row Only
</Select Condition>
doesn't do it?
 

boulops1

Veteran
Veteran
Joined
Dec 6, 2020
Messages
64
Reaction score
1
First Language
english
Primarily Uses
RMMV
@ATT_Turan

I appreciate every bit of help you have to offer!
I did find a solution to the 2nd part of my question, how to make a range of rows for a skill to select from. I didn't notice that you could use the selection conditions,

<Select Conditions>
Row 2 Max
</Select Conditions>

Which will allow the skill to hit everything up until that row, a range, which is perfect. there are more but that was the main one I was looking for.

as for the first part of my question. what you said is true, that does work but I cant specify the individual targets. the default scope is "1-4
random enemies" which I don't want. I want to be able to specify which 1-4 enemies I hit. to be even more specific i also don't want to be able to select the same target multiple times. ex chain lightning has to bounce to 3 different selected targets.


in this thread @Zevia makes a plugin that ALMOST does exactly that. the only issue is that you can select the same target multiple times which i don't want. i know nothing about coding and wish i could add that in somehow or find another way to be able to select multiple targets but not the same target multiple times. if that makes sense haha
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
708
Reaction score
378
First Language
English
Primarily Uses
RMMV
as for the first part of my question. what you said is true, that does work but I cant specify the individual targets. the default scope is "1-4 random enemies" which I don't want.
Oh. Well, in your original post, you said
my warrior knows the "cleave" spell that's scope is any 2 targets I pick
so I assumed you had the choosing of the targets handled.
https://forums.rpgmakerweb.com/index.php?threads/select-multiple-targets-v2-0-2.104341/

in this thread @Zevia makes a plugin that ALMOST does exactly that. the only issue is that you can select the same target multiple times which i don't want. i know nothing about coding and wish i could add that in somehow or find another way to be able to select multiple targets but not the same target multiple times. if that makes sense haha
Let's see if Zevia gets back to you. Are you sure it's a bug in his plugin? He states a number of times in that thread that he doesn't guarantee compatibility with the Yanfly plugins, have you tried it with the Yanfly target/selection/etc. disabled?
 

boulops1

Veteran
Veteran
Joined
Dec 6, 2020
Messages
64
Reaction score
1
First Language
english
Primarily Uses
RMMV
@ATT_Turan
sorry If underlining seems aggressive, just trying to make sure i make sense or get what im trying to explain across. i can see how that cleave comment might be misleading. if i take away those other plugins i lose a lot of the features i want. it still works with all the other plugins without crashing or anything.

do you know how to make a multi target skill that lets you select the targets but also doesn't let you select the same target multiple times?

I've been looking everywhere and i cant seem to find an answer and I don't think Zevia will answer just cause of how long its been since they've been active.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
708
Reaction score
378
First Language
English
Primarily Uses
RMMV
No I don't. I think you'll have to take Zevia's plugin and (presuming you don't know how) convince or commission a coder to do it.

You didn't answer my question, which is an important one - does the plugin work that way (able to select a target twice) when it's the only plugin being used? Or does it only do that when you start using Yanfly plugins at the same time?

That's important because when you get into someone trying to change the plugin, it will be much more complicated if that functionality is only happening when it interacts with the Yanfly material (the person working on it will have to have purchased the Yanfly material and will need to become familiar with that code as well).
 

boulops1

Veteran
Veteran
Joined
Dec 6, 2020
Messages
64
Reaction score
1
First Language
english
Primarily Uses
RMMV
@ATT_Turan
Yeah even after removing them it still has the ability to target the same enemy multiple times.

dang.. so close to having all this stuff working properly.




thanks.
 

oooNUKEooo

Veteran
Veteran
Joined
Sep 22, 2020
Messages
49
Reaction score
10
First Language
br portuguese
Primarily Uses
RMMV
then youre closer than you think...

if you got the yanflys plugins and this 3rd one working together, thats good. im assuming you have all of yanflys plugins, so, using the target core and selection control plugins, create a blank state and make it so that the selection of the skill applies the said state to the target and add to the skill a condition (via notetags) that only battlers without the state can be selected as valid targets. make the state only last 1 or 2 turns.
 

boulops1

Veteran
Veteran
Joined
Dec 6, 2020
Messages
64
Reaction score
1
First Language
english
Primarily Uses
RMMV
@oooNUKEooo

ooooh snap nuke! I think your on to something. i guess ill have to make this modification to every skill right? cause i dont want any of the skills in my game to be able to select the same target multiple times..

im understanding what your saying but also having a hard time seeing it. the state would have to be invisible and not show in battle.. are you able to snippet or gif an example of the condition note tag?


im very newbie at this but learning so much from you guys.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
708
Reaction score
378
First Language
English
Primarily Uses
RMMV
@oooNUKEooo

im understanding what your saying but also having a hard time seeing it. the state would have to be invisible and not show in battle..
By default, states don't show in any way in battle unless you tell them to in the SV Motion and SV Overlay fields.
are you able to snippet or gif an example of the condition note tag?

create a blank state and make it so that the selection of the skill applies the said state to the target
I have no idea how you'd do this without writing new code. I don't see anything in the Selection Control that could apply a state upon selection.
and add to the skill a condition (via notetags) that only battlers without the state can be selected as valid targets.
<Select Conditions>
Not State: x
</Select Conditions>
make the state only last 1 or 2 turns.
You would specifically want it to last only 1 turn so that you could target the same enemies again next round. I would even use the Turn Start timing from Yanfly's battle core just to help make sure.
 

boulops1

Veteran
Veteran
Joined
Dec 6, 2020
Messages
64
Reaction score
1
First Language
english
Primarily Uses
RMMV
@oooNUKEooo @ATT_Turan

okay so i tried:

1614197433669.png
note: state "cancel same select" is state 15. ignore "row 3 max"

and it partly works for after the skill is used, I cant select those targets again next turn.. but it doesn't work for the initial cast of it.. so while selecting the 4 targets the skill doesn't register that a target will have that state and therefor will still let me select the same target multiple times on that cast.
 
Last edited:

oooNUKEooo

Veteran
Veteran
Joined
Sep 22, 2020
Messages
49
Reaction score
10
First Language
br portuguese
Primarily Uses
RMMV
i kind of understood the problem... i think its about the timing... when using the multiple targets plugin, you select a target, then you select another, then the effects occur.

when youre selecting the targets, the effect havent happened yet, so no state was applied yet. you cant rely on the default effect box, you need to apply the effect upon selecting a target.

using the buffs and states and autopassive states plugins (from yanfly), maybe this will work:

create a state, leave it blank for most of its attributes, and make it passive on the cleave skill user.

insert in its note box the following notetag, making the needed substituitions:

Code:
<Custom Initiate Effect>
   //bellow, Z is the number of the state that will prevent being selected twice
   target.addState(Z);
</Custom Initiate Effect>

proceed with what you already made, checking if the state Z is not present in order to be a valid target selection.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
708
Reaction score
378
First Language
English
Primarily Uses
RMMV
and it partly works for after the skill is used, I cant select those targets again next turn.. but it doesn't work for the initial cast of it
Right, there's no way that adding a state during a skill could do anything before the skill has been activated (if it were that easy, we both would've told you to do that :p ).

I'll be curious to see what happens when you try Nuke's suggestion. The description in Buffs and States for Initiate Effect does say "when the battler selects a target," but my initial assumption is that it actually happens after selection and before running the the normal code for the skill - because, again, that is the point that anything associated with the skill will normally happen. I do not think it will allow you to apply the state during the targeting phase.

But it depends on how Yanfly wrote this to interact with his Selection plugin, I might be wrong.
 

oooNUKEooo

Veteran
Veteran
Joined
Sep 22, 2020
Messages
49
Reaction score
10
First Language
br portuguese
Primarily Uses
RMMV
the thing is: i know little about this multiple skill selection plugin. if the code above dont work either, ill be needing more details on how it works. providing a video each test would be a good idea.

the thing with those very original ideas in rpgmaker mv is that there are, usually, so many of them in one game and they differ so much from the original intent of the engine that too many plugins from different sources may be needed and it can be very problematic.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
708
Reaction score
378
First Language
English
Primarily Uses
RMMV
Alright...I have something for you to try. Please note I have not tested this at all, so it might not be of any help. What I hope will happen is that while you're selecting multiple targets, if you try to click/hit Enter on a target you've already selected, the button press will just be ignored until you select a unique target.

In Zevia's plugin, go to line 143. You want to cut that line, which says
var isForFriend = action.isForFriend();
and paste it two lines up. So you should have:
var action = BattleManager.inputtingAction(); var isForFriend = action.isForFriend();

Then add the following code on the next line, before the action.setTarget:
for (var i = 0; i < action._multipleTargets.length; i++) { if (isForFriend && $gameParty.members[index]===action._multipleTargets[i]) return; else if ($gameTroop.members[index]===action._multipleTargets[i]) return; }

Let me know what happens with that.
 

boulops1

Veteran
Veteran
Joined
Dec 6, 2020
Messages
64
Reaction score
1
First Language
english
Primarily Uses
RMMV
@oooNUKEooo @ATT_Turan

alright. 1st, i tried your method nuke and this is what i used and it didn't work. the notes i used are below.. if you want you can look up Zevia's plugin and see her coding for it. that's what Turan checked. it all just looks like gibberish to me.

1614283713747.png

2nd, i tried your edit Turan on Zevia's coding and it also didnt seem to work. when i casted on a target it just straight up hit only 1 target even though i specified 4 targets.

i wish i just knew some coding.. like this request of what i want doesn't seem too complicated. im surprised there isnt a plugin that already does this. i just dont know any coding.

yanfly has a code for a chain lightning spell that i think just need some slight altering..


it hits multiple targets and doesn't hit the same target twice but then the other targets are random and not selected by the user.

any suggestions fam?



thanks.
 

oooNUKEooo

Veteran
Veteran
Joined
Sep 22, 2020
Messages
49
Reaction score
10
First Language
br portuguese
Primarily Uses
RMMV
yeah, i saw your other post, figured that may be you also trying to solve this problem.

the thing is as i described in this other topic of yours: if you want a second window to open and select a new target, youll need a plugin or some different coding. your plugin should have solved things for you, but you want a specific thing that the plugins coder didnt take into account, probably because the plugin was developed for another need.

that chain lightning code is for the same skill being repeated with less damage each time. it dont call a window for reselecting a new target.
 

boulops1

Veteran
Veteran
Joined
Dec 6, 2020
Messages
64
Reaction score
1
First Language
english
Primarily Uses
RMMV
@oooNUKEooo

yeah i saw the way the damage got modified which is cool but i can just ignore inputting that part all together and i wont have to deal with damage splitting. Your right the creator of the plugin im trying to use didnt account for that. ive tried messaging then but no luck.

there has to be some small chunk of coding that lets you reselect new targets. i swear a small change to that chain lightning would do it frick! hahahah
 

oooNUKEooo

Veteran
Veteran
Joined
Sep 22, 2020
Messages
49
Reaction score
10
First Language
br portuguese
Primarily Uses
RMMV
ill look into something latter and let you know if i find it.
 

Latest Threads

Latest Profile Posts

Yay. I turned 39 today. Another year older, another year closer to the grave.
I'm sure the latest post/thread in the sidebar used to have 5 posts. Was it always been like this?

Made it to the 10th video doing this! :kaocry:

renderTimingPixel.png
Made the "My Beating Mystery" board today:
3ENFLSC.png

in Grim Trigger episodes 3 & 4, the main characters play a Clue rip-off board game called "My Beating Mystery" (haha), so of course I had to draw the board for it. Can't decide if I wanna add blood or not
Jeez...
I finally decide, after several ppl asking me to, to create a gamethread about project M... And my internet craps out on me halfway through the process :(

Forum statistics

Threads
110,405
Messages
1,053,050
Members
143,468
Latest member
oldj
Top