Ergebnis 1 bis 20 von 1418

Thema: Technik-Sammelthread für Probleme und Antworten

Hybrid-Darstellung

Vorheriger Beitrag Vorheriger Beitrag   Nächster Beitrag Nächster Beitrag
  1. #1
    Hallo Linkey,

    Vielen Dank für das Raussuchen, ich hab beim besten Willen selbst nichts finden können. x.X
    Das Script funktioniert FAST perfekt. Es tut was es tun soll, aber wenn ich an den Zaun vorbeilaufe, kommt an den Ecken zu Problemen:
    Wenn das Event (z.B. der Held) von dem Tile seitlich wegläuft, wird das Tile wieder nach oben befördert.

    Mit häufigen Versuchen hab ich kontrolliert, ob das bei den Followern auch der Fall ist, aber nein, es ist nur für das Event, das das Tile gerade verlässt.

  2. #2
    Moin Agura,

    hab mal schnell zwei Dinge eingebaut:
    1. Wenn der Charakter breiter als 32 Pixel ist, werden nun auch die benachbarten Felder geprüft
    2. Wenn der Charakter über einer Grafik angezeigt wird (z.B. Zaun) und sich bewegt, bleibt er solange im Vordergrund, bis er das nächste Feld erreicht hat
    Code:
    #==============================================================================
    #
    # ▼ Moby's Script System - Correct Sprite Display V1.0
    # -- Last Updated: 2013.01.26
    #
    # -- Update: LDT0319
    # -- Date:   2019.03.30
    # -- User:   D.T. Linkey
    # -- Change: If character is wider than 1 tile, check neighbour fields to 
    #            the correct Z-Value
    #
    #==============================================================================
    
    $imported = {} if $imported.nil?
    $imported["MSS-Correct_Sprite_Display"] = 1.0
    
    #==============================================================================
    # ▼ Updates
    # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    # (by brushfe) Tall events interact better with other tall events
    #
    #==============================================================================
    # ▼ 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.
    #
    #==============================================================================
    #
    #==============================================================================
    # ▼ Known Issues
    # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    # Really wide character sprites still are sometimes drawn behind tiles they
    # should be in front of.
    #==============================================================================
    
    
    #==============================================================================
    # ** Spriteset_Map
    #------------------------------------------------------------------------------
    # This class brings together map screen sprites, tilemaps, etc. It's used
    # within the Scene_Map class.
    #==============================================================================
    class Spriteset_Map
      #LDT0319 flag to check if character was in front of something before moving
      @chinfr = false
    #--------------------------------------------------------------------------
    # * 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)
          #========LDT0319 Start
          #get character width
          width = get_width(curr_sprite)
          #if character is moving and was already in front, keep z = 300
          if(curr_sprite.character.class.name == "Game_Player")
            if(curr_sprite.character.moving? && @chinfr)
              curr_sprite.z = 300 
              return
            end
          end
          #========LDT0319 End
          if height > 1
            x = curr_sprite.character.x
            curr_sprite.z = 100
            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.z = 300
                    break
                  else
                    #========LDT0319 Start
                    #check if width is greater than one tile
                    if(width > 1)
                      # for each additional tile, check the field
                      for ti in 2..width
                        # check the field on the left first...
                        tx = curr_sprite.character.x - (ti - 1)
                        if(!$game_map.data[tx, y, 2].nil?)
                          flag = $game_map.tileset.flags[$game_map.data[tx, y, 2]]
                          if flag & 0x10 != 0 && # [☆]: No effect on passage
                            $game_map.data[tx, y, 2] != 0
                            curr_sprite.z = 300
                            break
                          else
                            curr_sprite.z = 100
                          end
                        end
                        # ... check the field on the right
                        tx = curr_sprite.character.x + (ti - 1)
                        if(!$game_map.data[tx, y, 2].nil?)
                          flag = $game_map.tileset.flags[$game_map.data[tx, y, 2]]
                          if flag & 0x10 != 0 && # [☆]: No effect on passage
                            $game_map.data[tx, y, 2] != 0
                            curr_sprite.z = 300
                            break
                          else
                            curr_sprite.z = 100
                          end
                        end
                      end
                    else
                      curr_sprite.z = 100
                    end
                    #========LDT0319 End
                  end
                  loc = [curr_sprite.character.x, curr_sprite.character.y - 1]
                  $game_map.events_xy(*loc).each do |event|
                    if curr_sprite.character.class.name == "Game_Player" ||
                      curr_sprite.character.class.name == "Game_Follower" ||
                      curr_sprite.character.class.name == "Game_Event"
                      curr_sprite.z = 300
                      break
                    end
                  end
                end
              end
            end
          end
        end
        #========LDT0319 if character is in front, set chinfr to true
        @chinfr = true if(curr_sprite.z == 300 && curr_sprite.character.class.name == "Game_Player")
        @chinfr = false if(curr_sprite.z == 100 && curr_sprite.character.class.name == "Game_Player")
      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
    
    #========LDT Start
    def get_width(curr_sprite)
      width = 0
      if curr_sprite.character.character_name.scan(/$/)
        width = (curr_sprite.bitmap.width / 3) / 32
        width += 1 if (curr_sprite.bitmap.width / 3) % 32 > 0
      else
        width = (curr_sprite.bitmap.width / 12) / 32
        width += 1 if (curr_sprite.bitmap.width / 12) % 32 > 0
      end
    return width
    end
    #========LDT 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
    Allerdings gibt es auch mit dieser Lösung ein Problem: Der Charakter steht entweder vor oder hinter den Grafiken. Wenn auf deinem Bild nun ein Turm über die Füße deines Charakters ragen würde, würden die Füße über dem Turm angezeigt werden.
    Darauf musst du dann beim Mappen achten

  3. #3
    Zitat Zitat von Linkey Beitrag anzeigen
    Moin Agura,

    hab mal schnell zwei Dinge eingebaut:
    1. Wenn der Charakter breiter als 32 Pixel ist, werden nun auch die benachbarten Felder geprüft
    2. Wenn der Charakter über einer Grafik angezeigt wird (z.B. Zaun) und sich bewegt, bleibt er solange im Vordergrund, bis er das nächste Feld erreicht hat

    [..]

    Allerdings gibt es auch mit dieser Lösung ein Problem: Der Charakter steht entweder vor oder hinter den Grafiken. Wenn auf deinem Bild nun ein Turm über die Füße deines Charakters ragen würde, würden die Füße über dem Turm angezeigt werden.
    Darauf musst du dann beim Mappen achten
    Zu 1 & 2: Super, dankeschön. Allerdings wurde das mit dem Follower wohl falsch verstanden: Wenn der Follower das Tile betritt ist alles super, wenn diese allerdings das Tile verlässt, besteht das alte Problem immer noch.

    Zu deinem angesprochen Porblem: Ja... das gilt nicht nur für einen Turm, sondern auch für Bäume, leider... Kann man mit arbeiten, allerdings gibt es den Fehler in einer anderen Form nochmal, welcher ebenfalls versucht werden muss zu umgehen oder noch gefixt werden muss.

    Es handelt sich dabei um ein Event, das ich versuchshalber am Zaun langlaufen ließ.

  4. #4
    Hallo Agura,

    schmeiß das alte Script weg und nimm das hier, das funktioniert besser:
    Code:
    ##-----------------------------------------------------------------------------
    #  Large Sprite ☆ Display Fix v1.3
    #  Created by Neon Black at request of seita
    #  v1.4 - 12.18.14 - Added position tuning
    #  v1.3 - 1.12.14  - Viewport/position issue fixes
    #  v1.1 - 8.18.13  - Fixed an odd lag issue
    #  v1.0 - 8.17.13  - Main script completed
    #  For both commercial and non-commercial use as long as credit is given to
    #  Neon Black and any additional authors.  Licensed under Creative Commons
    #  CC BY 4.0 - http://creativecommons.org/licenses/by/4.0/
    ##-----------------------------------------------------------------------------
    
    # -- Update: LDT0319
    # -- Date:   2019.03.30
    # -- User:   D.T. Linkey
    # -- Change: Enabled Game_Followers too
    
    ##------
    ## By default, this script only affects the player.  To allow it to affect
    ## an event page as well, add a comment with the tag <large sprite> to the page
    ## of the event you would like to have affected by this.
     
    class Sprite_Character < Sprite_Base
      ##------
      ## The ID of the terrain used to display the large character above ☆ tiles.
      ## If the player is below this tile (y position), the sprite will appear
      ## above all tiles and events from that y position up.  If the player is on
      ## the same tile or above (y position) the event will appear BELOW ☆ tiles
      ## from that position up.
      ##------
      UpperTerrain = 7
     
      ##------
      ## This value is the pixel tuning used to check the location.  This is
      ## because characters tagged with a '!' in their name are drawn lower than
      ## normal characters and are considered to be lower than these.  This causes
      ## the script to think they are on the tile below where they really are and
      ## draw them above tiles they should appear under.
      ##------
      Tuning = -1
     
      alias :cp_011214_update_bitmap :update_bitmap
      def update_bitmap(*args)
        if graphic_changed? && @set_upper_area_sprite
          @force_no_gfx_change = true
        else
          @force_no_gfx_change = false
        end
        cp_011214_update_bitmap(*args)
      end
     
      ## Alias the update method to add in the new graphic check.
      alias :cp_073013_update_pos :update_position
      def update_position(*args)
        cp_073013_update_pos(*args)
        check_encompassed_area if sprite_is_onscreen?
      end
     
      ## Alias the dispose to dispose the upper sprite.
      alias :cp_073013_dispose :dispose
      def dispose(*args)
        @upper_area_sprite.dispose if @upper_area_sprite
        cp_073013_dispose(*args)
      end
     
    #~   ## Alias the graphic changed method to allow the sprite to revent to what it
    #~   ## was during the last frame.  This allows the check to work again.
    #~   alias :cp_073013_graphic_changed? :graphic_changed?
    #~   def graphic_changed?(*args)
    #~     cp_073013_graphic_changed?(*args) || @set_upper_area_sprite
    #~   end
     
      ## Check if the sprite is onscreen.  Reduces redundant drawing.
      def sprite_is_onscreen?
        #LDT0319 enabled game_follower
        return false if @character.is_a?(Game_Vehicle)
        return false unless @character.is_a?(Game_Player) || @character.is_a?(Game_Follower) || @character.large_sprite
        return false if @character.screen_z >= 200
        top_left, bot_right = get_edge_corner_dis
        return false if top_left[0] > Graphics.width
        return false if top_left[1] > Graphics.height
        return false if bot_right[0] < 0
        return false if bot_right[1] < 0
        return true
      end
     
      ## Get the top left and bottom right positions.
      def get_edge_corner_dis
        top_left = [self.x - self.ox, self.y - self.oy]
        bot_right = [top_left[0] + self.width, top_left[1] + self.height]
        return [top_left, bot_right]
      end
     
      ## Long method that checks each position and draws the upper sprite.
      def check_encompassed_area
        if @set_upper_area_sprite && !@force_no_gfx_change
          old_src = self.src_rect.clone
          self.bitmap = @old_bitmap
          self.src_rect = old_src
        end
        @set_upper_area_sprite = false
        top_left, bot_right = get_edge_corner_dis
        last_x, last_y, copy_region = nil, nil, 0
        map_xd, map_yd = $game_map.display_x * 32, $game_map.display_y * 32
        total_height = (self.height + @character.jump_height).round
        self.width.times do |x|
          xp = map_xd.to_i + top_left[0] + x
          unless xp / 32 == last_x
            last_x = xp / 32
            last_y, copy_region = nil, 0
            total_height.times do |y|
              yp = map_yd.to_i + bot_right[1] + @character.jump_height - y + Tuning
              next if yp.to_i / 32 == last_y
              last_y = yp.to_i / 32
              if last_y == (@character.screen_y + @character.jump_height + Tuning +
                            map_yd).to_i / 32
                break if $game_map.terrain_tag(last_x, last_y) == UpperTerrain
                next
              end
              next if $game_map.terrain_tag(last_x, last_y) != UpperTerrain
              copy_region = [self.height, total_height - y + 1].min
              set_upper_sprite
              break
            end
          end
          next if copy_region == 0
          rect = Rect.new(src_rect.x + x, src_rect.y, 1, copy_region)
          @upper_area_sprite.bitmap.blt(x, 0, self.bitmap, rect)
          self.bitmap.clear_rect(rect)
        end
        if !@set_upper_area_sprite && @upper_area_sprite
          @upper_area_sprite.visible = false
        end
      end
     
      ## Creates the upper sprite that's a copy of the current sprite.
      def set_upper_sprite
        return if @set_upper_area_sprite
        @upper_area_sprite ||= Sprite.new
        @upper_area_sprite.bitmap = Bitmap.new(self.width, self.height)
        props = ["x", "y", "ox", "oy", "zoom_x", "zoom_y", "angle", "mirror",
                 "bush_depth", "opacity", "blend_type", "color", "tone", "visible",
                 "viewport"]
        props.each do |meth|
          @upper_area_sprite.method("#{meth}=").call(self.method(meth).call)
        end
        @upper_area_sprite.z = 200
        @set_upper_area_sprite = true
        @old_bitmap, old_src_rect = self.bitmap, self.src_rect.clone
        self.bitmap = Bitmap.new(@old_bitmap.width, @old_bitmap.height)
        self.bitmap.blt(0, 0, @old_bitmap, @old_bitmap.rect)
        self.src_rect = old_src_rect
      end
    end
     
    class Game_Event < Game_Character
      attr_reader :large_sprite
     
      alias :cp_081713_setup_page_settings :setup_page_settings
      def setup_page_settings(*args)
        cp_081713_setup_page_settings(*args)
        get_large_sprite_conditions
      end
     
      def get_large_sprite_conditions
        @large_sprite = false
        return if @list.nil? || @list.empty?
        @list.each do |line|
          next unless line.code == 108 || line.code == 408
          case line.parameters[0]
          when /<large sprite>/i
            @large_sprite = true
          end
        end
      end
    end
    Quelle: https://forums.rpgmakerweb.com/index...lay-fix.22243/

    Mit diesem Script musst du die entsprechenden Tiles (z.B. den Zaun) auf Terrain-Tag 7 stellen.
    Ich habe das Script noch kurz angepasst, sodass es nicht nur für den Helden, sondern auch für die Follower funktioniert.

    Willst du Events ebenfalls korrekt anzeigen, musst du im Event einen Kommentar einfügen: <large sprite>

  5. #5
    Hallo Linkey,

    vielen Dank, dieses Script funktioniert wirklich besser. Ich muss jetzt nur noch auf eine Sache beim Mappen achten (siehe Spoiler), aber sonst ist alles gut.
    Wenn du Zeit, Lust und Güte dafür hast, kannst du dir das vielleicht noch anschauen, aber sonst muss ich einfach etwas ummappen.

    Nochmals: Vielen Dank.

  6. #6
    Ist denn nur der Zaun auf Terrain 7 gestellt oder auch die Baumkrone? Und wie ist das ganze genau gemappt?

  7. #7
    Nur der Zaun. Die Baumkrone ist mittels einem "Above Hero"-Event ohne sonstige Anmerkungen oder Befehlen realisiert worden.

  8. #8
    Hey Agura,

    ich habe es nun so erweitert, dass "above hero" events immer "on top" angezeigt werden:
    Code:
    ##-----------------------------------------------------------------------------
    #  Large Sprite ☆ Display Fix v1.3
    #  Created by Neon Black at request of seita
    #  v1.4 - 12.18.14 - Added position tuning
    #  v1.3 - 1.12.14  - Viewport/position issue fixes
    #  v1.1 - 8.18.13  - Fixed an odd lag issue
    #  v1.0 - 8.17.13  - Main script completed
    #  For both commercial and non-commercial use as long as credit is given to
    #  Neon Black and any additional authors.  Licensed under Creative Commons
    #  CC BY 4.0 - http://creativecommons.org/licenses/by/4.0/
    ##-----------------------------------------------------------------------------
    
    # -- Update: LDT0319
    # -- Date:   2019.03.30
    # -- User:   D.T. Linkey
    # -- Change: Enabled Game_Followers too
    
    ##------
    ## By default, this script only affects the player.  To allow it to affect
    ## an event page as well, add a comment with the tag <large sprite> to the page
    ## of the event you would like to have affected by this.
     
    class Sprite_Character < Sprite_Base
      ##------
      ## The ID of the terrain used to display the large character above ☆ tiles.
      ## If the player is below this tile (y position), the sprite will appear
      ## above all tiles and events from that y position up.  If the player is on
      ## the same tile or above (y position) the event will appear BELOW ☆ tiles
      ## from that position up.
      ##------
      UpperTerrain = 7
     
      ##------
      ## This value is the pixel tuning used to check the location.  This is
      ## because characters tagged with a '!' in their name are drawn lower than
      ## normal characters and are considered to be lower than these.  This causes
      ## the script to think they are on the tile below where they really are and
      ## draw them above tiles they should appear under.
      ##------
      Tuning = -1
     
      alias :cp_011214_update_bitmap :update_bitmap
      def update_bitmap(*args)
        if graphic_changed? && @set_upper_area_sprite
          @force_no_gfx_change = true
        else
          @force_no_gfx_change = false
        end
        cp_011214_update_bitmap(*args)
      end
     
      ## Alias the update method to add in the new graphic check.
      alias :cp_073013_update_pos :update_position
      def update_position(*args)
        cp_073013_update_pos(*args)
        check_encompassed_area if sprite_is_onscreen?
      end
     
      ## Alias the dispose to dispose the upper sprite.
      alias :cp_073013_dispose :dispose
      def dispose(*args)
        @upper_area_sprite.dispose if @upper_area_sprite
        cp_073013_dispose(*args)
      end
     
    #~   ## Alias the graphic changed method to allow the sprite to revent to what it
    #~   ## was during the last frame.  This allows the check to work again.
    #~   alias :cp_073013_graphic_changed? :graphic_changed?
    #~   def graphic_changed?(*args)
    #~     cp_073013_graphic_changed?(*args) || @set_upper_area_sprite
    #~   end
     
      ## Check if the sprite is onscreen.  Reduces redundant drawing.
      def sprite_is_onscreen?
        #LDT0319 enabled game_follower & put "above hero" events always on top
        self.z = 500 if(@character.is_a?(Game_Event) && @character.priority_type >= 2)
        return false if @character.is_a?(Game_Vehicle)
        return false unless @character.is_a?(Game_Player) || @character.is_a?(Game_Follower) || @character.large_sprite
        return false if @character.screen_z >= 200
        top_left, bot_right = get_edge_corner_dis
        return false if top_left[0] > Graphics.width
        return false if top_left[1] > Graphics.height
        return false if bot_right[0] < 0
        return false if bot_right[1] < 0
        return true
      end
     
      ## Get the top left and bottom right positions.
      def get_edge_corner_dis
        top_left = [self.x - self.ox, self.y - self.oy]
        bot_right = [top_left[0] + self.width, top_left[1] + self.height]
        return [top_left, bot_right]
      end
     
      ## Long method that checks each position and draws the upper sprite.
      def check_encompassed_area
        if @set_upper_area_sprite && !@force_no_gfx_change
          old_src = self.src_rect.clone
          self.bitmap = @old_bitmap
          self.src_rect = old_src
        end
        @set_upper_area_sprite = false
        top_left, bot_right = get_edge_corner_dis
        last_x, last_y, copy_region = nil, nil, 0
        map_xd, map_yd = $game_map.display_x * 32, $game_map.display_y * 32
        total_height = (self.height + @character.jump_height).round
        self.width.times do |x|
          xp = map_xd.to_i + top_left[0] + x
          unless xp / 32 == last_x
            last_x = xp / 32
            last_y, copy_region = nil, 0
            total_height.times do |y|
              yp = map_yd.to_i + bot_right[1] + @character.jump_height - y + Tuning
              next if yp.to_i / 32 == last_y
              last_y = yp.to_i / 32
              if last_y == (@character.screen_y + @character.jump_height + Tuning +
                            map_yd).to_i / 32
                break if $game_map.terrain_tag(last_x, last_y) == UpperTerrain
                next
              end
              next if $game_map.terrain_tag(last_x, last_y) != UpperTerrain
              copy_region = [self.height, total_height - y + 1].min
              set_upper_sprite
              break
            end
          end
          next if copy_region == 0
          rect = Rect.new(src_rect.x + x, src_rect.y, 1, copy_region)
          @upper_area_sprite.bitmap.blt(x, 0, self.bitmap, rect)
          self.bitmap.clear_rect(rect)
        end
        if !@set_upper_area_sprite && @upper_area_sprite
          @upper_area_sprite.visible = false
        end
      end
     
      ## Creates the upper sprite that's a copy of the current sprite.
      def set_upper_sprite
        return if @set_upper_area_sprite
        @upper_area_sprite ||= Sprite.new
        @upper_area_sprite.bitmap = Bitmap.new(self.width, self.height)
        props = ["x", "y", "ox", "oy", "zoom_x", "zoom_y", "angle", "mirror",
                 "bush_depth", "opacity", "blend_type", "color", "tone", "visible",
                 "viewport"]
        props.each do |meth|
          @upper_area_sprite.method("#{meth}=").call(self.method(meth).call)
        end
        @upper_area_sprite.z = 200
        @set_upper_area_sprite = true
        @old_bitmap, old_src_rect = self.bitmap, self.src_rect.clone
        self.bitmap = Bitmap.new(@old_bitmap.width, @old_bitmap.height)
        self.bitmap.blt(0, 0, @old_bitmap, @old_bitmap.rect)
        self.src_rect = old_src_rect
      end
    end
     
    class Game_Event < Game_Character
      attr_reader :large_sprite
      
      alias :cp_081713_setup_page_settings :setup_page_settings
      def setup_page_settings(*args)
        cp_081713_setup_page_settings(*args)
        get_large_sprite_conditions
      end
      
      def get_large_sprite_conditions
        @large_sprite = false
        return if @list.nil? || @list.empty?
        @list.each do |line|
          next unless line.code == 108 || line.code == 408
          case line.parameters[0]
          when /<large sprite>/i
            @large_sprite = true
          end
        end
      end
    end

  9. #9
    Hallo Linkey,

    Absolut perfekt, on top, top notch, (insert another "top"-Joke her).
    Vielen, vielen Dank.

  10. #10
    Hallo ich weiß nicht ob ich hier richtig bin, aber ich versuchs einfach mal:
    Wenn ich meine RPGs spiele dann kommt es bei manchen vor, dass der Bildschirm immer mal wieder zwischendrin für einen kurzen Moment schwarz wird nur für 1-2 Sekunden, in Kämpfen kann sich das manchmal auch häufen.

    Ist mein PC dafür zu modern? Früher war das nie so. Leider weiß ich nicht so genau wann es anfing das geht schon ne Weile so.
    Also ich rede von Spielen wie VD, VD2, Der Brief für den König, Zauberer und Prinzessin usw..
    Ich wäre das gerne los.

  11. #11
    Hallo ihr guten Frauen und Männer der Technik, ich habe leider wieder ein Problem. Da ich leider keinerlei Rubyerfahrung habe, kann ich das Problem auch nicht selber lösen.

    Folgendes: Ich verwende den Vx-Ace und das Pop-Up-Message-Script von Yami. Da diese/r allerdings die Scripts nicht mehr aktuell hällt, bzw. diese von der Seite aus nicht mehr zu finden sind, musste ich eine zufällige Version nehmen. Diese hat allerdings noch einen gravierenden Fehler.

    Wie man sehen kann, ist die Textbox wesentlich größer, als sie sein muss. Wenn man sich das ganze im Maker ansieht, habe ich eine Vermutung.

    Ich gehe davon aus, dass es sich um die Befehle handelt welche dafür da sind, um die Textbox über den NPC anzeigen zu lassen und um den Namen in einer seperaten Box dazustellen.
    Anscheinend werden beim berechnen der Textboxbreite ALLE Zeichen mitgenommen, so auch die Befehle.


    Das ist der Ausschnitt vom Script, der die Breite berechnet. Ich weiß, dass man das mit regulären Ausdrücken rausfiltern kann. Wie gesagt, ich habe keine Rubyerfahrung und weiß daher nicht, wie ich das implementieren muss.
    Den regulären Ausdruck kann ich liefern:
    Code:
    \\[a-z]{1,3}[\[<][\w\säöüÄÖÜß]+[\]>]
    Kann mir jemand den kompetent einarbeiten? Wenn das komplette Skript gebraucht, kann ich das gerne liefern.

    Allternativ kann man mir auch einfach die aktuellste Version von Yamis Skript geben. ^^'

    Ich bedanke mich schon mal im Vorraus.

  12. #12
    So, ich hab auch mal wieder eine Frage, zu der Funktion "Shop Processing" im Eventmodus des 2k3.

    Mein Vorhaben:
    Ich habe im Spiel einen Händler erstellt.
    Dieser soll einem nur spezielle Items abkaufen, die sonst kein Händler im Ankauf annehmen würde (in diesem Fall Kristalle und Edelsteine, er ist ein ehemaliger Minenarbeiter).
    Wie kann ich das vom Eventcode her lösen?
    Meine Idee war die Option "Sell Only" zu nehmen, aber dann könnte ich ihm ja auch alles andere verkaufen, was ich nicht will.

    Habt ihr Lösungsvorschläge?

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •