Galv Menu Themes + Remove MP Script compatibility snippet request

Panda_Artist

Humble RPG Fan
Veteran
Joined
Dec 22, 2018
Messages
339
Reaction score
17
First Language
Portuguese
Primarily Uses
RMVXA
Good Morning / Day / Afternoon / Evening everyone.

I'm using this script to remove MP from a certain actor for my game. The script works perfectly in the battle window but it still shows his MP on the menu because there is probably some incompatibility with Galv's menu themes




Is there a way the MP can be removed for the Menu Engine too?

Any help is appreciated.
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
3,191
Reaction score
721
First Language
English
Primarily Uses
RMVXA
Try this (with the notetag that was mentioned
Ruby:
class Window_Base < Window
    
    alias custom_bar_draw_actor_mp draw_actor_mp
    def draw_actor_mp(actor, x, y, width = 124)
        if actor.remove_mp?
        else
            custom_bar_draw_actor_mp(actor, x, y, width)
        end
    end
    
    alias custom_bar_draw_actor_tp draw_actor_tp
    def draw_actor_tp(actor, x, y, width = 124)
        if actor.remove_tp?
        else
            custom_bar_draw_actor_tp(actor, x, y, width)
        end
    end
    
  def draw_gmp(actor, x, y, width = 124)
        if actor.remove_mp?
        else
    draw_gauge(x, y, width, actor.mp_rate, mtheme::MP_COLOR1, mtheme::MP_COLOR2)
    change_color(system_color)
    draw_text(x - 30, y + 7, 30, line_height, Vocab::mp_a,2)
    draw_current_and_max_values(x, y + 3, width, actor.mp, actor.mmp,
      mp_color(actor), normal_color)
        end
  end
    
end

class Game_Actor <  Game_Battler

    def remove_tp?
        note = $data_actors[@actor_id].note
        a = actor.note.scan(/<remove[- _]tp>/)
        return a != []           
    end
    
    def remove_mp?
        note = $data_actors[@actor_id].note
        a = actor.note.scan(/<remove[- _]mp>/)
        return a != []           
    end
    
end
 

Panda_Artist

Humble RPG Fan
Veteran
Joined
Dec 22, 2018
Messages
339
Reaction score
17
First Language
Portuguese
Primarily Uses
RMVXA
Try this (with the notetag that was mentioned
Ruby:
class Window_Base < Window
   
    alias custom_bar_draw_actor_mp draw_actor_mp
    def draw_actor_mp(actor, x, y, width = 124)
        if actor.remove_mp?
        else
            custom_bar_draw_actor_mp(actor, x, y, width)
        end
    end
   
    alias custom_bar_draw_actor_tp draw_actor_tp
    def draw_actor_tp(actor, x, y, width = 124)
        if actor.remove_tp?
        else
            custom_bar_draw_actor_tp(actor, x, y, width)
        end
    end
   
  def draw_gmp(actor, x, y, width = 124)
        if actor.remove_mp?
        else
    draw_gauge(x, y, width, actor.mp_rate, mtheme::MP_COLOR1, mtheme::MP_COLOR2)
    change_color(system_color)
    draw_text(x - 30, y + 7, 30, line_height, Vocab::mp_a,2)
    draw_current_and_max_values(x, y + 3, width, actor.mp, actor.mmp,
      mp_color(actor), normal_color)
        end
  end
   
end

class Game_Actor <  Game_Battler

    def remove_tp?
        note = $data_actors[@actor_id].note
        a = actor.note.scan(/<remove[- _]tp>/)
        return a != []          
    end
   
    def remove_mp?
        note = $data_actors[@actor_id].note
        a = actor.note.scan(/<remove[- _]mp>/)
        return a != []          
    end
   
end
Thank you, this works perfectly. I will let you know if I encounter any problems.
 

Latest Threads

Latest Posts

Latest Profile Posts

I don't believe it. I actually did some proofreading in my game - and fixed some grammar errors! I feel so accomplished, knowing I can actually proofread my own writing!
...I've had a bad day, okay? Bad enough for me to want to proofread stuff. :yswt2:
Ughhh, July is not my month. Thankfully, it's nearly done.

I fixed the lips and noses for MZ! The files have been updated.
qQwgk8C.png

Everything below!
Ugh, I opened MV after a few weeks and I'm completely lost on what I was working on.
Does it happen to someone else or am I the only disorganized one around? :kaoswt:
xH5Fk2f.jpg
Today was not a really productive day, but at least i got some bust sketches going <3
E7QXZHNXoAIkpG8
hmm in exploring MZ with FOSSIL... I see I'll probably need to stick with MV for now as none of the menu altering plugins I use work on MZ lol. and I don't have the money to dump into what I would need in some cases to update plugins to their MZ versions. Everytime I think of converting, 5 or more reasons popup on why I shouldn't.

Forum statistics

Threads
113,670
Messages
1,076,546
Members
147,690
Latest member
thuthuatxocdia
Top