Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #==============================================================================
- # Skip Cutscenes Mode
- # By gerkrt/gerrtunk(main), GreenBanana, wecoc, pacman(some ideas or suggestions),
- # sandgolem(some of his script code here)
- # Version: 1.1
- # License: MIT, credits
- # Date: 11/08/2011
- # IMPORTANT NOTE: to acces the more actualitzed or corrected version of this
- # script check here: http://usuarios.multimania.es/kisap/english_list.html
- #==============================================================================
- =begin
- ------INTRODUCTION------
- This script introduce a mode where the cutscene type commands(show message, move
- event, etc, show picture, anymation, sounds, etc) dont function so only the
- logical and nor graphical options work(battle, changue equip, items, etc).
- In this way you can use this feature to skip any cutscene using a election or using
- a key for this option.
- Note that you can also use this to test better and very quick your games.
- -----INSTRUCTIONS---------
- You have two ways of doing this. First you can call this script to active or
- desactivate the cutscene mode:
- $game_system.skip_cutscene_mode = true
- ---> this activate it
- $game_system.skip_cutscene_mode = false
- ---> desactivate
- You can also use a key to active or desactive it in the game maps, you configure
- the key in:
- Skip_key = Input::A
- To changue it you have to use the information you configure using f1 ingame,
- and changuing the A letter to the you want to use.
- Note that you can configure a sound for the map option. For default it uses your
- database cancel se, but you can use any other se. If you dont want anyone, just
- put = false.
- Finally, note that the mode active/inactive is saved when you save the game and
- isnt reseted.
- -----DEFINING WHAT IS A CUTSCENCE-----
- You can also make that this mode only works when you want. To make that this mode
- works it have to be active this option with a script call:
- $game_system.is_cutscene = true (you can make = false like the other)
- Using this you can call this script at the start and the end of a event cutscene,
- activing and desactivating it, so it only works there. Note that also the key
- changuing dont work if that isnt active.
- This option is permanent too.
- -----DEBUG MODE-----
- You can autoactivate the is_scene atribute in the game when debuging it with
- the rpgmaker so you can test the project better. You just dont need to active
- that option.
- If you dont want to use this just set to false: Use_debug_mode = false
- -----COMPATIBILITY AND DESACTIVATING THE CUTSCENE KEY OPTION-------
- This script is incompatible with any script that changues the interpreter in the
- way it executes commands.
- But you can make it compatible with scripts that changue the map too much(normally
- it have to work). To do that put Modify_scene_map = false, but you will lose
- the key in map feature.
- =end
- module Wep
- Use_debug_mode = true
- Skip_key = Input::A
- Skip_SE = '003-System03'
- SKM_Modify_scene_map = true
- end
- #==============================================================================
- # ** Interpreter
- #------------------------------------------------------------------------------
- # This interpreter runs event commands. This class is used within the
- # Game_System class and the Game_Event class.
- #==============================================================================
- class Interpreter
- alias wep_scm_execcom_int execute_command
- #--------------------------------------------------------------------------
- # * Event Command Execution
- # Now it returns all the graphical options when cutscene mode is active to skip
- #--------------------------------------------------------------------------
- def execute_command
- # If last to arrive for list of event commands
- if @index >= @list.size - 1
- # End event
- command_end
- # Continue
- return true
- end
- # Make event command parameters available for reference via @parameters
- @parameters = @list[@index].parameters
- # Branch by command code
- case @list[@index].code
- when 101 # Show Text
- return if $game_system.skip_cutscene_mode and $game_system.is_cutscene ; return if Wep::Use_debug_mode and $DEBUG and $game_system.skip_cutscene_mode
- return command_101
- when 102 # Show Choices
- return if $game_system.skip_cutscene_mode and $game_system.is_cutscene ; return if Wep::Use_debug_mode and $DEBUG and $game_system.skip_cutscene_mode
- return command_102
- when 402 # When [**]
- return if $game_system.skip_cutscene_mode and $game_system.is_cutscene ; return if Wep::Use_debug_mode and $DEBUG and $game_system.skip_cutscene_mode
- return command_402
- when 403 # When Cancel
- return if $game_system.skip_cutscene_mode and $game_system.is_cutscene ; return if Wep::Use_debug_mode and $DEBUG and $game_system.skip_cutscene_mode
- return command_403
- when 103 # Input Number
- return if $game_system.skip_cutscene_mode and $game_system.is_cutscene ; return if Wep::Use_debug_mode and $DEBUG and $game_system.skip_cutscene_mode
- return command_103
- when 104 # Change Text Options
- return if $game_system.skip_cutscene_mode and $game_system.is_cutscene ; return if Wep::Use_debug_mode and $DEBUG and $game_system.skip_cutscene_mode
- return command_104
- when 105 # Button Input Processing
- return if $game_system.skip_cutscene_mode and $game_system.is_cutscene ; return if Wep::Use_debug_mode and $DEBUG and $game_system.skip_cutscene_mode
- return command_105
- when 106 # Wait
- return if $game_system.skip_cutscene_mode and $game_system.is_cutscene ; return if Wep::Use_debug_mode and $DEBUG and $game_system.skip_cutscene_mode
- return command_106
- when 111 # Conditional Branch
- return command_111
- when 411 # Else
- return command_411
- when 112 # Loop
- return command_112
- when 413 # Repeat Above
- return command_413
- when 113 # Break Loop
- return command_113
- when 115 # Exit Event Processing
- return command_115
- when 116 # Erase Event
- return command_116
- when 117 # Call Common Event
- return command_117
- when 118 # Label
- return command_118
- when 119 # Jump to Label
- return command_119
- when 121 # Control Switches
- return command_121
- when 122 # Control Variables
- return command_122
- when 123 # Control Self Switch
- return command_123
- when 124 # Control Timer
- return command_124
- when 125 # Change Gold
- return command_125
- when 126 # Change Items
- return command_126
- when 127 # Change Weapons
- return command_127
- when 128 # Change Armor
- return command_128
- when 129 # Change Party Member
- return command_129
- when 131 # Change Windowskin
- return command_131
- when 132 # Change Battle BGM
- return command_132
- when 133 # Change Battle End ME
- return command_133
- when 134 # Change Save Access
- return command_134
- when 135 # Change Menu Access
- return command_135
- when 136 # Change Encounter
- return command_136
- when 201 # Transfer Player
- return command_201
- when 202 # Set Event Location
- return command_202
- when 203 # Scroll Map
- return if $game_system.skip_cutscene_mode and $game_system.is_cutscene ; return if Wep::Use_debug_mode and $DEBUG and $game_system.skip_cutscene_mode
- return command_203
- when 204 # Change Map Settings
- return if $game_system.skip_cutscene_mode and $game_system.is_cutscene ; return if Wep::Use_debug_mode and $DEBUG and $game_system.skip_cutscene_mode
- return command_204
- when 205 # Change Fog Color Tone
- return if $game_system.skip_cutscene_mode and $game_system.is_cutscene ; return if Wep::Use_debug_mode and $DEBUG and $game_system.skip_cutscene_mode
- return command_205
- when 206 # Change Fog Opacity
- return if $game_system.skip_cutscene_mode and $game_system.is_cutscene ; return if Wep::Use_debug_mode and $DEBUG and $game_system.skip_cutscene_mode
- return command_206
- when 207 # Show Animation
- return if $game_system.skip_cutscene_mode and $game_system.is_cutscene ; return if Wep::Use_debug_mode and $DEBUG and $game_system.skip_cutscene_mode
- return command_207
- when 208 # Change Transparent Flag
- return if $game_system.skip_cutscene_mode and $game_system.is_cutscene ; return if Wep::Use_debug_mode and $DEBUG and $game_system.skip_cutscene_mode
- return command_208
- when 209 # Set Move Route
- return if $game_system.skip_cutscene_mode and $game_system.is_cutscene ; return if Wep::Use_debug_mode and $DEBUG and $game_system.skip_cutscene_mode
- return command_209
- when 210 # Wait for Move's Completion
- return if $game_system.skip_cutscene_mode and $game_system.is_cutscene ; return if Wep::Use_debug_mode and $DEBUG and $game_system.skip_cutscene_mode
- return command_210
- when 221 # Prepare for Transition
- return if $game_system.skip_cutscene_mode and $game_system.is_cutscene ; return if Wep::Use_debug_mode and $DEBUG and $game_system.skip_cutscene_mode
- return command_221
- when 222 # Execute Transition
- return if $game_system.skip_cutscene_mode and $game_system.is_cutscene ; return if Wep::Use_debug_mode and $DEBUG and $game_system.skip_cutscene_mode
- return command_222
- when 223 # Change Screen Color Tone
- return if $game_system.skip_cutscene_mode and $game_system.is_cutscene ; return if Wep::Use_debug_mode and $DEBUG and $game_system.skip_cutscene_mode
- return command_223
- when 224 # Screen Flash
- return if $game_system.skip_cutscene_mode and $game_system.is_cutscene ; return if Wep::Use_debug_mode and $DEBUG and $game_system.skip_cutscene_mode
- return command_224
- when 225 # Screen Shake
- return if $game_system.skip_cutscene_mode and $game_system.is_cutscene ; return if Wep::Use_debug_mode and $DEBUG and $game_system.skip_cutscene_mode
- return command_225
- when 231 # Show Picture
- return if $game_system.skip_cutscene_mode and $game_system.is_cutscene ; return if Wep::Use_debug_mode and $DEBUG and $game_system.skip_cutscene_mode
- return command_231
- when 232 # Move Picture
- return if $game_system.skip_cutscene_mode and $game_system.is_cutscene ; return if Wep::Use_debug_mode and $DEBUG and $game_system.skip_cutscene_mode
- return command_232
- when 233 # Rotate Picture
- return if $game_system.skip_cutscene_mode and $game_system.is_cutscene ; return if Wep::Use_debug_mode and $DEBUG and $game_system.skip_cutscene_mode
- return command_233
- when 234 # Change Picture Color Tone
- return if $game_system.skip_cutscene_mode and $game_system.is_cutscene ; return if Wep::Use_debug_mode and $DEBUG and $game_system.skip_cutscene_mode
- return command_234
- when 235 # Erase Picture
- return if $game_system.skip_cutscene_mode and $game_system.is_cutscene ; return if Wep::Use_debug_mode and $DEBUG and $game_system.skip_cutscene_mode
- return command_235
- when 236 # Set Weather Effects
- return if $game_system.skip_cutscene_mode and $game_system.is_cutscene ; return if Wep::Use_debug_mode and $DEBUG and $game_system.skip_cutscene_mode
- return command_236
- when 241 # Play BGM
- return if $game_system.skip_cutscene_mode and $game_system.is_cutscene ; return if Wep::Use_debug_mode and $DEBUG and $game_system.skip_cutscene_mode
- return command_241
- when 242 # Fade Out BGM
- return if $game_system.skip_cutscene_mode and $game_system.is_cutscene ; return if Wep::Use_debug_mode and $DEBUG and $game_system.skip_cutscene_mode
- return command_242
- when 245 # Play BGS
- return if $game_system.skip_cutscene_mode and $game_system.is_cutscene ; return if Wep::Use_debug_mode and $DEBUG and $game_system.skip_cutscene_mode
- return command_245
- when 246 # Fade Out BGS
- return if $game_system.skip_cutscene_mode and $game_system.is_cutscene ; return if Wep::Use_debug_mode and $DEBUG and $game_system.skip_cutscene_mode
- return command_246
- when 247 # Memorize BGM/BGS
- return command_247
- when 248 # Restore BGM/BGS
- return if $game_system.skip_cutscene_mode and $game_system.is_cutscene ; return if Wep::Use_debug_mode and $DEBUG and $game_system.skip_cutscene_mode
- return command_248
- when 249 # Play ME
- return if $game_system.skip_cutscene_mode and $game_system.is_cutscene ; return if Wep::Use_debug_mode and $DEBUG and $game_system.skip_cutscene_mode
- return command_249
- when 250 # Play SE
- return if $game_system.skip_cutscene_mode and $game_system.is_cutscene ; return if Wep::Use_debug_mode and $DEBUG and $game_system.skip_cutscene_mode
- return command_250
- when 251 # Stop SE
- return if $game_system.skip_cutscene_mode and $game_system.is_cutscene ; return if Wep::Use_debug_mode and $DEBUG and $game_system.skip_cutscene_mode
- return command_251
- when 301 # Battle Processing
- return command_301
- when 601 # If Win
- return command_601
- when 602 # If Escape
- return command_602
- when 603 # If Lose
- return command_603
- when 302 # Shop Processing
- return command_302
- when 303 # Name Input Processing
- return command_303
- when 311 # Change HP
- return command_311
- when 312 # Change SP
- return command_312
- when 313 # Change State
- return command_313
- when 314 # Recover All
- return command_314
- when 315 # Change EXP
- return command_315
- when 316 # Change Level
- return command_316
- when 317 # Change Parameters
- return command_317
- when 318 # Change Skills
- return command_318
- when 319 # Change Equipment
- return command_319
- when 320 # Change Actor Name
- return command_320
- when 321 # Change Actor Class
- return command_321
- when 322 # Change Actor Graphic
- return command_322
- when 331 # Change Enemy HP
- return command_331
- when 332 # Change Enemy SP
- return command_332
- when 333 # Change Enemy State
- return command_333
- when 334 # Enemy Recover All
- return command_334
- when 335 # Enemy Appearance
- return command_335
- when 336 # Enemy Transform
- return command_336
- when 337 # Show Battle Animation
- return command_337
- when 338 # Deal Damage
- return command_338
- when 339 # Force Action
- return command_339
- when 340 # Abort Battle
- return command_340
- when 351 # Call Menu Screen
- return command_351
- when 352 # Call Save Screen
- return command_352
- when 353 # Game Over
- return command_353
- when 354 # Return to Title Screen
- return command_354
- when 355 # Script
- return command_355
- else # Other
- return true
- end
- wep_scm_execcom_int
- end
- end
- #==============================================================================
- # ** Game System
- #==============================================================================
- class Game_System
- attr_accessor :skip_cutscene_mode
- attr_accessor :is_cutscene
- alias gs_init_wep_skm initialize
- def initialize
- @skip_cutscene_mode = false
- @is_cutscene = false
- gs_init_wep_skm
- end
- end
- #==============================================================================
- # ** Scene Map
- #==============================================================================
- # Compatibility check
- if Wep::SKM_Modify_scene_map
- class Scene_Map
- alias wep_cutsceneskip_update update
- def update
- wep_cutsceneskip_update
- # Skip cutscene
- if $game_system.is_cutscene and Input.trigger?(Wep::Skip_key)
- # Use SE
- if Wep::Skip_SE
- #$game_system.se_play(Wep::Skip_SE)
- Audio.se_play("Audio/SE/" + Wep::Skip_SE, 100, 0)
- end
- # Operate mode
- if $game_system.skip_cutscene_mode
- $game_system.skip_cutscene_mode = false
- else
- $game_system.skip_cutscene_mode = true
- end
- # Debug mode and its active
- elsif Wep::Use_debug_mode and $DEBUG and Input.trigger?(Wep::Skip_key)
- # Use SE
- if Wep::Skip_SE
- #$game_system.se_play(Wep::Skip_SE)
- Audio.se_play("Audio/SE/" + Wep::Skip_SE, 100, 0)
- end
- # Operate mode
- if $game_system.skip_cutscene_mode
- $game_system.skip_cutscene_mode = false
- else
- $game_system.skip_cutscene_mode = true
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement