Unreachable Targets


Plugin Download


This plugin allows to creat a trait that makes battlers unable to be targeted by other battler’s actions and battlers that are able to reach them.


Requires the Victor Engine – Basic Module

Learn how to Install Victor Engine Plugins


Was this useful for you? Consider lending a hand by becoming my patron at Patreon, so I can continue creating content to help you and many other developers.


  1. Sorry to bother yourself Victor,i got this error using the battle test:

    Excuse me for my bad english and thanks for all.

    Liked by 1 person

    • This error message is not useful on helping to find the issue.
      Post a picture of the console error message (press F8 during test play and send a picture from that window).

      Also, if you’re testing with other plugins, try to test it with only the basic module and this plugin and check if the error still happens, if not, it might be a compatibility and I will need you to find wich plugin is causing that.

      Like

  2. Im sorry Victor,Firefox was messing with the page text enconding. Redownloaded it again with chrome and it worked.

    Like

  3. hi! This is a interesting plugin thanks! I wanted to make something like The Darkest Dungeon were you can only hit one of the 2 enemies in the front with targeted spells, but some can hit up to the third enemy and area attacks hit all enemies. I will try to do something like getting all enemies positions and if the X of the enemy is bigger than the rest he will be targetable, otw he won’t. Probally will use states to do it since your plugin don’t have a eval option. It looks a pain to do that tougth, probally will get some errors untill i figure out how to do it right.

    Would love a plugin to help me with that in case you run out of ideas 🙂

    Like

    • Well, depending on who flexible you want it to be, you can use the Passive States plugin.
      It have an eval condition option, so you can make it apply the state based on the number of alive enemies ($gameTroop.aliveMembers().lenght)

      Liked by 1 person

      • thanks, that is a good function, i’ll try it later and tell you if i can’t do it. When i said about using states i was talking about the Passive States plugin already :). i’m not sure how the index work but if changes depending on the members alive (like enemy 2 died, enemy 3 is now enemy 2) i probally can do it. just need to find out how to find the X of a battler.

        i’ll try to use the function you said then do a for loop to associate the enemys X to a variable, then i use the passive states to check if the enemy that is with it have a X bigger than the rest. will need to think a little and test some things, but thanks for the fast response 🙂

        Like

      • Sorry to bother you again, but could you help me? I tried using the eval at the stat but it seens it is now working. Here is what i have done:
        enemy notetag:

        var eva = function() {
        var count = $gameTroop.aliveMembers().length;
        for (i = 0; i unt1){ var unt1 = dummy; $gameVariables.setValue(7, unt1); $gameVariables.setValue(5, i)}
        if (unt2 < unt1 && unt1 != dummy){var unt2 = dummy; $gameVariables.setValue(8, unt2); $gameVariables.setValue(6, i)}
        }
        var lol1 = $gameVariables.value(5);
        var lol2 = $gameVariables.value(6);
        if (user.index() === lol1 || user.index() === lol2){
        return true;
        }
        };
        eva();

        state notetag:
        it seens it is not executing it for some reason. I used variables to show a text later so i can see if it was working, but they always return 0. I also disabled all plugins except the necessary ones 😦

        Like

    • The page don’t allows you to use tags (it thinks you’re using html tags), use [ ] to represent the notetags.

      Like

      • sry for that, here:
        Enemy notetag:
        [custom passive state: 15]
        var eva = function() {
        var count = $gameTroop.aliveMembers().length;
        for (i = 0; i unt1){ var unt1 = dummy; $gameVariables.setValue(7, unt1); $gameVariables.setValue(5, i)}
        if (unt2 2;
        [/custom passive state: 15]

        but it also didn’t work, the function works fine in the console tought

        and i also tried using this function in the damage formula and associating it to a variable to do a eval of the state:

        var lol = $gameTroop.aliveMembers().length; $gameVariables.setValue(4, lol) // in the global formula

        and in the enemy:

        [custom passive state: 15]
        $gameVariables.value(4) > 2;
        [/custom passive state: 15]

        also didn’t work :/

        Like

      • If the tag is exactly like you posting, the issue is with it.

        the tag is

        <custom passive state: ID>
        code
        </custom passive state>

        don’t add the ID when closing the tag.

        Like

  4. oh, silly me, ctrl c, ctrl v problems hehe. Tank you, but now i’m having another problem with the code. I want it to check his index to see if he is the one that is closer to the party, but it seens i can’t use user.index() or a.index it says user is not defined. Do you know hot to do it?

    Like

    • to retrive the index you need to call
      array.indexOf(object)
      so if you have the enemy object you can use
      $gameTroop.members().indexOf(enemy) (‘enemy’ must be the enemy object)

      Like

      • by enemy object, what do you mean? (sorry i don’t have much knowledge of javascript yet)

        it is his id, his name or something else i’ll have to use a function for?

        Like

      • the enemy object is.. the enemy. The javascript object that have all enemy data. without it you can’t retrieve it’s id.

        All enemies are stored on $gameTroop.members() you need a way to get the enemy you want from that. But this is rathe complex. i suppose you should go to the rpgmakerweb forum and ask there, since the reply options here is quite limited and makes hard to explain the things.

        Like

      • good lord, i did it. I used a script in the the troop events, did a string with all the screenX of the enemies, sorted it in decrescent order and used a command to apply the untargetable for everyone but the ones with highest screen X. Ended up i didn’t had to use the passive states plugin, but thanks for the help 🙂 the function to see how many enemies are alive really helped.

        Like

Leave a comment