Chaos Project

RPG Maker => RPG Maker Scripts => RMXP Script Database => Topic started by: Heretic86 on March 29, 2013, 01:31:03 am

Title: [XP][VX][VXA] Debug Fast Forward
Post by: Heretic86 on March 29, 2013, 01:31:03 am
Debug Fast Forward
Authors: Heretic
Version: 0.1
Type: Debug Graphical Enhancement
Key Term: Misc Add-on



Introduction

This has to be the laziest script I've ever written!  I got really sick and tired of waiting to go through a sequence I am working on, so I decided to just put it all in Fast Forward with the press of a button!  It allowed me to test out my game much more quickly, so it will probably help you out as well.


Features




Screenshots

No screenshots needed to understand what Fast Forward and Slo-Mo are.


Demo

No Demo.  Put it in ANY project pretty much anywhere and it should work just hunky dory.


Script

Place above Main.  I dont think it even matters if you place it in the middle of the Default Scripts.

Spoiler: ShowHide

#--------------------------------------#
# Debug Fast Forward and Slo-Mo Script #
#--------------------------------------#
#
# Version: 0.1
#
# Hold down the CTRL Key to go in to Fast Forward
# Hold down the SHIFT Key to go into Slow Motion
#
# Legal:  Not copyrighted what-so-ever.  Do what ever you want with it.
#
#-------------------------------------------------------------------------------

# Set your Engine here.
$XPVXA = "XP"

module Graphics
 unless $graphics_fast_forward_defined
   # Prevent F12 Crash
   $graphics_fast_forward_defined = true
   class << Graphics
     alias graphics_fast_forward_update update
     def update
       # Call Original
       graphics_fast_forward_update
         # If DEBUG for XP and BTEST for all higher versions
         if $DEBUG || $TEST
           # If holding CTRL Key
           if Input.press?(Input::CTRL)
             # Fast Forward
             Graphics.frame_rate = 120
           # If holding SHIFT Key              
           elsif Input.press?(Input::SHIFT)
             # Slow Mo
             Graphics.frame_rate = 10
           else
             if $XPVXA == "XP"
               # Normal Speed of 40 Frames Per Second for XP
               Graphics.frame_rate = 40
             else
               # Normal Speed of 60 Frames Per Second for all higher versions
                Graphics.frame_rate = 60             
             end
           end
        end        
     end
   end
 end
end



Instructions

Put in game.

Run Game from Editor.

Hold down the CTRL Key to Fast Forward in Debug Mode.
Hold down the SHIFT Key to go into Slow Motion for Animation Debugging.

Eat Popcorn.


Compatibility

Should be 100% compatible.


Credits and Thanks




Author's Notes

Legal:  Not Copyrighted, No Restrictions.