Advertisement
Ventwig

Linear Menu Status

Apr 15th, 2012
747
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 7.99 KB | None | 0 0
  1. #============================================================================
  2. #Kingdom Hearts Birth By Sleep Status
  3. #By Ventwig
  4. #Version 1 - April 15 2012
  5. #For RPGMaker VX Ace
  6. #============================================================================
  7. # I was playing kingdom hearts birth by sleep, and decided I wanted to
  8. # Script something again. So I looked at the main menu and I liked the
  9. # Way the stats were drawn, so here it is :)
  10. # Thanks Mephistok for teaching me line drawing :D
  11. #=============================================================================
  12. # Description:
  13. # This code updates the menu status (the one of the four characters on
  14. # the main/pause menu) so that it looks more like the Kingdom Hearts
  15. # Series. It keeps everything horizontal, but instead of drawing gauges
  16. # and that stuff, it draws everything linear-ly and with numbers.
  17. # Just try it out, it's plug'n'play :)
  18. #===============================================================================
  19. # Instructions: Put in materials, above main.
  20. # Plug'N'Play with options
  21. #==============================================================================
  22. # Please give Credit to Ventwig if you would like to use one of my scripts
  23. # in a NON-COMMERCIAL project.
  24. # Please ask for permission if you would like to use it in a commercial game.
  25. # You may not re-distribute any of my scripts or claim as your own.
  26. # You may not release edits without permission, combatability patches are okay.
  27. #===============================================================================
  28.  
  29. ##################################################################
  30. #This is plug'n'play, but there's optional configuration to suit
  31. #Your every need! Right here!
  32. ################################################################
  33.  
  34. module BBS
  35.   #==============================================================
  36.   #Text drawn before the numbers, the left side of the line.
  37.   #Can be an abbreviation, or the full word
  38.   #Make sure to put it in quotations like: "Level"
  39.   #==============================================================
  40.   LTXT = "LV" #Level Text
  41.   HTXT = "HP" #HP Text
  42.   MTXT = "MP" #MP Text
  43.   NTXT = "Next LV" #Next level text, or required exp text
  44.  
  45.   #============================================================
  46.   #The symbol used to divide hp/maxhp or mp/maxmp
  47.   #Default is / , but you can use whatever
  48.   #Make sure to put it in quotations
  49.   #===========================================================
  50.   BRK = "/"
  51.  
  52.   #==============================================================
  53.   #The colour of the line drawn under the text.
  54.   #The number is the index of the colours in the windowskin
  55.   #==============================================================
  56.   NCOL = 10 #Name Colour, def 10
  57.   LCOL = 17 #Level Colour, def 17
  58.   HCOL = 3 #HP Colour, def 3
  59.   MCOL = 1 #MP Colour, def 1
  60.   NEXT_COL = 0 #Next Level Colour, def 0
  61.  
  62.   #============================================================
  63.   #True or false
  64.   #Sets whether or not you want to draw the actor's character sprite
  65.   #ontop of the face, def true
  66.   #===========================================================
  67.   DRAW_SPRITE = true
  68. end
  69.  
  70. #########################################################################
  71. #End Of configuration. Touch anything below and it'll delete system32   #
  72. #########################################################################
  73.  
  74. class Window_Base
  75.   def draw_line(x, y, w, h, _color = normal_color)
  76.         color = _color ; color
  77.         contents.fill_rect(x, y, w, h, color)
  78.   end
  79. end
  80.  
  81.  
  82. class Window_MenuStatus < Window_Selectable
  83.   #alias ventwig_status_window_new_initialize initialize
  84.   def initialize(x,y)
  85.    # ventwig_status_window_new_initialize(x,y)
  86.    super(x,y,window_width,window_height)
  87.     @pending_index = -1
  88.     @partysize = $game_party.members.size
  89.     @actor = $game_party.members[0]
  90.     @actor2 = $game_party.members[1]
  91.     @actor3 = $game_party.members[2]
  92.     @actor4 = $game_party.members[3]
  93.     draw_window
  94.   end
  95.   def draw_window
  96.     if @partysize > 0
  97.       draw_actor_name(@actor, 100, -3)
  98.       draw_text(100, 15, 100, 20, BBS::LTXT)
  99.       draw_text(100, 35, 100, 20, BBS::HTXT)
  100.       draw_text(100, 55, 100, 20, BBS::MTXT)
  101.       draw_text(100, 75, 100, 20, BBS::NTXT)
  102.       draw_text(200, 15, 100, 20, @actor.level.to_s,2)
  103.       draw_text(200, 35, 100, 20, @actor.hp.to_s + BBS::BRK + @actor.mhp.to_s,2)
  104.       draw_text(200, 55, 100, 20, @actor.mp.to_s + "/" + @actor.mmp.to_s,2)
  105.       draw_line(100, 17, 100, 2, _color = text_color(BBS::NCOL))
  106.       draw_line(100, 35, 200, 2, _color = text_color(BBS::LCOL))
  107.       draw_line(100, 55, 200, 2, _color = text_color(BBS::HCOL))
  108.       draw_line(100, 75, 200, 2, _color = text_color(BBS::MCOL))
  109.       draw_line(100, 95, 200, 2, _color = text_color(BBS::NEXT_COL))
  110.       draw_text(200, 75, 100, 20, @actor.next_level_exp.to_s,2)
  111.       draw_actor_face(@actor,3,0)
  112.       if BBS::DRAW_SPRITE == true
  113.         draw_actor_graphic(@actor, 20, 35)
  114.       end
  115.     end
  116.     if @partysize > 1
  117.       draw_actor_name(@actor2, 100, 95)
  118.       draw_text(100, 113, 100, 20, BBS::LTXT)
  119.       draw_text(100, 133, 100, 20, BBS::HTXT)
  120.       draw_text(100, 153, 100, 20, BBS::MTXT)
  121.       draw_text(100, 173, 100, 20, BBS::NTXT)
  122.       draw_text(200, 113, 100, 20, @actor2.level.to_s,2)
  123.       draw_text(200, 133, 100, 20, @actor2.hp.to_s + BBS::BRK + @actor2.mhp.to_s,2)
  124.       draw_text(200, 153, 100, 20, @actor2.mp.to_s + BBS::BRK + @actor2.mmp.to_s,2)
  125.       draw_text(200, 173, 100, 20, @actor2.next_level_exp.to_s,2)
  126.       draw_line(100, 115, 100, 2, _color = text_color(BBS::NCOL))
  127.       draw_line(100, 133, 200, 2, _color = text_color(BBS::LCOL))
  128.       draw_line(100, 153, 200, 2, _color = text_color(BBS::HCOL))
  129.       draw_line(100, 173, 200, 2, _color = text_color(BBS::MCOL))
  130.       draw_line(100, 193, 200, 2, _color = text_color(BBS::NEXT_COL))
  131.       draw_actor_face(@actor2,3,99)
  132.       if BBS::DRAW_SPRITE == true
  133.         draw_actor_graphic(@actor2, 20, 135)
  134.       end
  135.     end
  136.     if @partysize > 2
  137.       draw_actor_name(@actor3, 100, 194)
  138.       draw_text(100, 212, 100, 20, BBS::LTXT)
  139.       draw_text(100, 232, 100, 20, BBS::HTXT)
  140.       draw_text(100, 252, 100, 20, BBS::MTXT)
  141.       draw_text(100, 272, 100, 20, BBS::NTXT)
  142.       draw_text(200, 212, 100, 20, @actor3.level.to_s,2)
  143.       draw_text(200, 232, 100, 20, @actor3.hp.to_s + BBS::BRK + @actor3.mhp.to_s,2)
  144.       draw_text(200, 252, 100, 20, @actor3.mp.to_s + BBS::BRK + @actor3.mmp.to_s,2)
  145.       draw_text(200, 272, 100, 20, @actor3.next_level_exp.to_s,2)
  146.       draw_line(100, 214, 100, 2, _color = text_color(BBS::NCOL))
  147.       draw_line(100, 232, 200, 2, _color = text_color(BBS::LCOL))
  148.       draw_line(100, 252, 200, 2, _color = text_color(BBS::HCOL))
  149.       draw_line(100, 272, 200, 2, _color = text_color(BBS::MCOL))
  150.       draw_line(100, 292, 200, 2, _color = text_color(BBS::NEXT_COL))
  151.       draw_actor_face(@actor3,3,197)
  152.       if BBS::DRAW_SPRITE == true
  153.         draw_actor_graphic(@actor3, 20, 232)
  154.       end
  155.     end
  156.     if @partysize > 3
  157.       draw_actor_name(@actor4, 100, 291)
  158.       draw_text(100, 309, 100, 20, BBS::LTXT)
  159.       draw_text(100, 329, 100, 20, BBS::HTXT)
  160.       draw_text(100, 349, 100, 20, BBS::MTXT)
  161.       draw_text(100, 369, 100, 20, BBS::NTXT)
  162.       draw_text(200, 309, 100, 20, @actor4.level.to_s,2)
  163.       draw_text(200, 329, 100, 20, @actor4.hp.to_s + BBS::BRK + @actor4.mhp.to_s,2)
  164.       draw_text(200, 349, 100, 20, @actor4.mp.to_s + BBS::BRK + @actor4.mmp.to_s,2)
  165.       draw_text(200, 369, 100, 20, @actor4.next_level_exp.to_s,2)
  166.       draw_line(100, 311, 100, 2, _color = text_color(BBS::NCOL))
  167.       draw_line(100, 329, 200, 2, _color = text_color(BBS::LCOL))
  168.       draw_line(100, 349, 200, 2, _color = text_color(BBS::HCOL))
  169.       draw_line(100, 369, 200, 2, _color = text_color(BBS::MCOL))
  170.       draw_line(100, 389, 200, 2, _color = text_color(BBS::NEXT_COL))
  171.       draw_actor_face(@actor4,3,295)  
  172.       if BBS::DRAW_SPRITE == true
  173.         draw_actor_graphic(@actor4, 20,329)
  174.       end
  175.     end
  176.   end
  177. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement