질문과 답변

Extra Form

신규 프로젝트를 작성해서  KGC_ExtendedStatusScene 만 넣고 게임을 실행시켜 봐도, 프로필 내용이 세로로 출력됩니다...

 

뭔가 해결 방법이 없을까요 ㅠ_ㅠ

 

짧은 머리로 여기저기 찾아봐도, 모르겠어요 ㅠ_ㅠ

Comment '3'
  • ?
    시트르산 2010.09.23 08:58

    잘 돌아가는 제 스크립트를 써보실래요?

    적어드릴게요

     

     

    #_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
    #_/    ◆ 확장 스테이터스 화면 - KGC_ExtendedStatusScene ◆ VX ◆
    #_/    ◇ Last update : 2009/09/26 ◇
    #_/----------------------------------------------------------------------------
    #_/  스테이터스 화면에 표시하는 내용을 상세화합니다.
    #_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

    $data_states = load_data("Data/States.rvdata") if $data_states == nil
    $data_system = load_data("Data/System.rvdata") if $data_system == nil

    #==============================================================================
    # ★ 커스터마이즈 항목 - Customize BEGIN ★
    #==============================================================================

    module KGC
    module ExtendedStatusScene
    # ◆ 프로필
      PROFILE = []
    # 여기에서 아래로
      #  PROFILE[액터 ID] = '프로필'
      # 그렇다고 하는 서식에서 설정.
      # 개행하는 경우는, 개행하고 싶은 위치에 | 를 입력.
      PROFILE[1] =
        '라슈발츠 제국 소속의 레인져. |' +
        '강하기로 소문난 레인져 집단 내에서도|' +
        '다섯 손가락안에 들 정도의 엘리트.|' +
        '하지만 속은 평범한 여자아이라는 것이 포인트.|'

    # ◆ 커멘드
      #  커멘드를 표시하고 싶은 순서에 기술.
      #  표시하고 싶지 않은 커멘드는 생략가능 (0 개는 안 됨).
      #   :param          .. 파라미터
      #   :resist         .. 속성/스테이트 내성
      #   :element_resist .. 속성 내성
      #   :state_resist   .. 스테이트 내성
      #   :profile        .. 프로필
      COMMANDS = [:param, :element_resist, :state_resist, :profile]

    # ◆ 커멘드명
      COMMAND_NAME = {
        :param          => "능력치",
        :resist         => "내성",
        :element_resist => "속성 내성",
        :state_resist   => "상태변화 내성",
        :profile        => "프로필",
      }

      # ◆ 표시하는 파라미터
      #  :param 페이지에 표시하고 싶은 순서에 기술.
      #  표시하고 싶지 않은 항목은 생략가능.
      #   :atk .. 공격력
      #   :def .. 방어력
      #   :spi .. 정신력
      #   :agi .. 민첩성
      #   :hit .. 명중율
      #   :eva .. 회피율
      #   :cri .. 위기율
      #   :cp  .. CP (≪스킬 CP제≫ 에 대응)
      #   :ep  .. EP (≪장비 확장≫ 에 대응)
      PARAMS = [:atk, :def, :spi, :agi, :hit, :eva, :cri, :cp, :ep]

    # ◆ 파라미터명
      #  :param, :resist 커멘드로 사용.
      PARAMETER_NAME = {
        # :param 용
        :hit => "명중율",
        :eva => "회피율",
        :cri => "크리티컬",
        # :resist 용
        :element_resist => "속성 내성",
        :state_resist   => "상태변화 내성",
      }  # ← 이것은 지우지 않는 것!

    # ◆ 속성 내성의 표기 방법
      #   0 .. 수치
      #   1 .. 차트
      #   2 .. 차트&수치 (:resist 는 차트만)
      #  1, 2 는 ≪비트 맵 확장≫ 이 필요.
      RESIST_STYLE = 2
    # ◆ 내성의 수치
      #   0 .. 속성: 100 으로 통상, 99 이하는 경감 (마이너스는 흡수), 101 이상은 약점
      #        스테이트: 부가 성공율 (걸리기 쉬움)
      #   1 .. 속성: 0 으로 통상, 플러스는 경감 (101 이상은 흡수), 마이너스는 약점
      #        스테이트: 부가 회피율 (걸리기 어려움)
      RESIST_NUM_STYLE = 1

    # ◆ 차트색
      CHART_LINE_COLOR  = Color.new(128, 255, 128)  # 라인색
      CHART_BASE_COLOR  = Color.new(128, 192, 255)  # 베이스색
      CHART_FLASH_COLOR = Color.new(128, 255, 128)  # 플래시색
    # ◆ 차트를 매끈하게 한다
      #   true  : 고품질, 저속
      #   false : 저품질, 고속
      CHART_HIGHQUALITY = true

      #   이하의 항목은 ≪몬스터 도감≫ 과 호환성이 있습니다.
      #  ≪몬스터 도감≫ 측의 설정을 카피해도 상관하지 않습니다.

      # ◆ 속성 내성을 조사하는 범위
      #  내성을 조사하는 속성의 ID 를 배열에 격납.
      #  .. (이)나 ... (을)를 사용한 범위 지정도 가능.
      ELEMENT_RANGE = [1..16]
      # ◆ 속성의 아이콘
      #  각 속성에 대응하는 아이콘의 번호를 지정.
      #  배열의 첨자가 속성 ID 에 대응.
      #  (최초가 속성 ID: 0 에 대응, 나머지는 ID: 1, 2, 3, ... 의 순서)
      ELEMENT_ICON = [0,                         # ID: 0 はダミー (未使用)
        929,   737,   883,   583,  400,  562,  2799, 3807,   # 격투 ~ 吸収
        2816, 2817, 2818, 2819, 2820, 2821, 2822, 2823,  # 불꽃 ~ 암흑
      ]  # ← これは消さないこと!

      # ◆ ステート耐性を調べる範囲
      #  耐性を調べるステートの ID を配列に格納。
      #  記述方法は ELEMENT_RANGE と同様。
      STATE_RANGE = [1...16]
    end
    end

    #==============================================================================
    # ☆ カスタマイズ項目 終了 - Customize END ☆
    #==============================================================================

    $imported = {} if $imported == nil
    $imported["ExtendedStatusScene"] = true

    module KGC::ExtendedStatusScene
      module_function
      #--------------------------------------------------------------------------
      # ○ Range と Integer の配列を Integer の配列に変換 (重複要素は排除)
      #--------------------------------------------------------------------------
      def convert_integer_array(array, type = nil)
        result = []
        array.each { |i|
          case i
          when Range
            result |= i.to_a
          when Integer
            result |= [i]
          end
        }
        case type
        when :element
          result.delete_if { |x| x >= $data_system.elements.size }
        when :state
          result.delete_if { |x|
            x >= $data_states.size ||
            $data_states[x].nonresistance ||
            $data_states[x].priority == 0
          }
        end
        return result
      end

      # チェックする属性リスト
      CHECK_ELEMENT_LIST = convert_integer_array(ELEMENT_RANGE, :element)
      # チェックするステートリスト
      CHECK_STATE_LIST   = convert_integer_array(STATE_RANGE, :state)

      # 耐性表記方法
      case RESIST_STYLE
      when 0
        RESIST_STYLE_SYMBOL = :num
      when 1
        RESIST_STYLE_SYMBOL = :chart
      else
        RESIST_STYLE_SYMBOL = :both
      end
    end

    #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

    #==============================================================================
    # □ Window_StatusCommand
    #------------------------------------------------------------------------------
    #   ステータス画面で、表示する内容を選択するウィンドウです。
    #==============================================================================

    class Window_StatusCommand < Window_Command
      #--------------------------------------------------------------------------
      # ● オブジェクト初期化
      #--------------------------------------------------------------------------
      def initialize
        commands = []
        KGC::ExtendedStatusScene::COMMANDS.each { |c|
          commands << KGC::ExtendedStatusScene::COMMAND_NAME[c]
        }
        super(160, commands)
        self.height = WLH * 5 + 32
        self.active = true
      end
      #--------------------------------------------------------------------------
      # ○ 選択中のコマンド取得
      #--------------------------------------------------------------------------
      def command
        return KGC::ExtendedStatusScene::COMMANDS[index]
      end
      #--------------------------------------------------------------------------
      # ● カーソルを 1 ページ後ろに移動
      #--------------------------------------------------------------------------
      def cursor_pagedown
        return if Input.repeat?(Input::R)
        super
      end
      #--------------------------------------------------------------------------
      # ● カーソルを 1 ページ前に移動
      #--------------------------------------------------------------------------
      def cursor_pageup
        return if Input.repeat?(Input::L)
        super
      end
    end

    #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

    #==============================================================================
    # ■ Window_Status
    #==============================================================================

    class Window_Status < Window_Base
      #--------------------------------------------------------------------------
      # ● オブジェクト初期化
      #     actor : アクター
      #--------------------------------------------------------------------------
      def initialize(actor)
        super(160, 0, Graphics.width - 160, WLH * 5 + 32)
        @actor = actor
        refresh
      end
      #--------------------------------------------------------------------------
      # ● リフレッシュ
      #--------------------------------------------------------------------------
      def refresh
        self.contents.clear
        draw_basic(104, 0)
        draw_exp(104, WLH * 3)
      end
      #--------------------------------------------------------------------------
      # ● 基本情報の描画
      #     x : 描画先 X 座標
      #     y : 描画先 Y 座標
      #--------------------------------------------------------------------------
      def draw_basic(x, y)
        draw_actor_face(@actor, 0, (contents.height - 96) / 2)
        draw_actor_name(@actor, x, y)
        draw_actor_class(@actor, x + 120, y)
        draw_actor_level(@actor, x, y + WLH)
        draw_actor_state(@actor, x, y + WLH * 2)
        draw_actor_hp(@actor, x + 120, y + WLH)
        draw_actor_mp(@actor, x + 120, y + WLH * 2)
      end
      #--------------------------------------------------------------------------
      # ● 経験値情報の描画
      #     x : 描画先 X 座標
      #     y : 描画先 Y 座標
      #--------------------------------------------------------------------------
      def draw_exp(x, y)
        if $imported["GenericGauge"]
          draw_actor_exp(@actor, x, y + WLH * 0, 240)
          draw_actor_next_exp(@actor, x, y + WLH * 1, 240)
        end

        s1 = @actor.exp_s
        s2 = @actor.next_rest_exp_s
        s_next = sprintf(Vocab::ExpNext, Vocab::level)
        self.contents.font.color = system_color
        self.contents.draw_text(x, y + WLH * 0, 180, WLH, Vocab::ExpTotal)
        self.contents.draw_text(x, y + WLH * 1, 180, WLH, s_next)
        self.contents.font.color = normal_color

        unless $imported["GenericGauge"]
          self.contents.draw_text(x, y + WLH * 0, 240, WLH, s1, 2)
          self.contents.draw_text(x, y + WLH * 1, 240, WLH, s2, 2)
        end
      end
    end

    #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

    #==============================================================================
    # □ Window_StatusDetail
    #------------------------------------------------------------------------------
    #   ステータス画面で、アクターの詳細情報を表示するウィンドウです。
    #==============================================================================

    class Window_StatusDetail < Window_Base
      #--------------------------------------------------------------------------
      # ○ 公開インスタンス変数
      #--------------------------------------------------------------------------
      attr_reader   :category
      #--------------------------------------------------------------------------
      # ● オブジェクト初期化
      #     actor : アクター
      #--------------------------------------------------------------------------
      def initialize(actor)
        @category = nil
        y = WLH * 5 + 32
        super(0, y, Graphics.width, Graphics.height - y)
        create_chart_sprite
        @actor    = actor
        @duration = 0
        self.z = z
      end
      #--------------------------------------------------------------------------
      # ○ レーダーチャートスプライト作成
      #--------------------------------------------------------------------------
      def create_chart_sprite
        @element_chart_sprite = Sprite_Base.new
        @element_chart_sprite.bitmap = Bitmap.new(height - 32, height - 32)
        @element_chart_sprite.ox = @element_chart_sprite.width  / 2
        @element_chart_sprite.oy = @element_chart_sprite.height / 2
        @element_chart_sprite.blend_type = 1
        @element_chart_sprite.opacity = 0
        @element_chart_sprite.visible = false

        @state_chart_sprite = Sprite_Base.new
        @state_chart_sprite.bitmap = Bitmap.new(height - 32, height - 32)
        @state_chart_sprite.ox = @state_chart_sprite.width  / 2
        @state_chart_sprite.oy = @state_chart_sprite.height / 2
        @state_chart_sprite.blend_type = 1
        @state_chart_sprite.opacity = 0
        @state_chart_sprite.visible = false
      end
      #--------------------------------------------------------------------------
      # ● 破棄
      #--------------------------------------------------------------------------
      def dispose
        @element_chart_sprite.bitmap.dispose
        @element_chart_sprite.dispose
        @state_chart_sprite.bitmap.dispose
        @state_chart_sprite.dispose
        super
      end
      #--------------------------------------------------------------------------
      # ○ Z 座標設定
      #--------------------------------------------------------------------------
      def z=(value)
        super(value)
        @element_chart_sprite.z = z + 1 if @element_chart_sprite != nil
        @state_chart_sprite.z   = z + 1 if @state_chart_sprite   != nil
      end
      #--------------------------------------------------------------------------
      # ○ カテゴリー設定
      #--------------------------------------------------------------------------
      def category=(category)
        return if @category == category
        @category = category
        refresh
      end
      #--------------------------------------------------------------------------
      # ● リフレッシュ
      #--------------------------------------------------------------------------
      def refresh
        @element_chart_sprite.visible = false
        @state_chart_sprite.visible   = false
        return if @category == nil

        self.contents.clear
        case @category
        when :param
          draw_parameter_list
        when :resist
          draw_resistance
        when :element_resist
          draw_element_resistance(0, 0,
            KGC::ExtendedStatusScene::RESIST_STYLE_SYMBOL)
        when :state_resist
          draw_state_resistance(0, 0,
            KGC::ExtendedStatusScene::RESIST_STYLE_SYMBOL)
        when :profile
          draw_profile
        end
        Graphics.frame_reset
      end
      #--------------------------------------------------------------------------
      # ○ パラメータ描画
      #--------------------------------------------------------------------------
      def draw_parameter_list
        y = 0
        KGC::ExtendedStatusScene::PARAMS.each { |param|
          draw_parameter(param, 0, y)
          y += WLH
        }

        x = 192
        contents.font.color = system_color
        contents.draw_text(x, 0, 120, WLH, Vocab::equip)
        @actor.equips.each_with_index { |item, i|
          draw_item_name(item, x, WLH * (i + 1))
        }
        contents.font.color = normal_color
      end
      #--------------------------------------------------------------------------
      # ○ 個別パラメータ描画
      #--------------------------------------------------------------------------
      def draw_parameter(param, x, y)
        case param
        when :atk
          draw_actor_parameter(@actor, x, y, 0)
        when :def
          draw_actor_parameter(@actor, x, y, 1)
        when :spi
          draw_actor_parameter(@actor, x, y, 2)
        when :agi
          draw_actor_parameter(@actor, x, y, 3)
        when :hit
          draw_actor_parameter(@actor, x, y, 4)
        when :eva
          draw_actor_parameter(@actor, x, y, 5)
        when :cri
          draw_actor_parameter(@actor, x, y, 6)
        when :cp
          return unless $imported["SkillCPSystem"]
          return unless KGC::SkillCPSystem::SHOW_STATUS_CP
          draw_actor_cp(@actor, x, y, 156)
        when :ep
          return unless $imported["EquipExtension"]
          return unless KGC::EquipExtension::SHOW_STATUS_EP
          draw_actor_ep(@actor, x, y, 156)
        end
      end
      #--------------------------------------------------------------------------
      # ● 能力値の描画
      #     actor : アクター
      #     x     : 描画先 X 座標
      #     y     : 描画先 Y 座標
      #     type  : 能力値の種類 (0~6)
      #--------------------------------------------------------------------------
      def draw_actor_parameter(actor, x, y, type)
        return super(actor, x, y, type) if type <= 3

        names = KGC::ExtendedStatusScene::PARAMETER_NAME
        case type
        when 4
          parameter_name  = names[:hit]
          parameter_value = actor.hit
        when 5
          parameter_name  = names[:eva]
          parameter_value = actor.eva
        when 6
          parameter_name  = names[:cri]
          parameter_value = actor.cri
        end
        self.contents.font.color = system_color
        self.contents.draw_text(x, y, 120, WLH, parameter_name)
        self.contents.font.color = normal_color
        self.contents.draw_text(x + 120, y, 36, WLH, parameter_value, 2)
      end
      #--------------------------------------------------------------------------
      # ○ 耐性描画
      #--------------------------------------------------------------------------
      def draw_resistance
        case KGC::ExtendedStatusScene::RESIST_STYLE
        when 0
          type = :num
        else
          type = :chart
        end

        x = 0
        contents.font.color = system_color
        contents.draw_text(x, 0, 120, WLH,
          KGC::ExtendedStatusScene::PARAMETER_NAME[:element_resist])
        contents.font.color = normal_color
        x = draw_element_resistance(x, WLH, type)

        contents.font.color = system_color
        contents.draw_text(x, 0, 120, WLH,
          KGC::ExtendedStatusScene::PARAMETER_NAME[:state_resist])
        x = draw_state_resistance(x, WLH, type)

        contents.font.color = normal_color
      end
      #--------------------------------------------------------------------------
      # ○ 属性耐性描画
      #     x, y : 描画先 X, Y
      #     type : 表示形式 (:num, :chart, :both)
      #    描画終了時の X 座標を返す。
      #--------------------------------------------------------------------------
      def draw_element_resistance(x, y, type)
        if KGC::ExtendedStatusScene::CHART_HIGHQUALITY
          Bitmap.smoothing_mode = TRGSSX::SM_ANTIALIAS
        end

        if [:chart, :both].include?(type) && $imported["BitmapExtension"]
          x = draw_element_resistance_chart(x, y)
          @element_chart_sprite.visible = true
        end
        if [:num, :both].include?(type)
          x = draw_element_resistance_num(x, y)
        end

        Bitmap.smoothing_mode = TRGSSX::SM_DEFAULT

        return x
      end
      #--------------------------------------------------------------------------
      # ○ 属性耐性描画 (チャート)
      #     x, y : 描画先 X, Y
      #    描画終了時の X 座標を返す。
      #--------------------------------------------------------------------------
      def draw_element_resistance_chart(x, y)
        r  = (contents.height - y - 56) / 2
        cx = x + r + 28
        cy = y + r + 28
        pw = (Bitmap.smoothing_mode == TRGSSX::SM_ANTIALIAS ? 2 : 1)
        elements = KGC::ExtendedStatusScene::CHECK_ELEMENT_LIST

        draw_chart_line(cx, cy, r, elements.size, 3, pw)

        # チャート
        points = []
        elements.each_with_index { |e, i|
          n   = @actor.element_rate(e)
          n   = 100 - n if KGC::ExtendedStatusScene::RESIST_NUM_STYLE == 1
          n   = [[n, -100].max, 200].min
          dr  = r * (n + 100) / 100 / 3
          rad = Math::PI * (360.0 * i / elements.size - 90.0) / 180.0
          dx  = cx + Integer(dr * Math.cos(-rad))
          dy  = cy + Integer(dr * Math.sin(rad))
          points << [dx, dy]

          dx = cx + Integer((r + 14) * Math.cos(-rad)) - 12
          dy = cy + Integer((r + 14) * Math.sin(rad))  - 12
          draw_icon(KGC::ExtendedStatusScene::ELEMENT_ICON[e], dx, dy)
        }

        draw_chart(cx, cy, r, points, pw)
        draw_chart_flash(@element_chart_sprite, x, y, r, points, pw)

        return (x + cx + r + 42)
      end
      #--------------------------------------------------------------------------
      # ○ 属性耐性描画 (数値)
      #     x, y : 描画先 X, Y
      #    描画終了時の X 座標を返す。
      #--------------------------------------------------------------------------
      def draw_element_resistance_num(x, y)
        origin_y = y
        contents.font.color = normal_color
        KGC::ExtendedStatusScene::CHECK_ELEMENT_LIST.each { |i|
          if y + WLH > contents.height
            x += 84
            y  = origin_y
          end
          draw_icon(KGC::ExtendedStatusScene::ELEMENT_ICON[i], x, y)
          n = @actor.element_rate(i)
          n = 100 - n if KGC::ExtendedStatusScene::RESIST_NUM_STYLE == 1
          rate = sprintf("%4d%%", n)
          contents.draw_text(x + 24, y, 52, WLH, rate, 2)
          y += WLH
        }
        return (x + 96)
      end
      #--------------------------------------------------------------------------
      # ○ ステート耐性描画
      #     x, y : 描画先 X, Y
      #     type : 表示形式 (:num, :chart, :both)
      #    描画終了時の X 座標を返す。
      #--------------------------------------------------------------------------
      def draw_state_resistance(x, y, type)
        if KGC::ExtendedStatusScene::CHART_HIGHQUALITY
          Bitmap.smoothing_mode = TRGSSX::SM_ANTIALIAS
        end

        if [:chart, :both].include?(type) && $imported["BitmapExtension"]
          x = draw_state_resistance_chart(x, y)
          @state_chart_sprite.visible = true
        end
        if [:num, :both].include?(type)
          x = draw_state_resistance_num(x, y)
        end

        Bitmap.smoothing_mode = TRGSSX::SM_DEFAULT

        return x
      end
      #--------------------------------------------------------------------------
      # ○ ステート耐性描画 (チャート)
      #     x, y : 描画先 X, Y
      #    描画終了時の X 座標を返す。
      #--------------------------------------------------------------------------
      def draw_state_resistance_chart(x, y)
        r  = (contents.height - y - 56) / 2
        cx = x + r + 28
        cy = y + r + 28
        pw = (Bitmap.smoothing_mode == TRGSSX::SM_ANTIALIAS ? 2 : 1)
        states = KGC::ExtendedStatusScene::CHECK_STATE_LIST

        draw_chart_line(cx, cy, r, states.size, 2, pw)

        # チャート
        points = []
        states.each_with_index { |s, i|
          state = $data_states[s]
          n   = @actor.state_probability(s)
          n   = 100 - n if KGC::ExtendedStatusScene::RESIST_NUM_STYLE == 1
          dr  = r * n / 100
          rad = Math::PI * (360.0 * i / states.size - 90.0) / 180.0
          dx  = cx + Integer(dr * Math.cos(-rad))
          dy  = cy + Integer(dr * Math.sin(rad))
          points << [dx, dy]

          dx = cx + Integer((r + 14) * Math.cos(-rad)) - 12
          dy = cy + Integer((r + 14) * Math.sin(rad))  - 12
          draw_icon(state.icon_index, dx, dy)
        }

        draw_chart(cx, cy, r, points, pw)
        draw_chart_flash(@state_chart_sprite, x, y, r, points, pw)

        return (x + cx + r + 42)
      end
      #--------------------------------------------------------------------------
      # ○ ステート耐性描画 (数値)
      #     x, y : 描画先 X, Y
      #    描画終了時の X 座標を返す。
      #--------------------------------------------------------------------------
      def draw_state_resistance_num(x, y)
        origin_y = y
        contents.font.color = normal_color
        KGC::ExtendedStatusScene::CHECK_STATE_LIST.each { |i|
          state = $data_states[i]
          if y + WLH > contents.height
            x += 76
            y  = origin_y
          end
          draw_icon(state.icon_index, x, y)
          n = @actor.state_probability(i)
          n = 100 - n if KGC::ExtendedStatusScene::RESIST_NUM_STYLE == 1
          rate = sprintf("%3d%%", n)
          contents.draw_text(x + 24, y, 44, WLH, rate, 2)
          y += WLH
        }
        return x
      end
      #--------------------------------------------------------------------------
      # ○ チャートライン描画
      #     cx, cy : 中心 X, Y
      #     r      : 半径
      #     n      : 頂点数
      #     breaks : 空間数
      #     pw     : ペン幅
      #--------------------------------------------------------------------------
      def draw_chart_line(cx, cy, r, n, breaks, pw)
        color = KGC::ExtendedStatusScene::CHART_BASE_COLOR.clone
        contents.draw_regular_polygon(cx, cy, r, n, color, pw)
        color.alpha = color.alpha * 5 / 8
        contents.draw_spoke(cx, cy, r, n, color, pw)
        (1..breaks).each { |i|
          contents.draw_regular_polygon(cx, cy, r * i / breaks, n, color, pw)
        }
      end
      #--------------------------------------------------------------------------
      # ○ チャート描画
      #     cx, cy : 中心 X, Y
      #     r      : 半径
      #     points : 頂点リスト
      #     pw     : ペン幅
      #--------------------------------------------------------------------------
      def draw_chart(cx, cy, r, points, pw)
        contents.draw_polygon(points, KGC::ExtendedStatusScene::CHART_LINE_COLOR, 2)
      end
      #--------------------------------------------------------------------------
      # ○ チャートフラッシュ描画
      #     sprite : チャートスプライト
      #     x, y   : 基準 X, Y
      #     r      : 半径
      #     points : 頂点リスト
      #     pw     : ペン幅
      #--------------------------------------------------------------------------
      def draw_chart_flash(sprite, x, y, r, points, pw)
        points = points.clone
        points.each { |pt| pt[0] -= x }

        cx = x + r + 28
        cy = y + r + 28
        color = KGC::ExtendedStatusScene::CHART_FLASH_COLOR
        sprite.bitmap.clear
        sprite.bitmap.fill_polygon(points, Color.new(0, 0, 0, 0), color)
        sprite.ox = cx - x
        sprite.oy = cy
        sprite.x  = self.x + cx + 16
        sprite.y  = self.y + cy + 16
      end
      #--------------------------------------------------------------------------
      # ○ プロフィール描画
      #--------------------------------------------------------------------------
      def draw_profile
        profile = KGC::ExtendedStatusScene::PROFILE[@actor.id]
        return if profile == nil

        self.contents.font.color = normal_color
        profile.split(/|/).each_with_index { |line, i|
          draw_profile_text(0, WLH * i, line)
        }
      end
      #--------------------------------------------------------------------------
      # ○ プロフィールテキスト描画
      #     x, y : 描画先座標
      #     text : 描画テキスト
      #--------------------------------------------------------------------------
      def draw_profile_text(x, y, text)
        buf = convert_special_characters(text)
        while (c = buf.slice!(/./m)) != nil
          case c
          when "x01"                       # C[n]  (文字色変更)
            buf.sub!(/[(d+)]/, "")
            contents.font.color = text_color($1.to_i)
            next
          when "x02"                       # G  (所持金表示)
            n  = $game_party.gold.to_s
            cw = contents.text_size(n).width
            contents.draw_text(x, y, cw + 8, WLH, n)
            x += cw
          else                              # 普通の文字
            contents.draw_text(x, y, 40, WLH, c)
            x += contents.text_size(c).width
          end
        end
        contents.font.color = normal_color
      end
      #--------------------------------------------------------------------------
      # ○ 特殊文字の変換
      #     text : 変換対象テキスト
      #--------------------------------------------------------------------------
      def convert_special_characters(text)
        buf = text.dup
        buf.gsub!(/V[(d+)]/i) { $game_variables[$1.to_i] }
        buf.gsub!(/V[(d+)]/i) { $game_variables[$1.to_i] }
        buf.gsub!(/N[(d+)]/i) { $game_actors[$1.to_i].name }
        buf.gsub!(/C[(d+)]/i) { "x01[#{$1}]" }
        buf.gsub!(/G/)           { "x02" }
        buf.gsub!(/\/)          { "" }
        return buf
      end
      #--------------------------------------------------------------------------
      # ● フレーム更新
      #--------------------------------------------------------------------------
      def update
        super
        update_chart
      end
      #--------------------------------------------------------------------------
      # ○ チャート更新
      #--------------------------------------------------------------------------
      def update_chart
        return if @element_chart_sprite == nil

        @element_chart_sprite.update
        @state_chart_sprite.update

        zoom = opacity = 0
        case @duration
        when 0..11
          zoom    = @duration / 11.0
          opacity = 255
        when 12..27
          zoom    = 1
          opacity = (27 - @duration) * 16
        end
        @element_chart_sprite.zoom_x  = @element_chart_sprite.zoom_y = zoom
        @element_chart_sprite.opacity = opacity
        @state_chart_sprite.zoom_x    = @state_chart_sprite.zoom_y   = zoom
        @state_chart_sprite.opacity   = opacity

        @duration = (@duration + 1) % Graphics.frame_rate
      end
    end

    #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

    #==============================================================================
    # ■ Scene_Status
    #==============================================================================

    class Scene_Status < Scene_Base
      #--------------------------------------------------------------------------
      # ● オブジェクト初期化
      #     actor_index   : アクターインデックス
      #     command_index : コマンドインデックス
      #--------------------------------------------------------------------------
      def initialize(actor_index = 0, command_index = 0)
        @actor_index   = actor_index
        @command_index = command_index
      end
      #--------------------------------------------------------------------------
      # ● 開始処理
      #--------------------------------------------------------------------------
      alias start_KGC_ExtendedStatusScene start
      def start
        start_KGC_ExtendedStatusScene

        @command_window = Window_StatusCommand.new
        @command_window.index = @command_index
        @detail_window = Window_StatusDetail.new(@actor)
        @detail_window.category = @command_window.command
      end
      #--------------------------------------------------------------------------
      # ● 終了処理
      #--------------------------------------------------------------------------
      alias terminate_KGC_ExtendedStatusScene terminate
      def terminate
        terminate_KGC_ExtendedStatusScene

        @command_window.dispose
        @detail_window.dispose
      end
      #--------------------------------------------------------------------------
      # ● 次のアクターの画面に切り替え
      #--------------------------------------------------------------------------
      def next_actor
        @actor_index += 1
        @actor_index %= $game_party.members.size
        $scene = Scene_Status.new(@actor_index, @command_window.index)
      end
      #--------------------------------------------------------------------------
      # ● 前のアクターの画面に切り替え
      #--------------------------------------------------------------------------
      def prev_actor
        @actor_index += $game_party.members.size - 1
        @actor_index %= $game_party.members.size
        $scene = Scene_Status.new(@actor_index, @command_window.index)
      end
      #--------------------------------------------------------------------------
      # ● フレーム更新
      #--------------------------------------------------------------------------
      alias update_KGC_ExtendedStatusScene update
      def update
        @command_window.update
        @detail_window.update
        @detail_window.category = @command_window.command

        update_KGC_ExtendedStatusScene
      end
    end

  • ?
    시트르산 2010.09.23 10:13

    이 방법이 안된다면 혹시

    처음에 VX를 사용하실때

    혹시 일본에서 제작한 프로젝트에 그대로 덮어씌우신건 아닌지

    여부를 확인하고 싶어요.

  • ?
    니노미야 2010.09.23 11:20

    시트르산님, 감사합니다.

    올려주신 스크립트와 비교 대조해보니, 프로필 묘화 항목에 차이가 있었네요.

    어째서 이 하나 빠진 건지 모르겠지만, 하나 추가해서 정상가동 되고 있습니다.  ㅠ_ㅠ 정말 감사합니다.


List of Articles
종류 분류 제목 글쓴이 날짜 조회 수
공지 묻고 답하기 가이드 습작 2014.06.14 12451
RMMV 화면(카메라)를 고정하고 싶습니다. Generator 2016.10.19 166
RMVXA 화면(시점) 설정 할수있나요? 3 DlDiGh 2016.05.26 149
이벤트 작성 RMVXA 화면 흔들림이 대화도중에 끊기지 않게 나오는법 있나요? 겜만들고싶다앙 2021.04.24 53
이벤트 작성 RMMV 화면 흔들림이 계속되는 상황에서 이동할 수 있도록 만들고 싶습니다. 2 file 소설인 2020.10.13 185
RMXP 화면 확대하는 법? 1 오디넬 2012.03.22 3019
RMMV 화면 특정위치에 글자(변수)를 출력하는 방법이 있을까요? 3 슈아ll 2018.07.02 801
스크립트 추천 RMXP 화면 크기가 아닌 게임의 해상도를 조절하고싶습니다. file 데아곤 2019.11.10 412
RMMV 화면 크기 문제입니다. 3 file 데아곤 2017.09.09 244
RMVXA 화면 축소에 관하여 질문이 있습니다 6 file HST 2016.08.09 173
이벤트 작성 RMMV 화면 전환관련 5 텔레펑키씨 2019.12.18 311
스크립트 추천 RMVXA 화면 전체에 뜨는 애니메이션 컷신을 넣고 싶습니다 다크크리에이터 2023.11.09 44
RMVX 화면 여백을 없애고 늘리는 방법 10 file 크리스토퍼 2014.01.09 1181
기타 화면 어떻게 어둡게 하나요 6 Etrue 2014.01.11 1474
RMXP 화면 어둡게하기 1 테러범 2011.02.17 1157
기타 RMVXA 화면 사이즈를 800X600으로 수정후 동영상을 플레이했는데 옆으로 치우치네요 2 선인장해마 2021.01.26 94
RMVXA 화면 밖의 이벤트가 주인공에게 접근하게 만드는 방법 1 여줄가리 2015.10.27 181
기본툴 사용법 RMVXA 화면 밖에서도 몬스터가 추적을 개시할 수 있는 방법이 있을까요? 2 머리큰두두 2022.11.13 80
RMVXA 화면 밖 이벤트의 이동경로 8 무명시절 2016.10.26 288
RMVX 화면 뜨게 하는법! 1 제복잇 2012.02.14 2688
RMVXA 홍직설님의 영상에서 사용된 스크립트의 이름과 어떻게 구할 수 있는지를 알고 싶습니다. 겜제작광 2016.04.20 113
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ... 516 Next
/ 516