Advertisement
CompanionWulf

Developer's Mode Script - RGSS2/RMVX

Jan 16th, 2015
478
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 16.38 KB | None | 0 0
  1. =begin
  2. ╔══════════════════════════════════════════════════════════════════════════════╗
  3. ║ Developer's Mode Script                                                      ║
  4. ╟──────────────────────────────────────────────────────────────────────────────╢
  5. ║   Version       : 1.5                                                        ║
  6. ║   Author        : Companion Wulf                                             ║
  7. ║   Platforms     : RMVX                                                       ║
  8. ║   Release Date  : 26 April 2014                                              ║
  9. ║   Last Update   : 13 April 2014                                              ║
  10. ║   Demo Version  : N/A                                                        ║
  11. ║   Demo Date     : Unreleased                                                 ║
  12. ╟──────────────────────────────────────────────────────────────────────────────╢
  13. ║ ◄ Websites ►                                                                 ║
  14. ╟──────────────────────────────────────────────────────────────────────────────╢
  15. ║   Website        : http://rpgmakertimes.info                                 ║
  16. ║   Main Blog      : http://blog.rpgmakertimes.info                            ║
  17. ║   Companion Blog : http://rpgmakertimes.blogspot.com                         ║
  18. ║   Otherworld     : http://projects.rpgmakertimes.info/otherworld             ║
  19. ║                                                                              ║
  20. ╠══════════════════════════════════════════════════════════════════════════════╣
  21. ║ ◄ DESCRIPTION ►                                                              ║
  22. ╟──────────────────────────────────────────────────────────────────────────────╢
  23. ║     This script  allows you to bypass the Title  screen completely           ║
  24. ║     for any  number of reasons.  This is particularly  useful with           ║
  25. ║     developing games where you need to playtest regularly.                   ║
  26. ║                                                                              ║
  27. ╠══════════════════════════════════════════════════════════════════════════════╣
  28. ║ ◄ INSTALLATION ►                                                             ║
  29. ╟──────────────────────────────────────────────────────────────────────────────╢
  30. ║     Place the script between "Materials" and "Main", but above any           ║
  31. ║     other script that modifies Scene_Menu.                                   ║
  32. ║                                                                              ║
  33. ╠══════════════════════════════════════════════════════════════════════════════╣
  34. ║ ◄ INSTRUCTIONS ►                                                             ║
  35. ╟──────────────────────────────────────────────────────────────────────────────╢
  36. ║     Settings can be changed in the "DevMode" module.                         ║
  37. ║                                                                              ║
  38. ║     Place the script between "Materials" and "Main", but above any           ║
  39. ║     other scripts modifying the Title Screen.                                ║
  40. ║                                                                              ║
  41. ║     DEVELOPER_MODE is the setting to  toggle the script on or off.           ║
  42. ║     If set to "true",  it will completely bypass  the Title screen           ║
  43. ║     altogether and  go straight to the map where  the player start           ║
  44. ║     position is set. If set to "false", the Title screen will load           ║
  45. ║     as normal.                                                               ║
  46. ║                                                                              ║
  47. ║     During development  (unless you're  modifying the  Title screen          ║
  48. ║     itself),  you can turn  "Developer Mode" on and  then switch to          ║
  49. ║     off to  playtest the  game all  the way through.  Then when the          ║
  50. ║     game is finished, the script can be deleted.  Or it can be kept          ║
  51. ║     in if  players want to  skip past the  title and any  beginning          ║
  52. ║     cutscenes.                                                               ║
  53. ║                                                                              ║
  54. ╠══════════════════════════════════════════════════════════════════════════════╣
  55. ║ ◄ DEVELOPMENT NOTES ►                                                        ║
  56. ╟──────────────────────────────────────────────────────────────────────────────╢
  57. ║     I originally created this  during the development of my project          ║
  58. ║     "The Gladiator Project",  where it became necessary to playtest          ║
  59. ║     frequently to fine-tune the layouts and positions of items.              ║
  60. ║                                                                              ║
  61. ╠══════════════════════════════════════════════════════════════════════════════╣
  62. ║ ◄ COMPATIBILITY ISSUES ►                                                     ║
  63. ╟──────────────────────────────────────────────────────────────────────────────╢
  64. ║     Since  this  script rewrites  Scene_Title,  there  may  be some          ║
  65. ║     compatibility conflicts,  usually the "update" method.  In this          ║
  66. ║     case, simply contain the added code block in an unless/end con-          ║
  67. ║     dition, making sure that any  standalone aliases are before the          ║
  68. ║     "unless".                                                                ║
  69. ║                                                                              ║
  70. ║     As an example:                                                           ║
  71. ║                                                                              ║
  72. ║        def update                                                            ║
  73. ║           alias some_aliased_routine aliased_routine                         ║
  74. ║           unless DevMode::DEVELOPER_MODE                                     ║
  75. ║             # Appended code                                                  ║
  76. ║           end                                                                ║
  77. ║                                                                              ║
  78. ╠══════════════════════════════════════════════════════════════════════════════╣
  79. ║ ◄ METHODS AFFECTED ►                                                         ║
  80. ╟──────────────────────────────────────────────────────────────────────────────╢
  81. ║     ● New Methods - None                                                     ║
  82. ║     ● Aliased Methods - None                                                 ║
  83. ║     ● Overwritten Methods                                                    ║
  84. ║       ● Scene_Title:                                                         ║
  85. ║         ○ start                                                              ║
  86. ║         ○ post_start                                                         ║
  87. ║         ○ pre_terminate                                                      ║
  88. ║         ○ update                                                             ║
  89. ║         ○ command_new_game                                                   ║
  90. ║                                                                              ║
  91. ╠══════════════════════════════════════════════════════════════════════════════╣
  92. ║ ◄ FUTURE UPDATES ►                                                           ║
  93. ╟──────────────────────────────────────────────────────────────────────────────╢
  94. ║     The next update (bringing it to v1.5) will include optional set-         ║
  95. ║     tings for changing the starting position and XY-coordinates.             ║  
  96. ║                                                                              ║
  97. ║     After  version 1.5,  no future updates  are planned.  It doesn't         ║
  98. ║     need any, since it does what it's meant to as is.                        ║
  99. ║                                                                              ║
  100. ╠══════════════════════════════════════════════════════════════════════════════╣
  101. ║ ◄ VERSION HISTORY ►                                                          ║
  102. ╟──────────────────────────────────────────────────────────────────────────────╢
  103. ║   v1.0 (13-Apr-2014)                                                         ║
  104. ║     ● Create/finish script                                                   ║
  105. ║                                                                              ║
  106. ╚══════════════════════════════════════════════════════════════════════════════╝
  107. =end
  108.  
  109. $imported = {} if $imported == nil; $imported["CW-DevMode-v1.5"] = true
  110.  
  111. module DevMode
  112.   DEVELOPERS_MODE = false # Toggle "Developer's Mode" on/off (true/false)
  113. end
  114.  
  115. #═══════════════════════════════════════════════════════════════════════════════
  116. # ■ Scene_Menu
  117. #═══════════════════════════════════════════════════════════════════════════════
  118. if DevMode::DEVELOPERS_MODE
  119.   class Scene_Title < Scene_Base
  120.     #───────────────────────────────────────────────────────────────────────────
  121.     # * Start processing
  122.     #───────────────────────────────────────────────────────────────────────────
  123.     def start
  124.       super
  125.       load_database                     # Load database
  126.       create_game_objects               # Create game objects
  127.     end
  128.     #───────────────────────────────────────────────────────────────────────────
  129.     # * Post-Start Processing
  130.     #───────────────────────────────────────────────────────────────────────────
  131.     def post_start
  132.     end
  133.     #───────────────────────────────────────────────────────────────────────────
  134.     # * Pre-termination Processing
  135.     #───────────────────────────────────────────────────────────────────────────
  136.     def pre_terminate
  137.     end
  138.     #───────────────────────────────────────────────────────────────────────────
  139.     # * Termination Processing
  140.     #───────────────────────────────────────────────────────────────────────────
  141.     def terminate
  142.     end
  143.     #───────────────────────────────────────────────────────────────────────────
  144.     # * Frame Update
  145.     #───────────────────────────────────────────────────────────────────────────
  146.     def update
  147.     command_new_game
  148.     end
  149.     #───────────────────────────────────────────────────────────────────────────
  150.     # * Command: New Game
  151.     #───────────────────────────────────────────────────────────────────────────
  152.     def command_new_game
  153.       confirm_player_location
  154.       $game_party.setup_starting_members            # Initial party
  155.       $game_map.setup($data_system.start_map_id)    # Initial map position
  156.       $game_player.moveto($data_system.start_x, $data_system.start_y)
  157.       $game_player.refresh
  158.       $scene = Scene_Map.new
  159.       Graphics.frame_count = 0
  160.       $game_map.autoplay
  161.     end
  162.   end
  163. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement