Problem with gaining "SP" (TP)

I am reworking the TP system a bit to better fit my game style.  In battle, there are 3 types of skills.  "Magic" which uses Mana (MP), "Special" which uses Spirit (SP), and "Spirit" which uses a variety of things to generate SP.  I've got the 3 categories of skills working, and currently, the Lvl. 1 skill that all classes start with is just called "Spirit", part of the Spirit skills.  The skill does no damage, healing, etc.  All it does is take up a turn to generate 35 SP (all characters start battle with 25, and the max for everyone is 100).  SP is not gained from taking damage like normal TP, and basic attacks and actions (Guard, etc) generate a little amount of SP.

The problem is that in battle, when I command an actor to use the skill named Spirit (to recharge 35 SP), the interface throws up a giant "FAILED" above their portrait, but the SP is still generated.  In other words, the skill works as intended, except for the giant FAILED that is produced.

I'm using Yanfly's battle script for VX Ace (no addons, just the basic script), and the only alterations I've made to the initial scripts are small changes to make it so TP isn't generated from taking damage, etc.

Any help getting this skill to stop producing FAILED?  Or any other information you need?

Thanks!
Drat! Forgot that bug in mine!

I get a similar message with the "Banishing Potion" item in my part of the "Chain game" I'm doing. Never did figure it out and forgot about it so the piece is passed on with the bug still in it!

Anyway, I'm following this to see what people recommend, hopefully it will apply to mine as well so I can update it.
Cadh are you using Yanfly's as well, I assume?  Since you get the "FAILED" text?

In the script, this is the lines producing the message:

if @result.hit? && [email protected] text = YEA::BATTLE:😛OPUP_SETTINGS[:failed] rules = "DEFAULT" create_popup(text, rules)So both "@result.hit?" and "[email protected]" are evaluating to TRUE.  I'm not very familiar with Ruby syntax so I'm not entirely sure what that is saying.  If I did that might give a better understanding as to why this is evaluating true.

I'm guessing it means "If the skill HITS (not evaded), but it is NOT successful.."  Maybe that will help us to debug this anomaly.  
Actually I used a common event rather than a script (I'm using Lite), though if a good one comes up I'm willing to switch methods.

I'll post the event page when the blasted program finally starts up so I can check it.

*EDIT

Anyway the bugs with mine are are both related to the "Banishing Potion" item.

1.) It can be used on any enemy, not just the Ghost of Mr. Williams.

2.) it displays a message saying it had no effect before ending the battle and starting the next scene.(only advances when used on Ghost of Mr. Williams though)

Banishing Potion 1.PNGBanishing Potion 2.PNG
Cadh, I found the solution for my situation here.

Problem was, I was using the "TP Gain" box for my skill, with everything else basically empty (effects, damage, etc).  So I believe what was happening was that the skill was marked FAILED everytime because no actual "effect" was happening.  (I imagine the TP Gain box is sort of a sidelining trait).

So to fix this I removed the value from that box and instead made the skill increase TP by setting it as an effect in the effects list.  Once I did this the skill worked fine, no more FAILED.

So I believe it happens when no actual battle "effect" happens from a skill.  I would try, in your case, to remove the common event from the item, and instead set the scope to "All Enemies".  Have the [Death] effect applied in the effects list.  This way, the skill itself applies the effect, and it shouldn't fail.  With common event, the game probably doesn't recognize the effects as part of the skill itself, and since it sees it as an "empty" skill for the most part (like it did with mine), it fails and produces the message.

This is all speculation but worth a try.

Sorry for bad english 🙂
Hey, it is worth a try. The only remaining problem is how to make it affect ONLY the ghost instead of any enemy.

So yours is working now? Great to hear! ^_^
Yes it is solved for my issue 🙂

Couldn't you just create a special state similar to death but which every creature type is immune to instead of ghosts and use that with the item?  Might be easier than trying to run conditionals on an item use.
I have the "Lite" version of the program, in order to do that I need to decide on another state to eliminate because you can't change the maximum number of anything in the database. Characters, states, skills, items, weapons, armor, etc...

Might work though, just need to decide which one to change...

Original thread: https://forums.rpgmakerweb.com/threads/problem-with-gaining-sp-tp.18577/