Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
ForeverZer0

Custom Resolution Compatibility Plug-Ins

Recommended Posts

Custom Resolution Compatibility Plug-Ins

Authors: ForeverZer0

Version: 1.0

Type: Misc Add-on


Introduction

 

This is a listing of compatibility fixes for my Custom Resolution script. I broke this off from the main thread to make it a little easier to find what your looking for, and to avoid character limits and be able to keep them in spoilers. I plan on keeping this as updated as possible, so hopefully we might see a few games that use a screen size other than 640x480.


Requests/Submissions

 

If you want a fix to a script that is not included, feel free to submit a request. I will likely make fixes to any requests, so long as the script is not some obscure one that has never been heard of. Please use this template when making requests:

 

[b]Script:[/b] <PLACE SCRIPT NAME HERE>
[b]Link:[/b] <PROVIDE A LINK TO THE SCRIPT>
[b]Issue:[/b] <SHORT DESCRIPTION OF WHAT COMPATIBILITY ISSUE NEEDS FIXED>

 

If you have created a compatibility fix for a specific script, either PM me or post it as a reply and I will inlcude it in the main post, with full credit to you.


Compatibility Fixes

 

Weather System


Compatibility fix for default weather system.

 

 

[*]Place this script anywhere you like above main. (Plug & Play)

#===============================================================================
# ** RPG::Weather
#-------------------------------------------------------------------------------
# Compatibility fix for default weather system.
#===============================================================================

class RPG::Weather

 def update
   return if @type == 0
   for i in 1..@max
     sprite = @sprites[i]
     if sprite == nil
       break
     end
     if @type == 1
       sprite.x -= 2
       sprite.y += 16
       sprite.opacity -= 8
     elsif @type == 2
       sprite.x -= 8
       sprite.y += 16
       sprite.opacity -= 12
     elsif @type == 3
       sprite.x -= 2
       sprite.y += 8
       sprite.opacity -= 8
     end
     x = sprite.x - @ox
     y = sprite.y - @oy
     if sprite.opacity < 64 || x < -50 || x > SCREEN[0] + 150 || 
       y < -300 || y > SCREEN[1] + 32
       sprite.x = rand(SCREEN[0] + 160) - 50 + @ox
       sprite.y = rand(SCREEN[1] + 320) - 200 + @oy
       sprite.opacity = 255
     end
   end
 end
end

 

 

Compatibility fix for Advanced Weather (Ccoa's), Zer0 Advanced Weather (Versions 1.2 and under), and MAWS.

 

 

[*]Find the following lines in the "update" method:

     x = sprite.x - @ox
     y = sprite.y - @oy
     if sprite.opacity < 64 or x < -50 or x > 750 or y < -300 or y > 500
       sprite.x = rand(800) - 50 + @ox
       sprite.y = rand(800) - 200 + @oy
       sprite.opacity = 255
     end

 

Replace them with this:

     x = sprite.x - @ox
     y = sprite.y - @oy
     if sprite.opacity < 64 || x < -50 || x > SCREEN[0] + 150 || 
       y < -300 || y > SCREEN[1] + 32
       sprite.x = rand(SCREEN[0] + 160) - 50 + @ox
       sprite.y = rand(SCREEN[1] + 320) - 200 + @oy
       sprite.opacity = 255
     end

 

 

 

Compatibility fix for Advanced Weather 2.0 and higher (generated with the WeatherCreator).

 

 

[*]Find the following lines in the "update" method.

     @sprites.each {|sprite|
       sprite.update
       x, y = sprite.x - @ox, sprite.y - @oy 
       if sprite.opacity < 64 || x < -50 || x > 750 || y < -300 || y > 500
         # Determine coordinates at which sprite will reappear.
         if OFFSCREEN_TYPES.include?(@type)
           if rand(2) == 0
             sprite.x = rand(60) + (rand(2) == 0 ? -60 : 640) + @ox
             sprite.y = rand(800) - 200 + @oy
           else
             sprite.x = rand(800) - 50 + @ox
             sprite.y = rand(60) + (rand(2) == 0 ? -60 : 480) + @oy
           end
         else
           sprite.x = rand(800) - 50 + @ox
           sprite.y = rand(800) - 200 + @oy
         end
         sprite.opacity = 255
       end
     }

 

Replace them with this:

     @sprites.each {|sprite|
       sprite.update
       x, y = sprite.x - @ox, sprite.y - @oy 
       if sprite.opacity < 64 || x < -50 || x > 750 || y < -300 || y > 500
         # Determine coordinates at which sprite will reappear.
         if OFFSCREEN_TYPES.include?(@type)
           if rand(2) == 0
             sprite.x = rand(60) + (rand(2) == 0 ? -60 : SCREEN[0]) + @ox
             sprite.y = rand(800) - 200 + @oy
           else
             sprite.x = rand(800) - 50 + @ox
             sprite.y = rand(60) + (rand(2) == 0 ? -60 : SCREEN[1]) + @oy
           end
         else
           sprite.x = rand(SCREEN[0] + 160) - 50 + @ox
           sprite.y = rand(SCREEN[1] + 320) - 200 + @oy
         end
         sprite.opacity = 255
       end
     }

 

 

Message System


Default Message System

 

 

[*]Place code anywhere below Window_Message

#===============================================================================
# ** Window_Message
#-------------------------------------------------------------------------------
# Compatibility fix for default message system.
#===============================================================================

class Window_Message < Window_Selectable

 alias zer0_reolution_message_fix_init initialize
 def initialize
   zer0_reolution_message_fix_init
   self.x = (SCREEN[0] - self.width) / 2
   self.y = SCREEN[1] - (self.height + 16)
 end

 alias zer0_reolution_message_fix_reset reset_window
 def reset_window
   zer0_reolution_message_fix_reset
   if $game_temp.in_battle
     self.y = 16
   else
     self.y = case $game_system.message_position
     when 0 then 0
     when 1 then (SCREEN[1] - self.height) / 2
     when 2 then SCREEN[1] - (self.height + 16)
     end
   end
 end
end

 

 

Compatability fix for Multiple Message Windows (Non-SDK)

 

 

[*]Place code anywhere below default message system and MMS script.

#===============================================================================
# ** Window_Message
#-------------------------------------------------------------------------------
# Compatibility fix for Multiple Message Windows (Non-SDK).
#===============================================================================

class Window_Message < Window_Selectable

 alias zer0_reolution_message_fix_init initialize
 def initialize
   zer0_reolution_message_fix_init
   self.x = (SCREEN[0] - self.width) / 2
   self.y = SCREEN[1] - (self.height + 16)
 end

 alias zer0_reolution_message_fix_reset reset_window
 def reset_window
   zer0_reolution_message_fix_reset
   if $game_temp.in_battle
     self.y = 16
   else
     self.y = case $game_system.message_position
     when 0 then 0
     when 1 then (SCREEN[1] - self.height) / 2
     when 2 then SCREEN[1] - (self.height + 16)
     end
   end
 end

 def reposition
   if $game_temp.in_battle
     if 'abcd'.include?(@float_id) # must be between a and d
       @float_id = @float_id[0] - 97 # a = 0, b = 1, c = 2, d = 3
       return if $scene.spriteset.actor_sprites[@float_id] == nil
       sprite = $scene.spriteset.actor_sprites[@float_id]
     else
       @float_id -= 1 # account for, e.g., player entering 1 for index 0
       return if $scene.spriteset.enemy_sprites[@float_id] == nil
       sprite = $scene.spriteset.enemy_sprites[@float_id]
     end
     char_height = sprite.height
     char_width = sprite.width
     char_x = sprite.x
     char_y = sprite.y - char_height/2
   else # not in battle...
     char = (@float_id == 0 ? $game_player : $game_map.events[@float_id])
     if char == nil
       # no such character
       @float_id = nil
       return 
     end
     # close message (and stop event processing) if speaker is off-screen
     if char.screen_x <= 0 || char.screen_x >= SCREEN[0] ||
        char.screen_y <= 0 || char.screen_y > SCREEN[1]
       terminate_message
       $game_system.map_interpreter.command_115
       return
     end
     char_height = RPG::Cache.character(char.character_name,0).height / 4
     char_width = RPG::Cache.character(char.character_name,0).width / 4
     # record coords of character's center
     char_x = char.screen_x
     char_y = char.screen_y - char_height/2
   end
   params = [char_height, char_width, char_x, char_y]
   # position window and message tail
   vars = new_position(params)
   x = vars[0]
   y = vars[1]
   # check if any window locations need to be "flipped"
   if @location == 4 && x < 0
     # switch to right
     @location = 6
     vars = new_position(params)
     x = vars[0]
     if (x + self.width) > SCREEN[0]
       # right is no good either...
       if y >= 0
         # switch to top
         @location = 8
         vars = new_position(params)
       else
         # switch to bottom
         @location = 2
         vars = new_position(params)
       end
     end
   elsif @location == 6 && (x + self.width) > SCREEN[0]
     # switch to left
     @location = 4
     vars = new_position(params)
     x = vars[0]
     if x < 0
       # left is no good either...
       if y >= 0
         # switch to top
         @location = 8
         vars = new_position(params)
       else
         # switch to bottom
         @location = 2
         vars = new_position(params)
       end
     end
   elsif @location == 8 && y < 0
     # switch to bottom
     @location = 2
     vars = new_position(params)
     y = vars[1]
     if (y + self.height) > SCREEN[1]
       # bottom is no good either...
       # note: this will probably never occur given only 3 lines of text
       x = vars[0]
       if x >= 0
         # switch to left
         @location = 4
         vars = new_position(params)
       else
         # switch to right
         @location = 6
         vars = new_position(params)
       end
     end
   elsif @location == 2 && (y + self.height) > SCREEN[1]
     # switch to top
     @location = 8
     vars = new_position(params)
     y = vars[1]
     if y < 0
       # top is no good either...
       # note: this will probably never occur given only 3 lines of text
       x = vars[0]
       if x >= 0
         # switch to left
         @location = 4
         vars = new_position(params)
       else
         # switch to right
         @location = 6
         vars = new_position(params)
       end
     end
   end
   x = vars[0]
   y = vars[1]
   tail_x = vars[2]
   tail_y = vars[3]    
   # adjust windows if near edge of screen
   if x < 0
     x = 0
   elsif (x + self.width) > SCREEN[0]
     x = SCREEN[0] - self.width
   end
   if y < 0
     y = 0
   elsif (y + self.height) > SCREEN[1]
     y = SCREEN[0] - self.height
   elsif $game_temp.in_battle && @location == 2 && (y > ((SCREEN[1]/2) - self.height))
     # when in battle, prevent enemy messages from overlapping battle status
     # (note that it could still happen from actor messages, though)
     y = (SCREEN[1]/2) - self.height
     tail_y = y
   end
   # finalize positions
   self.x = x
   self.y = y
   @tail.x = tail_x
   @tail.y = tail_y
 end
end

 

 

Compatibility fix for Ccoa's UMS.

 

 

[*]Place code anywhere below Window_Message and the UMS.

#===============================================================================
# ** Window_Message
#-------------------------------------------------------------------------------
# Compatibility fix for Ccoa's UMS.
#===============================================================================

class Window_Message < Window_Selectable

 def initialize
   # x-coordinate depends on justification
   if $game_system.window_justification == RIGHT
     x = SCREEN[0] - self.width
   elsif $game_system.window_justification == LEFT
     x = 0
   else # center
     x = (SCREEN[0] - $game_system.window_width) / 2
   end
   # y-coordinate depends on height
   y = SCREEN[1] - $game_system.window_height - 16
   super(x, y, $game_system.window_width, $game_system.window_height)
   self.contents = Bitmap.new(width - 32, height - 32)
   self.visible = false
   self.z = 9998
   @fade_in = false
   @fade_out = false
   @contents_showing = false
   # face graphic sprite
   @face = Sprite.new
   @face.opacity = 0
   @face.z = self.z + 1
   @face_offset = 0
   # choice window
   @choice_window = Window_Choice.new([]) 
   @choice_window.back_opacity = self.back_opacity
   # comic sprite
   @comic = Sprite.new
   @comic.opacity = 0
   @comic.z = self.z + 1
   if $game_system.comic_style == TALK1
     @comic.bitmap = RPG::Cache.windowskin("talk1")
   elsif $game_system.comic_style == TALK2
     @comic.bitmap = RPG::Cache.windowskin("talk2")
   else # thought
     @comic.bitmap = RPG::Cache.windowskin("thought")
   end
   # window image sprite
   @window_back = Sprite.new
   @window_back.opacity = 0
   @window_back.z = self.z - 1
   if $game_system.window_image != nil
     @window_back.bitmap = $game_system.window_image
   end
   # name window
   @name_window = Window_Name.new
   @name_window.z = self.z + 1
   @pause_time = 0
   @wait = 0
   @show = false
   @face_frame = 0
 end

 def reset_window (change_opacity = true)
   # x-coordinate depends on justification
   if $game_system.message_event == -1
     if $game_system.window_justification == RIGHT
       self.x = SCREEN[0] - $game_system.window_width
     elsif $game_system.window_justification == LEFT
       self.x = 0
     else # center
       self.x = (SCREEN[0] - self.width) / 2
     end
   else
     if $game_system.message_event == 0 or $game_map.events[$game_system.message_event] == nil
       # center on player
       event_x = $game_player.screen_x
     else
       # center on the event specified
       event_x = $game_map.events[$game_system.message_event].screen_x
     end
     self.x = event_x - self.width / 2
     @comic.x = self.x + (self.width / 2) + 4
   end

   if $game_temp.in_battle
     self.y = 16
   else
     if $game_system.message_event == -1
       case $game_system.message_position
         when 0  # up
           self.y = 16
         when 1  # middle
           self.y = (SCREEN[0] - $game_system.window_height) / 2
         when 2  # down
           self.y = SCREEN[1] - $game_system.window_height - 24
       end
     else
       if $game_system.message_event == 0 or $game_map.events[$game_system.message_event] == nil
         # above player
         self.y = $game_player.screen_y - self.height - 48
       else
         # above event specified
         self.y = $game_map.events[$game_system.message_event].screen_y - self.height - 48
       end
       @comic.y = self.y + self.height - 2
       @comic.angle = 0
     end
   end
   if self.y < 0 + ($game_system.name == "" ? 0 : 16)
     if $game_system.comic_enabled
       if $game_system.message_event == 0 or $game_map.events[$game_system.message_event] == nil
         self.y = $game_player.screen_y - 16
       else
         self.y = $game_map.events[$game_system.message_event].screen_y - 16
       end
       @comic.angle = 180
       @comic.y = self.y + 2
       @comic.x = self.x + (self.width / 2) - 4
     else
       self.y = 0 + ($game_system.name == "" ? 0 : 16)
     end
   elsif self.y > SCREEN[1] - self.height 
     self.y = SCREEN[1] - self.height
   end
   if self.x < 0 
     self.x = 0
   elsif self.x > (SCREEN[1] + 40) - self.width - 48
     self.x = SCREEN[0] - self.width
   end

   if change_opacity
     if $game_system.message_frame == 0 and $game_temp.message_text != ""
       self.opacity = $game_system.opacity
     else
       self.opacity = 0
     end
     self.back_opacity = $game_system.back_opacity
   end

   # window back stuff
   if $game_system.window_image != nil
     @window_back.bitmap = RPG::Cache.windowskin($game_system.window_image)
     @window_back.x = self.x
     @window_back.y = self.y
   end

     # face stuff
     if $game_system.face_graphic != ""  
       # the player has chosen to show a face graphic
       if @done and $game_system.resting_face != ""
         @face.bitmap = RPG::Cache.picture($game_system.face_graphic + $game_system.resting_face)
         if @face_frame * $game_system.face_frame_width >= @face.bitmap.width
           @face_frame = 0
         end
       else
         @face.bitmap = RPG::Cache.picture($game_system.face_graphic)
       end

       # picture y-coordinate
       if $game_system.face_graphic_position == ABOVE
         @face.y = self.y - @face.bitmap.height
         @face_offset = 0
       elsif $game_system.face_graphic_position == CENTER
         delta = (@face.bitmap.height - self.height) / 2
         @face.y = self.y - delta
         if $game_system.animated_faces
           @face_offset = $game_system.face_frame_width + 16
         else
           @face_offset = @face.bitmap.width + 16
         end
       elsif $game_system.face_graphic_position == BOTTOM 
         @face.y = self.y + self.height - @face.bitmap.height
         if $game_system.animated_faces
           @face_offset = $game_system.face_frame_width + 16
         else
           @face_offset = @face.bitmap.width + 16
         end
       else # side
         delta = (@face.bitmap.height - self.height) / 2
         @face.y = self.y - delta
         @face_offset = 0
       end

       # picture x-coordinate
       if $game_system.face_graphic_justification == LEFT
         if $game_system.face_graphic_position == SIDE
           @face.x = self.x - @face.bitmap.width
         else
           @face.x = self.x + 10
         end
       else # right side
         if $game_system.animated_faces
           offset = @face.bitmap.width - $game_system.face_frame_width
         else
           offset = 0
         end
         if $game_system.face_graphic_position == SIDE
           @face.x = self.x + self.width + offset
         else
           @face.x = self.x + self.width - @face.bitmap.width - 10 + offset
           @face_offset = 0
         end
       end

       if $game_system.animated_faces
         @face.src_rect = Rect.new(@face_frame * $game_system.face_frame_width, 0, $game_system.face_frame_width, @face.bitmap.height)
         if @done and $game_system.resting_face != ""
           pause = $game_system.resting_animation_pause
         else
           pause = $game_system.animation_pause
         end
         if Graphics.frame_count % pause == 0
           @animate_face = true
         end
         if @animate_face
           if Graphics.frame_count % 3 == 0
             @face_frame += 1
             if @face_frame * $game_system.face_frame_width >= @face.bitmap.width
               @face_frame = 0
               @animate_face = false
             end
           end
         end
       end
     end

     # name window
     if $game_system.name != ""
       @name_window.x = self.x
       @name_window.y = self.y - 36
       @name_window.set_name($game_system.name)
     end

     # If choice
   if $game_temp.choice_max > 0
     @choice_window.set_choices($game_temp.choices)
     # determine x and y coords for choice window
     if $game_system.choice_justification == LEFT
       @choice_window.x = self.x
     else
       @choice_window.x = self.x + self.width - @choice_window.width
     end
     if $game_system.choice_position == ABOVE
       # check to make sure there is enough room above the textbox
       if self.y < @choice_window.height
         # not enough room above, place below
         @choice_window.y = self.y + self.height
       else
         # draw above
         @choice_window.y = self.y - @choice_window.height
       end
     elsif $game_system.choice_position == BOTTOM
       # check to make sure there is enough room below the textbox
       if (SCREEN[1] - self.y - self.height) < @choice_window.height
         # not enough room below, place above
         @choice_window.y = self.y - @choice_window.height
       else
         # draw below 
         @choice_window.y = self.y + self.height
       end
     else # side
       if $game_system.choice_justification == LEFT
         # check to make sure there's room on the left side
         if self.y < @choice_window.width
           # not enough room on the side, check to make sure there's room below
           if (SCREEN[1] - self.y - self.height) < @choice_window.height
             # not enough room below, place above
             @choice_window.y = self.y - @choice_window.height
           else
             # draw below 
             @choice_window.y = self.y + self.height
           end
         else
           # place on the left side
           @choice_window.y = self.y
           @choice_window.x = self.x - @choice_window.width
         end
       else # right
         # check to make sure there's room on the right side
         if ((SCREEN[0] + 40) - (self.y + self.width)) < @choice_window.width
           # not enough room on the side, check to make sure there's room below
           if (SCREEN[1] - self.y - self.height) < @choice_window.height
             # not enough room below, place above
             @choice_window.y = self.y - @choice_window.height
           else
             # draw below 
             @choice_window.y = self.y + self.height
           end
         else
           # place on the left side
           @choice_window.y = self.y
           @choice_window.x = self.x + self.width
         end
       end
     end
   end

   # If number input
   if $game_temp.num_input_variable_id > 0
     if @input_number_window == nil
       digits_max = $game_temp.num_input_digits_max
       number = $game_variables[$game_temp.num_input_variable_id]
       @input_number_window = Window_InputNumber.new(digits_max)
       @input_number_window.number = number
     end
     # determine x and y coords for number input window
     if $game_system.choice_justification == LEFT
       @input_number_window.x = self.x
     else
       @input_number_window.x = self.x + self.width - @input_number_window.width
     end
     if $game_system.choice_position == ABOVE
       # check to make sure there is enough room above the textbox
       if self.y < @input_number_window.height
         # not enough room above, place below
         @input_number_window.y = self.y + self.height
       else
         # draw above
         @input_number_window.y = self.y - @choice_window.height
       end
     elsif $game_system.choice_position == BOTTOM
       # check to make sure there is enough room below the textbox
       if (SCREEN[1] - self.y - self.height) < @input_number_window.height
         # not enough room below, place above
         @input_number_window.y = self.y - @input_number_window.height
       else
         # draw below 
         @input_number_window.y = self.y + self.height
       end
     else # side
       if $game_system.choice_justification == LEFT
         # check to make sure there's room on the left side
         if self.y < @input_number_window.width
           # not enough room on the side, check to make sure there's room below
           if (SCREEN[1] - self.y - self.height) < @input_number_window.height
             # not enough room below, place above
             @input_number_window.y = self.y - @input_number_window.height
           else
             # draw below 
             @input_number_window.y = self.y + self.height
           end
         else
           # place on the left side
           @input_number_window.y = self.y
           @input_number_window.x = self.x - @choice_window.width
         end
       else # right
         # check to make sure there's room on the right side
         if ((SCREEN{0} + 40) - (self.y + self.width)) < @input_number_window.width
           # not enough room on the side, check to make sure there's room below
           if (SCREEN[1] - self.y - self.height) < @input_number_window.height
             # not enough room below, place above
             @input_number_window.y = self.y - @input_number_window.height
           else
             # draw below 
             @input_number_window.y = self.y + self.height
           end
         else
           # place on the left side
           @input_number_window.y = self.y
           @input_number_window.x = self.x + self.width
         end
       end
     end
   end
 end
end

#===============================================================================
# ** Window_Slave
#===============================================================================

class Window_Slave

 alias zer0_resolution_ums_init initialize
 def initialize(text)
   zer0_resolution_ums_init(text)
   # x-coordinate depends on justification
   if @justification == RIGHT
     self.x = SCREEN[0] - self.width
   elsif @justification == LEFT
     self.x = 0
   else # center
     self.x = (SCREEN[0] - self.width) / 2
   end
   # y-coordinate depends on height
   self.y = SCREEN[1] - $game_system.window_height - 16
 end

def reset_window (change_opacity = true)
   # x-coordinate depends on justification
   if @message_event == -1
     if @justification == RIGHT
       self.x = SCREEN[0]  - self.width
     elsif @justification == LEFT
       self.x = 0
     else # center
       self.x = (SCREEN[0]  - self.width) / 2
     end
   else
     if @message_event == 0 or $game_map.events[@message_event] == nil
       # center on player
       event_x = $game_player.screen_x
     else
       # center on the event specified
       event_x = $game_map.events[@message_event].screen_x
     end
     self.x = event_x - self.width / 2
     @comic.x = self.x + (self.width / 2) + 4
   end

   if $game_temp.in_battle
     self.y = 16
   else
     if @message_event == -1
       case @message_position
         when 0  # up
           self.y = 16
         when 1  # middle
           self.y = (SCREEN[1] - self.height) / 2
         when 2  # down
           self.y = SCREEN[1] - self.height - 24
       end
     else
       if @message_event == 0 or $game_map.events[@message_event] == nil
         # above player
         self.y = $game_player.screen_y - self.height - 48
       else
         # above event specified
         self.y = $game_map.events[@message_event].screen_y - self.height - 48
       end
       @comic.y = self.y + self.height - 2
     end
   end
   if self.y < 0 + (@name == "" ? 0 : 16)
     self.y = 0 + (@name == "" ? 0 : 16)
   elsif self.y > SCREEN[1] - self.height 
     self.y = SCREEN[1] - self.height
   end
   if self.x < 0 
     self.x = 0
   elsif self.x > (SCREEN[0] + 40) - self.width - 48
     self.x = SCREEN[0]  - self.width
   end

   if change_opacity
     if $game_system.message_frame == 0
       self.opacity = 255
     else
       self.opacity = 0
     end
     self.back_opacity = $game_system.back_opacity
   end

   # face stuff
     if @face_graphic != ""  
       # the player has chosen to show a face graphic
       if @done and $game_system.resting_face != ""
         @face.bitmap = RPG::Cache.picture(@face_graphic + $game_system.resting_face)
         if @face_frame * $game_system.face_frame_width >= @face.bitmap.width
           @face_frame = 0
         end
       else
         @face.bitmap = RPG::Cache.picture(@face_graphic)
       end

       # picture y-coordinate
       if @face_graphic_position == ABOVE
         @face.y = self.y - @face.bitmap.height
         @face_offset = 0
       elsif @face_graphic_position == CENTER
         delta = (@face.bitmap.height - self.height) / 2
         @face.y = self.y - delta
         if $game_system.animated_faces
           @face_offset = $game_system.face_frame_width + 16
         else
           @face_offset = @face.bitmap.width + 16
         end
       elsif @face_graphic_position == BOTTOM 
         @face.y = self.y + self.height - @face.bitmap.height
         if $game_system.animated_faces
           @face_offset = $game_system.face_frame_width + 16
         else
           @face_offset = @face.bitmap.width + 16
         end
       else # side
         delta = (@face.bitmap.height - self.height) / 2
         @face.y = self.y - delta
         @face_offset = 0
       end

       # picture x-coordinate
       if @face_graphic_justification == LEFT
         if @face_graphic_position == SIDE
           @face.x = self.x - @face.bitmap.width
         else
           @face.x = self.x + 10
         end
       else
         if $game_system.animated_faces
           offset = @face.bitmap.width - $game_system.face_frame_width
         else
           offset = 0
         end
         if @face_graphic_position == SIDE
           @face.x = self.x + self.width + offset
         else
           @face.x = self.x + self.width - @face.bitmap.width - 10 + offset
           @face_offset = 0
         end
       end

       if $game_system.animated_faces
         @face.src_rect = Rect.new(@face_frame * $game_system.face_frame_width, 0, $game_system.face_frame_width, @face.bitmap.height)
         if @done and $game_system.resting_face != ""
           pause = $game_system.resting_animation_pause
         else
           pause = $game_system.animation_pause
         end
         if Graphics.frame_count % pause == 0
           @animate_face = true
         end
         if @animate_face
           if Graphics.frame_count % 3 == 0
             @face_frame += 1
             if @face_frame * $game_system.face_frame_width >= @face.bitmap.width
               @face_frame = 0
               @animate_face = false
             end
           end
         end
       end
     end

     # name window
     if @name != "" and @name != nil
       @name_window.set_name(@name)
       @name_window.x = self.x
       @name_window.y = self.y - 36
     end

     # If choice
   if $game_temp.choice_max > 0
     @choice_window.set_choices($game_temp.choices)
     # determine x and y coords for choice window
     if $game_system.choice_justification == LEFT
       @choice_window.x = self.x
     else
       @choice_window.x = self.x + self.width - @choice_window.width
     end
     if $game_system.choice_position == ABOVE
       # check to make sure there is enough room above the textbox
       if self.y < @choice_window.height
         # not enough room above, place below
         @choice_window.y = self.y + self.height
       else
         # draw above
         @choice_window.y = self.y - @choice_window.height
       end
     elsif $game_system.choice_position == BOTTOM
       # check to make sure there is enough room below the textbox
       if (SCREEN[1] - self.y - self.height) < @choice_window.height
         # not enough room below, place above
         @choice_window.y = self.y - @choice_window.height
       else
         # draw below 
         @choice_window.y = self.y + self.height
       end
     else # side
       if $game_system.choice_justification == LEFT
         # check to make sure there's room on the left side
         if self.y < @choice_window.width
           # not enough room on the side, check to make sure there's room below
           if (SCREEN[1] - self.y - self.height) < @choice_window.height
             # not enough room below, place above
             @choice_window.y = self.y - @choice_window.height
           else
             # draw below 
             @choice_window.y = self.y + self.height
           end
         else
           # place on the left side
           @choice_window.y = self.y
           @choice_window.x = self.x - @choice_window.width
         end
       else # right
         # check to make sure there's room on the right side
         if ((SCREEN[0] + 40) - (self.y + self.width)) < @choice_window.width
           # not enough room on the side, check to make sure there's room below
           if (SCREEN[1] - self.y - self.height) < @choice_window.height
             # not enough room below, place above
             @choice_window.y = self.y - @choice_window.height
           else
             # draw below 
             @choice_window.y = self.y + self.height
           end
         else
           # place on the left side
           @choice_window.y = self.y
           @choice_window.x = self.x + self.width
         end
       end
     end
   end
 end
end

 

 

Blizz-ABS (and add-ons)


Fix for the main Blizz-ABS scripts. (Not tested with old versions)

 

 

[*]Place code below all Blizz-ABS parts and below Custom Resolution script.

module BlizzABS
#===============================================================================
# ** Controller
#===============================================================================

 class Controller

   CX = ((SCREEN[0] / 2) - 16) * 4
   CY = ((SCREEN[1] / 2) - 16) * 4

   def center(x, y, flag = false)
     pix = flag ? $BlizzABS.pixel : 1
     x, y = x * 128 / pix, y * 128 / pix
     m_x = ($game_map.width - $game_map.tile_size[0]) * 128
     m_y = ($game_map.height - $game_map.tile_size[1]) * 128
     ox, oy = x - CX, y - CY
     if ox > m_x
       $game_map.display_x = m_x
     elsif ox < 0
       $game_map.display_x = 0
     else
       $game_map.display_x = ox
     end
     if oy > m_y
       $game_map.display_y = m_y
     elsif oy < 0
       $game_map.display_y = 0
     else
       $game_map.display_y = oy
     end 
   end
 end

#===============================================================================
# ** Utility
#===============================================================================

 class Utility
   def get_fullscreen_area
     return Rect.new($game_map.display_x / 4, $game_map.display_y / 4, 
       SCREEN[0], SCREEN[1])
   end

   def get_player_radius
     if $game_player.screen_x > (SCREEN[0] / 2)
       x_max = $game_player.screen_x
     else
       x_max = SCREEN[0] - $game_player.screen_x
     end
     if $game_player.screen_y > (SCREEN[1] / 2)
       y_max = $game_player.screen_y
     else
       y_max = SCREEN[1] - $game_player.screen_y
     end
     return Math.hypot(x_max, y_max) / 32
   end
 end
end


#===============================================================================
# ** Sprite
#===============================================================================

class Sprite

 def in_screen?
   return (self.x.between?(0, SCREEN[0]-1) && (self.y-16).between?(0, SCREEN[1]-1))
 end
end

#===============================================================================
# ** Game_Character
#===============================================================================

class Game_Character

 def in_abseal_range?
   factor = BlizzABS::Config::ABSEAL_FACTOR < 1 ? 1 :
       BlizzABS::Config::ABSEAL_FACTOR.to_i
   return false if @real_x < $game_map.display_x - factor * 128
   return false if @real_y < $game_map.display_y - factor * 128
   return false if @real_x >= $game_map.display_x + (SCREEN[0]*4) + factor * 128
   return false if @real_y >= $game_map.display_y + (SCREEN[1]*4)+ factor * 128
   return true
 end

end

#===============================================================================
# ** Map_Battler < Game_Character
#===============================================================================

class Map_Battler < Game_Character

 def in_screen?
   return (((@real_x - $game_map.display_x - 64) / 4).between?(0, SCREEN[0]) &&
           ((@real_y - $game_map.display_y - 64) / 4).between?(0, SCREEN[1]))
 end
end

#===============================================================================
# ** Map_Remote < Map_Battler
#===============================================================================

class Map_Remote < Map_Battler

 def out_of_screen?(add = 0)
   return (self.real_x - $game_map.display_x + add < 0 ||
           self.real_x - $game_map.display_x + add > (SCREEN[0]*4) ||
           self.real_y - $game_map.display_y + add < 0 ||
           self.real_y - $game_map.display_y + add > (SCREEN[1]*4))
 end  
end

#===============================================================================
# ** HUD < Sprite
#===============================================================================

class HUD < Sprite

 alias zer0_resolution_hud_position_init initialize
 def initialize(viewport = nil)
   zer0_resolution_hud_position_init(viewport)
   case BlizzABS::Config::HUD_POSITION
   when 0 then self.x, self.y = 4, 4
   when 1 then self.x, self.y = SCREEN[0] - self.bitmap.width - 4, 4
   when 2 then self.x, self.y = 4, (SCREEN[1] - 116)  
   end
 end
end

#===============================================================================
# ** Minimap < Sprite
#===============================================================================

class Minimap < Sprite

 def initialize
   width, height = SCREEN[0] / 4, SCREEN[1] / 4
   super(Viewport.new(SCREEN[0]-width-4, SCREEN[1]-height-4, width, height))
   @autotile = $BlizzABS.cache.image('minimap_autotile')
   create_passable_floor
   self.x = self.y = 0
   viewport.z = 5000
   @events, @names = check_events
   create_sevents
   self.visible = true
   update
 end

 def update(override = false)
   create_passable_floor if @map_id != $game_map.map_id
   ev = check_events
   if @events != ev[0] || @names != ev[1]
     @events, @names = ev
     destroy_sevents
     create_sevents
   end
   if $game_system.minimap < 2
     self.ox, self.oy = $game_map.display_x / 16, $game_map.display_y / 16
   elsif !($game_system.turn_button && Input.press?(Input::Turn)) || override
     if self.bitmap.width > SCREEN[0]
       border = $game_player.real_x/16 - (SCREEN[0] / 2)
       border_x = self.bitmap.width - SCREEN[0]
       if border < 0
         self.ox = 0
       elsif border > border_x
         self.ox = border_x
       else
         self.ox = border
       end
     else
       self.ox = self.bitmap.width/2 - (SCREEN[0] / 2)
     end
     if self.bitmap.height > SCREEN[1]
       border = $game_player.real_y/16 - (SCREEN[1] / 2)
       border_y = self.bitmap.height - SCREEN[1]
       if border < 0
         self.oy = 0
       elsif border > border_y
         self.oy = border_y
       else
         self.oy = border
       end
     else
       self.oy = self.bitmap.height/2 - (SCREEN[1] / 2)
     end
   end
   @sevents.each_index {|i|
       if $game_system.minimap == 2 || @events[i].update?
         @sevents[i].x = self.x + @events[i].real_x / 16
         @sevents[i].y = self.y + @events[i].real_y / 16
         @sevents[i].ox, @sevents[i].oy = self.ox, self.oy
         if @names[i] != '' && !@events[i].dropped? &&
             (@events[i].is_a?(Map_Actor) ||
             !@events[i].name.clone.gsub!('\box') {''})
           @sevents[i].src_rect.set((@events[i].direction - 2) * 7, 0, 14, 14)
           @sevents[i].ox += 3
           @sevents[i].oy += 3
         end
       end}
 end
end

#===============================================================================
# ** Scene_Map
#===============================================================================

class Scene_Map

 def update_minimap
   return if @minimap == nil
   if $game_system.minimap < 2
     @minimap.update
     return
   end
   unless @minimap.viewport.rect.width == SCREEN[0] &&
       @minimap.map_id == $game_map.map_id
     @minimap.viewport.rect.set(0, 0, SCREEN[0], SCREEN[1])
     @minimap.update(true)
   else
     @minimap.update
   end
   if $game_system.turn_button && Input.press?(Input::Turn) &&
       !$game_system.map_interpreter.running? && !@move_route_forcing &&
       !$game_temp.message_window_showing
     if @minimap.bitmap.width > SCREEN[0]
       if Input.repeat?(Input::RIGHT)
         if @minimap.ox + SCREEN[0] < @minimap.bitmap.width
           $game_system.se_play($data_system.cursor_se)
           @minimap.ox += 32
         else
           $game_system.se_play($data_system.buzzer_se)
         end
       elsif Input.repeat?(Input::LEFT)
         if @minimap.ox > 0
           $game_system.se_play($data_system.cursor_se)
           @minimap.ox -= 32
         else
           $game_system.se_play($data_system.buzzer_se)
         end
       end
     end
     if @minimap.bitmap.height > SCREEN[1]
       if Input.repeat?(Input::DOWN)
         if @minimap.oy + SCREEN[1] < @minimap.bitmap.height
           $game_system.se_play($data_system.cursor_se)
           @minimap.oy += 32
         else
           $game_system.se_play($data_system.buzzer_se)
         end
       elsif Input.repeat?(Input::UP)
         if @minimap.oy > 0
           $game_system.se_play($data_system.cursor_se)
           @minimap.oy -= 32
         else
           $game_system.se_play($data_system.buzzer_se)
         end
       end
     end
   end
 end

 def initialize_selection
   object, r, type, sprites = $game_temp.select_data
   enemy, dead, all = $BlizzABS.util.get_scope_data(object.scope)
   if $tons_version != nil && object.is_a?(RPG::Skill) &&
       ($tons_version >= 6.02 && $game_system.TARGET_EM_ALL &&
       FULL_TARGET_IDS.include?(object.id))
     target_all = all = true
   end
   sprites.each {|sprite| sprite.z += 1000000}
   @index = 0
   Graphics.freeze
   tone = $game_screen.tone
   @spriteset.viewport1.tone = Tone.new(tone.red - 32, tone.green - 32,
       tone.blue - 32, tone.gray)
   $game_system.se_play($data_system.decision_se)
   @win = Window_Help.new
   @win.z, @win.opacity = 10000, 192
   @ranges = [sprite.new(@spriteset.viewport1),
              Sprite.new(@spriteset.viewport1)]
   @ranges[0].z = @ranges[1].z = 950000
   color = (target_all ? Color.new(255, 255, 255, 96) : enemy ?
       Color.new(255, 0, 0, 96) : Color.new(0, 128, 255, 96))
   if type == BlizzABS::BEAM && all
     @ranges[0].bitmap = Bitmap.new(SCREEN[0], SCREEN[1])
     @ranges[1].bitmap = Bitmap.new(SCREEN[0]-2, SCREEN[1]-2)
     @ranges[0].bitmap.fill_rect(0, 0, SCREEN[0], SCREEN[1], 
       Color.new(255, 255, 0, 160))
     @ranges[0].bitmap.fill_rect(1, 1, SCREEN[0]-2, SCREEN[1]-2, 
       Color.new(0, 0, 0, 0))
     @ranges[1].x = @ranges[1].y = 1
     @ranges[1].bitmap.fill_rect(0, 0, SCREEN[0]-2, SCREEN[1]-2, color)
   else
     @ranges[0].bitmap = Bitmap.new(r * 2 + 32, r * 2 + 32)
     @ranges[1].bitmap = Bitmap.new(r * 2 + 32, r * 2 + 32)
     @ranges[0].x, @ranges[0].y = $game_player.screen_x, $game_player.screen_y
     @ranges[1].x, @ranges[1].y = $game_player.screen_x, $game_player.screen_y
     @ranges[0].ox, @ranges[0].oy = r + 16, r + 32
     @ranges[1].ox, @ranges[1].oy = r + 16, r + 32
     @ranges[0].bitmap.draw_circle(0, 0, r.to_i + 16, Color.new(255, 255, 0, 160))
     @ranges[0].bitmap.draw_circle(1, 1, r.to_i + 15, Color.new(0, 0, 0, 0))
     @ranges[1].bitmap.draw_circle(1, 1, r.to_i + 15, color)
   end
   if all
     sprites.each {|sprite| sprite.select = 1}
     @win.set_text(BlizzABS::Cache::WORDAll, 1)
   else
     sprites[0].select = 1
     @win.set_text(sprites[0].character.battler.name, 1)
   end
   @ranges[1].color.set(255, 255, 0, (16 - Graphics.frame_count % 32).abs * 8)
   Graphics.transition
 end
end

 

 


Notes

 

Please report any bugs/issues/suggestions. I will be happy to fix them.

Enjoy!

Edited by ForeverZer0

Share this post


Link to post
Share on other sites

Script: H-Mode7 Engine 

[b]Link:[/b] <http://save-point.org/thread-3151.html> [b]Issue:[/b] <When I try to run the game with the script it first it doesn't show the game in the full RES just the border and when I start to play the game it instantly turns the camera and moves the character to a new space but if I move the camera some I can see the land in the distant.It looks like it may be too much of a hassle but if you think you can fix it that would be wonderful.>

 

 




			
				


	Edited  by handy333
	
	

			
		

Share this post


Link to post
Share on other sites

necro-posting is when you post in a thread that is really old...like this one. No one responded to it sine it was made in may 2011. I'm closing it.

 

Btw if you're having trouble with a script, try asking the people who made the script for help, they will have a better idea what the problem might be and would be suited to fixing it.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...