질문과 답변

Extra Form

현재 아래와같은 아이템창 스크립트를 적용중입니다

문제점은 아이템을 다수로습득하였을때 스크롤이밀려 아이템 정보를 표시해주는 부분까지

밀고내려가버려서 그런데

스크립트 보실줄아시는분중에 지금아이템 표시줄이 14줄표시되는데;;c45e9421cf5a33ff2bb5ce0ec30c4cbc.png

Comment '7'
  • ?
    [고구려 삼족오] 2011.10.09 09:09

    삼국지 신[新]영걸전 공식 카페 매니저로 있는 [고구려 삼족오] 입니다.

    저 역시 게임 제작자로써 게임을 제작하다 보면 스크립트 때문에 문제가 많이 있는데..

    자세한건 잘 모르겠고 제 추측으로는 83번째 줄

    self.contents.font.size = 14

    만 현재 14 라는 숫자가 나오는걸로 봐서는 이 부분을 수정하시면 될것 같습니다.

    p.s 안될 경우에는 다른 분들의 조언을 들으시는것을 적극 권장.

  • profile
    NewSet 2011.10.09 10:19

    스압이라고 써놓지

     

    #_______________________________________________________________________________
    # SEL SCENE ITEM MENU V2.0
    #_______________________________________________________________________________
    # By Selacius
    # Graphics by lomastul, MOGHUNTER
    # Original XP Script by MOGHUNTER
    #_______________________________________________________________________________

    module Cache
     def self.menu(filename)
       load_bitmap("Graphics/Menus/", filename)
     end
    end

    ###############
    # Window_Base #
    ###############
    class Window_Base < Window
      def draw_maphp3(actor, x, y)
        back = Cache.menu("MeterBack")
        cw = back.width
        ch = back.height
        src_rect = Rect.new(0, 0, cw, ch)
        self.contents.blt(x + 65, y - ch + 30, back, src_rect)
        meter = Cache.menu("HPMeter")
        cw = meter.width * actor.hp / actor.maxhp
        ch = meter.height
        src_rect = Rect.new(0, 0, cw, ch)
        self.contents.blt(x + 65, y - ch + 30, meter, src_rect)
        text = Cache.menu("HP_Text")
        cw = text.width
        ch = text.height
        src_rect = Rect.new(0, 0, cw, ch)
        self.contents.blt(x + 35, y - ch + 30, text, src_rect)
        self.contents.font.color = Color.new(0,0,0,255)
        self.contents.draw_text(x + 81, y - 1, 48, 32, actor.hp.to_s, 2)
        self.contents.font.color = Color.new(255,255,255,255)
        self.contents.draw_text(x + 80, y - 2, 48, 32, actor.hp.to_s, 2)
      end
      def draw_mapsp3(actor, x, y)
        back = Cache.menu("MeterBack")
        cw = back.width
        ch = back.height
        src_rect = Rect.new(0, 0, cw, ch)
        self.contents.blt(x + 65, y - ch + 30, back, src_rect)
        meter = Cache.menu("MPMeter")
        cw = meter.width * actor.mp / actor.maxmp
        ch = meter.height
        src_rect = Rect.new(0, 0, cw, ch)
        self.contents.blt(x + 65, y - ch + 30, meter, src_rect)
        text = Cache.menu("MP_Text")
        cw = text.width
        ch = text.height
        src_rect = Rect.new(0, 0, cw, ch)
        self.contents.blt(x + 35, y - ch + 30, text, src_rect)
        self.contents.font.color = Color.new(0,0,0,255)
        self.contents.draw_text(x + 81, y - 1, 48, 32, actor.mp.to_s, 2)
        self.contents.font.color = Color.new(255,255,255,255)
        self.contents.draw_text(x + 80, y - 2, 48, 32, actor.mp.to_s, 2)
      end
      def draw_mexp_it(actor, x, y)
        lv_tx = Cache.menu("LV_tx")
        cw = lv_tx.width
        ch = lv_tx.height
        src_rect = Rect.new(0, 0, cw, ch)
        self.contents.blt(x + 60 , y - ch + 32, lv_tx, src_rect)
        self.contents.font.color = Color.new(0,0,0,255)
        self.contents.draw_text(x + 91, y + 5, 24, 32, actor.level.to_s, 1)
        self.contents.font.color = Color.new(255,255,255,255)
        self.contents.draw_text(x + 90, y + 4, 24, 32, actor.level.to_s, 1)
        end
    end

    #################################################
    # Window_Target_Item  - Status screen of players#
    #################################################
    class Window_Target_Item < Window_Selectable
      def initialize
        super(0, 40, 260, 410)
        self.contents = Bitmap.new(width - 32, height - 32)
        self.contents.font.bold = true
        self.contents.font.shadow = true
        self.contents.font.size = 14
        refresh
      end
      def refresh
        self.contents.clear
        @item_max = $game_party.members.size
        for actor in $game_party.members
          x = -4
          y = actor.index * 72
          draw_actor_face(actor,x,y,72)
          draw_actor_name(actor,x + 80,y)
          draw_mexp_it(actor, x + 110, y-10)
          draw_actor_state(actor,x + 125,y)
          draw_maphp3(actor, x + 20, y + 20)
          draw_mapsp3(actor, x + 20, y + 40)
        end
      end
      def update_cursor
        if @index < 0               # No cursor
          self.cursor_rect.empty
        elsif @index < @item_max    # Normal
          self.cursor_rect.set(0, @index * 72, contents.width, 72)
        elsif @index >= 100         # Self
          self.cursor_rect.set(0, (@index - 100) * 72, contents.width, 72)
        else                        # All
          self.cursor_rect.set(0, 0, contents.width, @item_max * 72)
        end
      end
    end

    #==============================================================================
    # ** MOD_Window_Item - Displays general items
    #------------------------------------------------------------------------------
    class MOG_Window_Item < Window_Selectable
      def initialize(x, y, width, height)
        super(x, y, width, height)
        @column_max = 1
        self.index = 0
        refresh
      end
      def item
        return @data[self.index]
      end
      def include?(item)
        return false if item == nil
        if $game_temp.in_battle
          return false unless item.is_a?(RPG::Item)
        end
        return true
      end
      def enable?(item)
        return $game_party.item_can_use?(item)
      end
      def refresh
        @data = []
        for item in $game_party.items
          next unless include?(item)
          if item.is_a?(RPG::Item) and !item.is_a?(RPG::Weapon) and !item.is_a?(RPG::Weapon)
            @data.push(item)
            if item.id == $game_party.last_item_id
              self.index = @data.size - 1
            end
          end
        end
        @data.push(nil) if include?(nil)
        @item_max = @data.size
        create_contents
        for i in 0...@item_max
          draw_item(i)
        end
      end
      def draw_item(index)
        rect = item_rect(index)
        self.contents.clear_rect(rect)
        item = @data[index]
        if item != nil
          number = $game_party.item_number(item)
          enabled = enable?(item)
          rect.width -= 4
          self.contents.font.bold = true
          self.contents.font.shadow = true
          self.contents.font.size = 14
          draw_item_name(item, rect.x, rect.y, enabled)
          self.contents.draw_text(rect, sprintf(":%2d", number), 2)
        end
      end
      def update_help
        @help_window.set_text(item == nil ? "" : item.description)
      end
    end

    #==============================================================================
    # ** Window_Weapon - Displays Weapon Items
    #------------------------------------------------------------------------------
    class Window_Weapon < Window_Selectable
      def initialize(x, y, width, height)
        super(x, y, width, height)
        @column_max = 1
        self.index = 0
        refresh
      end
      def item
        return @data[self.index]
      end
      def include?(item)
        return false if item == nil
        if $game_temp.in_battle
          return false unless item.is_a?(RPG::Weapon)
        end
        return true
      end
      def enable?(item)
        return $game_party.item_can_use?(item)
      end
      def refresh
        @data = []
        for item in $game_party.items
          next unless include?(item)
          if item.is_a?(RPG::Weapon)
            @data.push(item)
            if item.id == $game_party.last_item_id
              self.index = @data.size - 1
            end
          end
        end
        @data.push(nil) if include?(nil)
        @item_max = @data.size
        create_contents
        for i in 0...@item_max
          draw_item(i)
        end
      end
      def draw_item(index)
        rect = item_rect(index)
        self.contents.clear_rect(rect)
        item = @data[index]
        if item != nil
          number = $game_party.item_number(item)
          enabled = enable?(item)
          rect.width -= 4
          self.contents.font.bold = true
          self.contents.font.shadow = true
          self.contents.font.size = 14     
          draw_item_name(item, rect.x, rect.y, enabled)
          self.contents.draw_text(rect, sprintf(":%2d", number), 2)
        end
      end
      def update_help
        @help_window.set_text(item == nil ? "" : item.description)
      end
    end

    #==============================================================================
    # ** Window_Armor - Displays Armor Items
    #------------------------------------------------------------------------------
    class Window_Armor < Window_Selectable
      def initialize(x, y, width, height)
        super(x, y, width, height)
        @column_max = 1
        self.index = 0
        refresh
      end
      def item
        return @data[self.index]
      end
      def include?(item)
        return false if item == nil
        if $game_temp.in_battle
          return false unless item.is_a?(RPG::Armor)
        end
        return true
      end
      def enable?(item)
        return $game_party.item_can_use?(item)
      end
      def refresh
        @data = []
        for item in $game_party.items
          next unless include?(item)
          if item.is_a?(RPG::Armor)
            @data.push(item)
            if item.id == $game_party.last_item_id
              self.index = @data.size - 1
            end
          end
        end
        @data.push(nil) if include?(nil)
        @item_max = @data.size
        create_contents
        for i in 0...@item_max
          draw_item(i)
        end
      end
      def draw_item(index)
        rect = item_rect(index)
        self.contents.clear_rect(rect)
        item = @data[index]
        if item != nil
          number = $game_party.item_number(item)
          enabled = enable?(item)
          rect.width -= 4
          self.contents.font.bold = true
          self.contents.font.shadow = true
          self.contents.font.size = 14
          draw_item_name(item, rect.x, rect.y, enabled)
          self.contents.draw_text(rect, sprintf(":%2d", number), 2)
        end
      end
      def update_help
        @help_window.set_text(item == nil ? "" : item.description)
      end
    end

    #==============================================================================
    # ** Scene_Item
    #------------------------------------------------------------------------------
    class Scene_Item < Scene_Base
      def start
        @back = Plane.new
        @back.bitmap = Cache.menu("Background")
        @item_lay = Sprite.new
        @item_lay.bitmap = Cache.menu("Item_Lay")
        @item_com = Sprite.new
        @item_com.bitmap = Cache.menu("Item_com01")
        @viewport = Viewport.new(0, 0, 544, 416)
        @help_window = Window_Help.new(42,350)
        @help_window.viewport = @viewport
        @item_window = MOG_Window_Item.new(250, 70, 295, 350)
        @item_window.viewport = @viewport
        @item_window.help_window = @help_window
        @item_window.visible = true
        @item_window.active = true
        @weapon_window = Window_Weapon.new(250, 70, 295, 350)
        @weapon_window.viewport = @viewport
        @weapon_window.help_window = @help_window
        @weapon_window.visible = false
        @weapon_window.active = false
        @armor_window = Window_Armor.new(250, 70, 295, 350)
        @armor_window.viewport = @viewport
        @armor_window.help_window = @help_window
        @armor_window.visible = false
        @armor_window.active = false
        @target_window = Window_Target_Item.new
        @target_window.visible = true
        @target_window.active = false
        @help_window.opacity = 0
        @item_window.opacity = 0
        @weapon_window.opacity = 0
        @armor_window.opacity = 0
        @target_window.opacity = 0
        @window_index = 0
      end
      def terminate
        @help_window.dispose
        @item_window.dispose
        @weapon_window.dispose
        @armor_window.dispose
        @target_window.dispose
        @item_lay.dispose
        @back.dispose
        @item_com.dispose
      end
      def return_scene
        $scene = Scene_Menu.new(0)
      end
      def update
        @back.ox += 1
        @help_window.update
        @item_window.update
        @weapon_window.update
        @armor_window.update
        @target_window.update
        update_item_target
        if @item_window.active  and @item_window.visible
          update_item_selection
          return
        end
        if @target_window.active
          update_target_selection
        end 
        if @weapon_window.active and @weapon_window.visible
          update_weapon
          return
        end
        if @armor_window.active and @armor_window.visible
          update_armor
          return
        end
      end 
      def update_weapon
        if Input.trigger?(Input::B)
          Sound.play_cancel
          return_scene
        end
      end
      def update_armor
        if Input.trigger?(Input::B)
          Sound.play_cancel
          return_scene
        end
      end
      def update_item_target
        if Input.trigger?(Input::R) or Input.trigger?(Input::RIGHT)
          case @window_index
          when 0
            @item_com.bitmap = Cache.menu("Item_com02")
            @item_window.active = false
            @item_window.visible = false
            @weapon_window.visible = true
            @weapon_window.active = true
            @window_index += 1
          when 1
            @item_com.bitmap = Cache.menu("Item_com03")
            @weapon_window.visible = false
            @weapon_window.active = false
            @armor_window.visible = true
            @armor_window.active = true       
            @window_index += 1
          when 2
            @item_com.bitmap = Cache.menu("Item_com01")
            @armor_window.visible = false
            @armor_window.active = false
            @item_window.visible = true
            @item_window.active = true
            @window_index = 0
          end
        end
      if Input.trigger?(Input::L) or Input.trigger?(Input::LEFT)
          case @window_index
          when 0       
            @item_com.bitmap = Cache.menu("Item_com03")
            @item_window.active = false
            @item_window.visible = false
            @armor_window.visible = true
            @armor_window.active = true
            @window_index = 2
          when 1
            @item_com.bitmap = Cache.menu("Item_com01")
            @weapon_window.visible = false
            @weapon_window.active = false       
            @item_window.visible = true
            @item_window.active = true       
            @window_index -= 1
          when 2
            @item_com.bitmap = Cache.menu("Item_com02")
            @armor_window.visible = false
            @armor_window.active = false
            @weapon_window.visible = true
            @weapon_window.active = true
            @window_index -= 1
          end
        end 
      end
      def update_item_selection
        if Input.trigger?(Input::B)
          Sound.play_cancel
          return_scene
        elsif Input.trigger?(Input::C)
          @item = @item_window.item
          if @item != nil
            $game_party.last_item_id = @item.id
          end
          if $game_party.item_can_use?(@item)
            Sound.play_decision
            determine_item
          else
            Sound.play_buzzer
          end
        end
      end
      def determine_item
        if @item.for_friend?
            @target_window.active = true
            @item_window.active = false
          if @item.for_all?
            @target_window.index = 99 ps.이건 최대 수량
          else
            if $game_party.last_target_index < @target_window.item_max
              @target_window.index = $game_party.last_target_index
            else
              @target_window.index = 0
            end
          end
        else
          use_item_nontarget
        end
      end
      def update_target_selection
        if Input.trigger?(Input::B)
          Sound.play_cancel
          if $game_party.item_number(@item) == 0    # If item is used up
            @item_window.refresh                    # Recreate the window contents
          end
          @target_window.active = false
          @item_window.active = true
        elsif Input.trigger?(Input::C)
          if not $game_party.item_can_use?(@item)
            Sound.play_buzzer
          else
            determine_target
          end
        end
      end
      def determine_target
        used = false
        if @item.for_all?
          for target in $game_party.members
            target.item_effect(target, @item)
            used = true unless target.skipped
          end
        else
          $game_party.last_target_index = @target_window.index
          target = $game_party.members[@target_window.index]
          target.item_effect(target, @item)
          used = true unless target.skipped
        end
        if used
          use_item_nontarget
        else
          Sound.play_buzzer
        end
      end
      def use_item_nontarget
        Sound.play_use_item
        $game_party.consume_item(@item)
        @item_window.draw_item(@item_window.index)
        @target_window.refresh
        if $game_party.all_dead?
          $scene = Scene_Gameover.new
        elsif @item.common_event_id > 0
          $game_temp.common_event_id = @item.common_event_id
          $scene = Scene_Map.new
        end
      end
    end

     

    빨갛게 그어논거 11로 고치면 아마 될꺼에요

  • ?
    라스트루마 2011.10.09 10:32

    글자크기만줄어들고 줄수는그대로네용;

  • ?
    Alkaid 2011.10.09 18:30

    빨갛게 그어놓은 거는 말 그대로 폰트 크기네요.

  • profile
    NewSet 2011.10.12 17:13

    헐 사실 스크립트 몬함

  • profile
    습작 2011.10.09 12:03

    우선 아래와 같은 부분을 검색하세요.

    @item_window = MOG_Window_Item.new(250, 70, 295, 350)


    그리고 아래와 같이 수정하세요.

    @item_window = MOG_Window_Item.new(250, 70, 295, 296)

  • ?
    라스트루마 2011.10.09 17:13

    진정 진심 진심 감사합니다.


List of Articles
종류 분류 제목 글쓴이 날짜 조회 수
공지 묻고 답하기 가이드 습작 2014.06.14 12393
Visual Novel 네코노벨로 안드로이드 apk 만드는 방법 2 김훈 2014.10.26 1155
RMVX 메뉴에 그림을 띄우는법 2 하얀악어 2014.01.03 1154
RM2k 처음시작시 침대에서 누운상태로 있기 1 aira 2013.01.21 1154
RMVX 캐릭터 직접제작 크기를 늘이고 싶어요 9 file 아카샤나 2014.04.06 1153
RMVXA 스킬 사용효과에 통상공격100%의 기능? 3 은잔 2014.01.27 1153
RMVXA 메뉴 스크립트를 수정하고 싶은데 잘 모르겠습니다 2 file IZEN 2013.03.24 1153
RMVX 타일셋 우선순위 변경방법 질문입니다 1 file 으은 2013.05.07 1153
RMVX 아이템창 문제;;(고수분의도움으로 해결되었습니다.) 7 file 라스트루마 2011.10.09 1153
라이선스 기타 자작툴에 RPG메이커 소스를 사용해도 저작권에 문제가 없을까요? 5 안경포스 2015.02.24 1152
RMVX 전투스크립트 전환이라고 해야할까요?.. 3 file 빡새 2012.11.24 1152
RMXP 메세지 앞에 일러스트 표시하는 방법을 알려주세요! 5 제로스 2012.09.02 1152
RMXP 스크립트에 대해 잘 아시는분만 눌러주세요 4 물콩?! 2011.05.20 1152
RMVXA 장비확장 질문 1 세계의질서 2012.06.27 1152
RMVXA 적과 만나는 방식을 바꾸려고 하는데... 6 파송송뇌진탕 2013.09.29 1151
RPG VX ACE 데이터베이스 한글패치 관련 질문 올립니다 2 file KMOY 2014.12.15 1150
RMVX 액터의 오프닝시 위치 처리가 자동으로 이루어집니다. 3 file 지나가는떡꼬치 2012.07.03 1149
RMXP XP마우스 스크립트: 마우스가 이벤트 위에 있을때 실행시키는 방법 7 석진이 2011.05.30 1149
RMVXA Database Limit Breaker 3 세계의질서 2012.06.27 1149
RMVXA 메뉴창 커맨드로 장소이동(또는 커먼이벤트 실행) 2 난현이라는 2012.12.22 1148
기타 컴퓨터 응용프로그램이 다 먹통이 되었습니다. 6 file 황금시계 2012.12.03 1148
Board Pagination Prev 1 ... 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 ... 516 Next
/ 516