Item fails when used on actor that doens't meet conditions

How to make item that fails when used on actor that doesn't meet conditions? eg. Using Mana potion on someone who uses TP?

It would be awesome if you couldn't target the actor at all but since I've heard that "can't" be done this is the second best option.
Try making the item run on common events. Start a conditional branch with if (actor name) is (class), then show text of it failing, and branch end. I'm not sure if this will work though, I've only had VX Ace for about a week.
Running a common event will work, but if the item is set to consumable it'll get tricky to prevent it from uselessly being consumed.


However, your information that it can't be done is partially wrong - it cannot be done by eventing, but there are several condition scripts that do exactly that.


So if you can use scripts (they're blocked in the free Lite version and enabled in the full version) then it can be done, just search the master script list for those scripte, there are several (one from Tsukihime, I think one from Yanfly and another one from an author whose name I don't remember now)
@Andar: I think you misread the first post. Show me a script that prevents TARGETTING of enemy/actor with X condition? And of course I have full version.

Tsukihimes scripts that check for conditions (like Scope Conditions, Tag Manager) don't check for results. I don't think doing it with common events is a choice since I would like it to show the "FAILED" popup when used on an actor without condition X.
Of course the scripts don't check for results, you need to use the tags for that.


The actor that uses TP but not MP would get a tag TP_only and the conditions for the item would be set to not work when that tag is detected.


You might need to experiment a bit with which tag goes where (especially if you have mixed classes) but that is the way you handle such a problem, and not by calculating result numbers. And yes, Tsukihime's tag manager has an addon for preventing targeting. I don't have the link but I checked that a few months ago.
I'm not sure if I follow you. I mean when using Tag Manager and tagging the item and the actor and then testing it the Item checks the condition (which it doesn't meet since the condition for the item is Mana and the actor doesnt have that tag)  when it is used but doesn't go far enough that it would actually calculate the results if the conditions aren't met so it would result in Failed. "if a target is not within the scope of the action, then it wouldn't even be targeted" even when you can target the actor.

So you use the item, target the wrong actor and get no popup for failing. 
Of course the scripts don't check for results, you need to use the tags for that.


The actor that uses TP but not MP would get a tag TP_only and the conditions for the item would be set to not work when that tag is detected.


You might need to experiment a bit with which tag goes where (especially if you have mixed classes) but that is the way you handle such a problem, and not by calculating result numbers. And yes, Tsukihime's tag manager has an addon for preventing targeting. I don't have the link but I checked that a few months ago.
Item application is done as follows


1. Check if item can be used on target (used?)


2. Determine if it hit? (hit? miss?)


3. Determine if target evades (evade?)


Scope manager focuses on the first step: if target does not satisfy the condition, the item will not be used on that target.


Yanfly's popup script likely relies on the item actually being used in order to determine what to show.


Tag Manager also operates on the first check.


The reason for this is because anything else would require me to overwrite the way items are applied.

Original thread: https://forums.rpgmakerweb.com/threads/item-fails-when-used-on-actor-that-doenst-meet-conditions.36048/