Guest User

DrTodd's edited script

a guest
May 2nd, 2016
265
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.72 KB | None | 0 0
  1. #===============================================================================
  2. #
  3. # DT's One Person Menu
  4. # Author: DoctorTodd
  5. # Date (02/19/2012)
  6. # Type: (Menu)
  7. # Version: (1.0.0) (VXA)
  8. # Level: (Simple)
  9. #
  10. #===============================================================================
  11. #
  12. # NOTES: 1)This script will only work with ace, you may find my VX version on
  13. # RMRK.net and the rpg maker web forums.
  14. #
  15. #===============================================================================
  16. #
  17. # Description: A menu that is modified to work as if you are only using one
  18. # actor.
  19. #
  20. # Credits: Me (DoctorTodd)
  21. #
  22. #===============================================================================
  23. #
  24. # Instructions
  25. # Paste above main.
  26. #
  27. #===============================================================================
  28. #
  29. # Contact me for commercial use, other wise just credit me and don't repost
  30. # without my permission.
  31. #
  32. #===============================================================================
  33. #
  34. # Editing begins 40 and ends on 59.
  35. #
  36. #===============================================================================
  37. module DTOPM
  38.  
  39. #Window skin to use, place in system.
  40. WINDOW = ('Window')
  41.  
  42. #Status Window X
  43. SX = 10
  44.  
  45. #Status Window Y
  46. SY = 10
  47.  
  48. #Gold window X
  49. GX = 40
  50.  
  51. #Gold Window Y
  52. GY = 242
  53.  
  54. #Command Window X
  55. CX = 10
  56.  
  57. #Command Window Y
  58. CY = 170
  59. end
  60.  
  61. class Scene_Menu < Scene_MenuBase
  62. #--------------------------------------------------------------------------
  63. # * Start processing
  64. #--------------------------------------------------------------------------
  65. def start
  66. super
  67. create_background
  68. create_command_window
  69. create_status_window
  70. # create_gold_window
  71. end
  72. #--------------------------------------------------------------------------
  73. # * Create Gold Window
  74. #--------------------------------------------------------------------------
  75. def create_gold_window
  76. @gold_window = Window_Gold.new
  77. @gold_window.x = (DTOPM::GX)
  78. @gold_window.y = (DTOPM::GY)
  79. @gold_window.windowskin = Cache.system(DTOPM::WINDOW)
  80. @gold_window.height = 55
  81. end
  82. #--------------------------------------------------------------------------
  83. # * Create Status Window
  84. #--------------------------------------------------------------------------
  85. def create_status_window
  86. @status_window = Window_MenuInfo.new((DTOPM::SX), (DTOPM::SY))
  87. @status_window.windowskin = Cache.system(DTOPM::WINDOW)
  88. end
  89. #--------------------------------------------------------------------------
  90. # * Create Command Window
  91. #--------------------------------------------------------------------------
  92. def create_command_window
  93. @command_window = Window_MenuCommand.new
  94. @command_window.set_handler(:item, method(:command_item))
  95. # @command_window.set_handler(:skill, method(:command_skill))
  96. # @command_window.set_handler(:equip, method(:command_equip))
  97. # @command_window.set_handler(:status, method(:command_status))
  98. @command_window.set_handler(:save, method(:command_save))
  99. # @command_window.set_handler(:game_end, method(:command_game_end))
  100. @command_window.set_handler(:cancel, method(:return_scene))
  101. @command_window.x = (DTOPM::CX)
  102. @command_window.y = (DTOPM::CY)
  103. end
  104. end
  105. #--------------------------------------------------------------------------
  106. # * [Item] Command
  107. #--------------------------------------------------------------------------
  108. def command_item
  109. SceneManager.call(Scene_Item)
  110. end
  111. #--------------------------------------------------------------------------
  112. # * [Save] Command
  113. #--------------------------------------------------------------------------
  114. def command_save
  115. SceneManager.call(Scene_Save)
  116. end
  117. #--------------------------------------------------------------------------
  118. # * [Skill] Command
  119. #--------------------------------------------------------------------------
  120. def command_skill
  121. @actor = $game_party.members[0]
  122. SceneManager.call(Scene_Skill)
  123. end
  124. #===================================================================
  125. # ** Window_MenuStatus
  126. #------------------------------------------------------------------------------
  127. # This window displays the characters status on the menu screen.
  128. #==============================================================================
  129.  
  130. class Window_MenuInfo < Window_Base
  131. #--------------------------------------------------------------------------
  132. # * Object Initialization
  133. # x : window X coordinate
  134. # y : window Y coordinate
  135. #--------------------------------------------------------------------------
  136. def initialize(x, y)
  137. super(x, y, 88, 152)
  138. refresh
  139. end
  140. #--------------------------------------------------------------------------
  141. # * Refresh
  142. #--------------------------------------------------------------------------
  143. def refresh
  144. self.contents.clear
  145. @actor = $game_party.members[0]
  146. draw_actor_face(@actor, 0, 0, width = 92)
  147. draw_actor_name(@actor, 12, 104)
  148. # draw_actor_level(@actor, 190, 5)
  149. # draw_actor_hp(@actor, 110 ,40)
  150. # draw_actor_mp(@actor, 110 , 65)
  151. # draw_actor_param(@actor, 0, 100, 0)
  152. # draw_actor_param(@actor, 0, 124, 1)
  153. # draw_actor_param(@actor, 0, 148, 2)
  154. # draw_actor_param(@actor, 0, 172, 3)
  155. # draw_actor_graphic(@actor, 220, 160)
  156. # draw_actor_icons(@actor, 0, 0)
  157. end
  158. end
  159. #==============================================================================
  160. # ** Window_MenuCommand
  161. #------------------------------------------------------------------------------
  162. # This command window appears on the menu screen.
  163. #==============================================================================
  164.  
  165. class Window_MenuCommand < Window_Command
  166. #--------------------------------------------------------------------------
  167. # * Initialize Command Selection Position (Class Method)
  168. #--------------------------------------------------------------------------
  169. def self.init_command_position
  170. @@last_command_symbol = nil
  171. end
  172. #--------------------------------------------------------------------------
  173. # * Object Initialization
  174. #--------------------------------------------------------------------------
  175. def initialize
  176. super(0, 0)
  177. select_last
  178. end
  179. #--------------------------------------------------------------------------
  180. # * Get Window Width
  181. #--------------------------------------------------------------------------
  182. def window_width
  183. return 88
  184. end
  185. #--------------------------------------------------------------------------
  186. # * Get Number of Lines to Show
  187. #--------------------------------------------------------------------------
  188. def visible_line_number
  189. item_max
  190. end
  191. #--------------------------------------------------------------------------
  192. # * Create Command List
  193. #--------------------------------------------------------------------------
  194. def make_command_list
  195. add_main_commands
  196. add_original_commands
  197. add_save_command
  198. # add_game_end_command
  199. end
  200. #--------------------------------------------------------------------------
  201. # * Add Main Commands to List
  202. #--------------------------------------------------------------------------
  203. def add_main_commands
  204. add_command(Vocab::item, :item, main_commands_enabled)
  205. # add_command(Vocab::skill, :skill, main_commands_enabled)
  206. # add_command(Vocab::equip, :equip, main_commands_enabled)
  207. # add_command(Vocab::status, :status, main_commands_enabled)
  208. end
  209. #--------------------------------------------------------------------------
  210. # * For Adding Original Commands
  211. #--------------------------------------------------------------------------
  212. def add_original_commands
  213. end
  214. #--------------------------------------------------------------------------
  215. # * Add Save to Command List
  216. #--------------------------------------------------------------------------
  217. def add_save_command
  218. add_command(Vocab::save, :save, save_enabled)
  219. end
  220. #--------------------------------------------------------------------------
  221. # * Add Exit Game to Command List
  222. #--------------------------------------------------------------------------
  223. def add_game_end_command
  224. add_command(Vocab::game_end, :game_end)
  225. end
  226. #--------------------------------------------------------------------------
  227. # * Get Activation State of Main Commands
  228. #--------------------------------------------------------------------------
  229. def main_commands_enabled
  230. $game_party.exists
  231. end
  232. #--------------------------------------------------------------------------
  233. # * Get Activation State of Formation
  234. #--------------------------------------------------------------------------
  235. def formation_enabled
  236. $game_party.members.size >= 2 && !$game_system.formation_disabled
  237. end
  238. #--------------------------------------------------------------------------
  239. # * Get Activation State of Save
  240. #--------------------------------------------------------------------------
  241. def save_enabled
  242. !$game_system.save_disabled
  243. end
  244. #--------------------------------------------------------------------------
  245. # * Processing When OK Button Is Pressed
  246. #--------------------------------------------------------------------------
  247. def process_ok
  248. @@last_command_symbol = current_symbol
  249. super
  250. end
  251. #--------------------------------------------------------------------------
  252. # * Restore Previous Selection Position
  253. #--------------------------------------------------------------------------
  254. def select_last
  255. select_symbol(@@last_command_symbol)
  256. end
  257. end
Advertisement
Add Comment
Please, Sign In to add comment