Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- =begin
- ╔══════════════════════════════════════════════════════════════════════════════╗
- ║ Q-Engine Animated Title Add-On Version 2.0a (QES-ATA) ║
- ╟──────────────────────────────────────────────────────────────────────────────╢
- ║ Version : 2.0.0a ║
- ║ Author : Companion Wulf ║
- ║ Platform : RMVX ║
- ║ Inception Date : 18 December 2013 ║
- ║ Release Date : 10 March 2015 ║
- ║ Last Update : 29 September 2014 ║
- ║ Demo Version : N/A ║
- ║ Demo Date : N/A ║
- ║ Website : http://rpgmakertimes.info ║
- ║ Blog : http://blog.rpgmakertimes.info ║
- ║ ║
- ╠══════════════════════════════════════════════════════════════════════════════╣
- ║ ◄ DESCRIPTION ► ║
- ╟──────────────────────────────────────────────────────────────────────────────╢
- ║ The Q-Engine incorporates all of the scripts from the former ║
- ║ Scripts/Add-Ons Compendium, but with additional options, as ║
- ║ well as extra functions and features. ║
- ║ ║
- ║ The Q-Engine Animated Title Add-On adds a fully customizable ║
- ║ animated multi-layered title screen. This was originally part ║
- ║ of the Q-Engine, but it was extracted as a separate add-on for ║
- ║ easier expansion. ║
- ║ ║
- ╠══════════════════════════════════════════════════════════════════════════════╣
- ║ ◄ INSTALLATION ► ║
- ╟──────────────────────────────────────────────────────────────────────────────╢
- ║ Place after the "Q-Engine" main script. ║
- ║ ║
- ║ NOTE: See "Required Scripts" section for additional install- ║
- ║ ation notes. ║
- ║ ║
- ╠══════════════════════════════════════════════════════════════════════════════╣
- ║ ◄ KNOWN COMPATABILITY ISSUES ► ║
- ╟──────────────────────────────────────────────────────────────────────────────╢
- ║ There may only be compatability issues for other scripts that ║
- ║ overwrite or modify the Scene_Title class. ║
- ║ ║
- ╠══════════════════════════════════════════════════════════════════════════════╣
- ║ ◄ REQUIRED SCRIPTS ► ║
- ╟──────────────────────────────────────────────────────────────────────────────╢
- ║ The following scripts/modules are required for the Q-Engine ║
- ║ script to work properly (in this order): ║
- ║ ║
- ║ ● Global Colors Module ║
- ║ ● Q-Engine Script ║
- ║ ● Bitmap Add-On ║
- ║ ║
- ║ Optional Q-Engine add-ons should be added after these scripts. ║
- ║ ║
- ║ NOTE: The current manual is out of date and doesn't reflect ║
- ║ the changes in version 4.0. When he manual has been completely ║
- ║ updated, it will also include the settings for the various ║
- ║ add-ons. This will be fully updated when it's complete. ║
- ║ ║
- ╠══════════════════════════════════════════════════════════════════════════════╣
- ║ ◄ MANUAL ► ║
- ╟──────────────────────────────────────────────────────────────────────────────╢
- ║ The complete Q-Engine manual is now available in DOC or PDF ║
- ║ formats, downloadable from RPG Maker Times Companion, along ║
- ║ with a demo showcasing its features. ║
- ║ ║
- ║ Note: The current manual is out of date and doesn't reflect ║
- ║ the changes in version 4.0. When he manual has been completely ║
- ║ updated, it will also include the settings for the various ║
- ║ add-ons. This will be fully updated when it's complete. ║
- ║ ║
- ╠══════════════════════════════════════════════════════════════════════════════╣
- ║ ◄ Q-ENGINE ANIMATED TITLE ADD-ON VERSION HISTORY ► ║
- ╟──────────────────────────────────────────────────────────────────────────────╢
- ║ The version history tracking will be changing to the following ║
- ║ format: ║
- ║ ║
- ║ Release.Updates.Developmental ║
- ║ ║
- ║ Release numbers indicate public release versions. ║
- ║ ║
- ║ Updates refers to new scripts/scriptlets (both major and minor ║
- ║ updates). ║
- ║ ║
- ║ Developmental updates are for tweaks or bug fixes, and new ║
- ║ added methods. ║
- ║ ║
- ╟──────────────────────────────────────────────────────────────────────────────╢
- ║ NOTE: The QES-ATA was originally part of the Q-Engine, but it ║
- ║ has since become a separate add-on to make future expansion ║
- ║ easier. The version history up until version 1.0 is based on ║
- ║ the original Q-Engine integration. ║
- ║ ║
- ╠══════════════════════════════════════════════════════════════════════════════╣
- ║ * Updates Version History * ║
- ╟──────────────────────────────────────────────────────────────────────────────╢
- ║ v2.0.0a (10-Mar-2015) ║
- ║ ● Release: Version 2.0a (Alpha) ║
- ╟──────────────────────────────────────────────────────────────────────────────╢
- ║ v2.0.0b (08-Oct-2014) ║
- ║ ● Release: Version 2.0b (Beta) ║
- ╟──────────────────────────────────────────────────────────────────────────────╢
- ║ v1.0.2 (29-Sep-2014) ║
- ║ ● Tweak: Rework requirements structure, including version checker ║
- ╟──────────────────────────────────────────────────────────────────────────────╢
- ║ v1.0.1 (18-Jul-2014) ║
- ║ ● Bug Fix: Issue with animated screen if Animated Title turned off ║
- ╟──────────────────────────────────────────────────────────────────────────────╢
- ║ v1.0.0 (01-Mar-2014) ║
- ║ ● Update: Animated Title extracted as a separate add-on ║
- ╟──────────────────────────────────────────────────────────────────────────────╢
- ║ V0.4.5 (18-Nov-2013) ║
- ║ ● Bug Fix: -X/+X coordination animation problems on Animated Title Screen ║
- ╟──────────────────────────────────────────────────────────────────────────────╢
- ║ v0.4.4 (15-Aug-2013) ║
- ║ ● Add: Version display on Title screen ║
- ╟──────────────────────────────────────────────────────────────────────────────╢
- ║ v0.3.4 (10-Apr-2013) ║
- ║ ● Tweak: Moved Title/Game Over folders to Pictures for easier importation ║
- ║ ● Tweak: Disable random title if Animated Title is enabled ║
- ╟──────────────────────────────────────────────────────────────────────────────╢
- ║ v0.3.2 (04-Mar-2013) ║
- ║ ● Add: Title & Author Logo speeds ║
- ║ ● Bug Fix: Several inconcruities in Animation Title script ║
- ╟──────────────────────────────────────────────────────────────────────────────╢
- ║ v0.2.1 (03-Mar-2013) ║
- ║ ● Add: Author Logo to Animated Title script ║
- ╟──────────────────────────────────────────────────────────────────────────────╢
- ║ v0.1.1 (18-Dec-2013) ║
- ║ ● Tweak: Animated Title on/off for other animated title scripts ║
- ║ ● Add: Full Animated Title script ║
- ║ ║
- ╚══════════════════════════════════════════════════════════════════════════════╝
- =end
- $imported = {} if $imported == nil; $imported["CW-QESATA"] = true
- #===============================================================================
- # ** Q-Engine Animated Title Add-On Settings **
- #===============================================================================
- module QESATA_SETTINGS
- #=============================================================================
- # * ANIMATED TITLE OPTIONS *
- # These options are to change the settings for the Animated
- # Title add-on.
- #----------------------------------------------------------------------------
- TOGGLE_ATA_ADDON = true # Enable/disable QES Animated Title Add-On
- #----------------------------------------------------------------------------
- # * Animated Title Screen
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- ANIMATED_TITLE = true # Toggle animated title screen on/off
- # Images for title animations. Place in "Graphics/Pictures/Titles/".
- LAYER_IMAGES_TTL = [
- "Q-Engine", # Logo or game title
- "Author", # Author logo
- "TitleMain", # Primary title background
- "TitleMain", # First background layer for animation
- "TitleMain", # Second background layer for animation
- "TitleMain" # Third background layer for animation
- ]
- # Main Title/Logo
- LOGO_START_COORDS = [105, -100] # Logo starting coordinates
- LOGO_END_COORDS = [105, 150] # Logo ending coordinates
- LOGO_SPEED = 2 # Logo movement speed
- # Author
- AUTHOR_START_COORDS = [220, -100] # Author starting coordinates
- AUTHOR_END_COORDS = [220, 199] # Author ending coordinates
- AUTHOR_SPEED = 3 # Author movement speed
- # Layers Effects/Movement
- LAYER_OPACITIES = [120, 100, 110] # Opacities for animation layers
- LAYER_BLENDS = [0, 1, 0] # Animation layers blending modes
- LAYER1_MOVE_COORDS = [2, 0] # XY movement coordinates for first layer
- LAYER2_MOVE_COORDS = [-2, 0] # XY movement coordinates for second layer
- LAYER3_MOVE_COORDS = [0, 0] # XY movement coordinates for third layer
- #=============================================================================
- end
- #==============================================================================
- # ** DO NOT EDIT BEYOND THIS POINT ** #
- #==============================================================================
- class QesAta
- include QESATA_SETTINGS
- module Required
- QESATA_VERSION = "4.0"
- p("Q-Engine Animated Title Add-On - "+
- "It appears that you have an older version of the Q-Engine script, which"+
- " might not be compatible with this version of the Q-Engine Animated Title"+
- " Add-On. If you receive any errors, please upgrade the Q-Engine"+
- " to the latest version from the RPG Maker Times & Companion blogsite:"+
- " http://blog.rpgmakertimes.info.") if $imported["CWQesVX"] && QEngine::QES_VERSION < QESATA_VERSION
- #============================================================================
- # ** REQUIRED MODULES SETTINGS **
- #----------------------------------------------------------------------------
- REQ_MODULES_QESATA = {
- #----------------------------------------------------------------------------
- # Note: The "Universal Configuration Module" (UCSM) is no longer
- # required to run the Q-Engine, as most of the relevant settings
- # have now been integrated into the Q-Engines for better ease of
- # use. The "Global Colors Module" and the "Bitmap Addons" ARE
- # required, so they need to be set to "Yes" or "True" to prevent
- # an error from occurring (the case does not matter).
- #
- # You can add your own required scripts to the list, but make
- # sure you follow the sequence precisely.
- #
- # * "Module Name" - The name of the required script.
- # * "Import Name" - The $import hash (like a unique identifying
- # name) for the script. If set to "false", then the entire
- # script relating to the $import is considered as disabled.
- # When it's set to "true" or contains either a string or digit
- # (such as for a version number), it's considered as enabled.
- # * "Type" - The type of script the requirement is: "M" is for
- # "Module", "A" is for "Add-On" and "S" is for "Script". This
- # will then be displayed in the resulting error message.
- # * "Required" - This determines whether the script is required
- # in order for the game to run properly. Values can be "Yes"
- # or "No" and "True" or "False" (the case doesn't matter). If
- # set to "Yes" or "True", an error message will occur giving
- # details of the missing or uninstalled script type.
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- # Required
- # Module Name Import Name Type Yes/No/True/False
- #---------------------------------------------------------------------------
- 0 => ["Global Colors", "CWColors", "M", "Yes"], # Required
- 1 => ["Q-Engine", "CWQesVX", "S", "Yes"], # Required
- 2 => ["Bitmap Addons", "CWBitmapAddons", "A", "Yes"], # Required
- }
- #--------------------------------------------------------------------------
- # * Check Required Modules
- # Displays the current project version in the top right-hand
- # This routine will check through the requirements (predefined
- # in REQ_MODULES_QESATA) and determine if they are required.
- # Non-required modules will be skipped, but an error message
- # dialog will display each one either not installed or not
- # turned on.
- #--------------------------------------------------------------------------
- module_mssg = " is disabled, missing or not properly implemented."
- body_mssg = " Please ensure that it is enabled or installed correctly."
- req_modules = REQ_MODULES_QESATA
- for i in 0...req_modules.size
- import = $imported[req_modules[i][1]] unless $imported == nil
- case req_modules[i][2]
- when "M"; type = " Module"; when "A"; type = " Add-On"; when "S"; type = " Script"
- end
- unless import || req_modules[i][3].downcase == "no" || req_modules[i][3].downcase == "false"
- p ["QES Error: The required ", req_modules[i][0], type, module_mssg, body_mssg].join
- ok = false; next
- end
- end
- exit if ok == false
- end
- end
- #==============================================================================
- # ** Scene_Title (QES-ATA)
- #------------------------------------------------------------------------------
- # Aliased Methods
- # * create_title_graphic
- # * dispose_command_window
- # * update
- #==============================================================================
- class Scene_Title < Scene_Base
- include QESATA_SETTINGS
- #--------------------------------------------------------------------------
- # * Create Title Graphic |--ALIASED--|
- #--------------------------------------------------------------------------
- alias cwqeata_scnttl_create_title_graphic create_title_graphic
- def create_title_graphic
- cwqeata_scnttl_create_title_graphic
- if TOGGLE_ATA_ADDON && ANIMATED_TITLE
- @sprite.bitmap = Cache.title("") # Disable default
- # Main Background
- @sprite_title = Sprite.new
- @sprite_title.bitmap = Cache.title(LAYER_IMAGES_TTL[2])
- @sprite_title.opacity = 100
- # Logo
- @sprite_logo = Sprite.new
- @sprite_logo.bitmap = Cache.title(LAYER_IMAGES_TTL[0])
- @sprite_logo.x, @sprite_logo.y = LOGO_START_COORDS[0], LOGO_START_COORDS[1]
- #Author
- @sprite_author = Sprite.new
- @sprite_author.bitmap = Cache.title(LAYER_IMAGES_TTL[1])
- @sprite_author.x, @sprite_author.y = AUTHOR_START_COORDS[0], AUTHOR_START_COORDS[1]
- # Layer 1
- @sprite_bg1 = Plane.new
- @sprite_bg1.bitmap = Cache.title(LAYER_IMAGES_TTL[3])
- @sprite_bg1.opacity = LAYER_OPACITIES[0]
- @sprite_bg1.blend_type = LAYER_BLENDS[0]
- # Layer 2
- @sprite_bg2 = Plane.new
- @sprite_bg2.bitmap = Cache.title(LAYER_IMAGES_TTL[4])
- @sprite_bg2.opacity = LAYER_OPACITIES[1]
- @sprite_bg2.blend_type = LAYER_BLENDS[1]
- # Layer 3
- @sprite_bg3 = Plane.new
- @sprite_bg3.bitmap = Cache.title(LAYER_IMAGES_TTL[5])
- @sprite_bg3.opacity = LAYER_OPACITIES[2]
- @sprite_bg3.blend_type = LAYER_BLENDS[2]
- # Priorities
- @sprite_title.z = 4
- @sprite_logo.z = 5
- @sprite_author.z = 5
- @sprite_bg1.z = 1
- @sprite_bg2.z = 2
- @sprite_bg3.z = 3
- end
- end
- #--------------------------------------------------------------------------
- # * Dispose of Command Window |--ALIASED--|
- #--------------------------------------------------------------------------
- alias cwqeata_scnttl_dispose dispose_command_window
- def dispose_command_window
- cwqeata_scnttl_dispose
- if TOGGLE_ATA_ADDON && ANIMATED_TITLE
- @sprite_title.dispose
- @sprite_author.dispose
- @sprite_logo.dispose
- @sprite_bg1.dispose
- @sprite_bg2.dispose
- @sprite_bg3.dispose
- end
- end
- #--------------------------------------------------------------------------
- # * Frame Update |--ALIASED--|
- #--------------------------------------------------------------------------
- alias cwqeata_scnttl_update update
- def update
- cwqeata_scnttl_update
- if TOGGLE_ATA_ADDON && ANIMATED_TITLE
- @sprite_title.opacity += 1 unless @sprite_title.opacity = 160
- if @sprite_logo.x != LOGO_END_COORDS[0]
- @sprite_logo.x += LOGO_SPEED
- end
- if @sprite_author.x != AUTHOR_END_COORDS[0]
- @sprite_author.x += AUTHOR_SPEED
- end
- @sprite_logo.y += LOGO_SPEED unless @sprite_logo.y >= LOGO_END_COORDS[1]
- @sprite_author.y += AUTHOR_SPEED unless @sprite_author.y >= AUTHOR_END_COORDS[1]
- @sprite_bg1.ox += LAYER1_MOVE_COORDS[0]
- @sprite_bg1.oy += LAYER1_MOVE_COORDS[1]
- @sprite_bg2.ox += LAYER2_MOVE_COORDS[0]
- @sprite_bg2.oy += LAYER2_MOVE_COORDS[1]
- @sprite_bg3.ox += LAYER3_MOVE_COORDS[0]
- @sprite_bg3.oy += LAYER3_MOVE_COORDS[1]
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement