Working with just TP as the skill system for my game, and I'm wondering if there is a script-or an edit that can be done to hide the MP bar and show only the TP bar in both combat and menus?
[VXA] Disable MP, Use Only TP
RGSS3 Script RequestsHello, I needed that too, and found somewhere (don't know where, didn't make a note) this script. In the note I did make it says it's by Shiggy and to "just put <remove tp> and/or <remove mp> in an actor notebox (MP has to be set to 0 for all levels)".
Thank you, sadly - I think it might be something in my scripts that is overriding it. Because it still shows for me.
It's so crazy actually - that I might have to start with a fresh project, I've adjusted:
- Window_Base
- Window_BattleStatus
- Set MP Stat to 0
- Removed MP from Skills
- Check scripts, and #'d out any show MP lines
- Added the script you posted
For some reason MP still shows up for me in battles. It's the wierdest thing...
That's strange. Have you tried to move the script around? Like try to put it in the first spot and then move it downward to see if it maybe won't work in one of the places. Sometimes the order matters.
It definitely works in my project...
Did you add the notetag in the actor window? Or is that what you mean by "removed mp from skills"?
It definitely works in my project...
Did you add the notetag in the actor window? Or is that what you mean by "removed mp from skills"?
Yeah, thank you so much - I think there's a hardcode somewhere in some of the more complex scripts I have I'm going to search - I tried moving it up and down and changing order to test to no avail. It's probably something I messed up elsewhere in another script that I'll have to troubleshoot. But thank you so much for this script! As I intend to use it once I fix the error the I made of my own!
If you changed Window_BattleStatus to comment out draw_actor_mp
and it still shows then you have a script somewhere that is putting it back.
Remember that any scripts below the default can overwrite the default scripts.
Do you have any battle scripts?
Yeah, that was the FIRST thing I did - and what made me think something was a miss.
I'm using Yanfly's Battle Engine, and Yanfly's FTB scripts - along with TheoAllen's Theolized Battle System. - They work pretty seamlessly with some patches and edits, and the system itself has been fine. But I think you're right - one of them may be overriding draw_actor_mp
I found this in The Yanfly Battle Engine:
Code:
#--------------------------------------------------------------------------
# overwrite method: draw_actor_mp
#--------------------------------------------------------------------------
def draw_actor_mp(actor, dx, dy, width = 124)
draw_gauge(dx, dy, width, actor.mp_rate, mp_gauge_color1, mp_gauge_color2)
change_color(system_color)
cy = (Font.default_size - contents.font.size) / 2 + 1
draw_text(dx+2, dy+cy, 30, line_height, Vocab::mp_a)
draw_current_and_max_values(dx, dy+cy, width, actor.mp, actor.mmp,
mp_color(actor), normal_color)
end
When I # that out, it removes the MP bar! \o/ However, a new issue arrives in that I'm not seeing the TP bar haha. But at least I think I've found what is overriding it!
Since that piece of code only affects the MP bar, it can't be the root cause for the disappearance of the TP bar.
In my experience the tp bar only showed up if you had skills that used tp. Check that
You should not need to comment out the entire method, just the calls to it.
Open your script editor and press Ctrl+Shift+F and type in draw_actor_mp how many times does it show up?
Checked this, looks good here.
I re-enabled it, because yeah - commenting it all out was creating some other issues. So I took your next suggestion:
YANFLY CORE ENGINE:
Code:
#--------------------------------------------------------------------------
# overwrite method: draw_actor_simple_status
#--------------------------------------------------------------------------
def draw_actor_simple_status(actor, dx, dy)
draw_actor_name(actor, dx, dy)
draw_actor_level(actor, dx, dy + line_height * 1)
draw_actor_icons(actor, dx, dy + line_height * 2)
dw = contents.width - dx - 124
draw_actor_class(actor, dx + 120, dy, dw)
draw_actor_hp(actor, dx + 120, dy + line_height * 1, dw)
draw_actor_mp(actor, dx + 120, dy + line_height * 2, dw)
end
YANFLY BATTLE ENGINE
Code:
#--------------------------------------------------------------------------
# overwrite method: draw_item
#--------------------------------------------------------------------------
def draw_item(index)
return if index.nil?
clear_item(index)
actor = battle_members[index]
rect = item_rect(index)
return if actor.nil?
draw_actor_face(actor, rect.x+2, rect.y+2, actor.alive?)
draw_actor_name(actor, rect.x, rect.y, rect.width-8)
draw_actor_action(actor, rect.x, rect.y)
draw_actor_icons(actor, rect.x, line_height*1, rect.width)
gx = YEA::BATTLE::BATTLESTATUS_HPGAUGE_Y_PLUS
contents.font.size = YEA::BATTLE::BATTLESTATUS_TEXT_FONT_SIZE
draw_actor_hp(actor, rect.x+2, line_height*2+gx, rect.width-4)
if draw_tp?(actor) && draw_mp?(actor)
dw = rect.width/2-2
dw += 1 if $imported["YEA-CoreEngine"] && YEA::CORE::GAUGE_OUTLINE
draw_actor_tp(actor, rect.x+2, line_height*3, dw)
dw = rect.width - rect.width/2 - 2
draw_actor_mp(actor, rect.x+rect.width/2, line_height*3, dw)
elsif draw_tp?(actor) && !draw_mp?(actor)
draw_actor_tp(actor, rect.x+2, line_height*3, rect.width-4)
else
draw_actor_mp(actor, rect.x+2, line_height*3, rect.width-4)
end
end
Code:
#--------------------------------------------------------------------------
# overwrite method: draw_actor_mp
#--------------------------------------------------------------------------
def draw_actor_mp(actor, dx, dy, width = 124)
draw_gauge(dx, dy, width, actor.mp_rate, mp_gauge_color1, mp_gauge_color2)
change_color(system_color)
cy = (Font.default_size - contents.font.size) / 2 + 1
draw_text(dx+2, dy+cy, 30, line_height, Vocab::mp_a)
draw_current_and_max_values(dx, dy+cy, width, actor.mp, actor.mmp,
mp_color(actor), normal_color)
end
Considering that TP is suddenly missing afterwards, I also added the lines where draw_actor_tp was being used:
YANFLY CORE ENGINE
Code:
#--------------------------------------------------------------------------
# overwrite method: draw_actor_tp
#--------------------------------------------------------------------------
def draw_actor_tp(actor, x, y, width = 124)
draw_gauge(x, y, width, actor.tp_rate, tp_gauge_color1, tp_gauge_color2)
change_color(system_color)
draw_text(x, y, 30, line_height, Vocab::tp_a)
change_color(tp_color(actor))
draw_text(x + width - 42, y, 42, line_height, actor.tp.to_i.group, 2)
end
YANFLY BATTLE ENGINE
Code:
#--------------------------------------------------------------------------
# overwrite method: draw_item
#--------------------------------------------------------------------------
def draw_item(index)
return if index.nil?
clear_item(index)
actor = battle_members[index]
rect = item_rect(index)
return if actor.nil?
draw_actor_face(actor, rect.x+2, rect.y+2, actor.alive?)
draw_actor_name(actor, rect.x, rect.y, rect.width-8)
draw_actor_action(actor, rect.x, rect.y)
draw_actor_icons(actor, rect.x, line_height*1, rect.width)
gx = YEA::BATTLE::BATTLESTATUS_HPGAUGE_Y_PLUS
contents.font.size = YEA::BATTLE::BATTLESTATUS_TEXT_FONT_SIZE
draw_actor_hp(actor, rect.x+2, line_height*2+gx, rect.width-4)
if draw_tp?(actor) && draw_mp?(actor)
dw = rect.width/2-2
dw += 1 if $imported["YEA-CoreEngine"] && YEA::CORE::GAUGE_OUTLINE
draw_actor_tp(actor, rect.x+2, line_height*3, dw)
dw = rect.width - rect.width/2 - 2
draw_actor_mp(actor, rect.x+rect.width/2, line_height*3, dw)
elsif draw_tp?(actor) && !draw_mp?(actor)
draw_actor_tp(actor, rect.x+2, line_height*3, rect.width-4)
else
draw_actor_mp(actor, rect.x+2, line_height*3, rect.width-4)
end
end
Code:
#--------------------------------------------------------------------------
# overwrite method: draw_actor_tp
#--------------------------------------------------------------------------
def draw_actor_tp(actor, dx, dy, width = 124)
draw_gauge(dx, dy, width, actor.tp_rate, tp_gauge_color1, tp_gauge_color2)
change_color(system_color)
cy = (Font.default_size - contents.font.size) / 2 + 1
draw_text(dx+2, dy+cy, 30, line_height, Vocab::tp_a)
change_color(tp_color(actor))
draw_text(dx + width - 42, dy+cy, 42, line_height, actor.tp.to_i, 2)
end
I checked every script that I have installed, and noted that draw_actor_mp or tp are not listed in ANY other script, so I believe it has to be something in Yanfly's engine.
I also checked the Window_Base and Window_BattleStatus - which both list draw_actor_mp and tp - but are the stuff that is included with RPGMaker VXA.
Thank EVERYON for the help, I honestly can't express how amazing it is to see the responses and engagement! I have no doubt it's something simple that I'm overlooking somewhere, thus is the nature of the coding beast.
I have no other suggestions.
If you have commented out the calls to draw_actor_mp, then you should no longer see the mp bar.
Code:
#--------------------------------------------------------------------------
# overwrite method: draw_item
#--------------------------------------------------------------------------
def draw_item(index)
return if index.nil?
clear_item(index)
actor = battle_members[index]
rect = item_rect(index)
return if actor.nil?
draw_actor_face(actor, rect.x+2, rect.y+2, actor.alive?)
draw_actor_name(actor, rect.x, rect.y, rect.width-8)
draw_actor_action(actor, rect.x, rect.y)
draw_actor_icons(actor, rect.x, line_height*1, rect.width)
gx = YEA::BATTLE::BATTLESTATUS_HPGAUGE_Y_PLUS
contents.font.size = YEA::BATTLE::BATTLESTATUS_TEXT_FONT_SIZE
draw_actor_hp(actor, rect.x+2, line_height*2+gx, rect.width-4)
if draw_tp?(actor) && draw_mp?(actor)
dw = rect.width/2-2
dw += 1 if $imported["YEA-CoreEngine"] && YEA::CORE::GAUGE_OUTLINE
draw_actor_tp(actor, rect.x+2, line_height*3, dw)
dw = rect.width - rect.width/2 - 2
#~ draw_actor_mp(actor, rect.x+rect.width/2, line_height*3, dw)
elsif draw_tp?(actor) && !draw_mp?(actor)
draw_actor_tp(actor, rect.x+2, line_height*3, rect.width-4)
else
#~ draw_actor_mp(actor, rect.x+2, line_height*3, rect.width-4)
end
end
Original thread: https://forums.rpgmakerweb.com/threads/vxa-disable-mp-use-only-tp.151026/