질문과 답변

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 21143
RMVXA 캐릭터 이름을 입력할 때 스크립트 변경 2 file leon13a 2014.10.22 1639
RM2k3 윈도우 8에서 알만툴 2003 되나요 3 빨빨뛰댕겨 2013.11.01 1639
RMVX 시야에 관한 스크립트 질문이요. 3 file 네이피어 2012.02.17 1639
RMXP 스크립트에 대해서 1 마린레이 2011.09.25 1639
RMXP XAS 3.91 스킬 아이콘 단축키 질문 비극ㆍ 2012.08.18 1639
기타 게임파일 수정 3 드릴러 2013.10.24 1638
기타 울프툴 게임을 번역 중인데 특정 텍스트들을 못 바꾸겠습니다 6 file 2013.10.17 1638
RMVX 공격이 미스 되었을 때 애니메이션 효과 없애기 1 존스노우 2012.06.06 1638
RMXP 온라인 스크립트 1 으갸고갸그겨 2011.05.22 1638
RMVXA rpg만들기 vx ace를 깔고 한글화 패치 관련 6 킹랍토르 2013.06.02 1637
RMVX 스크립트 찾고있습니다. 1 아이리수 2012.08.11 1637
RMXP 스크립트 게이지바조종하는데 짤립니다; 1 file 라이네크 2011.09.13 1637
RMVX 타일셋 질문입니다. 3 Xin 2012.07.27 1635
RMVX 이벤트 접촉크기에 대해... 2 file 매디 2011.07.30 1635
기타 루아 배울려면 1 백승욱 2011.04.24 1635
RMVX 메세지, 대사 출력 속도 조절하는 법 아시는 분 계신가요 3 은은색색 2014.03.04 1633
RM2k 방향키를 다른키로 대체하는 방법좀 가르쳐주세요 베스트개그수 2012.10.06 1633
RMXP 선택지 표시할때 5 까멸 2011.12.11 1633
RMMV dlc적용방법 1 file 무랭 2016.09.12 1632
RMVXA RPG 만들기 VX Ace, 이벤트 종료 후 캐릭터 사라지게 하려면 어떻게 해야합니까? 8 대악당 2013.08.17 1632
Board Pagination Prev 1 ... 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 ... 518 Next
/ 518