Removing MP/TP From Certain Characters (Yanfly)

So I'm working on a game and using Yanfly Scripts where I intend for all spells to have limits on how many times you can use them in battle except in the case of one character.

IS there a way in which I can remove MP from all but that character in both battle and on the menu? Thank you all in advance.
I've moved this thread to Script Support. Please be sure to post your threads in the correct forum next time. Thank you.


Please give a link to the script you're using, no one can help you unless you give us that info.
I've moved this thread to Script Support. Please be sure to post your threads in the correct forum next time. Thank you.

Please give a link to the script you're using, no one can help you unless you give us that info.
My apologize, I'll be more careful in the future.

https://yanflychannel.wordpress.com/rmvxa/core-scripts/ace-core-engine/
I don't really understand...

Do you mean, you want to remove the MP bar unless in case of a certain actor?
If you set an actor's MP at zero in the class database, I think the bar doesn't show up.  So you don't have to remove anything.
I don't really understand...

Do you mean, you want to remove the MP bar unless in case of a certain actor?
Exactly - I found something that explained how to remove the bar for everyone and a script that was supposed to do it that didn't work at all for some reason (I'm going to assume it wasn't compatible with Yanfly's scripts). In my game only one character uses actual MP. 

If you set an actor's MP at zero in the class database, I think the bar doesn't show up.  So you don't have to remove anything.
I tried that and all it shows is a bar that says 0 MP. 🙁
Then try this snippet :

Spoiler
Code:
module KOCKA  module SNIPPET_MP#==============================================================================##                         CONFIGURATION                                        ##==============================================================================# # Add the iD's of the actors that you want MP to be displayed here.# Ex. [1, 2, 3]# Cannot be set to nil or disabled.ACTORS = [] #==============================================================================## DO NOT TOUCH ANYTHING BELOW THIS LINE UNLESS YOU KNOW WHAT ARE YOU DOING!    ##==============================================================================#  endendclass Window_BattleStatus  include KOCKA::SNIPPET_MP  def draw_gauge_area_with_tp(rect, actor)    draw_actor_hp(actor, rect.x + 0, rect.y, 72)    draw_actor_mp(actor, rect.x + 82, rect.y, 64) if ACTORS.include?(actor.id)    draw_actor_tp(actor, rect.x + 156, rect.y, 64)  end  def draw_gauge_area_without_tp(rect, actor)    draw_actor_hp(actor, rect.x + 0, rect.y, 134)    draw_actor_mp(actor, rect.x + 144,  rect.y, 76) if ACTORS.include?(actor.id)  endendclass Window_Base < Window  include KOCKA::SNIPPET_MP  def draw_actor_simple_status(actor, x, y)    draw_actor_name(actor, x, y)    draw_actor_level(actor, x, y + line_height * 1)    draw_actor_icons(actor, x, y + line_height * 2)    draw_actor_class(actor, x + 120, y)    draw_actor_hp(actor, x + 120, y + line_height * 1)    draw_actor_mp(actor, x + 120, y + line_height * 2) if ACTORS.include?(actor.id)  endend
Then try this snippet :

Spoiler
module KOCKA  module SNIPPET_MP#==============================================================================##                         CONFIGURATION                                        ##==============================================================================# # Add the iD's of the actors that you want MP to be displayed here.# Ex. [1, 2, 3]# Cannot be set to nil or disabled.ACTORS = [] #==============================================================================## DO NOT TOUCH ANYTHING BELOW THIS LINE UNLESS YOU KNOW WHAT ARE YOU DOING!    ##==============================================================================#  endendclass Window_BattleStatus  include KOCKA::SNIPPET_MP  def draw_gauge_area_with_tp(rect, actor)    draw_actor_hp(actor, rect.x + 0, rect.y, 72)    draw_actor_mp(actor, rect.x + 82, rect.y, 64) if ACTORS.include?(actor.id)    draw_actor_tp(actor, rect.x + 156, rect.y, 64)  end  def draw_gauge_area_without_tp(rect, actor)    draw_actor_hp(actor, rect.x + 0, rect.y, 134)    draw_actor_mp(actor, rect.x + 144,  rect.y, 76) if ACTORS.include?(actor.id)  endendclass Window_Base < Window  include KOCKA::SNIPPET_MP  def draw_actor_simple_status(actor, x, y)    draw_actor_name(actor, x, y)    draw_actor_level(actor, x, y + line_height * 1)    draw_actor_icons(actor, x, y + line_height * 2)    draw_actor_class(actor, x + 120, y)    draw_actor_hp(actor, x + 120, y + line_height * 1)    draw_actor_mp(actor, x + 120, y + line_height * 2) if ACTORS.include?(actor.id)  endend
Thank you, but there is still one problem - it seems MP and TP dissappear from the menu, but only TP dissappears during battle.
Which Yanfly battle scripts are you using?  I use his, and I've just double-checked - actors with no Magic skills do not have the MP bar showing in battle.  Are you sure that you have not accidentally allocated the 'Magic' skill in the features section of the class tab?  And that none of the skills for those actors are set to Magic?

EDIT

Here is a screenshot showing what I mean.  2 actors have the MP bar, 2 do not.  The 2 that do not have no magic skills allocated to them.

Spoiler
MP%20bars%20example_zpshdlt0ky1.png
Then I don't know.

Are you sure you are only using the mentioned YEA-Core script?

And are you pasting this below all other scripts?

And did you configure the script correctly?

It worked for me when I had no menu and battle scripts installed, so...
An alternative way to achieve the same end (limited uses of skills for all actors except one) is to use Yanfly's Skill Restrictions script.  That way you could specify exactly how many times a skill can be used and it doesn't matter if the actor still has MP - if you've reached the limit, that's it.

The way the script is set up, the limit resets for the next battle.  I have a small mod which changes that so that you have to rest at the inn before it resets.  If you're interested in that route, I can post it here.
Then I don't know.

Are you sure you are only using the mentioned YEA-Core script?

And are you pasting this below all other scripts?

And did you configure the script correctly?

It worked for me when I had no menu and battle scripts installed, so...
I'm not using any non-YEA Scripts except for a Word Wrapping Message Boxes one by: KilloZapit... maybe I'm doing something wrong. Any idea what I might be doing wrong? I'm sure it's something on my end...

An alternative way to achieve the same end (limited uses of skills for all actors except one) is to use Yanfly's Skill Restrictions script.  That way you could specify exactly how many times a skill can be used and it doesn't matter if the actor still has MP - if you've reached the limit, that's it.

The way the script is set up, the limit resets for the next battle.  I have a small mod which changes that so that you have to rest at the inn before it resets.  If you're interested in that route, I can post it here.
My plan was actully that - the characters would have their "spells" they could use a limited amount of times except one character - she has the ability to cast magic as much as much she wants as long as she has MP. I wanted to remove the MP Bars for the other characters because it looks awkward for them to have MP bars when they don't use MP. That being said - yes I'm quite interested in such a script... 🙂
First we need to establish exactly which Yanfly scripts you are using.  Please list core, battle, menu and message scripts by Yanfly that you have in your project.
Here is a list of all the scripts I’m using and their order in my script editor. They are all currently in their default states from when I downloaded so it‘s easier to figure out what‘s going on.

Yanfly Engine Ace - Ace Core Engine v1.09
Yanfly Engine Ace - Ace Message System v1.05
Yanfly Engine Ace - Party System v1.08

Yanfly Engine Ace - Ace Battle Engine v1.22
Yanfly Engine Ace - Element Absorb v1.01
Yanfly Engine Ace - Element Reflect v1.01

Yanfly Engine Ace - Ace Equip Engine v1.06
Yanfly Engine Ace - Convert Damage v1.02
Yanfly Engine Ace - Equip Dynamic Stats v1.00
Yanfly Engine Ace - Passive States v1.02
Yanfly Engine Ace - Skill Cost Manager v1.03
Yanfly Engine Ace - Skill Restrictions v1.02

Yanfly Engine Ace - Ace Item Menu v1.02
Yanfly Engine Ace - Ace Menu Engine v1.07
Yanfly Engine Ace - Ace Shop Options v1.01
Yanfly Engine Ace - Ace Status Menu v1.02
Yanfly Engine Ace - System Options v1.00

(Not Yanfly) Word Wrapping Message Boxes, by: KilloZapit

Yanfly Engine Ace - Anti-Fail Message v1.00

(Technically Not Yanfly, but for Yanfly‘s scripts) Revive Fix by Yami

(Not Yanfly obviously) Remove MP/TP by KockaAdmiralac
With Ace Core Engine, Battle Engine Party System and Menu Engine, you should end up with a battle screen that looks like mine i.e. when the actor has no magic skills, no MP bar shows.  If yours is still showing it means that something else is interfering with the way those scripts are running.

What I suggest you do is to disable all the other scripts except those 4 (you do that by putting your cursor in the right hand pane where the script code is, press Ctrl+A to select all, then Ctrl+Q to comment out each line) to see what happens.  If you have just the TP bars, no MP bars, then re-enable the scripts one by one (doing the same thing, but this time it will remove the # before each line) until you find out which one it is.
Then do it like this.

1) Go to YEA-Battle Engine

2) Click CTRL+F and search for "draw_actor_mp"

3) There will be 4 cases, for the upper two add " if actor.id == <your actor id>" at the end of line.

Don't touch other two.

Or just try what @ksjp17 said.

And, I asked are you using some other scripts, not are you using some other non-Yanfly scripts, it's ridiculous looking at YEA-Core Engine for solving battle and menu related questions.
Neither of those worked... but I'm not one to be bothered by failures. Failure is a learning oppritunity! I'm going to start a new project and experiment with the scripts I'm using to figure this out!

I want to thank you both for yer help!
With Ace Core Engine, Battle Engine Party System and Menu Engine, you should end up with a battle screen that looks like mine i.e. when the actor has no magic skills, no MP bar shows.  If yours is still showing it means that something else is interfering with the way those scripts are running.

What I suggest you do is to disable all the other scripts except those 4 (you do that by putting your cursor in the right hand pane where the script code is, press Ctrl+A to select all, then Ctrl+Q to comment out each line) to see what happens.  If you have just the TP bars, no MP bars, then re-enable the scripts one by one (doing the same thing, but this time it will remove the # before each line) until you find out which one it is.
Okay it appears to be the Yanfly Engine Ace - Ace Battle Engine v1.22's effect of changing the way the menu looks in battle - and I can't for the life remember how to change it back to the default look without removing the other aspects of the Ace Battle Engine. I may just remove it as in hindsight maybe it's not really needed (even if I do like some of the things it does).

Original thread: https://forums.rpgmakerweb.com/threads/removing-mp-tp-from-certain-characters-yanfly.44331/