CompanionWulf

Q-Engine v4.0a (RMVX)

Mar 9th, 2015
278
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. =begin
  2. ╔══════════════════════════════════════════════════════════════════════════════╗
  3. ║ Q-Engine Script Version 4.0a (QES)                                           ║
  4. ╟──────────────────────────────────────────────────────────────────────────────╢
  5. ║   Version         : 4.0a                                                     ║
  6. ║   Author          : Companion Wulf                                           ║
  7. ║   Platforms       : RMVX                                                     ║
  8. ║   Inception Date  : 5 September 2012                                         ║
  9. ║   Release Date    : 10 March 2015                                            ║
  10. ║   Last Update     : 6 October 2014                                           ║
  11. ║   Demo Version    : Public Demo v1.0                                         ║
  12. ║   Demo Date       : 10 January 2013                                          ║
  13. ║   Website         : http://rpgmakertimes.info                                ║
  14. ║   Blog            : http://blog.rpgmakertimes.info                           ║
  15. ║                                                                              ║
  16. ║   PUBLIC DEMO V4.0 is pending.                                               ║
  17. ║                                                                              ║
  18. ╠══════════════════════════════════════════════════════════════════════════════╣
  19. ║ ◄ DESCRIPTION ►                                                              ║
  20. ╟──────────────────────────────────────────────────────────────────────────────╢
  21. ║     The Q-Engine  incorporates all of the  scripts from the former           ║
  22. ║     Scripts/Add-Ons Compendium,  but with  additional options,  as           ║
  23. ║     well as extra functions and features.                                    ║
  24. ║                                                                              ║
  25. ╠══════════════════════════════════════════════════════════════════════════════╣
  26. ║ ◄ INSTALLATION ►                                                             ║
  27. ╟──────────────────────────────────────────────────────────────────────────────╢
  28. ║     Place between "Materials" and "Main Process".                            ║
  29. ║                                                                              ║
  30. ║     NOTE:  See "Required Scripts" section for  additional install-           ║
  31. ║     ation notes.                                                             ║
  32. ║                                                                              ║
  33. ╠══════════════════════════════════════════════════════════════════════════════╣
  34. ║ ◄ KNOWN COMPATABILITY ISSUES ►                                               ║
  35. ╟──────────────────────────────────────────────────────────────────────────────╢
  36. ║     There may be  compatability issues  with other scripts,  but I           ║
  37. ║     haven't been able to test them.                                          ║
  38. ║                                                                              ║
  39. ╠══════════════════════════════════════════════════════════════════════════════╣
  40. ║ ◄ REQUIRED SCRIPTS ►                                                         ║
  41. ╟──────────────────────────────────────────────────────────────────────────────╢
  42. ║     The following  scripts/modules are required  for the  Q-Engine           ║
  43. ║     script to work properly (in this order):                                 ║
  44. ║                                                                              ║
  45. ║         ● Global Colors Module                                               ║
  46. ║         ● Q-Engine Script                                                    ║
  47. ║         ● Bitmap Add-On                                                      ║
  48. ║                                                                              ║
  49. ║     Optional Q-Engine add-ons should be added after these scripts.           ║
  50. ║                                                                              ║
  51. ║     NOTE: The Universal Configuration Settings Module (UCSM) is no           ║
  52. ║     longer required to run the Q-Engine or its add-ons, as most of           ║
  53. ║     the relevant settings have been integrated  into the script to           ║
  54. ║     make it much easier to update.                                           ║
  55. ║                                                                              ║
  56. ╠══════════════════════════════════════════════════════════════════════════════╣
  57. ║ ◄ MANUAL ►                                                                   ║
  58. ╟──────────────────────────────────────────────────────────────────────────────╢
  59. ║     The complete  Q-Engine manual is now  available in  DOC or PDF           ║
  60. ║     formats,  downloadable from  RPG Maker Times Companion,  along           ║
  61. ║     with a demo showcasing its features.                                     ║
  62. ║                                                                              ║
  63. ║     NOTE:  The current manual  is out of date  and doesn't reflect           ║
  64. ║     the changes in version 4.0. When he manual has been completely           ║
  65. ║     updated,  it will also  include the  settings for  the various           ║
  66. ║     add-ons. This will be fully updated when it's complete.                  ║
  67. ║                                                                              ║
  68. ╠══════════════════════════════════════════════════════════════════════════════╣
  69. ║ ◄ Q-ENGINE VERSION HISTORY *                                                 ║
  70. ╟──────────────────────────────────────────────────────────────────────────────╢
  71. ║     The version history tracking will be changing to the following           ║
  72. ║     format:                                                                  ║
  73. ║                                                                              ║
  74. ║         Release.Updates.Developmental.Manual                                 ║
  75. ║                                                                              ║
  76. ║     Release numbers indicate public release versions.                        ║
  77. ║                                                                              ║
  78. ║     Updates refers to new scripts/scriptlets (both major and minor           ║
  79. ║     updates).                                                                ║
  80. ║                                                                              ║
  81. ║     Developmental updates  are for  tweaks or  bug fixes,  and new           ║
  82. ║     added methods.                                                           ║
  83. ║                                                                              ║
  84. ║     Manual indicates major updates to the Q-Engine manual.                   ║
  85. ║                                                                              ║
  86. ║     Note: Updates for Q-Engine add-ons  will no longer be shown in           ║
  87. ║     the Q-Engine Version History, but will be in the corresponding           ║
  88. ║     add-on scripts instead.                                                  ║
  89. ║                                                                              ║
  90. ╠══════════════════════════════════════════════════════════════════════════════╣
  91. ║ * Updates Version History *                                                  ║
  92. ╟──────────────────────────────────────────────────────────────────────────────╢
  93. ║ VERSION 4.0+ - Future Updates                                                ║
  94. ║   * Additional "other" option in the main Title screen menu                  ║
  95. ║   * Missing File/Directory test/rescue routine                               ║
  96. ║   * Animated Game Over Screen                                                ║
  97. ║   * HP/MP percentage heal on level up (+fix current)                         ║
  98. ║   * Enemy HP/MP/States above enemies                                         ║
  99. ║   * Title/Status Menu icons                                                  ║
  100. ║   * Resize Game Over graphics (random)                                       ║
  101. ║   * Fix Dual Wield Weapon/Weapon and not Weapon/Shield                       ║
  102. ║                                                                              ║
  103. ╚══════════════════════════════════════════════════════════════════════════════╝
  104.  
  105. # v4.0.0.0a (10-Mar-2015)
  106. #   ● Release: Version 4.0a (Alpha)
  107. # v4.0.0.0b (08-Oct-2014)
  108. #   ● Release: Version 4.0b (Beta)
  109. # v3.9.9.0 (06-Oct-2014)
  110. #   ● Tweak: Add confirmation exit message
  111. # v3.9.8.0 (04-Oct-2014)
  112. #   ● Tweak: Integrate the main UCSM settings into the Q-Engine settings
  113. #   ● Tweak: Required module options to display requirement types
  114. # v3.9.6.0 (29-Sep-2014)
  115. #   ● Tweak: Rework requirements structure, including version checker
  116. #   ● Add: Comma delimeters for large gold amounts
  117. #   ● Add: Currency symbol alignment
  118. #   ● Update: Restructure Q-Engine in line with updated UCSM and cleaner code
  119. # v3.8.3.0 (01-Aug-2014)
  120. #   ● Bug Fix: Error with Confirm Exit if ESS not installed
  121. #   ● Bug Fix: "Stack Level Too Deep" error conflict
  122. # v3.8.1.0 (15-Jul-2014)
  123. #   ● Bug Fix: Incorrect window sizing for Title Window Info [QES]
  124. # v3.8.0.0 (09-Jul-2014)
  125. #   ● Update: Equip Screen extracted options as separate add-on [QES-EQA]
  126. # v3.7.0.0 (26-Jun-2014)
  127. #   ● Update: Status Screen extracted as to separate add-on [QES-SSA]
  128. # v3.6.0.0 (15-Mar 2014)
  129. #   ● Update: Began recoding/cleaning code
  130. # v3.5.7.0 (10-Mar-2014)
  131. #   ● Tweak: Confirmation statement for Confirm Exit window [QES]
  132. #   ● Tweak: Disable title in Info Window if set to nil
  133. # v3.5.5.0 (01-Mar-2014)
  134. #   ● Update: Animated Title extracted as a separate add-on [QES-ATA]
  135. # v3.4.5.0 (28-Feb-2014)
  136. #   ● Update: Began extracting main features to separate add-ons
  137. # v3.3.5.0 (23-Jan-2014)
  138. #   ● Update: Moved Map Location to Map Add-On [QES-MAP]
  139. #   ● Bug Fix: "Stack Level Too Deep" error when preloading add-ons
  140. # v3.2.4.0 (18-Jan-2014)
  141. #   ● Add: Class icons [QES-SSA]
  142. #   ● Bug Fix: Calls to Q-Engine class/methods not working properly
  143. # v3.1.3.0 (16-Jan-2014)
  144. #   ● Tweak: Improved required module checker (cross-module compatible)
  145. # v3.1.2.0 (10-Dec-2013)
  146. #   ● Bug Fix: Health States not showing up on all characters [QES-SSA]
  147. # v3.1.1.0 (29-Nov-2013)
  148. #   ● Bug Fix: Version Window reduced text size
  149. #   ● Add: Exit Confirm (for Title/GameOver/Status menus)
  150. # v3.0.0.0 (25-Nov-2013)
  151. #   ● Release: Version 3.0
  152. # v2.8.12.0 (18-Nov-2013)
  153. #   ● Tweak: Prevent dead characters from levelling up
  154. #   ● Bug Fix: -X/+X coordination animation problems on Animated Title Screen [QES-ATA]
  155. #   ● Tweak: Prevent full HP/MP restore dead characters on level up
  156. #   ● Bug Fix: Remove all states not working properly
  157. # v2.8.8.0 (07-Nov-2013)
  158. #   ● Update: Extract Battle settings to Q-Engine CBS Add-On [QES-CMS]
  159. # v2.7.8.0 (05-Nov-2013)
  160. #   ● Add: Health States [QE-SSA]
  161. #   ● Tweak: Corrected Game End menu return code
  162. #   ● Tweak: Added menu select SEs to Game Over memory [QES-GOA]
  163. # v2.6.6.0 (22-Aug-2013)
  164. #   ● Tweak: Restructure battle/start end image [QES-CMS]
  165. #   ● Tweak: Battle start/end image overlay transparency [QES-CMS]
  166. #   ● Add: Battle End Image [QES-CMS]
  167. #   ● Tweak: Prevent pretitles + full names in battle scene [QES-CMS]
  168. # v2.5.4.0 (15-Aug-2013)
  169. #   ● Bug Fix: Menu BG not appearing properly on Main Menu fixed
  170. #   ● Add: Version display on Title screen
  171. #   ● Bug Fix: Turn Counter bug [QES-CBS]
  172. #   ● Bug Fix: Required Modules checker
  173. # v2.4.1.0 (14-Aug-2013)
  174. #   ● Update: Icons Configuration merged into Universal Configuration module
  175. #   ● Add: Universal Configuration module
  176. #   ● Add: Required Modules/Directories checker
  177. # v2.2.0.0 (13-Aug-2013)
  178. #   ● Update: Restructure Configuration settings
  179. #   ● Update: Rewrote Q-Engine structure for compatibility with v3.0 engine
  180. # v2.0.0.0 (25-Jun-2013)
  181. #   ● Release: Public v2.0 (not properly released)
  182. # v1.23.37.3 (10-Jun-2013)
  183. #   ● Bug Fix: Window bug in Game Over Menu layout [QES-GOA]
  184. # v1.23.36.3 (11-May-2013)
  185. #   ● Add: Windowskin Changer scriptlet [not used]
  186. # v1.22.36.3 (10-May-2013)
  187. #   ● Bug Fix: "Stack level too deep" error in combat when Extra Stats active [ESS]
  188. # v1.22.35.3 (05-May-2013)
  189. #   ● Remove: Alternative Layout in favor of individual sections toggles [QES-SSA]
  190. # v1.22.34.3 (30-Apr-2013)
  191. #   ● Bug Fix: Exp display bug (Alt Exp) [QES-SSA]
  192. #   ● Update: Extra Stats to v3.0 (independent script) [ESS]
  193. #   ● Tweak: Made slightly more cross-compatible
  194. # v1.21.31.3 (15-Apr-2013)
  195. #   ● Add: Draw Labels method to Bitmap (draw_label) [BMA]
  196. # v1.20.31.3 (14-Apr-2013)
  197. #   ● Tweak: Rewrote Alternative Layout to enable/disable individual sections [QE-SSA]
  198. #   ● Tweak: Reorganised Alternative Layout for better ease of use [QE-SSA]
  199. # v1.20.29.3 (12-Apr-2013)
  200. #   ● Tweak: Cleaned code for Alternative Experience/Status layouts [QE-SSA]
  201. # v1.20.28.3 (10-Apr-2013)
  202. #   ● Tweak: Moved Title/Game Over folders to Pictures for easier importation  [QES-ATA/QES-GOA]
  203. #   ● Tweak: Disable random game over if Animated Game Over is enabled [QES-GOA]
  204. #   ● Tweak: Disable random title if Animated Title is enabled [QES-ATA]
  205. # v1.20.25.3 (18-Mar-2013)
  206. #   ● Fix: Turn Counter not updating properly [QES-CBS]
  207. #   ● Add: Encounter Ratio to Extra Stats [ESS]
  208. # v1.19.24.3 (17-Mar-2013)
  209. #   ● Began work on Q-Engine Message System (QEMS) [Not fully integrated yet]
  210. # v1.18.24.3 (15-Mar-2013)
  211. #   ● Add: Last names option [QES-SSA]
  212. #   ● Tweak: Improved Actor Battle Faces [QES-CBS]
  213. # v1.17.23.3 (12-Mar-2013)
  214. #   ● Add: Actor Battle Faces [QES-CBS]
  215. #   ● Tweak: Added opacity setting to draw_face method [QES]
  216. # v1.16.22.3 (11-Mar-2013)
  217. #   ● Fix: Some layout anomalies on the Status screen [QES-SSA]
  218. #   ● Add: Class based rank titles [QES-SSA]
  219. # v1.15.21.3 (10-Mar-2013)
  220. #   ● Fix: Gold gained added to total from selling items in shops [ESS]
  221. # v1.15.20.3 (09-Mar-2013)
  222. #   ● Add: Additional character options derived from items/weapons/armour [QES-SSA]
  223. #   ● Add: Map Location window on Scene Menu
  224. #   ● Tweak: Purified Actor Options to fit with Alternative Display layouts [QES-SSA]
  225. #   ● Tweak: Automatic parameter columns if Actor Options on [QES-SSA]
  226. #   ● Bug Fix: Battle Counter not updating [QES-CBS]
  227. #   ● Manual: Fully updated manual to reflect changes in RC 2.0
  228. # v1.13.17.2 (08-Mar-2013)
  229. #   ● Fix: Turn Counter scriptlet incongruity [QES-CBS]
  230. #   ● Fix: "Stack level too deep" error for Critical Hit Flash Screen scriptlet [QES-CBS]
  231. #   ● Add: Section titles for Alternative Layout [QES-SSA]
  232. #   ● Tweak: Revamped Alternative Layout sections code [QES-SSA]
  233. # v1.12.14.2 (07-Mar-2013)
  234. #   ● Add: Default font and font size settings for titles [USCM]
  235. # v1.11.14.2 (06-Mar-2013)
  236. #   ● Add: Remove States on Level Up [QES-CHA]
  237. #   ● Tweak: Separated EXP layouts from Alternative Layout for better compatibility [QES-SSA]
  238. #   ● Tweak: Parameter icons to the Equipment screen [QES-EQA]
  239. #   ● Bug Fix: Game Over Menu disable "Continue" option if no saved games [QES-GOA]
  240. # v1.10.11.2 (05-Mar-2013)
  241. #   ● Add: New Bitmap method - reset_fonts [BMA]
  242. #   ● Rework code to clean it up and for better compatibility [QES]
  243. #   ● Manual: Reorganise to reflect forthcoming changes
  244. # v1.8.11.1 (04-Mar-2013)
  245. #   ● Add: Title & Author Logo speeds [QES-ATA]
  246. #   ● Bug Fix: Global font settings [QES]
  247. #   ● Bug Fix: Several inconcruities in Animation Title script [QES-ATA]
  248. # v1.7.9.1 (03-Mar-2013)
  249. #   ● Add: Author Logo to Animated Title script [QES-ATA]
  250. #   ● Started script reorganisation/rewrite [QES]
  251. # v1.5.9.1 (01-Feb-2013)
  252. #   ● Add: Actor Options scriptlet [QES-SSA]
  253. #   ● Remove: Parameter Columns to remove conflicts and for better compatibility [QE-SSA]
  254. # v1.4.8.1 (28-Jan-2013)
  255. #   ● Add: Pretitles based on actor genders [QES-SSA]
  256. #   ● Tweak: Player coordinates to the Extra Stats window [ESS]
  257. # v1.3.7.1 (27-Jan-2013)
  258. #   ● Tweak: Tweak to disable "Name:" if alternative layout is selected [QES-SSA]
  259. #   ● Tweak: Recover HP/MP after level up tweak [QES-CHA]
  260. #   ● Add: Keypress function to display Extra Stats on the map [ESS]
  261. #   ● Bug Fix: Extra Stats - total gold counter [ESS]
  262. #   ● Bug Fix: Extra Stats - total exp counter [ESS]
  263. # v1.2.3.1 (25-Jan-2013)
  264. #   ● Manual: Updated manual (fixing additional inconsistencies)
  265. #   ● Add: Character Profile information [QES-SSA]
  266. #   ● Bug Fix: Alternative Status Screen States [QES-SSA]
  267. #   ● Tweak: Purified Extra Parameters code [QES-SSA]
  268. # v1.1.1.0 (13-Jan-2013)
  269. #   ● Began alternative Status Screen layout [QES-SSA]
  270. #   ● Tweak: Experience Layout for better integration [QES-SSA]
  271. # v1.0.1.0 (12-Jan-2013)
  272. #   ● Bug Fix: Menu Background incongruity [QES]
  273. # v1.0.0.0 (10-Jan-2013)
  274. #   ● Release: Public Demo v1.0
  275. # v0.20.25.4 (18-Dec-2012)
  276. #   ● Tweak: Animated Title on/off for other animated title scripts [QES-ATA]
  277. #   ● Add: Full Animated Title script [QES-ATA]
  278. #   ● Tweak: Title menu window opacities option tweak [QES]
  279. # v0.19.23.4 (15-Dec-2012)
  280. #   ● Manual: Updated for website compatability
  281. #   ● Bug Fix: Fixed several incongruous bugs [QES]
  282. # v0.19.22.3 (08-Dec-2012)
  283. #   ● Manual: Completely up-to-date
  284. # v0.19.22.2 (01-Dec-2012)
  285. #   ● Tweak: Game Over Menu Music option tweak [QES-GOA]
  286. #   ● Bug Fix: A few major bugs in the Game Over menu [QES-GOA]
  287. # v0.19.19.2 (15-Nov-2012)
  288. #   ● Add: Game Over menu [QES-GOA]
  289. # v0.18.19.2 (31-Oct-2012)
  290. #   ● Add: "No Equip" text for unequipped items (Status screen) [QES-SSA]
  291. # v0.17.19.2 (30-Oct-2012)
  292. #   ● Add: Alternative experience layout style [QES-SSA]
  293. #   ● Bug Fix: Fixed a bug with Experience Maxed Text tweak [QES-SSA]
  294. #   ● Bug Fix: Fixed display bug with Status screen alpha boxes [disabled]
  295. # v0.16.18.2 (29-Oct-2012)
  296. #   ● Add: Equipment Extras (Status screen) [QES-SSA]
  297. # v0.16.18.2 (26-Oct-2012)
  298. #   ● Tweak: Menu Backgrounds [QES]
  299. #   ● Add: Battle Turn Count [QES-CBS]
  300. #   ● Manual: up to current version completed
  301. # v0.15.7.1 (20-Oct-2012)
  302. #   ● Add: Parameter Columns option [disabled]
  303. # v0.14.7.1 (19-Oct-2012)
  304. #   ● Add: New Bitmap methods - draw_font_shadow & draw_font_outline [not used]
  305. # v0.13.7.1 (14-Oct-2012)
  306. #   ● Rewrite: Script structure to tie in with the rewrite of the manual
  307. #   ● Bug Fix: Text display scripts [QES]
  308. #   ● Tweak: Windowskin opacities tweak [QES]
  309. # v0.12.5.1 (10-Oct-2012)
  310. #   ● Add: Menu Info Window, with settings for basic/advanced options [QES]
  311. #   ● Add: Alpha box for Status screen (parameters/options) [disabled]
  312. # v0.10.5.1 (08-Oct-2012)
  313. #   ● Add: Parameter Equip Increase/Decrease Icons tweak [QES-EQA]
  314. # v0.9.5.1 (07-Oct-2012)
  315. #   ● Add: New Bitmap method - draw_rect_alpha [disabled]
  316. # v0.8.5.1 (05-Oct-2012)
  317. #   ● Tweak: Experience Maxed Text tweak [QES-SSA]
  318. #   ● Add: New Bitmap method - draw_title [BMA]
  319. #   ● Manual: Began writing manual
  320. # v0.8.4.0 (04-Oct-2012)
  321. #   ● Add: Random Game Over background [QES]
  322. #   ● Add: Random Title background [QES]
  323. #   ● Add: Critical Hit Flash Screen scriptlet [QES-CBS]
  324. #   ● Add: Battle Announcer Image scriptlet [QES-CBS]
  325. #   ● Tweak: Add Gold Icon tweak [QES]
  326. # v0.4.3.0 (24-Sep-2012)
  327. #   ● Add: Extra hidden parameters to Status screen [QES-SSA]
  328. #   ● Tweak: Parameter Icons tweak [QES-SSA]
  329. # v0.3.2.0 (14-Sep-2012)
  330. #   ● Add: New Bitmap method - draw_horz_line [BMA]
  331. # v0.3.1.0 (10-Sep-2012)
  332. #   ● Add: Color Module (containing 127 named colours) [GCM]
  333. # v0.2.1.0 (6-Sep-2012)
  334. #   ● Add: Enhanced Extra Stats Window script [ESS]
  335. #   ● Add: Default configurations [UCSM]
  336. # v0.0.1.0 (5-Sep-2012)
  337. #   ● Began (re)working on script [QES]
  338. #
  339. #------------------------------------------------------------------------------
  340. # Abbreviations
  341. #------------------------------------------------------------------------------
  342. #   BMA     - Bitmap Add-On
  343. #   ESS     - Extra Stats Script
  344. #   GCM     - Global Colors Module
  345. #   QES     - Q-Engine
  346. #   QES-ATA - Q-Engine: Animated Title Add-On
  347. #   QES-CBS - Q-Engine: Combat Add-On
  348. #   QES-CHA - Q-Engine: Character Add-On
  349. #   QES-GOA - Q-Engine: Game Over Add-On
  350. #   QES-SSA - Q-Engine: Status Add-On
  351.  
  352. #==============================================================================
  353. =end
  354.  
  355. $imported = {} if $imported == nil; $imported["CWQesVX"] = true
  356.  
  357. #===============================================================================
  358. # ** Q-Engine Settings **
  359. #===============================================================================
  360. module QES_SETTINGS
  361.   include CW_GLOBAL_COLORS
  362.   #============================================================================
  363.   # ** Q-ENGINE SCRIPT CONFIGURATION **
  364.   #----------------------------------------------------------------------------
  365.   #     All of the options below are configurable.
  366.   #
  367.   #     For a more comprehensive guide on how to use certain sections,
  368.   #     please refer to the "Q-Engine Guide" section.  There shouldn't
  369.   #     be any need to modify anything else,  as they're all plug-and-
  370.   #     play. Most of the settings are set to "true" by default.
  371.   #
  372.   #     "true" toggles the setting on; "false" toggles it off.
  373.   #
  374.   #     All  colours  are  predefined in the  required  Global Colors
  375.   #     Module.
  376.   #============================================================================
  377.   # ** MAIN SYSTEM SETTINGS **
  378.   #----------------------------------------------------------------------------
  379.   #     These options  (formerly part of  the Universal  Configuration
  380.   #     Settings  Module) define the  default settings,  such as fonts
  381.   #     and windowskins.
  382.   #
  383.   #----------------------------------------------------------------------------
  384.   # ** Font Settings **
  385.   #----------------------------------------------------------------------------
  386.   #     These options globally define the default fonts and settings.
  387.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  388.   DEFAULT_FONT = "Trebuchet MS"          # Default font
  389.   DEFAULT_SIZE = 18                      # Default font size
  390.   DEFAULT_BOLD = false                   # Default font bold on/off
  391.   DEFAULT_ITALIC = false                 # Default font italic on/off
  392.   DEFAULT_FONT_COLOR = WHITE             # Default text colour
  393.  
  394.   #----------------------------------------------------------------------------
  395.   # ** Title Settings **
  396.   #----------------------------------------------------------------------------
  397.   #     These settings are for  a new method that can be  used to draw
  398.   #     titles onto bitmaps,  integrated into the required Bitmap Add-
  399.   #     Ons Module for convenience.  (See the  Additional Notes in the
  400.   #     BMA usage instructions.)
  401.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  402.   DEFAULT_TITLE_FONT = "Arial"           # Default font for titles
  403.   DEFAULT_TITLE_SIZE = 20                # Default font size for titles on/off
  404.   DEFAULT_TITLE_BOLD = true              # Default font bold for titles on/off
  405.   DEFAULT_TITLE_ITALIC = false           # Default font italic for titles on/off
  406.   DEFAULT_TITLE_COLOR = YELLOW           # Default title colour
  407.   TITLE_UNDERLINE = true                 # Include line under titles on/off
  408.   UNDERLINE_COLOR = LightBlue            # Default colour for divider underlines
  409.  
  410.   #----------------------------------------------------------------------------
  411.   # ** Windowskins **
  412.   #----------------------------------------------------------------------------
  413.   #     These settings affect the default windowskin.
  414.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  415.   DEFAULT_SKIN = "Window"                # Default sytem windowskin
  416.   DEFAULT_SKIN_OPACITY = 200             # Default windowskin opacity
  417.   DEFAULT_SKIN_BACKOPACITY = 255         # Default windowskin background opacity
  418.   DEFAULT_SKIN_CONTENTOPACITY = 255      # Default windowskin foreground opacity
  419.  
  420.   #----------------------------------------------------------------------------
  421.   # ** Bitmap Settings **
  422.   #----------------------------------------------------------------------------
  423.   #     These settings are  intended for use with the  required Bitmap
  424.   #     Add-Ons module to define certain settings in the Q-Engine.    
  425.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  426.   LINE_COLOR = LightBlue                # Colour for lines
  427.   CIRCLE_LINE_COLOR = WHITE             # Color for circle lines
  428.  
  429.   #============================================================================
  430.   # ** TITLE SCREEN OPTIONS **
  431.   #----------------------------------------------------------------------------
  432.   #     These options are mainly for the Title screen,  including menu
  433.   #     options and screen animation.
  434.   #----------------------------------------------------------------------------
  435.   # * Version Number
  436.   #     Displays the  current  project version  in the  top right-hand
  437.   #     corner of the Title screen.
  438.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  439.   SHOW_VERSION = true                 # Display version number on Title screen
  440.     VERSION_ID = "4.0.0.0a"           # Current version number of the game
  441.    
  442.   #----------------------------------------------------------------------------
  443.   # * Random Title Backgrounds *
  444.   #----------------------------------------------------------------------------
  445.   #     These display random backgrounds on  the Title screen in place
  446.   #     of the default each time the Title screen is loaded.
  447.   #
  448.   #     If the Animated Title Add-On is installed,  this is turned off
  449.   #     in favour of the settings in the QES-ATA instead.
  450.   #
  451.   #     Note: Graphics for the random Title backgrounds must be placed
  452.   #     in the "Graphics/Pictures/Titles" folder.
  453.   #
  454.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  455.   RANDOM_TITLE_BG = true              # Toggle random Title background on/off
  456.     TITLES = [                        # In directory Graphics/Pictures/Titles
  457.       "Title1",
  458.       "Title2",
  459.       "Title3",
  460.       # Add more here
  461.     ]
  462.    
  463.   #----------------------------------------------------------------------------
  464.   # * Title Info Menu *
  465.   #----------------------------------------------------------------------------
  466.   #     These settings  add a separate  window with  a description for
  467.   #     each of the commands.  Depending on the type  selected a title
  468.   #     is also displayed.
  469.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  470.   SHOW_TITLE_MENU_INFO = true         # Show menu info window on Title Menu
  471.     # Change Title menu type
  472.     TITLE_MENU_INFO_TYPE = 1          # Normal/enhanced info window (0 or 1)
  473.       # Menu details for command/info windows
  474.       #                Title            Description
  475.       INFO_NEW_GAME = ["New Game",      "Initiate a new game."]
  476.       INFO_CONTINUE = ["Continue Game", "Reload a previously saved game."]
  477.       INFO_END_GAME = ["End Game",      "Quit the game."]
  478.     # Set menu/info window opacities if SHOW_TITLE_MENU_INFO is "true"
  479.     TITLE_WINDOW_OPACITIES = [0, 0]
  480.  
  481.   #============================================================================
  482.   # ** GAME OVER OPTIONS **
  483.   #----------------------------------------------------------------------------
  484.   #     These options affect the Game Over Screen.
  485.   #----------------------------------------------------------------------------
  486.   # * Random Game Over Backgrounds *
  487.   #----------------------------------------------------------------------------
  488.   #     These display  random backgrounds  on the  Game Over  screen in
  489.   #     place of the default each time the Title screen is loaded.
  490.   #
  491.   #     If the  Animated Game Over Add-On is installed,  this is turned
  492.   #     off in favour of the settings in the QES-GOA instead.
  493.   #
  494.   #     Note:  Graphics for the  random Game Over  backgrounds  must be
  495.   #     placed in the "Graphics/Pictures/Gameovers" folder.
  496.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  497.   RANDOM_GAMEOVER_BG = true           # Toggle random Game Over background on/off
  498.     GAMEOVERS = [                     # In directory Graphics/Pictures/GameOvers
  499.       "GameOver06",
  500.       "GameOver35",
  501.       "GameOver43",
  502.       "GameOver46",
  503.       # Add more here
  504.     ]
  505.    
  506.   #============================================================================
  507.   # * MENU OPTIONS *
  508.   #     The Menu Options add features and functionality to some of the menus.
  509.   #----------------------------------------------------------------------------
  510.   CONFIRM_EXIT = true                 # Toggle exit confirmation on/off
  511.     CONFIRM_TEXT = ["Yes", "No"]      # Exit confirmation options
  512.    
  513.   #============================================================================
  514.   # ** GOLD WINDOW OPTIONS **
  515.   #     The Gold Window Options tweak the gold display window.
  516.   #----------------------------------------------------------------------------
  517.   SHOW_GOLD_ICON = true               # Show gold icon in window
  518.   ALIGN_CURRENCY = "Left"             # Align currency symbole left or right
  519.   GOLD_COMMAS = true                  # Add commas to larger numbers in gold
  520.   #----------------------------------------------------------------------------
  521.   # * Gold Icon *
  522.   #     Defines the icon representing gold/money in the Gold Window.
  523.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  524.   GOLD_ICON = 147
  525.   #============================================================================
  526. end
  527.  
  528. #==============================================================================
  529. # ** DO NOT EDIT BEYOND THIS POINT **                                         #
  530. #==============================================================================
  531.  
  532. class QEngine
  533.   QES_VERSION = "4.0"
  534.   #--------------------------------------------------------------------------
  535.   # * Public Instance Variables
  536.   #--------------------------------------------------------------------------
  537.   attr_accessor :from_menu
  538.  
  539.   #--------------------------------------------------------------------------
  540.   # * Initialization
  541.   #--------------------------------------------------------------------------
  542.   def initialize
  543.     @from_menu = 0
  544.   end
  545.  
  546.   module Required
  547.     #============================================================================
  548.     # ** REQUIRED MODULES SETTINGS **
  549.     #----------------------------------------------------------------------------
  550.     REQ_MODULES_QES = {
  551.       #----------------------------------------------------------------------------
  552.       #     Note: The "Universal Configuration Module" (UCSM) is no longer
  553.       #     required to run the Q-Engine, as most of the relevant settings
  554.       #     have now been integrated into the Q-Engines for better ease of
  555.       #     use.  The "Global Colors Module"  and the "Bitmap Addons"  ARE
  556.       #     required, so they need to be set to "Yes" or "True" to prevent
  557.       #     an error from occurring (the case does not matter).
  558.       #
  559.       #     You can add your own  required scripts  to the list,  but make
  560.       #     sure you follow the sequence precisely.
  561.       #
  562.       #     * "Module Name" - The name of the required script.
  563.       #     * "Import Name" - The $import hash  (like a unique identifying
  564.       #       name) for  the script.  If set to "false",  then the  entire
  565.       #       script  relating to the  $import is considered  as disabled.
  566.       #       When it's set to "true" or contains either a string or digit
  567.       #       (such as for a version number), it's considered as enabled.
  568.       #     * "Type" - The type of  script the requirement is:  "M" is for
  569.       #       "Module", "A" is for "Add-On" and "S" is for "Script".  This
  570.       #       will then be displayed in the resulting error message.
  571.       #     * "Required" - This determines whether  the script is required
  572.       #       in order for  the game to run properly.  Values can be "Yes"
  573.       #       or "No" and "True" or "False" (the case doesn't matter).  If
  574.       #       set to "Yes" or "True",  an error message will  occur giving
  575.       #       details of the missing or uninstalled script type.
  576.       #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  577.       #                                                            Required
  578.       #         Module Name         Import Name      Type     Yes/No/True/False
  579.       #---------------------------------------------------------------------------
  580.       0 => ["Global Colors",      "CWColors",       "M",    "Yes"], # Required
  581.       1 => ["Q-Engine",           "CWQesVX",        "S",    "Yes"], # Required
  582.       2 => ["Bitmap Addons",      "CWBitmapAddons", "A",    "No"],  # Required
  583.     }
  584.     #--------------------------------------------------------------------------
  585.     # * Check Required Modules
  586.     #     Displays the  current  project version  in the  top right-hand
  587.     #     This routine will check through  the requirements  (predefined
  588.     #     in REQ_MODULES_QES) and  determine if they are required.  Non-
  589.     #     required modules will be skipped,  but an error message dialog
  590.     #     will display each one either not installed or not turned on.
  591.     #--------------------------------------------------------------------------
  592.     module_mssg = " is disabled, missing or not properly implemented."
  593.     body_mssg = " Please ensure that it is enabled or installed correctly."
  594.     req_modules = REQ_MODULES_QES
  595.     for i in 0...req_modules.size
  596.       import = $imported[req_modules[i][1]] unless $imported == nil
  597.       case req_modules[i][2]
  598.       when "M"; type = " Module"; when "A"; type = " Add-On"; when "S"; type = " Script"
  599.       end
  600.       unless import || req_modules[i][3].downcase == "no" || req_modules[i][3].downcase == "false"
  601.         p ["QES Error: The required ", req_modules[i][0], type, module_mssg, body_mssg].join
  602.         ok = false; next
  603.       end
  604.     end
  605.     exit if ok == false
  606.   end
  607. end
  608.  
  609. #==============================================================================
  610. # ** Cache
  611. #   Added: title, gameover
  612. #==============================================================================
  613. module Cache
  614.   #--------------------------------------------------------------------------
  615.   # * Get Title Graphics
  616.   #     filename : Filename
  617.   #--------------------------------------------------------------------------
  618.   def self.title(filename);
  619.     load_bitmap("Graphics/Pictures/Titles/", filename)
  620.   end
  621.   #--------------------------------------------------------------------------
  622.   # * Get Game Over Graphics
  623.   #     filename : Filename
  624.   #--------------------------------------------------------------------------
  625.   def self.gameover(filename)
  626.     load_bitmap("Graphics/Pictures/GameOvers/", filename)
  627.   end
  628. end
  629.  
  630. #==============================================================================
  631. # ** Scene_Title
  632. #------------------------------------------------------------------------------
  633. # Aliased Methods
  634. #   * create_game_objects
  635. #   * create_title_graphic
  636. #   * create_command_window
  637. #   * update
  638. #   * close_command_window
  639. #   * dispose_command_window
  640. #   * command_shutdown
  641. # Added Methods
  642. #   * update_command_info
  643. #==============================================================================
  644.  
  645. class Scene_Title < Scene_Base
  646.   include QES_SETTINGS#, CW_UNIVERSAL_CONFIG
  647.   #--------------------------------------------------------------------------
  648.   # * Create Game Objects                                       |--ALIASED--|
  649.   #--------------------------------------------------------------------------
  650.   alias :cwqe_create_objects :create_game_objects
  651.   def create_game_objects
  652.     cwqe_create_objects
  653.     $qes = QEngine.new
  654.     $qesata = QesAta.new if $imported["CW-QESATA"] && QESATA_SETTINGS::TOGGLE_ATA_ADDON
  655.     $qeseqa = QesEqa.new if $imported["CW-QESEQA"] && QESEQA_SETTINGS::TOGGLE_EQA_ADDON
  656.     $qesgoa = QesGoa.new if $imported["CW-QESGOA"] && QESGOA_SETTINGS::TOGGLE_GOA_ADDON
  657.     $qesssa = QesSsa.new if $imported["CW-QESSSA"] && QESSSA_SETTINGS::TOGGLE_SSA_ADDON
  658.     $qescbs = QesCbs.new if $imported["CW-QESCBS"] && QESCBS_SETTINGS::TOGGLE_CBS_ADDON
  659.    
  660.     $qescha = QesCha.new if $imported["CW-QESCHA"] && QESCHA_SETTINGS::TOGGLE_CHA_ADDON
  661. #~     $qemap = QEMAP.new if TOGGLE_MAP_ADDON && $imported["CWQ-EngineMap"]
  662.    
  663.     @version_window = Window_Version.new if SHOW_VERSION
  664.     #
  665.   end
  666.   #--------------------------------------------------------------------------
  667.   # * Create Title Graphic                                      |--ALIASED--|
  668.   #--------------------------------------------------------------------------
  669.   alias :cwqe_scnttl_create_title_graphic :create_title_graphic
  670.   def create_title_graphic
  671.     cwqe_scnttl_create_title_graphic
  672.     if RANDOM_TITLE_BG and not ($imported["CWQ-EngineATA"] && TOGGLE_ANIMATED_TITLE_ADDON)
  673.       unless $imported["CWQ-EngineATA"] && TOGGLE_ANIMATED_TITLE_ADDON
  674.         @sprite.bitmap = Cache.title(TITLES[rand(TITLES.size)].to_s)
  675.       end
  676.     end
  677.   end
  678.   #--------------------------------------------------------------------------
  679.   # * Create Command Window                                     |--ALIASED--|
  680.   #--------------------------------------------------------------------------
  681.   alias :cwqe_scnttl_create_commands :create_command_window
  682.   def create_command_window
  683.     cwqe_scnttl_create_commands
  684.     if SHOW_TITLE_MENU_INFO
  685.       case TITLE_MENU_INFO_TYPE
  686.       when 0
  687.         @command_window_x = (544  - @command_window.width) / 2
  688.         @command_window_y = 238
  689.         @info_window_x, @info_window_y = 0, 345
  690.       when 1
  691.         @command_window_x = (195 - @command_window.width) / 2
  692.         @command_window_y = 288
  693.         @info_window_x, @info_window_y = 185, 288
  694.       end
  695.       @command_window.x, @command_window.y = @command_window_x, @command_window_y
  696.       @info_window = Window_Info.new(@info_window_x, @info_window_y)
  697.       @command_window.opacity = TITLE_WINDOW_OPACITIES[0]
  698.       @info_window.opacity = TITLE_WINDOW_OPACITIES[1]
  699.       update_command_info
  700.     end
  701.   end
  702.  
  703.   #--------------------------------------------------------------------------
  704.   # * Frame Update                                              |--ALIASED--|
  705.   #--------------------------------------------------------------------------
  706.   alias :cwqe_scnttl_update :update
  707.   def update
  708.     cwqe_scnttl_update
  709.     update_command_info if SHOW_TITLE_MENU_INFO
  710.   end
  711.   #--------------------------------------------------------------------------
  712.   # * Update Command Window Info                                  |--ADDED--|
  713.   #--------------------------------------------------------------------------
  714.   def update_command_info
  715.     if SHOW_TITLE_MENU_INFO
  716.       case @command_window.index
  717.         when 0; title, text = INFO_NEW_GAME[0], INFO_NEW_GAME[1]
  718.         when 1; title, text = INFO_CONTINUE[0], INFO_CONTINUE[1]
  719.         when 2; title, text = INFO_END_GAME[0], INFO_END_GAME[1]
  720.         when 3; title, text = INFO_ABOUT[0], INFO_ABOUT[1]
  721.       end
  722.       @info_window.write_text(0, 0, title, text, 1)
  723.     end
  724.   end
  725.   #--------------------------------------------------------------------------
  726.   # * Close Command Window                                      |--ALIASED--|
  727.   #--------------------------------------------------------------------------
  728.   alias :cwqe_scnttl_close_command_window :close_command_window
  729.   def close_command_window
  730.     @info_window.visible = false if SHOW_TITLE_MENU_INFO
  731.     cwqe_scnttl_close_command_window
  732.   end
  733.   #--------------------------------------------------------------------------
  734.   # * Dispose of Command Window                                 |--ALIASED--|
  735.   #--------------------------------------------------------------------------
  736.   alias :cwqe_scnttl_dispose :dispose_command_window
  737.   def dispose_command_window
  738.     cwqe_scnttl_dispose
  739.     @info_window.dispose if SHOW_TITLE_MENU_INFO
  740.     @version_window.dispose if SHOW_VERSION
  741.   end
  742.   #--------------------------------------------------------------------------
  743.   # * Command: Shutdown                                         |--ALIASED--|
  744.   #--------------------------------------------------------------------------
  745.   alias :cwqe_scnttl_command_shutdown :command_shutdown
  746.   def command_shutdown
  747.     if CONFIRM_EXIT
  748.       $qes.from_menu = 1; $scene = Scene_ConfirmExit.new
  749.     else cwqe_scnttl_command_shutdown
  750.     end
  751.   end
  752. end
  753.  
  754. #==============================================================================
  755. # ** Scene_End
  756. #------------------------------------------------------------------------------
  757. # Aliased Method
  758. #   * command_shutdown
  759. # Overwritten Method
  760. #   * return_scene
  761. #==============================================================================
  762. class Scene_End < Scene_Base
  763.   include QES_SETTINGS
  764.   #--------------------------------------------------------------------------
  765.   # * Command: [Shutdown]                                       |--ALIASED--|
  766.   #--------------------------------------------------------------------------
  767.   alias :cwqes_scnend_command_shutdown :command_shutdown
  768.   def command_shutdown
  769.     if CONFIRM_EXIT
  770.       $qes.from_menu = 3; $scene = Scene_ConfirmExit.new
  771.     else cwqes_scnend_command_shutdown
  772.     end
  773.   end
  774.   #--------------------------------------------------------------------------
  775.   # * Return to Original Screen                             |--OVERWRITTEN--|
  776.   #--------------------------------------------------------------------------
  777.   def return_scene
  778.     $imported["CWExtraStatsVX-3.1"] && ESS_SETTINGS::EXTRA_STATS ? return_code = 6 : return_code = 5
  779.     $scene = Scene_Menu.new(return_code)
  780.   end
  781. end
  782.  
  783. #==============================================================================
  784. # ** Scene_Gameover
  785. #------------------------------------------------------------------------------
  786. # Aliased Methods
  787. #   * create_gameover_graphic
  788. # Added Methods
  789. #
  790. # Overwritten Methods
  791. #
  792. #==============================================================================
  793.  
  794. class Scene_Gameover < Scene_Base
  795.   include QES_SETTINGS#, CW_UNIVERSAL_CONFIG
  796.   #--------------------------------------------------------------------------
  797.   # * Create Title Graphic                                      |--ALIASED--|
  798.   #--------------------------------------------------------------------------
  799.   alias :cwqesgoa_scngmo_create_gameover_graphic :create_gameover_graphic
  800.   def create_gameover_graphic
  801.     cwqesgoa_scngmo_create_gameover_graphic
  802.     if RANDOM_GAMEOVER_BG and not ($imported["CW-QESGOA"] && TOGGLE_GOA_ADDON)
  803.       @sprite.bitmap = Cache.gameover(GAMEOVERS[rand(GAMEOVERS.size)].to_s) unless ANIMATED_GAME_OVER
  804.     end
  805.   end
  806. end
  807.  
  808. #==============================================================================
  809. # ** Scene_ConfirmExit
  810. #------------------------------------------------------------------------------
  811. #  This adds a Yes/No confirmation to exit the game. It returns to the previous
  812. #  screen if cancelled.
  813. #------------------------------------------------------------------------------
  814. class Scene_ConfirmExit < Scene_Base
  815.   include QES_SETTINGS
  816.   #--------------------------------------------------------------------------
  817.   # * Start
  818.   #--------------------------------------------------------------------------
  819.   def start
  820.     super
  821.     create_menu_background
  822.     @exit_message = Window_Help.new
  823.     @exit_message.x = (544 - @exit_message.width) / 2
  824.     @exit_message.y = (416 - @exit_message.height) / 2 - 60
  825.     @exit_window = Window_Command.new(172, [CONFIRM_TEXT[0], CONFIRM_TEXT[1]])
  826.     @exit_window.x = (544 - @exit_window.width) / 2
  827.     @exit_window.y = (416 - @exit_window.height) / 2
  828.   end
  829.   #--------------------------------------------------------------------------
  830.   # * Terminate
  831.   #--------------------------------------------------------------------------
  832.   def terminate
  833.     dispose_menu_background
  834.     @exit_message.dispose
  835.     @exit_window.dispose
  836.   end
  837.   #--------------------------------------------------------------------------
  838.   # * Update
  839.   #--------------------------------------------------------------------------
  840.   def update
  841.     super
  842.     @exit_message.set_text("Really quit?", 1)
  843.     @exit_window.update
  844.     begin_confirmation if @exit_window.active
  845.   end
  846.   #--------------------------------------------------------------------------
  847.   # * Begin Confirmation
  848.   #--------------------------------------------------------------------------
  849.   def begin_confirmation
  850.     if Input.trigger?(Input::C)
  851.       case @exit_window.index
  852.       when 0
  853.         command_yes
  854.         when 1
  855.         command_no
  856.       end
  857.     elsif Input.trigger?(Input::B)
  858.       command_no
  859.     end
  860.   end
  861.   #--------------------------------------------------------------------------
  862.   # * Command: Yes
  863.   #--------------------------------------------------------------------------
  864.   def command_yes
  865.     Sound.play_decision
  866.     RPG::BGM.fade(800)
  867.     RPG::BGS.fade(800)
  868.     RPG::ME.fade(800)
  869.     $scene = nil
  870.   end
  871.   #--------------------------------------------------------------------------
  872.   # * Command: No
  873.   #--------------------------------------------------------------------------
  874.   def command_no
  875.     Sound.play_decision
  876.     case $qes.from_menu
  877.     when 1; $scene = Scene_Title.new
  878.     when 2; $scene = Scene_Gameover.new
  879.     when 3; $scene = Scene_Menu.new
  880.     end
  881.   end
  882. end
  883.  
  884. # Aliased methods: draw_currency_value
  885. class Window_Base
  886.   include QES_SETTINGS#, CW_UNIVERSAL_CONFIG
  887.   #--------------------------------------------------------------------------
  888.   # * Draw number with currency unit
  889.   #--------------------------------------------------------------------------
  890.   alias :cwqes_winbs_draw_currency_value :draw_currency_value
  891.   def draw_currency_value(value, x, y, width)
  892.     GOLD_COMMAS ? value = $game_party.gold.to_s.reverse.gsub(/(\d{3})(?=\d)/, '\\1,').reverse :
  893.       value = $game_party.gold.to_s
  894.     case ALIGN_CURRENCY.upcase
  895.     when "LEFT"
  896.       cx = contents.text_size(Vocab::gold).width
  897.       self.contents.font.color = normal_color
  898.       self.contents.draw_text(x, y, width-cx-2, WLH, value, 2)
  899.       self.contents.font.color = system_color
  900.       self.contents.draw_text(x + 28, y, width, WLH, Vocab::gold, 0)
  901.     when "RIGHT"
  902.       cwqes_winbs_draw_currency_value(value, x, y, width)
  903.     end
  904.   end
  905. end
  906.  
  907. #==============================================================================
  908. # ** Window_Gold
  909. #------------------------------------------------------------------------------
  910. # Aliased Method
  911. #   * refresh
  912. #==============================================================================
  913. class Window_Gold < Window_Base
  914.   include QES_SETTINGS#, CW_UNIVERSAL_CONFIG
  915.   #--------------------------------------------------------------------------
  916.   # * Refresh                                                   |--ALIASED--|
  917.   #--------------------------------------------------------------------------
  918.   alias :cwqe_wingold_refresh :refresh
  919.   def refresh
  920.     cwqe_wingold_refresh
  921.     draw_icon(GOLD_ICON, 0, 0) if SHOW_GOLD_ICON
  922.   end
  923. end
  924.  
  925. #==============================================================================
  926. # ** Window_Version
  927. #------------------------------------------------------------------------------
  928. #  This window displays the current version of the game.
  929. #==============================================================================
  930. class Window_Version < Window_Base
  931.   include QES_SETTINGS#, CW_UNIVERSAL_CONFIG
  932.   #--------------------------------------------------------------------------
  933.   # * Object Initialization
  934.   #     x : window X coordinate
  935.   #     y : window Y coordinate
  936.   #--------------------------------------------------------------------------
  937.   def initialize
  938.     super(400, 0, 160, WLH + 32)
  939.     self.opacity = 0
  940.     refresh
  941.   end
  942.   #--------------------------------------------------------------------------
  943.   # * Refresh
  944.   #--------------------------------------------------------------------------
  945.   def refresh
  946.     self.contents.clear
  947.     self.contents.font.size = DEFAULT_SIZE - 1
  948.     self.contents.draw_text(0, 0, 160, WLH, "Version: " + VERSION_ID)
  949.     self.contents.reset_fonts
  950.   end
  951. end
  952.  
  953. #==============================================================================
  954. # ** Window_Info                                                    |--ADDED--|
  955. #------------------------------------------------------------------------------
  956. #  This window shows skill and item explanations along with actor status.
  957. #==============================================================================
  958. class Window_Info < Window_Base
  959.   include QES_SETTINGS#, CW_UNIVERSAL_CONFIG
  960.   #--------------------------------------------------------------------------
  961.   # * Object Initialization
  962.   #--------------------------------------------------------------------------
  963.   def initialize(x, y, width = 544 - x, height = WLH * 2 + 64)
  964.     height = WLH * 4 if TITLE_MENU_INFO_TYPE == 1
  965.     super(x, y, width, height)
  966.     @width = width
  967.   end
  968.   #--------------------------------------------------------------------------
  969.   # * Set Text
  970.   #  text  : character string displayed in window
  971.   #  title : title string displayed in window
  972.   #  align : alignment (0..left, 1..center, 2..right)
  973.   #--------------------------------------------------------------------------
  974.   def write_text(x, y, title, text, align = 2)
  975.     if text != @text or title != @title or align != @align
  976.       self.contents.clear
  977.       if SHOW_TITLE_MENU_INFO && TITLE_MENU_INFO_TYPE == 1
  978.         self.contents.draw_title(x, y, title, self.width + 2, WLH, 0)
  979.         y += WLH * 1
  980.       end
  981.       self.contents.font.color = normal_color
  982.       self.contents.draw_text(x, y, @width, WLH, text, align)
  983.       @text = text
  984.       @title = title
  985.       @align = align
  986.     end
  987.   end
  988. end
RAW Paste Data