질문과 답변

Extra Form

전투 시작시 전투/도주 선택 없이 바로 전투로 넘어가는 것과

 

전투 커맨드에서 아예 공격/방어를 삭제하고 싶은데 어떻게 할 수 없을까요?

 

한참동안 스크립트를 만져봤는데 결국 에러만 떠서 포기했네요... 방법 없나요?

Comment '1'
  • profile
    습작 2012.09.30 16:26

    0.

     

      질문하신 내용은 간단해보이지만, 실은 여러곳을 건드려줘야 하는 내용입니다. 일단 기본 기능상에서 지원하지 않는 커스텀이며 스크립트 수정을 통해서 구현이 가능합니다. 다만 이스피나님께서 언급하신 바와 같이 스크립트를 직접 수정하기 어려우신 분께는 다소 힘든 부분이라 생각됩니다. 제작의뢰쪽에 어울리는 질문내용이라고 할 수 있겠네요.^^


      아래 해당 기능 구현을 위해서 가볍게 수정된 코드를 적어드립니다. 충분한 테스트를 거치지 않았기 때문에 예외사항에 대해서는 불안정 할 수 도 있습니다. 더불어 요청하신 부분은 기존의 전투처리 과정을 뒤바꾸는 내용이기 때문에 아마도 다른 전투 관련 스크립트 사용시 충돌 등의 오작동 여지가 있으니 이점 참고하시면 감사하겠습니다.


      그럼 좋은 게임 제작 활동 부탁드립니다.^^


    #==============================================================================

    #==============================================================================

    module BattleManager

      #--------------------------------------------------------------------------

      def self.init_members

        @phase = :init

        @can_escape = false

        @can_lose = false

        @event_proc = nil

        @preemptive = false

        @surprise = false

        @actor_index = 0

        @action_forced = nil

        @map_bgm = nil

        @map_bgs = nil

        @action_battlers = []

      end

      #--------------------------------------------------------------------------

      def self.clear_actor

        @actor_index = 0

      end

      #--------------------------------------------------------------------------

      def self.prior_command

        begin

          if !actor || !actor.prior_command

            @actor_index = [0, @actor_index -= 1].max

          end

        end until actor.inputable?

        return true

      end

      #--------------------------------------------------------------------------

    end

    #==============================================================================

    #==============================================================================

    class Window_ActorCommand < Window_Command

      #--------------------------------------------------------------------------

      def make_command_list

        return unless @actor

        add_skill_commands

        add_item_command

      end

      #--------------------------------------------------------------------------

    end

    #==============================================================================

    #==============================================================================


    class Scene_Battle < Scene_Base

      #--------------------------------------------------------------------------

      def update_message_open

        if $game_message.busy? && !@status_window.close?

          @message_window.openness = 0

          @status_window.close

          @actor_command_window.close

        end

      end

      #--------------------------------------------------------------------------

      def create_all_windows

        create_message_window

        create_scroll_text_window

        create_log_window

        create_status_window

        create_info_viewport

        create_actor_command_window

        create_help_window

        create_skill_window

        create_item_window

        create_actor_window

        create_enemy_window

      end

      #--------------------------------------------------------------------------

      def create_actor_command_window

        @actor_command_window = Window_ActorCommand.new

        @actor_command_window.viewport = @info_viewport

        @actor_command_window.set_handler(:skill,  method(:command_skill))

        @actor_command_window.set_handler(:item,   method(:command_item))

        @actor_command_window.set_handler(:cancel, method(:prior_command))

        @actor_command_window.x = Graphics.width

      end

      #--------------------------------------------------------------------------

      def prior_command

        if BattleManager.prior_command

          start_actor_command_selection    

        end

      end

      #--------------------------------------------------------------------------

      def start_actor_command_selection

        unless scene_changing?

          refresh_status

          @status_window.unselect

          @status_window.open

          if BattleManager.input_start

            @status_window.select(BattleManager.actor.index)

            @actor_command_window.setup(BattleManager.actor)

          else

            turn_start

          end

        end

      end

      #--------------------------------------------------------------------------

      def battle_start

        BattleManager.battle_start

        process_event

        start_actor_command_selection

      end

      #--------------------------------------------------------------------------

      def turn_start

        @actor_command_window.close

        @status_window.unselect

        @subject =  nil

        BattleManager.turn_start

        @log_window.wait

        @log_window.clear

      end

      #--------------------------------------------------------------------------

      def turn_end

        all_battle_members.each do |battler|

          battler.on_turn_end

          refresh_status

          @log_window.display_auto_affected_status(battler)

          @log_window.wait_and_clear

        end

        BattleManager.turn_end

        process_event

        start_actor_command_selection

      end

      #--------------------------------------------------------------------------

      def update_info_viewport

        move_info_viewport(128) if @actor_command_window.active

        move_info_viewport(64)  if BattleManager.in_turn?

      end

      #--------------------------------------------------------------------------

    end





List of Articles
종류 분류 제목 글쓴이 날짜 조회 수
공지 묻고 답하기 가이드 습작 2014.06.14 12448
RMXP 맵을 복제해서 해당맵으로 이동하게하는법좀요 2 식빵족추장 2012.09.23 1212
RMVXA 특정 장소에서 인카운트 변경 2 레비엔 2012.09.23 1388
RM2k 도트에 대하여 질문 2 카오스 울프 2012.09.24 1301
RMXP 캐릭터 플레이어 속도 어떻게 변횐하나요? 1 맥켄리 2012.09.24 1387
RMXP 총기류 만드는방법좀;; 2 무적쿠르저 2012.09.24 1438
RMXP 타일셋이라고 하나요? 그게 투명하지 않아요. 4 file 덩치큰아이 2012.09.25 1373
RMVXA 능력치에 따라서 mhp 증가 4 바다의보배 2012.09.25 1170
기타 아방스에 관하여 4 카오스 울프 2012.09.25 1221
RM2k 맵 자체에서 몬스터의 등장 3 카오스 울프 2012.09.26 1530
RMXP 맵개수 제한 해제 정년팽 2012.09.26 1273
RMVXA 매끄럽게 이동시키기 2 xzrjs 2012.09.26 1632
RMVXA 모듈을 txt파일로 만들어 게임상으로 불러오는 방법을 알고 싶습니다. 8 77이알 2012.09.26 1396
RMXP 이게머죠? 1 file 후비고 2012.09.27 1469
기타 캐릭터 칩 만드는 법 2 이호성 2012.09.28 3709
RMVXA 전투 시작할때와 전투 중 커맨드를 좀 바꾸고 싶습니다 1 이스피나 2012.09.29 1613
RMXP 게임을 하고 있지 않을경우 게임소리를 차단 CJYG* 2012.09.30 1282
RMXP 아이템창만뜨게하기 1 네코코마 2012.09.30 1271
RMXP RPGXP 윈도우7 온라인 되지 않습니다. 1 흑온의팬 2012.10.01 1773
RMXP 이번에는 스크립트 오류가 뜹니다. 9 흑온의팬 2012.10.01 1799
RM2k3 원래 RPG2003에 첨부된 BGM들이 모조리 않들려요 엑스트라 2012.10.01 1773
Board Pagination Prev 1 ... 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 ... 516 Next
/ 516