Advertisement
Dekita

key menu 1.2

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