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,190
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 Profile Posts

PSA: please stop putting the word 'Eternal' in your game titles.
RMMZ: "Simple enough for a child!"
also RMMZ: "What, you're trying to make an RPG and you didn't know about Euler angles?"
I kinda spent the day having my own little gamejam and came up with this Catastrophe!

GZOq45s.png
Have Defeated Enemy Join Party as Actor, Show Passage Status, & MZ-Chan Art | RPG Maker News #107

My outfit at Metrocon. It was fun.

Forum statistics

Threads
113,625
Messages
1,076,286
Members
147,638
Latest member
Zachimera
Top