Hi! I am making a game with a resized window (using the script by ForeverZer0 & KK20) and I was wondering if there was a way to make a script call to change the dialogue window placement and size at will?
I am aware you can change it within the script itself, as I’ve done so for one menu already. But I also dig the vibe it gives me when i don’t touch it at all:
Though, for CGs, I’d like to for example have the dialogue window pop back into the bottom and elongate like your typical dialogue box; So that the CG is visible better.
And then right after the CG is over, go back to how it is now (shown in the images).
So, is there a script call I could use? I don’t really know how the scripts work as I still had some trouble resizing the menu (and I will make a new topic for something I’m still looking for later)
RMXP doesn’t have a script call for this out of the box, but a small add on can give you one. Insert a new script above Main (below the resolution script) and paste this:
class Game_System
attr_accessor :message_box
end
class Window_Message
alias message_box_initialize initialize
def initialize
message_box_initialize
@default_box = [self.x, self.width, self.height]
end
alias message_box_reset_window reset_window
def reset_window
message_box_reset_window
if $game_system.message_box == nil
x, w, h = @default_box
y = self.y
else
x, y, w, h = $game_system.message_box
end
self.x = x
self.y = y
if w != self.width or h != self.height
self.width = w
self.height = h
old = self.contents
self.contents = Bitmap.new(w - 32, h - 32)
self.contents.font = old.font
old.dispose
end
end
end
Then before the CG text, use the Script event command with this:
$game_system.message_box = [0, 480, 1024, 160]
The four numbers are x, y, width and height. I’m guessing your screen is 1024 x 640 from the screenshots, so that should put a full width box along the bottom. If the SCREEN line in your resolution script says something different, swap in those numbers.
When the CG is over, this puts it back to how it is now:
$game_system.message_box = nil
It kicks in on the next Show Text, so the script call just needs to come before the text you want changed.