VE - Toggle Targets

Victor Sant

Veteran
Veteran
Joined
Mar 17, 2012
Messages
1,694
Reaction score
1,449
First Language
Portuguese
Primarily Uses








 


This plugin allows to setup certain action to have a option to toggle it’s targets. You can switch between single target/all targers or between allies/opponents. You can also setup actions to deal less damage if targeting all or have them to have the damage divided by the number of targets.


 


Download:


Victor Engine - Toggle Targets


 


Credits:


Author: Victor Sant


 


Terms of Use
 
Last edited by a moderator:

Neo Soul Gamer

Veteran
Veteran
Joined
Aug 10, 2012
Messages
632
Reaction score
352
First Language
English
Primarily Uses
N/A
I have to say... Your plugin's have been great. Compatibility has been awesome compared to your VXA scripts. Thanks a lot!
 

HintonR

Veteran
Veteran
Joined
Mar 2, 2016
Messages
197
Reaction score
26
First Language
English
Primarily Uses
RMMV
TypeError: Cannot read property 'setTargetToggle' of null
    at Scene_Battle.selectEnemySelection (/L:/RPG%20Maker/ES/js/plugins/VE_ToggleTargets.js:567)
    at Scene_Battle.onSelectAction (rpg_scenes.js:2398)
    at Scene_Battle.onSelectAction (/L:/RPG%20Maker/ES/js/plugins/YEP_BattleEngineCore.js:4047)
    at Scene_Battle.onSelectAction (/L:/RPG%20Maker/ES/js/plugins/VE_ToggleTargets.js:576)
    at Scene_Battle.commandAttack (/L:/RPG%20Maker/ES/js/plugins/YEP_WeaponUnleash.js:864)
    at Scene_Battle.commandAttack (/L:/RPG%20Maker/ES/js/plugins/VE_ToggleTargets.js:537)
    at Window_ActorCommand.Window_Selectable.callHandler (rpg_windows.js:896)
    at Window_ActorCommand.Window_Command.callOkHandler (rpg_windows.js:1420)
    at Window_ActorCommand.Window_Selectable.processOk (rpg_windows.js:1150)
    at Window_ActorCommand.processOk (rpg_windows.js:5428)


Heya. 
 


So I'm getting an error with toggle target when I reach the last enemy. I will look into it. But this might be due to a non-Yanfly plugin called LeBattleAutoSelect.


Will be playing around with plugin order to see.
 

HintonR

Veteran
Veteran
Joined
Mar 2, 2016
Messages
197
Reaction score
26
First Language
English
Primarily Uses
RMMV
TypeError: Cannot read property 'setTargetToggle' of null
    at Scene_Battle.selectEnemySelection (/L:/RPG%20Maker/ES/js/plugins/VE_ToggleTargets.js:567)
    at Scene_Battle.onSelectAction (rpg_scenes.js:2398)
    at Scene_Battle.onSelectAction (/L:/RPG%20Maker/ES/js/plugins/YEP_BattleEngineCore.js:4047)
    at Scene_Battle.onSelectAction (/L:/RPG%20Maker/ES/js/plugins/VE_ToggleTargets.js:576)
    at Scene_Battle.commandAttack (/L:/RPG%20Maker/ES/js/plugins/YEP_WeaponUnleash.js:864)
    at Scene_Battle.commandAttack (/L:/RPG%20Maker/ES/js/plugins/VE_ToggleTargets.js:537)
    at Window_ActorCommand.Window_Selectable.callHandler (rpg_windows.js:896)
    at Window_ActorCommand.Window_Command.callOkHandler (rpg_windows.js:1420)
    at Window_ActorCommand.Window_Selectable.processOk (rpg_windows.js:1150)
    at Window_ActorCommand.processOk (rpg_windows.js:5428)


Heya. 
 


So I'm getting an error with toggle target when I reach the last enemy. I will look into it. But this might be due to a non-Yanfly plugin called LeBattleAutoSelect.


Will be playing around with plugin order to see.


Yup... just did some order testing.

Toggle Target must be placed BEFORE LeBattleAutoSelect. 

Everything works as intended. Great work man! I'm the guy from Youtube. I'll post what you sent about the Control Text conflict to Yanfly. If you haven't already contacted him so he can update his plugin. Thanks again!!
 

killerfer

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


Hello Victor. If it's not much trouble, my game has a LOT of skills, and I want all of them to have the <toggle scope> option (like BOF or FF). Could we have, in a future update, a plugin parameter to set this to "on" in all skills without the need for the notetag? Thanks for all your work.
 

Victor Sant

Veteran
Veteran
Joined
Mar 17, 2012
Messages
1,694
Reaction score
1,449
First Language
Portuguese
Primarily Uses
@killerfer


it's possible. I must confess I just didn't add it because I was being lazy and hope no one would really care about it  BD


I will add it after i finish the current plugin i'm working.
 

HintonR

Veteran
Veteran
Joined
Mar 2, 2016
Messages
197
Reaction score
26
First Language
English
Primarily Uses
RMMV
Hi Victor. 


I have another issue with something happening in battle. When a skill has both toggle scope and toggle target, it seems like whenever I've targeted all (scope) and then try to swap back to target allies/enemies it will auto execute. 


This seems to be a compatibility issue with the LeAutoBattleSelect plugin. 


When I put your plugin before LeAutoBattleSelect, there are no errors. Except for the little bug when switching between allies/enemies when target ALL is set before switching to allies/enemies.

However, when I put it after LeAutoBattleSelect. Toggling between scopes and targets works just fine. But when I am on the last enemy I get this crash. 


Toggle.png
It's probably not a problem with your script. And I can live without AutoBattleSelect. But sometimes the subtle things are the most important...


I will also try to post on his thread to see what I can learn and what I can modify to fix this issue. 

Thank you!
 
Last edited by a moderator:

Victor Sant

Veteran
Veteran
Joined
Mar 17, 2012
Messages
1,694
Reaction score
1,449
First Language
Portuguese
Primarily Uses
Well there is not much i can do if you don't provide a link the plugin (as i don't have any idea of what is 'LeAutoBattleSelect' and I won't search through the internet just to do so).


Also, i need the console error message, the in-game error message is quite useless, since it don't point where the error occured.
 

killerfer

Veteran
Veteran
Joined
Nov 4, 2015
Messages
198
Reaction score
50
First Language
Portuguese
@HintonR @Victor Sant


Sorry to barge in :p


Victor I didn't know that plugin either but I just saw the thread and felt like pointing it out:






HintonR, when you get the error you need to press F8 to open the console and then you print the screen to show the error.
 

Victor Sant

Veteran
Veteran
Joined
Mar 17, 2012
Messages
1,694
Reaction score
1,449
First Language
Portuguese
Primarily Uses
This explain why the forum search didn't return any result, The topic name is  'Auto Battle Selection' and the plugin filename is 'LeAutoBattleSelection'.


Now that i see what this plugin does I belive that it is not a good idea to use them together.


Think: You have a toogleable action that targets enemies. If there two enemies, you can toggle to actors, But if have only a single enemy, you will not able to toggle. (wich is exactly what causes the issue).


This plugin skips the target selection, witch is vital for the toggle target, since all the targeting setup needed for the toggle targets is done on those windows.


You will notice that I added a selction for all targets, even when by default it is skipped, this show how important selecting the target is for this plugin.


Sorry but there is not much to be done. It would need to redesign or add too many new check to the plugin, for something that is not even supposed to work well together.


This is a case of plugins that weren't designed to work together, because their role of one is basically to undo what the other was supposed to do.


tl;dr;


If the tharget selection is skiped, it will not work.
 
Last edited by a moderator:

HintonR

Veteran
Veteran
Joined
Mar 2, 2016
Messages
197
Reaction score
26
First Language
English
Primarily Uses
RMMV
@Victor Sant@killerfer


Here is the error log just for reference. But I definitely understand that what you mean Victor. It's no biggie. Thank you for responding anyway. //rmwforums.s3.amazonaws.com/emoticons/default_smile.gifToggle.png


Also, sorry about earlier for not giving enough information. Wasn't thinking... heh. 
 
Last edited by a moderator:

Mortalis

Veteran
Veteran
Joined
Jun 9, 2014
Messages
34
Reaction score
3
First Language
English
Primarily Uses
Greetings Victor Saint! I am having crashing issues between this and Yanfly's Skill Learn System. When I try to learn a skill the game crashes. I have included a screen shot, when I turn Toggle Target off it works. Thanks if you have insight! And I do have the most up to date Skill Learn, Toggle Target, and the VE Engine.

crash.png
 

HeroicJay

Veteran
Veteran
Joined
Jun 23, 2014
Messages
322
Reaction score
175
First Language
English
Primarily Uses
RMMV
Hm, this apparently predates my own single/multiple switch (in the "in development" forum) by a week, but I had no idea it existed until just now. Huh.
 

Victor Sant

Veteran
Veteran
Joined
Mar 17, 2012
Messages
1,694
Reaction score
1,449
First Language
Portuguese
Primarily Uses
@killerfer updated the plugin and added the default plugin parameters.


@Mortalis check if the updated plugin still have this issue. I've made some changes but didn't test the compatibility myself.


@HeroicJay it happens all the time, a lot of plugins I've made also had other similar plugins that were released previously. But this don't matter, it's good to have different options if for some reason people can't use one of them.
 

LunarWingCloud

Villager
Member
Joined
Aug 23, 2013
Messages
5
Reaction score
1
First Language
English
Primarily Uses
Victor you literally just saved my life right now. Not being knowledgeable in JavaScript, I've been looking everywhere for this exact plugin to be made for MV. Thank you so much for making this. 
 
Last edited by a moderator:

solaris1111

Veteran
Veteran
Joined
Jan 1, 2014
Messages
115
Reaction score
20
First Language
French
Primarily Uses
Hi Victor, first, thank you for this plugin! I used the vx version on my previous game and it was needed! Thank you!


I think i have a problem with the key binding. It work very fine with the default "shift" for scope toggle, if i add or change it for something else (i tried W, Page Up and Page Down) and nothing work. I'd like to change so the player can toggle with LB and/or RB, classic style.


I turn OFF all plugins that could interfere with button or key mapping, same result.
 

Victor Sant

Veteran
Veteran
Joined
Mar 17, 2012
Messages
1,694
Reaction score
1,449
First Language
Portuguese
Primarily Uses
"Q", "Page Up"/"Page Down" (with whitespaces) aren't valid keys


Only keys on the Input.keyMapper can be used. 


Input.keyMapper = {
    9: 'tab',       // tab
    13: 'ok',       // enter
    16: 'shift',    // shift
    17: 'control',  // control
    18: 'control',  // alt
    27: 'escape',   // escape
    32: 'ok',       // space
    33: 'pageup',   // pageup
    34: 'pagedown', // pagedown
    37: 'left',     // left arrow
    38: 'up',       // up arrow
    39: 'right',    // right arrow
    40: 'down',     // down arrow
    45: 'escape',   // insert
    81: 'pageup',   // Q
    87: 'pagedown', // W
    88: 'escape',   // X
    90: 'ok',       // Z
    96: 'escape',   // numpad 0
    98: 'down',     // numpad 2
    100: 'left',    // numpad 4
    102: 'right',   // numpad 6
    104: 'up',      // numpad 8
    120: 'debug'    // F9
};


Keys enabled by plugins would work as long those keys are inserted on the Input.keyMapper.
 

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

Latest Threads

Latest Profile Posts

JDgoldvox wrote on Mr. Detective's profile.
hey, could u help me with a problem? basically, How do I delete a character from a map after a cut scene is over? I am really new with RPG maker MV. Please help!
The most rewarding part of making custom body character parts is absolutely not making the masks work. Somebody please put me out of my misery.
Any commercial devs here ever mess with Gamejolt? Been contemplating making my games available there but don't know if it's worth the effort or not.
Social distancing taught me of how much of not a loner I am. Dammit, I miss seeing my friends...
Happy 4th of July all. Anybody have plans? Mine here is staying home away from the virus. Still a nice 3 day weekend.

Forum statistics

Threads
99,262
Messages
963,605
Members
130,856
Latest member
superfluffy
Top