질문과 답변

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 12444
RMVXA 전투 중 hp가 0이 됐을 때 이벤트가 뜨게 하고 싶습니다. 2 독눈vs항해술 2014.12.16 524
RMMV 전투 종료시 아이템 삭제 2 file 리팝이 2017.05.03 207
RMVXA 전투 인터페이스를 고치고 싶은데... 2 repola 2014.04.03 683
RMVX 전투 인원수 1 블랙키 2011.01.21 956
RMVXA 전투 이벤트중 캐릭터의 이름이 짤립니다. 2 file 겜맨602 2015.03.02 190
RMVXA 전투 이벤트를 만들었는데 오류가 있어요. 1 RPG란무엇인가? 2016.07.19 69
RMVX 전투 이벤트가 실행이 안돼요 4 file Thyella 2016.06.26 114
RMVX 전투 이벤트 턴수 조정에 관한 질문입니다. C_tan 2012.03.24 1951
액션 전투 RMMV 전투 이벤트 작성하는데 자꾸 failde to load: img/battleback2/SF_MilitaryBase.png 라고 떠요.ㅠㅠ 1 슈슈슈슈 2020.01.27 122
RMVX 전투 이벤트 작성 1 file Esee 2013.06.22 989
기본툴 사용법 RMVXA 전투 애니메이션을 전투중간에 바꿀수 있나요? 1 겜만들고싶다앙 2021.03.27 53
RMVXA 전투 실행시 에러가 나면서 튕깁니다. 1 file 밥_짓는_남자 2015.05.11 136
RMVXA 전투 시작할때와 전투 중 커맨드를 좀 바꾸고 싶습니다 1 이스피나 2012.09.29 1613
RMVX 전투 시작할 때 도망치다 나타나게 하는 법 좀 가르쳐주세요. 1 용발2 2011.03.20 1283
이벤트 작성 RMVXA 전투 시작시 캐릭터 목소리(혹은 효과음) 나오게 하는 법 1 초보노인 2022.05.30 258
턴제 전투 RMMV 전투 시작 시 나오는 화면전환 효과를 바꾸고 싶습니다. 마이럼 2022.06.27 203
RMVX 전투 시에 적의 모습 뿐 아니라 하단에 자기캐릭터 모습 나오게끔.. 1 아루쿠 2011.09.29 1489
RMVX 전투 시에 나오는 대사 어떻게 설정하나요? 3 전학생 2013.09.15 1074
RM2k3 전투 시스템에 대해서 꼭 알고싶은것이 있습니다. 2 디시플 2014.03.25 800
RMVXA 전투 시스템에 대해 1 만땅몬 2016.03.15 167
Board Pagination Prev 1 ... 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 ... 516 Next
/ 516