[XP] Blizz-ABS

Started by Blizzard, January 09, 2008, 08:21:56 am

Previous topic - Next topic

KK20

August 09, 2020, 05:03:14 pm #5460 Last Edit: August 09, 2020, 05:09:59 pm by KK20
"I didn't knew they should not be animated."
It's more I didn't know that idle animations didn't animate. But yeah, toggling the event's Stop Animation can be considered a fix. Idle animations for actors, however, will require some kind of script fix.

Custom Resolution, in its latest version, doesn't need the DLL. There's a DLL-less version mentioned. Another thread was made for compatibility with other scripts here: https://forum.chaos-project.com/index.php/topic,7947.0.html
It's unknown whether it still works though. Take a look at the script database and search for "Custom Resolution".

But I would also suggest that you use XPA Tilemap instead.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Ronivan

August 09, 2020, 06:52:50 pm #5461 Last Edit: August 09, 2020, 07:06:57 pm by Ronivan
Big thanks. Everything here seems to slowly fit together and work properly. I thought that I could use an idle animated animation because the sprites I use actually have animated idle, which is supposed to be play when no action is being executed. It didn't troubled me with the character animation, because the only part I did animated was the hair, which is not something essential. The only thing I would like to have with Blizz ABS is the 8 direction movement with a unique diagonal animation. I have these diagonal animations in place, but it seems that this system don't make use of this kind of sprite for diagonal moves.

Edit: I swap to the your XPA custom screen script, which work properly with Blizz ABS; however, I found the same strange behavior on screen position, which my player is locked in the upper-left corner of the screen.

KK20

It's a tilemap rewrite actually, not a custom screen. It just happens to support other resolutions.

Yeah, there's no 8-dir sprite support built into Blizz-ABS. I don't believe it's easy to implement either.

I think you should be able to still use the Custom Resolution Compatibility fix. You just need to rename any instances of SCREEN with SCREEN_RESOLUTION.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Ronivan

August 09, 2020, 09:47:17 pm #5463 Last Edit: August 09, 2020, 11:29:14 pm by Ronivan
Renaming the stances won't solve it either. Although the game crashes when I move my character, its in the same position, on the upper-left. Even if I move it to the corner, it still fixes the center of the screen on the upper-left. I can tell this is an issue with the Blizz-ABS because it don't behave like that if I remove the ABS and play it. This I tested with XPA Screen, I'm not using the other anymore.

Ronivan

I tried to change values in the controller section, which kinda solved the screen position issue; however, the area of the screen don't move, and if I move outside it, the enemies disappear and my spells animation don't work. This custom screen size will not work with Blizz-ABS I'm afraid.

KK20

Since you don't seem to understand what I'm saying, here's what I did:

Script order
  • Blizz-ABS
  • Multiframes for Blizz-ABS
  • XPA Tilemap
  • Custom Resolution Compatibility

For Custom Resolution Compatibility:

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Ronivan

I did all the following, but still got that undefined method tile_size error at start. I did append the script as blandly said in the description, did the changes in the screen to screen_resolution. Heres the complete resolution compatibility addon I'm using:

module BlizzABS
 
    #===============================================================================
    # ** Controller
    #===============================================================================
   
      class Controller
         
        CX = ((SCREEN_RESOLUTION[0]) - 16) * 4
        CY = ((SCREEN_RESOLUTION[1]) - 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_RESOLUTION[0], SCREEN_RESOLUTION[1])
        end
   
        def get_player_radius
          if $game_player.screen_x > (SCREEN_RESOLUTION[0] / 2)
            x_max = $game_player.screen_x
          else
            x_max = SCREEN_RESOLUTION[0] - $game_player.screen_x
          end
          if $game_player.screen_y > (SCREEN_RESOLUTION[1] / 2)
            y_max = $game_player.screen_y
          else
            y_max = SCREEN_RESOLUTION[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_RESOLUTION[0]-1) && (self.y-16).between?(0, SCREEN_RESOLUTION[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_RESOLUTION[0]*4) + factor * 128
        return false if @real_y >= $game_map.display_y + (SCREEN_RESOLUTION[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_RESOLUTION[0]) &&
                ((@real_y - $game_map.display_y - 64) / 4).between?(0, SCREEN_RESOLUTION[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_RESOLUTION[0]*4) ||
                self.real_y - $game_map.display_y + add < 0 ||
                self.real_y - $game_map.display_y + add > (SCREEN_RESOLUTION[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_RESOLUTION[0] - self.bitmap.width - 4, 4
        when 2 then self.x, self.y = 4, (SCREEN_RESOLUTION[1] - 116) 
        end
      end
    end
   
    #===============================================================================
    # ** Minimap < Sprite
    #===============================================================================
   
    class Minimap < Sprite
     
      def initialize
        width, height = SCREEN_RESOLUTION[0] / 4, SCREEN_RESOLUTION[1] / 4
        super(Viewport.new(SCREEN_RESOLUTION[0]-width-4, SCREEN_RESOLUTION[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_RESOLUTION[0]
            border = $game_player.real_x/16 - (SCREEN_RESOLUTION[0] / 2)
            border_x = self.bitmap.width - SCREEN_RESOLUTION[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_RESOLUTION[0] / 2)
          end
          if self.bitmap.height > SCREEN_RESOLUTION[1]
            border = $game_player.real_y/16 - (SCREEN_RESOLUTION[1] / 2)
            border_y = self.bitmap.height - SCREEN_RESOLUTION[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_RESOLUTION[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_RESOLUTION[0] &&
            @minimap.map_id == $game_map.map_id
          @minimap.viewport.rect.set(0, 0, SCREEN_RESOLUTION[0], SCREEN_RESOLUTION[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_RESOLUTION[0]
            if Input.repeat?(Input::RIGHT)
              if @minimap.ox + SCREEN_RESOLUTION[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_RESOLUTION[1]
            if Input.repeat?(Input::DOWN)
              if @minimap.oy + SCREEN_RESOLUTION[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_RESOLUTION[0], SCREEN_RESOLUTION[1])
          @ranges[1].bitmap = Bitmap.new(SCREEN_RESOLUTION[0]-2, SCREEN_RESOLUTION[1]-2)
          @ranges[0].bitmap.fill_rect(0, 0, SCREEN_RESOLUTION[0], SCREEN_RESOLUTION[1],
            Color.new(255, 255, 0, 160))
          @ranges[0].bitmap.fill_rect(1, 1, SCREEN_RESOLUTION[0]-2, SCREEN_RESOLUTION[1]-2,
            Color.new(0, 0, 0, 0))
          @ranges[1].x = @ranges[1].y = 1
          @ranges[1].bitmap.fill_rect(0, 0, SCREEN_RESOLUTION[0]-2, SCREEN_RESOLUTION[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
     
    #=== GAME_MAP PART ADDED =============================
    class Game_Map
      attr_reader :tile_size
      alias initiate_tile_size_for_babs initialize
      def initialize
        @tile_size = [SCREEN_RESOLUTION[0], SCREEN_RESOLUTION[1]].collect {|n| (n / 32.0).ceil }
        initiate_tile_size_for_babs
      end
    end
    #=====================================================
end
   
[\code]

KK20

You appended the Game_Map class inside of Scene_Map. Gotta be outside of it.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Ronivan

August 10, 2020, 11:15:18 am #5468 Last Edit: August 10, 2020, 11:22:14 am by Ronivan
Nope, still getting the same undefined tile_map error over and over. Keep in mind that I'm using Visual Studio Code to properly position the classes inside the script, because XP script editor is beyond bad.

KK20

I've uploaded my Scripts.rxdata for the project that worked for me. Compare it to what you have right now, because you're clearly doing something wrong.

https://drive.google.com/file/d/1rls8o3abcBwnB7tmanePfO1C_GPeDM6R/view?usp=sharing

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

KK20


Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Ronivan

Finally found the reason, all thanks to your data. This is what was causing all the issues:


The upper is the correct form, while the lower one was incorrect, and I was using that. If you look at the script I have posted here, you will see that incorrect form too. I don't know why that happened, because the original scripted posted by ForeverZer0 is correct. I'm sure that I'm the one to blame, because I may have changed the code in some moment, trying desperately to find a solution. Anyway, big thanks again for helping me out on this. I triple tested all the situations that I had issues, and now they are gone.

Ronivan

Just a question, its possible to delay the damage hit itself, like when you have a long attack animation, you don't want the damage hit to happen at the start of the animation, but rather the end. Its possible to somehow add a delay to this?

KK20

What you could do is enable charge weapon sprites. Rename your _atk# animation to atk_chr#. Move your Weapon frames over to charge_frames. Now, if you want, you can make the _atk# animation be the end-animation of the attack and adjust the frames and penalty accordingly. Make your weapon CHARGEFreeze and set its frame count equal to the sum of the charge_frames.

Here's an example:
    def self.penalty(id)
      return 2 # I reduced it for better game-feel
    end
   
    def self.frames(id)
      return [0] # this is the absolute lowest possible setting you can do
    end
   
    def self.charge(id)
      return [CHARGEFreeze, 18]
    end
   
    def self.charge_frames(id)
      return [3, 3, 3, 3, 3, 3] # sum of 18
    end

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!