Advertisement
roninator2

Doctor Todd One Person Menu - Addon - Skill

Dec 7th, 2024
31
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 3.80 KB | None | 0 0
  1. #===============================================================================
  2. #
  3. # R2's One Person Skill Menu - Addon to DT OPM
  4. # Author: Roninator2
  5. # Date (31/05/2022)
  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 (Roninator2)
  21. #
  22. #===============================================================================
  23. #
  24. # Instructions
  25. # Paste above main.
  26. #
  27. #===============================================================================
  28.  
  29. module DTOPMS
  30.  
  31.   #Window skin to use, place in system.
  32.   WINDOW = ('Window')
  33.  
  34.   #Skill Command Window X
  35.   SCX = 50
  36.  
  37.   #Skill Command Window Y
  38.   SCY = 120
  39.  
  40.   #Skill Command Window Width
  41.   SCW = 150
  42.  
  43.   #Skill Command Window Height
  44.   SCH = 160
  45.  
  46.   #Status Window X
  47.   SSX = 200
  48.  
  49.   #Status Window Y
  50.   SSY = 120
  51.  
  52.   #Status Window Width
  53.   SSW = 400
  54.  
  55.   #Status Window Height
  56.   SSH = 120
  57.  
  58.   #Skill Item Window X
  59.   SIX = 50
  60.  
  61.   #Skill Item Window Y
  62.   SIY = 240
  63.  
  64.   #Skill Item Window Width
  65.   SIW = 550
  66.  
  67.   #Skill Item Window Height
  68.   SIH = 200
  69.  
  70. end
  71.  
  72. class Scene_Skill < Scene_ItemBase
  73.   #--------------------------------------------------------------------------
  74.   # * Start Processing
  75.   #--------------------------------------------------------------------------
  76.   def start
  77.     super
  78.     create_help_window
  79.     create_command_window
  80.     create_status_window
  81.     create_item_window
  82.   end
  83.   #--------------------------------------------------------------------------
  84.   # * Create Command Window
  85.   #--------------------------------------------------------------------------
  86.   def create_command_window
  87.     @help_window.x = (DTOPMI::HX)
  88.     @help_window.y = (DTOPMI::HY)
  89.     @command_window = Window_SkillCommand.new((DTOPMS::SCX), (DTOPMS::SCY))
  90.     @command_window.windowskin = Cache.system(DTOPMS::WINDOW)
  91.     @command_window.viewport = @viewport
  92.     @command_window.help_window = @help_window
  93.     @command_window.actor = @actor
  94.     @command_window.set_handler(:skill,    method(:command_skill))
  95.     @command_window.set_handler(:cancel,   method(:return_scene))
  96.     @command_window.set_handler(:pagedown, method(:next_actor))
  97.     @command_window.set_handler(:pageup,   method(:prev_actor))
  98.   end
  99.   #--------------------------------------------------------------------------
  100.   # * Create Status Window
  101.   #--------------------------------------------------------------------------
  102.   def create_status_window
  103.     @status_window = Window_SkillStatus.new((DTOPMS::SSX), (DTOPMS::SSY))
  104.     @status_window.viewport = @viewport
  105.     @status_window.actor = @actor
  106.   end
  107.   #--------------------------------------------------------------------------
  108.   # * Create Item Window
  109.   #--------------------------------------------------------------------------
  110.   def create_item_window
  111.     @item_window = Window_SkillList.new((DTOPMS::SIX), (DTOPMS::SIY), (DTOPMS::SIW), (DTOPMS::SIH))
  112.     @item_window.actor = @actor
  113.     @item_window.viewport = @viewport
  114.     @item_window.help_window = @help_window
  115.     @item_window.set_handler(:ok,     method(:on_item_ok))
  116.     @item_window.set_handler(:cancel, method(:on_item_cancel))
  117.     @command_window.skill_window = @item_window
  118.   end
  119. end
  120.  
  121. class Window_SkillCommand < Window_Command
  122.   def window_width
  123.     return (DTOPMS::SCW)
  124.   end
  125. end
  126.  
  127. class Window_SkillStatus < Window_Base
  128.   def initialize(x, y)
  129.     super(x, y, window_width, (DTOPMS::SSH))
  130.     @actor = nil
  131.   end
  132.   def window_width
  133.     (DTOPMS::SSW)
  134.   end
  135. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement