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,194
Reaction score
723
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

After so long, my random sprites set is complete! I wonder who could guess them all? :kaothx:
2COlHup.png

And yes, I'm doing more.
I'm thinking of devouring some tutorials for RPG Maker MV. Just all kinds: mapping, spriting, programming, ect. the whole works! :)

Maybe videos, my brother and I can sit down and watch them during one of our weekly business meetings.
Ami
trying to make a Dialogue Script in Indonesian,first. then translate into English.

this is the reason why i'm terrible at this section beside making the enemies :stare:
Made a Mapping Tutorial on Adding Lighting/Shadows using Tileset

Forum statistics

Threads
113,928
Messages
1,078,445
Members
148,033
Latest member
AnGieA
Top