Help - Search - Members - Calendar
Full Version: Message window
RPG RPG Revolution Forums > Game Engines > RPG Maker XP Discussion
Avarius
Hi guys,

This may seem like a basic scripting fix for most of you, but I've been looking all over and can't seem to find a guide specifically for this problem.

I've tried playing around the scripts but can't seem to fix this, so either I'm doing it wrong, missing something, or a running script is interfering with my changes. All I want to know how to do is move and resize the message window that appears when talking to characters. If someone could offer some assistance, or even direct me to where I can find the answer, I would appreciate it.

Thanks!
Jens of Zanicuud
Ok, then...

1. To modify Message_Window size:

In initialize method
CODE
def initialize
    super(80, 304, 480, 160)                
    self.contents = Bitmap.new(width - 32, height - 32)
    self.visible = false
    self.z = 9998
    @fade_in = false
    @fade_out = false
    @contents_showing = false
    @cursor_width = 0
    self.active = false
    self.index = -1
  end


modify this line:

CODE
super(80, 304, 480, 160)


this way:

CODE
super(new_x, new_y, new_width, new_height)


2. However, Window y is set by another method:

CODE
def reset_window
    if $game_temp.in_battle
      self.y = 16
    else
      case $game_system.message_position
      when 0  # up
        self.y = 16
      when 1  # medium height
        self.y = 160
      when 2  # bottom
        self.y = 304
      end
    end
    if $game_system.message_frame == 0
      self.opacity = 255
    else
      self.opacity = 0
    end
    self.back_opacity = 160
  end


You should modify the line commented in order to move the Window.

I hope this is what you need.

Jens
Avarius
Thank you Jens for your prompt, and very clear assistance. I was able to follow your instructions but nothing changed, so I was certain that it must be a conflicting script. I moved UMS under the Main line and suddenly my changes to Message_Window worked as expected.

You've been a big help. Thank you!


QUOTE (Jens of Zanicuud @ Jan 22 2012, 05:11 AM) *
Ok, then...

1. To modify Message_Window size:

In initialize method
CODE
def initialize
    super(80, 304, 480, 160)                
    self.contents = Bitmap.new(width - 32, height - 32)
    self.visible = false
    self.z = 9998
    @fade_in = false
    @fade_out = false
    @contents_showing = false
    @cursor_width = 0
    self.active = false
    self.index = -1
  end


modify this line:

CODE
super(80, 304, 480, 160)


this way:

CODE
super(new_x, new_y, new_width, new_height)


2. However, Window y is set by another method:

CODE
def reset_window
    if $game_temp.in_battle
      self.y = 16
    else
      case $game_system.message_position
      when 0  # up
        self.y = 16
      when 1  # medium height
        self.y = 160
      when 2  # bottom
        self.y = 304
      end
    end
    if $game_system.message_frame == 0
      self.opacity = 255
    else
      self.opacity = 0
    end
    self.back_opacity = 160
  end


You should modify the line commented in order to move the Window.

I hope this is what you need.

Jens

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.