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,192
Reaction score
722
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

Sometimes a mechanic that is meant to add challenge is just annoying. Even the Final Fantasy games did not completely escape this pitfall of design. (FF8 draw system I'm looking at you - grrrr)
starting working on the sprites for one of my games major antagonists finally. here's the first frame of his chanting motion in battle.
Have spent too much time hammering out with a friend just how to make a reoccurring enemy that permanently learns skills you use against her.
I know what I want in a loose sense. Maybe I should just make a post asking for opinions and suggestions.
Shoot Enemy Off-Screen, Run RPG Maker Game as a Web Server, & Thai Keyboard | RPG Maker News #109

Forum statistics

Threads
113,734
Messages
1,077,036
Members
147,762
Latest member
Bad_At_Scripting
Top