Aldeia RPG

Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.

Suporte ao desenvolvimento de jogos


3 participantes

    Correção de Sprites

    Valentine
    Valentine
    Administrador
    Administrador


    Medalhas : Correção de Sprites ZgLkiRU
    Mensagens : 5336
    Créditos : 1163

    Correção de Sprites Empty Correção de Sprites

    Mensagem por Valentine Ter maio 22, 2018 12:29 pm

    Compativel com: RMVX Ace
    Compatibilidade :boa
    Facilidade de uso: fácil
    Lag gerado: baixo

    Para que serve o script
    Sabe aquele bug chato, aonde chars acima de 32px, ao estarem presentes entre um tile abaixo dele e outro acima, da uma impressão bem feia? pois bem esse script corrigi isso Very Happy.

    Script
    Código:
    #==============================================================================
    #
    # ▼ Moby's Script System - Correct Sprite Display V1.0
    # -- Last Updated: 2012.06.26
    #
    #==============================================================================
     
    $imported = {} if $imported.nil?
    $imported["MSS-Correct_Sprite_Display"] = 1.0
     
    #==============================================================================
    # ▼ Updates
    # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    # N/A
    #
    #==============================================================================
    # ▼ Introduction
    # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    # This script corrects how sprites will be displayed, to prevent errors
    # happening when the sprite is higher than 32px and the tile above it is set
    # to star passability.
    #
    #==============================================================================
    # ▼ Instructions
    # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    # To install this script, open up your script editor and copy/paste this script
    # to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
    #
    #
    # If you have any questions, bugs you want to report or anything else,
    # please contact me at mobychan@gmx.de or via my profile on
    # http://forums.rpgmakerweb.com (mobychan).
    #
    #
    # This script is Plug and Play.
    # It automatically checks if the Sprite is bigger then 32px and adjust the
    # tiles around that sprite accordingly.
    # If you're using Anaryu's Particle Engine (ported by Yami)
    # there won't be any issues.
    #
    #==============================================================================
    # ▼ Compatibility
    # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
    # it will run with RPG Maker VX without adjusting.
    #
    #==============================================================================
    #
    #==============================================================================
    # ▼ Compatibility Issues
    # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    # N/A
    #
    #==============================================================================
     
     
     
    #==============================================================================
    # ** Spriteset_Map
    #------------------------------------------------------------------------------
    #  This class brings together map screen sprites, tilemaps, etc. It's used
    # within the Scene_Map class.
    #==============================================================================
     
    class Spriteset_Map
      #--------------------------------------------------------------------------
      # * Update Character Sprite
      #--------------------------------------------------------------------------
      alias msscsd_update_characters update_characters unless $@
      def update_characters
        msscsd_update_characters
      
        @character_sprites.each do |curr_sprite|
          if curr_sprite.character.class.name == "Game_Event" ||
              curr_sprite.character.class.name == "Game_Player" ||
              curr_sprite.character.class.name == "Game_Follower"
            height = get_height(curr_sprite)
          
            if height > 1
              x = curr_sprite.character.x
              curr_sprite.viewport = @viewport1
            
              id = $game_map.data[x, curr_sprite.character.y, 2]
              flag_pos = $game_map.tileset.flags[id]
            
              if (!(flag_pos & 0x10 != 0) || id == 0)
                for i in 2..height
                  y = curr_sprite.character.y - (i - 1)
                
                  if !$game_map.data[x, y, 2].nil?
                    flag = $game_map.tileset.flags[$game_map.data[x, y, 2]]
                  
                    if flag & 0x10 != 0 && # [☆]: No effect on passage
                        $game_map.data[x, y, 2] != 0
                      curr_sprite.viewport = @viewport2
                      break
                    else
                      curr_sprite.viewport = @viewport1
                    end
                  end
                end
              end
            end
          end
        end
      end
      #--------------------------------------------------------------------------
      # * Gets the given Sprites height
      #--------------------------------------------------------------------------
      def get_height(curr_sprite)
        height = 0
      
        if curr_sprite.character.character_name.scan(/$/)
          height = (curr_sprite.bitmap.height / 4) / 32
          height += 1 if (curr_sprite.bitmap.height / 4) % 32 > 0
        else
          height = (curr_sprite.bitmap.height / 8) / 32
          height += 1 if (curr_sprite.bitmap.height / 8) % 32 > 0
        end
        return height
      end
      #--------------------------------------------------------------------------
      # * Add Particle
      #--------------------------------------------------------------------------
      def add_particle(target, name, blend, setting, offset, v = nil, a = nil)
            particle = Particle.new(@viewport2, target, name, blend, setting, offset, v, a)
            @particles.push(particle)
      end
    end

    Imagens
    Antes
    Correção de Sprites Messed%2520up%2520Display

    Depois
    Correção de Sprites Correct%2520Sprite%2520Display

    Créditos e avisos
    Mobychan
    Azel
    Azel
    Iniciante
    Iniciante


    Mensagens : 47
    Créditos : 7

    Correção de Sprites Empty Re: Correção de Sprites

    Mensagem por Azel Ter maio 22, 2018 10:52 pm

    Serviria para arrumar char dos XP no VX Ace ?

    Tem um script gringo que faz a conversão mas deixa ela meio que bugada igual a primeira imagem...
    Irei testar para ter certeza.

    +1 Crédito por trazer para a gente  Very Happy
    Kies
    Kies
    Diva
    Diva


    Mensagens : 1154
    Créditos : 124

    Ficha do personagem
    Nível: 1
    Experiência:
    Correção de Sprites Left_bar_bleue0/0Correção de Sprites Empty_bar_bleue  (0/0)
    Vida:
    Correção de Sprites Left_bar_bleue30/30Correção de Sprites Empty_bar_bleue  (30/30)

    Correção de Sprites Empty Re: Correção de Sprites

    Mensagem por Kies Qui maio 24, 2018 8:45 am

    Quando acabar o Netace.. ai sim vou usar kkkk; Daria pra por esse script certo?

    Conteúdo patrocinado


    Correção de Sprites Empty Re: Correção de Sprites

    Mensagem por Conteúdo patrocinado


      Data/hora atual: Qui Mar 28, 2024 4:40 pm