[XP] Custom Resolution Compatibility Plug-Ins

Started by ForeverZer0, December 18, 2010, 01:41:22 pm

Previous topic - Next topic

ForeverZer0

December 18, 2010, 01:41:22 pm Last Edit: January 14, 2018, 05:04:12 pm by KK20
Custom Resolution Compatibility Plug-Ins
Authors: ForeverZer0
Version: 1.0
Type: Misc Add-on
Key Term: 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 inlude it in the main post, with full credit to you.


Compatibility Fixes

Weather System


Compatibility fix for default weather system.
Spoiler: ShowHide

  • 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), Advanced Weather (Zer0's)(Versions 1.2 and under), and MAWS.
Spoiler: ShowHide

  • 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).
Spoiler: ShowHide

  • 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
Spoiler: ShowHide

  • 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)
Spoiler: ShowHide

  • 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.
Spoiler: ShowHide

  • 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)
Spoiler: ShowHide

  • 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

    If using v97, or get an error about tile_size is undefined, append this to the script above:

    class Game_Map
      attr_reader :tile_size
      alias initiate_tile_size_for_babs initialize
      def initialize
        @tile_size = [SCREEN[0], SCREEN[1]].collect {|n| (n / 32.0).ceil }
        initiate_tile_size_for_babs
      end
    end





Notes

Please report any bugs/issues/suggestions. I will be happy to fix them.
Enjoy!
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

[Luke]

You made the impossible, you're the man, bla bla blah. We all approve your genius, Now let's do something useful.

I've tested this with the Blizz ABS, RMX-OS, half of the Tons of Addons enabled, Multiple Message Windows, CCTS, Ryex's Collapsing CMS, and many, many other scripts (even some yet unnamed made by me) in my project and NOTHING DID CRASH. Well, at least after I've repaired the MMS issue: The initialize method of the Window_Message class needs an 'msgindex' argument. Also the initialization called in the Scene_Map has an argument of 0 specified. Fix:

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

All we need is a pair of brackets and some characters inside ;)

So, nothing did crash. But... There are some major issues with the Blizz-ABS:
1. HUD is too 'low' and it's not visible (same for the RMX-OS chat window, both covered with map)
2. Blizz-ABS battlers have similar issue - there is no priority of their 'upper' parts, if you're 'north' to the enemy, his head doesn't cover your legs.
Well, they are not that major, but still this is a must-fix.

And my personal objection:
The player's character appears at the same position of the screen as in the 640x480 resolution instead of the center of the current resolution's rectangle.

Blizzard

I think the only problem are the relative z coordinates. F0 should fix that easily. :)
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

ForeverZer0

December 20, 2010, 12:15:20 pm #3 Last Edit: December 20, 2010, 11:36:01 pm by ForeverZer0
I am in the middle of making the BABS fixes. I have already addressed the following in it:

  • HUD placement.
  • Minimap placement
  • Minimap will be drawn to scale to fit the screen. I t will always be 160 pixels wide, but the height will change to match the aspect ratio of the screen.
  • Centering of player (almost, one last bug to work there)


The biggest problem thus far is with the pixel movement and the pre-cached priorities. Since the priorities are pre-cached and saved, but the pixel-rate can be altered at run-time, the coordinates will no longer be correct. I'm working on a solution though, just didn't get it finished yet, so never fear.


I actually have one last bug to work out with the original script, hence it is not yet version 1.0. There are instances where the priorities will mess up when multiple characters are lined up vertically, with a priority 1 tile sandwiching them on the same axis. The bottom character will be drawn over the lowest tile (at least his legs).


EDIT: I just attempted to fix the argument error that [Luke] pointed out above (thank you, by the way), and I get the 403 Error. Is it possible for a mod to fix it for me, please?

EDIT2:
I finished(?) the Blizz-ABS compatibility plug-in, but once again the 403. I will attempt to post it tomorrow. There is a computer at work that sometimes lets me post and modify my own topics.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

ForeverZer0

Blizz-ABS (and add-ons)



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

  • 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


I can't modify my own post, so here it is.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Blizzard

Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

ForeverZer0

I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Dark4Space

Sorry I don't speak an perfectly English but... houston we have a problem

Script: Gamba SBABS
Link: http://www.mundorpgmaker.com/forum/index.php?topic=54718.0
Issue: The events follow the character if it is to the left and return to normal when the player "see" where the event has started

[Luke]

Why are you posting a link to a non-English forum? Probably it's a form of ABSEAL. And I bet that kind of a script needs a huge plug-in. Find somebody on that forum who's well-known with that ABS and will make a CR plugin. I know it's a breakthrough and ForeverZer0 is an interforumational scripting celebrity (or will be) since he published a script that was considered by another scripting god (Blizzard) as very difficult to make ("Scripts that are not possible and why they aren't"), but, still, he cannot make plugins for all the scripts in the world...
...probably :D He did make CRS, so I doubt there's anything impossible to him :P

ForeverZer0

I'm not promising anything on this one. I WILL take a look through it, but I am not going to translate all that just to understand what each method is doing. If something pops out at me, I will make a fix for it, though.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Dark4Space

Using Google Translate:

This is a mixed with XAS ABS and RTH ABS.
Plug-ins have no incompatibility with the script.
Yes, it is also recognized worldwide ForeverZer0

burandon


ForeverZer0

Yes, it should be.
CCTS does not actually change to many graphical things, it simple controls existing things. You will definitely want to get the weather plug-in, though, so that the weather displays across the entire screen.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

burandon

November 09, 2011, 08:21:49 am #13 Last Edit: November 09, 2011, 08:28:35 am by burandon
I'm having problem with blizzABS.I'm using resolution 896x704. After the title screen the game crashes with a error with Multiple Message and his fix it crashes like this:


Error in script Blizz ABS Part2, in 2219 line 'NoMethodError'

undefined method 'refresh' for #<Game_Player:0x8b98e78>

With only Blizz and his fix it crashes like this:

Error in script Custom Resolution, in 429 in line 'ZeroDivisionError'

divided by zero


Sorry 'bout the English, I'm Brazilian ^^

Blizzard

Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Zexion

January 25, 2012, 07:32:39 pm #15 Last Edit: January 25, 2012, 08:05:12 pm by Zexion
I'm having a wierd bug, and I have no idea how to fix it.
My resolution is 320x240 exactly half the size that it used to be.
It seems to be cutting off the rest of the map! I can't really describe it so here's a picture!
Spoiler: ShowHide

Spoiler: ShowHide
And yes there is quite a bit more to the map than this!
I've tried removing the charset script and messaging script, and still this happens. The other scripts are menu scripts, which still work perfectly fine(just to big now with the smaller res.) What could this be?

Oh, i found out that if i make the map bigger, it fixes the above bug!


But now i have discovered that I can't use animated panoramas anymore! In my game, the character visits megaman's world, and there are animated backgrounds in it, but when i use this script it gives me an error.
"Script:'Custom Resolution' line 551: NoMethodError occurred.
undefined method 'width' for nil:NilClass"

It only happens when i animate panoramas by using an event and doing
Spoiler: ShowHide
change picture
wait 4 frames
change picture
wait 4 frames

is there any way to fix it?

CountVlad

I'm getting a divide my zero error on line 429 of the main custom resolution script when using the latest version of Blizz-ABS, the custom resolution script and the compatibility plugin.
I've got the scripts in the right order, as far as I know, and it's on a new project with no other custom scripts. I haven't changed any of the settings.

My script order:

ABS1
ABS2
ABS3
Custom Resolution
ABS Compatibility

They are all below the default scripts and above Main.

Any help would be much appreciated.

ForeverZer0

Do you have the pixel_rate in Blizz-ABS set to 0?
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

CountVlad

July 08, 2012, 04:19:44 pm #18 Last Edit: July 08, 2012, 04:21:14 pm by CountVlad
Quote from: ForeverZer0 on July 08, 2012, 11:34:34 am
Do you have the pixel_rate in Blizz-ABS set to 0?

In part one of Blizz-ABS it says "PIXEL_MOVEMENT_RATE = 0".

EDIT: it's version 2.84 without any of the settings changed, if that helps.

ForeverZer0

Just change the line above where it says "if $BlizzABS" to "if $BlizzABS && $game_system.pixel_rate != 0"
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.