Advertisement
Dekita

Key menu 1.1

Apr 2nd, 2013
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.45 KB | None | 0 0
  1. if true # << Make true to use this script, false to disable.
  2. #===============================================================================
  3. #
  4. # ☆ $D13x - Key Menu
  5. # -- Author : Dekita
  6. # -- Version : 1.1
  7. # -- Level : Easy / Normal
  8. # -- Requires : $D13x Core v 1.4+
  9. # -- Engine : RPG Maker VX Ace.
  10. #
  11. #===============================================================================
  12. # ☆ Import
  13. #-------------------------------------------------------------------------------
  14. $D13x={}if$D13x==nil
  15. $D13x[:Key_Menu]=true
  16. #===============================================================================
  17. # ☆ Updates
  18. #-------------------------------------------------------------------------------
  19. # D /M /Y
  20. # 29/o3/2o13 - Compatibility, (Key Menu HUD)
  21. # - Bugfix, (scene re-trigger if long key press)
  22. # 28/o3/2o13 - Finished,
  23. # 27/o3/2o13 - Started
  24. #
  25. #===============================================================================
  26. # ☆ Introduction
  27. #-------------------------------------------------------------------------------
  28. # This script allows the use of other keys to trigger various scenes,
  29. # Such as 'M' Key triggering the menu, 'S' Key Triggering the Status Screen,
  30. # 'I' key Triggering Items. ect..
  31. # And of course allows easy removal of the default Menu calling key.
  32. #
  33. #===============================================================================
  34. # ★☆★☆★☆★☆★☆★☆★☆★ TERMS AND CONDITIONS: ☆★☆★☆★☆★☆★☆★☆★☆★☆
  35. #===============================================================================
  36. # 1. You MUST give credit to "Dekita" !!
  37. # 2. You are NOT allowed to repost this script.(or modified versions)
  38. # 3. You are NOT allowed to convert this script.
  39. # 4. You are NOT allowed to use this script for Commercial games.
  40. # 5. ENJOY!
  41. #
  42. # "FINE PRINT"
  43. # By using this script you hereby agree to the above terms and conditions,
  44. # if any violation of the above terms occurs "legal action" may be taken.
  45. # Not understanding the above terms and conditions does NOT mean that
  46. # they do not apply to you.
  47. # If you wish to discuss the terms and conditions in further detail you can
  48. # contact me at http://dekitarpg.wordpress.com/
  49. #
  50. #===============================================================================
  51. # ☆ Instructions
  52. #-------------------------------------------------------------------------------
  53. # Place Below " ▼ Materials " and Above " ▼ Main " in your script editor.
  54. #
  55. #===============================================================================
  56. # ☆ HELP
  57. #-------------------------------------------------------------------------------
  58. # For a list of possible key symbols check the help section of the
  59. # $D13x core script.
  60. #
  61. #===============================================================================
  62. module Key_Menu
  63. #===============================================================================
  64. $D13x[:CORE]?Key=Keys::Key: Key={:Key=>'KEY'}# << KEEP
  65. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  66. # ☆ Key Settings
  67. #-----------------------------------------------------------------------------
  68. # Make this true to disable the default Vx Ace menu key.
  69. Disable_Menu_Call = true
  70.  
  71. Menu_Key = Key[:NONE] # Triggers Menu :NONE = no trigger
  72. Items_Key = Key[:I] # Triggers Items
  73. Skills_Key = Key[:M] # Triggers Skills
  74. Equips_Key = Key[:G] # Triggers Equip
  75. Status_Key = Key[:P] # Triggers Status
  76. Save_Key = Key[:N] # Triggers Save
  77. Pause_Key = Key[:O] # Triggers Game End
  78.  
  79. end #####################
  80. # CUSTOMISATION END #
  81. #####################
  82. #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
  83. # #
  84. # http://dekitarpg.wordpress.com/ #
  85. # #
  86. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
  87. #===============================================================================#
  88. # ARE YOU MODIFYING BEYOND THIS POINT? \.\. #
  89. # YES?\.\. #
  90. # OMG, REALLY? \| #
  91. # WELL SLAP MY FACE AND CALL ME A DRAGONITE.\..\.. #
  92. # I REALLY DIDN'T THINK YOU HAD IT IN YOU.\..\.. #
  93. #===============================================================================#
  94. class Scene_Map < Scene_Base
  95. #===============================================================================
  96. #--------------------------------------------------------------------------
  97. # Alias List
  98. #--------------------------------------------------------------------------
  99. alias :update_my_KEYz :update_scene
  100. alias :update_menu_key :update_call_menu
  101. #--------------------------------------------------------------------------
  102. # Update Scene Transition
  103. #--------------------------------------------------------------------------
  104. def update_scene
  105. update_my_KEYz
  106. update_de_keys
  107. end
  108. #--------------------------------------------------------------------------
  109. # Update Keys
  110. #--------------------------------------------------------------------------
  111. def update_de_keys
  112. return if scene_changing?
  113. update_call_pause unless scene_changing?
  114. update_new_call_menu unless scene_changing?
  115. update__call_items unless scene_changing?
  116. update__call_skills unless scene_changing?
  117. update__call_equips unless scene_changing?
  118. update__call_status unless scene_changing?
  119. update__call_save unless scene_changing?
  120. end
  121. #--------------------------------------------------------------------------
  122. # Determine if Pause is being triggered
  123. #--------------------------------------------------------------------------
  124. def update_call_pause
  125. return unless !$game_map.interpreter.running?
  126. return unless !$game_player.moving?
  127. return unless Keys.trigger?(Key_Menu::Pause_Key)
  128. SceneManager.call(Scene_End)
  129. end
  130. #--------------------------------------------------------------------------
  131. # Determine if Menu is Called due to Cancel Button
  132. #--------------------------------------------------------------------------
  133. def update_call_menu
  134. return if Key_Menu::Disable_Menu_Call
  135. update_menu_key
  136. end
  137. #--------------------------------------------------------------------------
  138. # Determine if Menu is Called due to New Key
  139. #--------------------------------------------------------------------------
  140. def update_new_call_menu
  141. return unless Key_Menu::Disable_Menu_Call
  142. return unless !$game_map.interpreter.running?
  143. return unless !$game_player.moving?
  144. return unless Keys.trigger?(Key_Menu::Menu_Key)
  145. call_menu
  146. end
  147. #--------------------------------------------------------------------------
  148. # Determine if Menu is Called due to New Key
  149. #--------------------------------------------------------------------------
  150. def update__call_items
  151. return unless !$game_map.interpreter.running?
  152. return unless !$game_player.moving?
  153. return unless Keys.trigger?(Key_Menu::Items_Key)
  154. SceneManager.call(Scene_Item)
  155. end
  156. #--------------------------------------------------------------------------
  157. # Determine if Menu is Called due to New Key
  158. #--------------------------------------------------------------------------
  159. def update__call_skills
  160. return unless !$game_map.interpreter.running?
  161. return unless !$game_player.moving?
  162. return unless Keys.trigger?(Key_Menu::Skills_Key)
  163. SceneManager.call(Scene_Skill)
  164. end
  165. #--------------------------------------------------------------------------
  166. # Determine if Menu is Called due to New Key
  167. #--------------------------------------------------------------------------
  168. def update__call_equips
  169. return unless !$game_map.interpreter.running?
  170. return unless !$game_player.moving?
  171. return unless Keys.trigger?(Key_Menu::Equips_Key)
  172. SceneManager.call(Scene_Equip)
  173. end
  174. #--------------------------------------------------------------------------
  175. # Determine if Menu is Called due to New Key
  176. #--------------------------------------------------------------------------
  177. def update__call_status
  178. return unless !$game_map.interpreter.running?
  179. return unless !$game_player.moving?
  180. return unless Keys.trigger?(Key_Menu::Status_Key)
  181. SceneManager.call(Scene_Status)
  182. end
  183. #--------------------------------------------------------------------------
  184. # Determine if Menu is Called due to New Key
  185. #--------------------------------------------------------------------------
  186. def update__call_save
  187. return unless !$game_map.interpreter.running?
  188. return unless !$game_player.moving?
  189. return unless Keys.trigger?(Key_Menu::Save_Key)
  190. SceneManager.call(Scene_Save)
  191. end
  192.  
  193. end
  194.  
  195. #==============================================================================#
  196. # http://dekitarpg.wordpress.com/ #
  197. #==============================================================================#
  198. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement