Getting rid of Gauges and Window Opacity

Discussion in 'RGSSx Script Support' started by Ksi, Jun 28, 2012.

Thread Status:
Not open for further replies.
  1. Ksi

    Ksi ~RTP Princess~ Moderator

    Messages:
    2,002
    Likes Received:
    1,533
    Location:
    Australia
    First Language:
    English
    Hey all, I've got a small help request that should (hopefully) be easy enough. It's purely cosmetic, but I've tried to find a way to do it myself and been unable to work out just what to do.

    I'm trying to get rid of the HP and MP bars in the Menu scene. That's right, I just want the numerical data shown for HP and MP in the menu. In battle, I'd prefer the bars to stay, though.

    So, is there an easy way to do this? I'd gather it'd be just changing a couple of lines somewhere in the window scripts, but I can't figure it out.

    I'm also trying to change the window/menu opacity to 255, and I know that somewhere there's a piece of script which deals with changing the window opacity, but I'll be damned if I can find it. (I've been searching for anything with opacity, tranparency, back_opacity, 196 - I was told this was the default opacity - and other terms in the script search with no luck. >.<; )

    I tried adding



    Code:
    back_opacity = 255
    under the Initialize part of window_base, as was suggested in another topic, but that didn't change anything at all. The windows/menu are still semi-transparent. Anyone know a fix for this?

    Again, I've looked through the default scripts and found nothing to help. Done a few searches here and on other forums, and again, nothing.

    Any help is greatly appreciated~
     
    Last edited by a moderator: Jun 28, 2012
    #1
  2. Archeia

    Archeia Level 99 Demi-fiend Staff Member Developer

    Messages:
    14,632
    Likes Received:
    14,381
    Location:
    Game Dev Salt Mines
    First Language:
    Filipino
    Primarily Uses:
    VNM
    Liberty in Window_Base add



    Code:
        self.back_opacity = 255
    
    below self.windowskin = Cache.system("Window")
     
    #2
  3. EvilEagles

    EvilEagles Stargazer Veteran

    Messages:
    1,679
    Likes Received:
    714
    First Language:
    Vietnamese
    Primarily Uses:
    Other
    This should work.



    Code:
    
    class Window_Base < Window
      OPACITY = 255
    
      def initialize(x, y, width, height)
        super
        self.windowskin = Cache.system("Window")
        update_padding
        update_tone
        create_contents
        @opening = @closing = false
        self.back_opacity = OPACITY
      end
      def draw_actor_hp_menu(actor, x, y, width = 124)
        draw_text(x, y, 30, line_height, Vocab::hp_a)
        draw_current_and_max_values(x, y, width, actor.hp, actor.mhp,
    	  hp_color(actor), normal_color)
      end
      def draw_actor_mp_menu(actor, x, y, width = 124)
        draw_text(x, y, 30, line_height, Vocab::mp_a)
        draw_current_and_max_values(x, y, width, actor.mp, actor.mmp,
    	  mp_color(actor), normal_color)
        end
      def draw_actor_simple_status(actor, x, y)
        draw_actor_name(actor, x, y)
        draw_actor_level(actor, x, y + line_height * 1)
        draw_actor_icons(actor, x, y + line_height * 2)
        draw_actor_class(actor, x + 120, y)
        draw_actor_hp_menu(actor, x + 120, y + line_height * 1)
        draw_actor_mp_menu(actor, x + 120, y + line_height * 2)
      end
    end
    
     
    #3
    Archeia likes this.
  4. Ksi

    Ksi ~RTP Princess~ Moderator

    Messages:
    2,002
    Likes Received:
    1,533
    Location:
    Australia
    First Language:
    English
    Thank you both <3

    Nessy, I had the back_opacity, and had tried self.opacity too, but didn't even consider self.back_opacity! I have learned!

    (Liberty levels up~)

    And thank you, Eagles <3

    Though it doesn't get rid of the ones in the status menu. I'll see if I can figure that out. ^.^

    Got it to work by applying the changes to the main scripts as opposed to adding the above script. :D

    For anyone who doesn't want to do that, just copy the Window_status < Window_Selectable parts to a new script under the one Eagles provided~

    Works a charm! Thanks guys!
     
    Last edited by a moderator: Jun 28, 2012
    #4
  5. Archeia

    Archeia Level 99 Demi-fiend Staff Member Developer

    Messages:
    14,632
    Likes Received:
    14,381
    Location:
    Game Dev Salt Mines
    First Language:
    Filipino
    Primarily Uses:
    VNM
    :D

    This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
     
    #5
Thread Status:
Not open for further replies.

Share This Page