질문과 답변

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 21162
플러그인 사용 RMMV 장비/아이템에 레벨 제한을 걸고 싶습니다 1 코코아밀크 2019.06.02 127
스크립트 사용 RMVXA 폰트...적...용... 3 Leme 2019.06.02 379
이벤트 작성 RMMV 알툴만 mv 조각퍼즐 맞투기 1 초보제작기 2019.06.04 128
기본툴 사용법 RMVXA 애니메이션 이펙트에 닿을시 게임오버 연출 6 file 4124214 2019.06.04 171
기본툴 사용법 RMVXA 상대방과 거리계산 기본툴 12 file 4124214 2019.06.05 244
기타 RMMV 툴을 사용하려는데 화면이 잘리네요. 1 HATZ 2019.06.06 113
에러 해결 RMVXA 맵칩을 직접 찍었는데 캐릭터가 이동이 안 됩니다. 4 ㄲㅁ 2019.06.06 172
턴제 전투 RMMV 프론트뷰에서 적스킬, 아군회복스킬 중앙에 보이게하기 2 HASIN 2019.06.07 142
기타 툴선택 Mv vs VXA 1 Tozha 2019.06.11 268
이벤트 작성 RMMV 플레이어가 이동할때 미끄러지듯이 이동하게 하는 법 없나요? 5 file 이누_ 2019.06.11 186
스크립트 사용 RMMV 플러그인 스크립트 사용 질문! (on off 및 변수 바꾸기) 2 efihnsipdaghpsa 2019.06.12 147
턴제 전투 RMMV 해상도 변경후 배틀배경 늘리기 2 file 태하 2019.06.12 216
기타 Visual Novel 비주얼노벨 툴 선택에 도움을 주세요 소녀160 2019.06.12 407
이벤트 작성 RMVXA 날라오는 투사체 구현 2 힘들다 2019.06.12 185
기타 툴선택 어떤 툴을 사용해야 하나요? 2 소녀160 2019.06.13 254
퀘스트 작성 기타 퀘스트 표시 질문합니다 ㅠㅠ 3 찐서 2019.06.13 377
스크립트 사용 RMMV (해결)Alert 사용 후 이벤트가 클릭도 안했는데 스킵됩니다ㅜㅜ 2 file STRS 2019.06.14 160
스크립트 사용 RMMV 변수를 스크립트에서 사용하고 싶습니다 1 efihnsipdaghpsa 2019.06.14 130
기타 RMXP 도트말고 펜선 캐릭터 칩은 규격을 어떻게 해야하나요? 먼지를먹다 2019.06.14 156
이벤트 작성 RMVXA 물체를 특정위치에 옮겼을 때 이벤트가 실행되게 하고싶습니다. 1 file lys4154 2019.06.15 105
Board Pagination Prev 1 ... 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 ... 518 Next
/ 518