keep it on noelle and asriel but remove it from showing on riley and basil.
How can I remove the MP from battle
RPG Maker XP Supportkeep it on noelle and asriel but remove it from showing on riley and basil.
Just to make sure, you want to display mp when your character has at least 1 max mp or do you want to hide it even for characters with more than 0 max mp?
Here is a small script to hide the mps in battle when your actor has 0 max mp (put this above main):
Here is a small script to hide the mps in battle when your actor has 0 max mp (put this above main):
Ruby:
class Window_BattleStatus < Window_Base
#--------------------------------------------------------------------------
# override method: draw_actor_sp -> draw only if maxsp is above 0
#--------------------------------------------------------------------------
def draw_actor_sp(actor, x, y, width = 144)
super if actor.maxsp > 0
end
end #Window_BattleStatus
yes thats what I was thinking, hide it when they have 0 mp.
also, would you be able to move the HP number down to the bottom when it removes the MP number, just above the status effect text?
So when they cast a spell and reach 0 mp, you want me to hide the mp number, right? I'm just making sure I understand correctly what you want.
In that case, you can put this code and remove the one I provided in my previous post as it is redundant.
Ruby:
class Window_BattleStatus < Window_Base
#--------------------------------------------------------------------------
# overwrite method: refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
actor_x = i * 160 + 4
draw_actor_name(actor, actor_x, 0)
#added case when maxsp <= 0
if actor.maxsp > 0
draw_actor_hp(actor, actor_x, 32, 120)
draw_actor_sp(actor, actor_x, 64, 120)
else
draw_actor_hp(actor, actor_x, 64, 120)
end
#end of changes
if @level_up_flags[i]
self.contents.font.color = normal_color
self.contents.draw_text(actor_x, 96, 120, 32, "LEVEL UP!")
else
draw_actor_state(actor, actor_x, 96)
end
end
end
end #Window_BattleStatus
It still only hides mp when maxmp is exactly 0, if you want to hide mp when mp reaches 0 (even with maxmp > 0), you can replace the line from my code
if actor.maxsp > 0 with if actor.sp > 0.Original thread: https://forums.rpgmakerweb.com/threads/how-can-i-remove-the-mp-from-battle.180585/