Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- =begin
- ╔══════════════════════════════════════════════════════════════════════════════╗
- ║ Q-Engine Script Version 4.0a (QES) ║
- ╟──────────────────────────────────────────────────────────────────────────────╢
- ║ Version : 4.0a ║
- ║ Author : Companion Wulf ║
- ║ Platforms : RMVX ║
- ║ Inception Date : 5 September 2012 ║
- ║ Release Date : 10 March 2015 ║
- ║ Last Update : 6 October 2014 ║
- ║ Demo Version : Public Demo v1.0 ║
- ║ Demo Date : 10 January 2013 ║
- ║ Website : http://rpgmakertimes.info ║
- ║ Blog : http://blog.rpgmakertimes.info ║
- ║ ║
- ║ PUBLIC DEMO V4.0 is pending. ║
- ║ ║
- ╠══════════════════════════════════════════════════════════════════════════════╣
- ║ ◄ 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. ║
- ║ ║
- ╠══════════════════════════════════════════════════════════════════════════════╣
- ║ ◄ INSTALLATION ► ║
- ╟──────────────────────────────────────────────────────────────────────────────╢
- ║ Place between "Materials" and "Main Process". ║
- ║ ║
- ║ NOTE: See "Required Scripts" section for additional install- ║
- ║ ation notes. ║
- ║ ║
- ╠══════════════════════════════════════════════════════════════════════════════╣
- ║ ◄ KNOWN COMPATABILITY ISSUES ► ║
- ╟──────────────────────────────────────────────────────────────────────────────╢
- ║ There may be compatability issues with other scripts, but I ║
- ║ haven't been able to test them. ║
- ║ ║
- ╠══════════════════════════════════════════════════════════════════════════════╣
- ║ ◄ 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 Universal Configuration Settings Module (UCSM) is no ║
- ║ longer required to run the Q-Engine or its add-ons, as most of ║
- ║ the relevant settings have been integrated into the script to ║
- ║ make it much easier to update. ║
- ║ ║
- ╠══════════════════════════════════════════════════════════════════════════════╣
- ║ ◄ 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 VERSION HISTORY * ║
- ╟──────────────────────────────────────────────────────────────────────────────╢
- ║ The version history tracking will be changing to the following ║
- ║ format: ║
- ║ ║
- ║ Release.Updates.Developmental.Manual ║
- ║ ║
- ║ 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. ║
- ║ ║
- ║ Manual indicates major updates to the Q-Engine manual. ║
- ║ ║
- ║ Note: Updates for Q-Engine add-ons will no longer be shown in ║
- ║ the Q-Engine Version History, but will be in the corresponding ║
- ║ add-on scripts instead. ║
- ║ ║
- ╠══════════════════════════════════════════════════════════════════════════════╣
- ║ * Updates Version History * ║
- ╟──────────────────────────────────────────────────────────────────────────────╢
- ║ VERSION 4.0+ - Future Updates ║
- ║ * Additional "other" option in the main Title screen menu ║
- ║ * Missing File/Directory test/rescue routine ║
- ║ * Animated Game Over Screen ║
- ║ * HP/MP percentage heal on level up (+fix current) ║
- ║ * Enemy HP/MP/States above enemies ║
- ║ * Title/Status Menu icons ║
- ║ * Resize Game Over graphics (random) ║
- ║ * Fix Dual Wield Weapon/Weapon and not Weapon/Shield ║
- ║ ║
- ╚══════════════════════════════════════════════════════════════════════════════╝
- # v4.0.0.0a (10-Mar-2015)
- # ● Release: Version 4.0a (Alpha)
- # v4.0.0.0b (08-Oct-2014)
- # ● Release: Version 4.0b (Beta)
- # v3.9.9.0 (06-Oct-2014)
- # ● Tweak: Add confirmation exit message
- # v3.9.8.0 (04-Oct-2014)
- # ● Tweak: Integrate the main UCSM settings into the Q-Engine settings
- # ● Tweak: Required module options to display requirement types
- # v3.9.6.0 (29-Sep-2014)
- # ● Tweak: Rework requirements structure, including version checker
- # ● Add: Comma delimeters for large gold amounts
- # ● Add: Currency symbol alignment
- # ● Update: Restructure Q-Engine in line with updated UCSM and cleaner code
- # v3.8.3.0 (01-Aug-2014)
- # ● Bug Fix: Error with Confirm Exit if ESS not installed
- # ● Bug Fix: "Stack Level Too Deep" error conflict
- # v3.8.1.0 (15-Jul-2014)
- # ● Bug Fix: Incorrect window sizing for Title Window Info [QES]
- # v3.8.0.0 (09-Jul-2014)
- # ● Update: Equip Screen extracted options as separate add-on [QES-EQA]
- # v3.7.0.0 (26-Jun-2014)
- # ● Update: Status Screen extracted as to separate add-on [QES-SSA]
- # v3.6.0.0 (15-Mar 2014)
- # ● Update: Began recoding/cleaning code
- # v3.5.7.0 (10-Mar-2014)
- # ● Tweak: Confirmation statement for Confirm Exit window [QES]
- # ● Tweak: Disable title in Info Window if set to nil
- # v3.5.5.0 (01-Mar-2014)
- # ● Update: Animated Title extracted as a separate add-on [QES-ATA]
- # v3.4.5.0 (28-Feb-2014)
- # ● Update: Began extracting main features to separate add-ons
- # v3.3.5.0 (23-Jan-2014)
- # ● Update: Moved Map Location to Map Add-On [QES-MAP]
- # ● Bug Fix: "Stack Level Too Deep" error when preloading add-ons
- # v3.2.4.0 (18-Jan-2014)
- # ● Add: Class icons [QES-SSA]
- # ● Bug Fix: Calls to Q-Engine class/methods not working properly
- # v3.1.3.0 (16-Jan-2014)
- # ● Tweak: Improved required module checker (cross-module compatible)
- # v3.1.2.0 (10-Dec-2013)
- # ● Bug Fix: Health States not showing up on all characters [QES-SSA]
- # v3.1.1.0 (29-Nov-2013)
- # ● Bug Fix: Version Window reduced text size
- # ● Add: Exit Confirm (for Title/GameOver/Status menus)
- # v3.0.0.0 (25-Nov-2013)
- # ● Release: Version 3.0
- # v2.8.12.0 (18-Nov-2013)
- # ● Tweak: Prevent dead characters from levelling up
- # ● Bug Fix: -X/+X coordination animation problems on Animated Title Screen [QES-ATA]
- # ● Tweak: Prevent full HP/MP restore dead characters on level up
- # ● Bug Fix: Remove all states not working properly
- # v2.8.8.0 (07-Nov-2013)
- # ● Update: Extract Battle settings to Q-Engine CBS Add-On [QES-CMS]
- # v2.7.8.0 (05-Nov-2013)
- # ● Add: Health States [QE-SSA]
- # ● Tweak: Corrected Game End menu return code
- # ● Tweak: Added menu select SEs to Game Over memory [QES-GOA]
- # v2.6.6.0 (22-Aug-2013)
- # ● Tweak: Restructure battle/start end image [QES-CMS]
- # ● Tweak: Battle start/end image overlay transparency [QES-CMS]
- # ● Add: Battle End Image [QES-CMS]
- # ● Tweak: Prevent pretitles + full names in battle scene [QES-CMS]
- # v2.5.4.0 (15-Aug-2013)
- # ● Bug Fix: Menu BG not appearing properly on Main Menu fixed
- # ● Add: Version display on Title screen
- # ● Bug Fix: Turn Counter bug [QES-CBS]
- # ● Bug Fix: Required Modules checker
- # v2.4.1.0 (14-Aug-2013)
- # ● Update: Icons Configuration merged into Universal Configuration module
- # ● Add: Universal Configuration module
- # ● Add: Required Modules/Directories checker
- # v2.2.0.0 (13-Aug-2013)
- # ● Update: Restructure Configuration settings
- # ● Update: Rewrote Q-Engine structure for compatibility with v3.0 engine
- # v2.0.0.0 (25-Jun-2013)
- # ● Release: Public v2.0 (not properly released)
- # v1.23.37.3 (10-Jun-2013)
- # ● Bug Fix: Window bug in Game Over Menu layout [QES-GOA]
- # v1.23.36.3 (11-May-2013)
- # ● Add: Windowskin Changer scriptlet [not used]
- # v1.22.36.3 (10-May-2013)
- # ● Bug Fix: "Stack level too deep" error in combat when Extra Stats active [ESS]
- # v1.22.35.3 (05-May-2013)
- # ● Remove: Alternative Layout in favor of individual sections toggles [QES-SSA]
- # v1.22.34.3 (30-Apr-2013)
- # ● Bug Fix: Exp display bug (Alt Exp) [QES-SSA]
- # ● Update: Extra Stats to v3.0 (independent script) [ESS]
- # ● Tweak: Made slightly more cross-compatible
- # v1.21.31.3 (15-Apr-2013)
- # ● Add: Draw Labels method to Bitmap (draw_label) [BMA]
- # v1.20.31.3 (14-Apr-2013)
- # ● Tweak: Rewrote Alternative Layout to enable/disable individual sections [QE-SSA]
- # ● Tweak: Reorganised Alternative Layout for better ease of use [QE-SSA]
- # v1.20.29.3 (12-Apr-2013)
- # ● Tweak: Cleaned code for Alternative Experience/Status layouts [QE-SSA]
- # v1.20.28.3 (10-Apr-2013)
- # ● Tweak: Moved Title/Game Over folders to Pictures for easier importation [QES-ATA/QES-GOA]
- # ● Tweak: Disable random game over if Animated Game Over is enabled [QES-GOA]
- # ● Tweak: Disable random title if Animated Title is enabled [QES-ATA]
- # v1.20.25.3 (18-Mar-2013)
- # ● Fix: Turn Counter not updating properly [QES-CBS]
- # ● Add: Encounter Ratio to Extra Stats [ESS]
- # v1.19.24.3 (17-Mar-2013)
- # ● Began work on Q-Engine Message System (QEMS) [Not fully integrated yet]
- # v1.18.24.3 (15-Mar-2013)
- # ● Add: Last names option [QES-SSA]
- # ● Tweak: Improved Actor Battle Faces [QES-CBS]
- # v1.17.23.3 (12-Mar-2013)
- # ● Add: Actor Battle Faces [QES-CBS]
- # ● Tweak: Added opacity setting to draw_face method [QES]
- # v1.16.22.3 (11-Mar-2013)
- # ● Fix: Some layout anomalies on the Status screen [QES-SSA]
- # ● Add: Class based rank titles [QES-SSA]
- # v1.15.21.3 (10-Mar-2013)
- # ● Fix: Gold gained added to total from selling items in shops [ESS]
- # v1.15.20.3 (09-Mar-2013)
- # ● Add: Additional character options derived from items/weapons/armour [QES-SSA]
- # ● Add: Map Location window on Scene Menu
- # ● Tweak: Purified Actor Options to fit with Alternative Display layouts [QES-SSA]
- # ● Tweak: Automatic parameter columns if Actor Options on [QES-SSA]
- # ● Bug Fix: Battle Counter not updating [QES-CBS]
- # ● Manual: Fully updated manual to reflect changes in RC 2.0
- # v1.13.17.2 (08-Mar-2013)
- # ● Fix: Turn Counter scriptlet incongruity [QES-CBS]
- # ● Fix: "Stack level too deep" error for Critical Hit Flash Screen scriptlet [QES-CBS]
- # ● Add: Section titles for Alternative Layout [QES-SSA]
- # ● Tweak: Revamped Alternative Layout sections code [QES-SSA]
- # v1.12.14.2 (07-Mar-2013)
- # ● Add: Default font and font size settings for titles [USCM]
- # v1.11.14.2 (06-Mar-2013)
- # ● Add: Remove States on Level Up [QES-CHA]
- # ● Tweak: Separated EXP layouts from Alternative Layout for better compatibility [QES-SSA]
- # ● Tweak: Parameter icons to the Equipment screen [QES-EQA]
- # ● Bug Fix: Game Over Menu disable "Continue" option if no saved games [QES-GOA]
- # v1.10.11.2 (05-Mar-2013)
- # ● Add: New Bitmap method - reset_fonts [BMA]
- # ● Rework code to clean it up and for better compatibility [QES]
- # ● Manual: Reorganise to reflect forthcoming changes
- # v1.8.11.1 (04-Mar-2013)
- # ● Add: Title & Author Logo speeds [QES-ATA]
- # ● Bug Fix: Global font settings [QES]
- # ● Bug Fix: Several inconcruities in Animation Title script [QES-ATA]
- # v1.7.9.1 (03-Mar-2013)
- # ● Add: Author Logo to Animated Title script [QES-ATA]
- # ● Started script reorganisation/rewrite [QES]
- # v1.5.9.1 (01-Feb-2013)
- # ● Add: Actor Options scriptlet [QES-SSA]
- # ● Remove: Parameter Columns to remove conflicts and for better compatibility [QE-SSA]
- # v1.4.8.1 (28-Jan-2013)
- # ● Add: Pretitles based on actor genders [QES-SSA]
- # ● Tweak: Player coordinates to the Extra Stats window [ESS]
- # v1.3.7.1 (27-Jan-2013)
- # ● Tweak: Tweak to disable "Name:" if alternative layout is selected [QES-SSA]
- # ● Tweak: Recover HP/MP after level up tweak [QES-CHA]
- # ● Add: Keypress function to display Extra Stats on the map [ESS]
- # ● Bug Fix: Extra Stats - total gold counter [ESS]
- # ● Bug Fix: Extra Stats - total exp counter [ESS]
- # v1.2.3.1 (25-Jan-2013)
- # ● Manual: Updated manual (fixing additional inconsistencies)
- # ● Add: Character Profile information [QES-SSA]
- # ● Bug Fix: Alternative Status Screen States [QES-SSA]
- # ● Tweak: Purified Extra Parameters code [QES-SSA]
- # v1.1.1.0 (13-Jan-2013)
- # ● Began alternative Status Screen layout [QES-SSA]
- # ● Tweak: Experience Layout for better integration [QES-SSA]
- # v1.0.1.0 (12-Jan-2013)
- # ● Bug Fix: Menu Background incongruity [QES]
- # v1.0.0.0 (10-Jan-2013)
- # ● Release: Public Demo v1.0
- # v0.20.25.4 (18-Dec-2012)
- # ● Tweak: Animated Title on/off for other animated title scripts [QES-ATA]
- # ● Add: Full Animated Title script [QES-ATA]
- # ● Tweak: Title menu window opacities option tweak [QES]
- # v0.19.23.4 (15-Dec-2012)
- # ● Manual: Updated for website compatability
- # ● Bug Fix: Fixed several incongruous bugs [QES]
- # v0.19.22.3 (08-Dec-2012)
- # ● Manual: Completely up-to-date
- # v0.19.22.2 (01-Dec-2012)
- # ● Tweak: Game Over Menu Music option tweak [QES-GOA]
- # ● Bug Fix: A few major bugs in the Game Over menu [QES-GOA]
- # v0.19.19.2 (15-Nov-2012)
- # ● Add: Game Over menu [QES-GOA]
- # v0.18.19.2 (31-Oct-2012)
- # ● Add: "No Equip" text for unequipped items (Status screen) [QES-SSA]
- # v0.17.19.2 (30-Oct-2012)
- # ● Add: Alternative experience layout style [QES-SSA]
- # ● Bug Fix: Fixed a bug with Experience Maxed Text tweak [QES-SSA]
- # ● Bug Fix: Fixed display bug with Status screen alpha boxes [disabled]
- # v0.16.18.2 (29-Oct-2012)
- # ● Add: Equipment Extras (Status screen) [QES-SSA]
- # v0.16.18.2 (26-Oct-2012)
- # ● Tweak: Menu Backgrounds [QES]
- # ● Add: Battle Turn Count [QES-CBS]
- # ● Manual: up to current version completed
- # v0.15.7.1 (20-Oct-2012)
- # ● Add: Parameter Columns option [disabled]
- # v0.14.7.1 (19-Oct-2012)
- # ● Add: New Bitmap methods - draw_font_shadow & draw_font_outline [not used]
- # v0.13.7.1 (14-Oct-2012)
- # ● Rewrite: Script structure to tie in with the rewrite of the manual
- # ● Bug Fix: Text display scripts [QES]
- # ● Tweak: Windowskin opacities tweak [QES]
- # v0.12.5.1 (10-Oct-2012)
- # ● Add: Menu Info Window, with settings for basic/advanced options [QES]
- # ● Add: Alpha box for Status screen (parameters/options) [disabled]
- # v0.10.5.1 (08-Oct-2012)
- # ● Add: Parameter Equip Increase/Decrease Icons tweak [QES-EQA]
- # v0.9.5.1 (07-Oct-2012)
- # ● Add: New Bitmap method - draw_rect_alpha [disabled]
- # v0.8.5.1 (05-Oct-2012)
- # ● Tweak: Experience Maxed Text tweak [QES-SSA]
- # ● Add: New Bitmap method - draw_title [BMA]
- # ● Manual: Began writing manual
- # v0.8.4.0 (04-Oct-2012)
- # ● Add: Random Game Over background [QES]
- # ● Add: Random Title background [QES]
- # ● Add: Critical Hit Flash Screen scriptlet [QES-CBS]
- # ● Add: Battle Announcer Image scriptlet [QES-CBS]
- # ● Tweak: Add Gold Icon tweak [QES]
- # v0.4.3.0 (24-Sep-2012)
- # ● Add: Extra hidden parameters to Status screen [QES-SSA]
- # ● Tweak: Parameter Icons tweak [QES-SSA]
- # v0.3.2.0 (14-Sep-2012)
- # ● Add: New Bitmap method - draw_horz_line [BMA]
- # v0.3.1.0 (10-Sep-2012)
- # ● Add: Color Module (containing 127 named colours) [GCM]
- # v0.2.1.0 (6-Sep-2012)
- # ● Add: Enhanced Extra Stats Window script [ESS]
- # ● Add: Default configurations [UCSM]
- # v0.0.1.0 (5-Sep-2012)
- # ● Began (re)working on script [QES]
- #
- #------------------------------------------------------------------------------
- # Abbreviations
- #------------------------------------------------------------------------------
- # BMA - Bitmap Add-On
- # ESS - Extra Stats Script
- # GCM - Global Colors Module
- # QES - Q-Engine
- # QES-ATA - Q-Engine: Animated Title Add-On
- # QES-CBS - Q-Engine: Combat Add-On
- # QES-CHA - Q-Engine: Character Add-On
- # QES-GOA - Q-Engine: Game Over Add-On
- # QES-SSA - Q-Engine: Status Add-On
- #==============================================================================
- =end
- $imported = {} if $imported == nil; $imported["CWQesVX"] = true
- #===============================================================================
- # ** Q-Engine Settings **
- #===============================================================================
- module QES_SETTINGS
- include CW_GLOBAL_COLORS
- #============================================================================
- # ** Q-ENGINE SCRIPT CONFIGURATION **
- #----------------------------------------------------------------------------
- # All of the options below are configurable.
- #
- # For a more comprehensive guide on how to use certain sections,
- # please refer to the "Q-Engine Guide" section. There shouldn't
- # be any need to modify anything else, as they're all plug-and-
- # play. Most of the settings are set to "true" by default.
- #
- # "true" toggles the setting on; "false" toggles it off.
- #
- # All colours are predefined in the required Global Colors
- # Module.
- #============================================================================
- # ** MAIN SYSTEM SETTINGS **
- #----------------------------------------------------------------------------
- # These options (formerly part of the Universal Configuration
- # Settings Module) define the default settings, such as fonts
- # and windowskins.
- #
- #----------------------------------------------------------------------------
- # ** Font Settings **
- #----------------------------------------------------------------------------
- # These options globally define the default fonts and settings.
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- DEFAULT_FONT = "Trebuchet MS" # Default font
- DEFAULT_SIZE = 18 # Default font size
- DEFAULT_BOLD = false # Default font bold on/off
- DEFAULT_ITALIC = false # Default font italic on/off
- DEFAULT_FONT_COLOR = WHITE # Default text colour
- #----------------------------------------------------------------------------
- # ** Title Settings **
- #----------------------------------------------------------------------------
- # These settings are for a new method that can be used to draw
- # titles onto bitmaps, integrated into the required Bitmap Add-
- # Ons Module for convenience. (See the Additional Notes in the
- # BMA usage instructions.)
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- DEFAULT_TITLE_FONT = "Arial" # Default font for titles
- DEFAULT_TITLE_SIZE = 20 # Default font size for titles on/off
- DEFAULT_TITLE_BOLD = true # Default font bold for titles on/off
- DEFAULT_TITLE_ITALIC = false # Default font italic for titles on/off
- DEFAULT_TITLE_COLOR = YELLOW # Default title colour
- TITLE_UNDERLINE = true # Include line under titles on/off
- UNDERLINE_COLOR = LightBlue # Default colour for divider underlines
- #----------------------------------------------------------------------------
- # ** Windowskins **
- #----------------------------------------------------------------------------
- # These settings affect the default windowskin.
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- DEFAULT_SKIN = "Window" # Default sytem windowskin
- DEFAULT_SKIN_OPACITY = 200 # Default windowskin opacity
- DEFAULT_SKIN_BACKOPACITY = 255 # Default windowskin background opacity
- DEFAULT_SKIN_CONTENTOPACITY = 255 # Default windowskin foreground opacity
- #----------------------------------------------------------------------------
- # ** Bitmap Settings **
- #----------------------------------------------------------------------------
- # These settings are intended for use with the required Bitmap
- # Add-Ons module to define certain settings in the Q-Engine.
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- LINE_COLOR = LightBlue # Colour for lines
- CIRCLE_LINE_COLOR = WHITE # Color for circle lines
- #============================================================================
- # ** TITLE SCREEN OPTIONS **
- #----------------------------------------------------------------------------
- # These options are mainly for the Title screen, including menu
- # options and screen animation.
- #----------------------------------------------------------------------------
- # * Version Number
- # Displays the current project version in the top right-hand
- # corner of the Title screen.
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- SHOW_VERSION = true # Display version number on Title screen
- VERSION_ID = "4.0.0.0a" # Current version number of the game
- #----------------------------------------------------------------------------
- # * Random Title Backgrounds *
- #----------------------------------------------------------------------------
- # These display random backgrounds on the Title screen in place
- # of the default each time the Title screen is loaded.
- #
- # If the Animated Title Add-On is installed, this is turned off
- # in favour of the settings in the QES-ATA instead.
- #
- # Note: Graphics for the random Title backgrounds must be placed
- # in the "Graphics/Pictures/Titles" folder.
- #
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- RANDOM_TITLE_BG = true # Toggle random Title background on/off
- TITLES = [ # In directory Graphics/Pictures/Titles
- "Title1",
- "Title2",
- "Title3",
- # Add more here
- ]
- #----------------------------------------------------------------------------
- # * Title Info Menu *
- #----------------------------------------------------------------------------
- # These settings add a separate window with a description for
- # each of the commands. Depending on the type selected a title
- # is also displayed.
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- SHOW_TITLE_MENU_INFO = true # Show menu info window on Title Menu
- # Change Title menu type
- TITLE_MENU_INFO_TYPE = 1 # Normal/enhanced info window (0 or 1)
- # Menu details for command/info windows
- # Title Description
- INFO_NEW_GAME = ["New Game", "Initiate a new game."]
- INFO_CONTINUE = ["Continue Game", "Reload a previously saved game."]
- INFO_END_GAME = ["End Game", "Quit the game."]
- # Set menu/info window opacities if SHOW_TITLE_MENU_INFO is "true"
- TITLE_WINDOW_OPACITIES = [0, 0]
- #============================================================================
- # ** GAME OVER OPTIONS **
- #----------------------------------------------------------------------------
- # These options affect the Game Over Screen.
- #----------------------------------------------------------------------------
- # * Random Game Over Backgrounds *
- #----------------------------------------------------------------------------
- # These display random backgrounds on the Game Over screen in
- # place of the default each time the Title screen is loaded.
- #
- # If the Animated Game Over Add-On is installed, this is turned
- # off in favour of the settings in the QES-GOA instead.
- #
- # Note: Graphics for the random Game Over backgrounds must be
- # placed in the "Graphics/Pictures/Gameovers" folder.
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- RANDOM_GAMEOVER_BG = true # Toggle random Game Over background on/off
- GAMEOVERS = [ # In directory Graphics/Pictures/GameOvers
- "GameOver06",
- "GameOver35",
- "GameOver43",
- "GameOver46",
- # Add more here
- ]
- #============================================================================
- # * MENU OPTIONS *
- # The Menu Options add features and functionality to some of the menus.
- #----------------------------------------------------------------------------
- CONFIRM_EXIT = true # Toggle exit confirmation on/off
- CONFIRM_TEXT = ["Yes", "No"] # Exit confirmation options
- #============================================================================
- # ** GOLD WINDOW OPTIONS **
- # The Gold Window Options tweak the gold display window.
- #----------------------------------------------------------------------------
- SHOW_GOLD_ICON = true # Show gold icon in window
- ALIGN_CURRENCY = "Left" # Align currency symbole left or right
- GOLD_COMMAS = true # Add commas to larger numbers in gold
- #----------------------------------------------------------------------------
- # * Gold Icon *
- # Defines the icon representing gold/money in the Gold Window.
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- GOLD_ICON = 147
- #============================================================================
- end
- #==============================================================================
- # ** DO NOT EDIT BEYOND THIS POINT ** #
- #==============================================================================
- class QEngine
- QES_VERSION = "4.0"
- #--------------------------------------------------------------------------
- # * Public Instance Variables
- #--------------------------------------------------------------------------
- attr_accessor :from_menu
- #--------------------------------------------------------------------------
- # * Initialization
- #--------------------------------------------------------------------------
- def initialize
- @from_menu = 0
- end
- module Required
- #============================================================================
- # ** REQUIRED MODULES SETTINGS **
- #----------------------------------------------------------------------------
- REQ_MODULES_QES = {
- #----------------------------------------------------------------------------
- # 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", "No"], # 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_QES) 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_QES
- 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
- #==============================================================================
- # ** Cache
- # Added: title, gameover
- #==============================================================================
- module Cache
- #--------------------------------------------------------------------------
- # * Get Title Graphics
- # filename : Filename
- #--------------------------------------------------------------------------
- def self.title(filename);
- load_bitmap("Graphics/Pictures/Titles/", filename)
- end
- #--------------------------------------------------------------------------
- # * Get Game Over Graphics
- # filename : Filename
- #--------------------------------------------------------------------------
- def self.gameover(filename)
- load_bitmap("Graphics/Pictures/GameOvers/", filename)
- end
- end
- #==============================================================================
- # ** Scene_Title
- #------------------------------------------------------------------------------
- # Aliased Methods
- # * create_game_objects
- # * create_title_graphic
- # * create_command_window
- # * update
- # * close_command_window
- # * dispose_command_window
- # * command_shutdown
- # Added Methods
- # * update_command_info
- #==============================================================================
- class Scene_Title < Scene_Base
- include QES_SETTINGS#, CW_UNIVERSAL_CONFIG
- #--------------------------------------------------------------------------
- # * Create Game Objects |--ALIASED--|
- #--------------------------------------------------------------------------
- alias :cwqe_create_objects :create_game_objects
- def create_game_objects
- cwqe_create_objects
- $qes = QEngine.new
- $qesata = QesAta.new if $imported["CW-QESATA"] && QESATA_SETTINGS::TOGGLE_ATA_ADDON
- $qeseqa = QesEqa.new if $imported["CW-QESEQA"] && QESEQA_SETTINGS::TOGGLE_EQA_ADDON
- $qesgoa = QesGoa.new if $imported["CW-QESGOA"] && QESGOA_SETTINGS::TOGGLE_GOA_ADDON
- $qesssa = QesSsa.new if $imported["CW-QESSSA"] && QESSSA_SETTINGS::TOGGLE_SSA_ADDON
- $qescbs = QesCbs.new if $imported["CW-QESCBS"] && QESCBS_SETTINGS::TOGGLE_CBS_ADDON
- $qescha = QesCha.new if $imported["CW-QESCHA"] && QESCHA_SETTINGS::TOGGLE_CHA_ADDON
- #~ $qemap = QEMAP.new if TOGGLE_MAP_ADDON && $imported["CWQ-EngineMap"]
- @version_window = Window_Version.new if SHOW_VERSION
- #
- end
- #--------------------------------------------------------------------------
- # * Create Title Graphic |--ALIASED--|
- #--------------------------------------------------------------------------
- alias :cwqe_scnttl_create_title_graphic :create_title_graphic
- def create_title_graphic
- cwqe_scnttl_create_title_graphic
- if RANDOM_TITLE_BG and not ($imported["CWQ-EngineATA"] && TOGGLE_ANIMATED_TITLE_ADDON)
- unless $imported["CWQ-EngineATA"] && TOGGLE_ANIMATED_TITLE_ADDON
- @sprite.bitmap = Cache.title(TITLES[rand(TITLES.size)].to_s)
- end
- end
- end
- #--------------------------------------------------------------------------
- # * Create Command Window |--ALIASED--|
- #--------------------------------------------------------------------------
- alias :cwqe_scnttl_create_commands :create_command_window
- def create_command_window
- cwqe_scnttl_create_commands
- if SHOW_TITLE_MENU_INFO
- case TITLE_MENU_INFO_TYPE
- when 0
- @command_window_x = (544 - @command_window.width) / 2
- @command_window_y = 238
- @info_window_x, @info_window_y = 0, 345
- when 1
- @command_window_x = (195 - @command_window.width) / 2
- @command_window_y = 288
- @info_window_x, @info_window_y = 185, 288
- end
- @command_window.x, @command_window.y = @command_window_x, @command_window_y
- @info_window = Window_Info.new(@info_window_x, @info_window_y)
- @command_window.opacity = TITLE_WINDOW_OPACITIES[0]
- @info_window.opacity = TITLE_WINDOW_OPACITIES[1]
- update_command_info
- end
- end
- #--------------------------------------------------------------------------
- # * Frame Update |--ALIASED--|
- #--------------------------------------------------------------------------
- alias :cwqe_scnttl_update :update
- def update
- cwqe_scnttl_update
- update_command_info if SHOW_TITLE_MENU_INFO
- end
- #--------------------------------------------------------------------------
- # * Update Command Window Info |--ADDED--|
- #--------------------------------------------------------------------------
- def update_command_info
- if SHOW_TITLE_MENU_INFO
- case @command_window.index
- when 0; title, text = INFO_NEW_GAME[0], INFO_NEW_GAME[1]
- when 1; title, text = INFO_CONTINUE[0], INFO_CONTINUE[1]
- when 2; title, text = INFO_END_GAME[0], INFO_END_GAME[1]
- when 3; title, text = INFO_ABOUT[0], INFO_ABOUT[1]
- end
- @info_window.write_text(0, 0, title, text, 1)
- end
- end
- #--------------------------------------------------------------------------
- # * Close Command Window |--ALIASED--|
- #--------------------------------------------------------------------------
- alias :cwqe_scnttl_close_command_window :close_command_window
- def close_command_window
- @info_window.visible = false if SHOW_TITLE_MENU_INFO
- cwqe_scnttl_close_command_window
- end
- #--------------------------------------------------------------------------
- # * Dispose of Command Window |--ALIASED--|
- #--------------------------------------------------------------------------
- alias :cwqe_scnttl_dispose :dispose_command_window
- def dispose_command_window
- cwqe_scnttl_dispose
- @info_window.dispose if SHOW_TITLE_MENU_INFO
- @version_window.dispose if SHOW_VERSION
- end
- #--------------------------------------------------------------------------
- # * Command: Shutdown |--ALIASED--|
- #--------------------------------------------------------------------------
- alias :cwqe_scnttl_command_shutdown :command_shutdown
- def command_shutdown
- if CONFIRM_EXIT
- $qes.from_menu = 1; $scene = Scene_ConfirmExit.new
- else cwqe_scnttl_command_shutdown
- end
- end
- end
- #==============================================================================
- # ** Scene_End
- #------------------------------------------------------------------------------
- # Aliased Method
- # * command_shutdown
- # Overwritten Method
- # * return_scene
- #==============================================================================
- class Scene_End < Scene_Base
- include QES_SETTINGS
- #--------------------------------------------------------------------------
- # * Command: [Shutdown] |--ALIASED--|
- #--------------------------------------------------------------------------
- alias :cwqes_scnend_command_shutdown :command_shutdown
- def command_shutdown
- if CONFIRM_EXIT
- $qes.from_menu = 3; $scene = Scene_ConfirmExit.new
- else cwqes_scnend_command_shutdown
- end
- end
- #--------------------------------------------------------------------------
- # * Return to Original Screen |--OVERWRITTEN--|
- #--------------------------------------------------------------------------
- def return_scene
- $imported["CWExtraStatsVX-3.1"] && ESS_SETTINGS::EXTRA_STATS ? return_code = 6 : return_code = 5
- $scene = Scene_Menu.new(return_code)
- end
- end
- #==============================================================================
- # ** Scene_Gameover
- #------------------------------------------------------------------------------
- # Aliased Methods
- # * create_gameover_graphic
- # Added Methods
- #
- # Overwritten Methods
- #
- #==============================================================================
- class Scene_Gameover < Scene_Base
- include QES_SETTINGS#, CW_UNIVERSAL_CONFIG
- #--------------------------------------------------------------------------
- # * Create Title Graphic |--ALIASED--|
- #--------------------------------------------------------------------------
- alias :cwqesgoa_scngmo_create_gameover_graphic :create_gameover_graphic
- def create_gameover_graphic
- cwqesgoa_scngmo_create_gameover_graphic
- if RANDOM_GAMEOVER_BG and not ($imported["CW-QESGOA"] && TOGGLE_GOA_ADDON)
- @sprite.bitmap = Cache.gameover(GAMEOVERS[rand(GAMEOVERS.size)].to_s) unless ANIMATED_GAME_OVER
- end
- end
- end
- #==============================================================================
- # ** Scene_ConfirmExit
- #------------------------------------------------------------------------------
- # This adds a Yes/No confirmation to exit the game. It returns to the previous
- # screen if cancelled.
- #------------------------------------------------------------------------------
- class Scene_ConfirmExit < Scene_Base
- include QES_SETTINGS
- #--------------------------------------------------------------------------
- # * Start
- #--------------------------------------------------------------------------
- def start
- super
- create_menu_background
- @exit_message = Window_Help.new
- @exit_message.x = (544 - @exit_message.width) / 2
- @exit_message.y = (416 - @exit_message.height) / 2 - 60
- @exit_window = Window_Command.new(172, [CONFIRM_TEXT[0], CONFIRM_TEXT[1]])
- @exit_window.x = (544 - @exit_window.width) / 2
- @exit_window.y = (416 - @exit_window.height) / 2
- end
- #--------------------------------------------------------------------------
- # * Terminate
- #--------------------------------------------------------------------------
- def terminate
- dispose_menu_background
- @exit_message.dispose
- @exit_window.dispose
- end
- #--------------------------------------------------------------------------
- # * Update
- #--------------------------------------------------------------------------
- def update
- super
- @exit_message.set_text("Really quit?", 1)
- @exit_window.update
- begin_confirmation if @exit_window.active
- end
- #--------------------------------------------------------------------------
- # * Begin Confirmation
- #--------------------------------------------------------------------------
- def begin_confirmation
- if Input.trigger?(Input::C)
- case @exit_window.index
- when 0
- command_yes
- when 1
- command_no
- end
- elsif Input.trigger?(Input::B)
- command_no
- end
- end
- #--------------------------------------------------------------------------
- # * Command: Yes
- #--------------------------------------------------------------------------
- def command_yes
- Sound.play_decision
- RPG::BGM.fade(800)
- RPG::BGS.fade(800)
- RPG::ME.fade(800)
- $scene = nil
- end
- #--------------------------------------------------------------------------
- # * Command: No
- #--------------------------------------------------------------------------
- def command_no
- Sound.play_decision
- case $qes.from_menu
- when 1; $scene = Scene_Title.new
- when 2; $scene = Scene_Gameover.new
- when 3; $scene = Scene_Menu.new
- end
- end
- end
- # Aliased methods: draw_currency_value
- class Window_Base
- include QES_SETTINGS#, CW_UNIVERSAL_CONFIG
- #--------------------------------------------------------------------------
- # * Draw number with currency unit
- #--------------------------------------------------------------------------
- alias :cwqes_winbs_draw_currency_value :draw_currency_value
- def draw_currency_value(value, x, y, width)
- GOLD_COMMAS ? value = $game_party.gold.to_s.reverse.gsub(/(\d{3})(?=\d)/, '\\1,').reverse :
- value = $game_party.gold.to_s
- case ALIGN_CURRENCY.upcase
- when "LEFT"
- cx = contents.text_size(Vocab::gold).width
- self.contents.font.color = normal_color
- self.contents.draw_text(x, y, width-cx-2, WLH, value, 2)
- self.contents.font.color = system_color
- self.contents.draw_text(x + 28, y, width, WLH, Vocab::gold, 0)
- when "RIGHT"
- cwqes_winbs_draw_currency_value(value, x, y, width)
- end
- end
- end
- #==============================================================================
- # ** Window_Gold
- #------------------------------------------------------------------------------
- # Aliased Method
- # * refresh
- #==============================================================================
- class Window_Gold < Window_Base
- include QES_SETTINGS#, CW_UNIVERSAL_CONFIG
- #--------------------------------------------------------------------------
- # * Refresh |--ALIASED--|
- #--------------------------------------------------------------------------
- alias :cwqe_wingold_refresh :refresh
- def refresh
- cwqe_wingold_refresh
- draw_icon(GOLD_ICON, 0, 0) if SHOW_GOLD_ICON
- end
- end
- #==============================================================================
- # ** Window_Version
- #------------------------------------------------------------------------------
- # This window displays the current version of the game.
- #==============================================================================
- class Window_Version < Window_Base
- include QES_SETTINGS#, CW_UNIVERSAL_CONFIG
- #--------------------------------------------------------------------------
- # * Object Initialization
- # x : window X coordinate
- # y : window Y coordinate
- #--------------------------------------------------------------------------
- def initialize
- super(400, 0, 160, WLH + 32)
- self.opacity = 0
- refresh
- end
- #--------------------------------------------------------------------------
- # * Refresh
- #--------------------------------------------------------------------------
- def refresh
- self.contents.clear
- self.contents.font.size = DEFAULT_SIZE - 1
- self.contents.draw_text(0, 0, 160, WLH, "Version: " + VERSION_ID)
- self.contents.reset_fonts
- end
- end
- #==============================================================================
- # ** Window_Info |--ADDED--|
- #------------------------------------------------------------------------------
- # This window shows skill and item explanations along with actor status.
- #==============================================================================
- class Window_Info < Window_Base
- include QES_SETTINGS#, CW_UNIVERSAL_CONFIG
- #--------------------------------------------------------------------------
- # * Object Initialization
- #--------------------------------------------------------------------------
- def initialize(x, y, width = 544 - x, height = WLH * 2 + 64)
- height = WLH * 4 if TITLE_MENU_INFO_TYPE == 1
- super(x, y, width, height)
- @width = width
- end
- #--------------------------------------------------------------------------
- # * Set Text
- # text : character string displayed in window
- # title : title string displayed in window
- # align : alignment (0..left, 1..center, 2..right)
- #--------------------------------------------------------------------------
- def write_text(x, y, title, text, align = 2)
- if text != @text or title != @title or align != @align
- self.contents.clear
- if SHOW_TITLE_MENU_INFO && TITLE_MENU_INFO_TYPE == 1
- self.contents.draw_title(x, y, title, self.width + 2, WLH, 0)
- y += WLH * 1
- end
- self.contents.font.color = normal_color
- self.contents.draw_text(x, y, @width, WLH, text, align)
- @text = text
- @title = title
- @align = align
- end
- end
- end
Add Comment
Please, Sign In to add comment