RPGXP スクリプト
2013.10.01 06:14

Switchless Common Events

閲覧数 619 推奨数 0 コメント 0
?

Shortcut

Prev前へ 書き込み

Next次へ 書き込み

Larger Font Smaller Font 上へ 下へ Go comment 印刷
?

Shortcut

Prev前へ 書き込み

Next次へ 書き込み

Larger Font Smaller Font 上へ 下へ Go comment 印刷
=begin

 Switchless Common Events v1.1
 by PK8
 Created: 5/6/2012
 Modified: 5/27/2012
 ──────────────────────────────────────────────────────────────────────────────
 ■ Author's Notes
   This was a fairly quick script I wrote. It was an idea I had in my head
   for a little while.
 ──────────────────────────────────────────────────────────────────────────────
 ■ Introduction
   Remember how in RPG Maker 2000 and 2003, you didn't need to rely on switches
   in order for your common events to run on parallel process and autorun? Well,
   it's back. This script lets you set which common events are going to run in
   either parallel processing or automatically, without the use of conditional
   switches.
 ──────────────────────────────────────────────────────────────────────────────
 ■ Features
   o Set which common events are going to use autorun or parallel process
     triggering without a conditional switch.
 ──────────────────────────────────────────────────────────────────────────────
 ■ Methods Aliased
   Scene_Title.command_new_game
   Interpreter.setup_starting_event
   Game_CommonEvent.refresh
 ──────────────────────────────────────────────────────────────────────────────
 ■ Changelog
   v1   (05/06/2012): Initial Release
   v1.1 (05/27/2012): Removed Custom Conditionals feature because it was
                      unnecessary and could easily be accomplished through
                      conditional branches. I also reduced a lot of code.
   
=end

#==============================================================================
# ** Configuration
#==============================================================================

module PK8
  class Switchless_CommonEvents
    #--------------------------------------------------------------------------
    # * Do not modify
    #--------------------------------------------------------------------------
    Autorun, Parallel = [], []
    
    #--------------------------------------------------------------------------
    # * Decide which common events would autorun/process without a switch.
    # Autorun/Parallel = [Common Event IDs]
    #--------------------------------------------------------------------------
    #Autorun  = [10, 9]
    #Parallel = [8, 7]
  end
end

#==============================================================================
# ** Scene_Title
#------------------------------------------------------------------------------
#  This class performs title screen processing.
#==============================================================================

class Scene_Title
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  unless method_defined?(:pk8_sce_command_new_game)
    alias_method(:pk8_sce_command_new_game, :command_new_game)
  end
  #--------------------------------------------------------------------------
  # * Command: New Game
  #--------------------------------------------------------------------------
  def command_new_game
    pk8_sce_command_new_game
    PK8::Switchless_CommonEvents::Autorun.each { | id |
      ceid = $data_common_events[id]; ceid.trigger, ceid.switch_id = 0, 0 }
    PK8::Switchless_CommonEvents::Parallel.each { | id |
      ceid = $data_common_events[id]; ceid.trigger, ceid.switch_id = 0, 0 }
  end
end

#==============================================================================
# ** Interpreter
#------------------------------------------------------------------------------
#  This interpreter runs event commands. This class is used within the
#  Game_System class and the Game_Event class.
#==============================================================================

class Interpreter
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  unless method_defined?(:pk8_sce_setup_starting_event)
    alias_method(:pk8_sce_setup_starting_event, :setup_starting_event)
  end
  #--------------------------------------------------------------------------
  # * Starting Event Setup
  #--------------------------------------------------------------------------
  def setup_starting_event
    pk8_sce_setup_starting_event
    $data_common_events.compact.each { | ce | setup(ce.list, 0) if (
      PK8::Switchless_CommonEvents::Autorun.include?(ce.id)) }
  end
end

#==============================================================================
# ** Game_CommonEvent
#------------------------------------------------------------------------------
#  This class handles common events. It includes execution of parallel process
#  event. This class is used within the Game_Map class ($game_map).
#==============================================================================

class Game_CommonEvent
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  unless method_defined?(:pk8_sce_refresh)
    alias_method(:pk8_sce_refresh, :refresh)
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    pk8_sce_refresh
    if PK8::Switchless_CommonEvents::Parallel.include?(@common_event_id)
      @interpreter = Interpreter.new if @interpreter == nil
    end
  end
end
?

List of Articles
番号 カテゴリ タイトル 投稿者 日付 閲覧数 推奨数
208 RPGXP スクリプト 미니맵 스크립트 2 2013.10.01 2196 0
207 RPGXP スクリプト 부활 스크립트 2 2013.10.01 2791 0
206 RPGXP スクリプト 발소리 스크립트 6 2013.10.01 1746 0
205 RPGXP スクリプト 메뉴 스크립트 Zer0 CMS 3 2013.10.01 1421 0
204 RPGXP スクリプト 상점에서 아이템 능력치를 표시해주는 스크립트 1 2013.10.01 1677 0
203 RPGXP スクリプト 대기 회복 스크립트 2013.10.01 1091 0
202 RPGXP スクリプト 복권 스크립트 5 2013.10.01 1160 0
201 RPGXP スクリプト 아이템 갯수 제한 2013.10.01 1100 0
200 RPGXP スクリプト 레벨업시 능력치 표시 4 2013.10.01 1094 0
199 RPGXP スクリプト 현재 시간 확인 2 2013.10.01 915 0
198 RPGXP スクリプト 화면의 쉐이크를 더 어지럽게 바꿔보자! 2013.10.01 1023 0
197 RPGXP スクリプト 현재위치&임무 표시 2 2013.10.01 993 0
196 RPGXP スクリプト 윈도우 링 메뉴 1 2013.10.01 856 0
195 RPGXP スクリプト 장비 레벨 제한 2 2013.10.01 928 1
194 RPGXP スクリプト 텔레포트 스크립트 1 2013.10.01 914 0
193 RPGXP スクリプト 밤낮 설정 3 2013.10.01 1007 0
192 RPGXP スクリプト 전메뉴 반투명화 2 2013.10.01 780 0
191 RPGXP スクリプト Initial Switches and Variables 2013.10.01 615 0
» RPGXP スクリプト Switchless Common Events 2013.10.01 619 0
189 RPGXP スクリプト Universal Message System 1.8.0 by ccoa 2013.10.01 596 0
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 15 Next
/ 15


[プライバシーに関する声明] | [利用規約] | [お問い合わせ] | [スポンサーシップ] | [ンサイド・ヒストリー]

Copyright © 1999 - 2016 INdiSide.com/CL3D Co.、Ltd. All Rights Reserved.
Owner : Chunmu(Jiseon Lee) | kernys(Wonbae Kim) | Sasinji(Byungkook Kim)