the (one) RING MENU

Script Request Template
Hi everyone, Im working on a Lord of the Rings game, and Im using the ring menu, but my Idea was to put "The One Ring" around the Ring menu. Please let me know if this is possible

Script Title:
The "One" Ring menu
RMXP or RMVX:
RMXP
Detailed Description:
Well this is the script:
  1. #===================================================
  2. # ■ Ring Menu - Show Player Location - Release #1 (Enhanced By Dubealex)
  3. #===================================================
  4. # For more infos and update, visit:
  5. # asylum.dubealex.com
  6. #
  7. # Original Ring Menu by: 和希 (From XRXS)
  8. # Original Edit and Fix by: Maki
  9. # Show Player Location Version by: Dubealex
  10. #
  11. # You can customize this script at line #35 - Have fun !!
  12. # If you want to show more stuff, its easy to do, you can try to ask in the forum.
  13. #
  14. # [email hidden]
  15. #===================================================
  16.  
  17.  
  18. #===================================================
  19. # ▼ CLASS Scene_Menu Begins
  20. #===================================================
  21.  
  22. class Scene_Menu
  23. #--------------------------------------------------------------------------
  24. # پ? ?I?u?W?F?N?gڈ?????
  25. #     menu_index : ?R?}???h??Jپ[?\??ڈ?????u
  26. #--------------------------------------------------------------------------
  27. def initialize(menu_index = 0)
  28.   @menu_index = menu_index
  29.   $location_text=[]
  30.   $window_size=[]
  31.   $ring_menu_text=[]
  32.   $chara_select=[]
  33.   @window_opacity=[]
  34.   @chara_select=[]
  35.   @window_position=[]
  36.  
  37.    #--------------------------------------------------------------------------------------------------
  38.    # ■ Ring Menu Customization Section: (By Dubealex)
  39.    #--------------------------------------------------------------------------------------------------
  40.    # Those variables defines how the script will act.
  41.    # Simply change the value by those you want.
  42.    # Remember that changing the font size has its limitation due to text space allocation.
  43.    #
  44.    # ▼ TEXT SETTINGS FOR SHOW PLAYER LOCATION WINDOW:
  45.    $location_text[0]="Tahoma"      # Font Type
  46.    $location_text[1]=22                # Font Size
  47.    $location_text[2]=6                  # Location Title Color
  48.    $location_text[4]=0                  # Map Name Color
  49.    $location_text[3]="Location:"     # Customize the "Location" Title Text
  50.  
  51.    # ▼ SHOW LOCATION WINDOW SETTINS:
  52.    @show_location_window=true                       #Set to false to not use it !
  53.    @window_opacity[0]=255                             # Border Opacity
  54.    @window_opacity[1]=130                             # Background Opacity
  55.    $window_location_skin="001-Blue01"            # Window Skin
  56.    @window_position[0]=20                             # X Axis Position
  57.    @window_position[1]=20                             # Y Axis Position
  58.    $window_size[0]=160                                  # Lengh
  59.    $window_size[1]=96                                    # Heigh
  60.  
  61.    # ▼  TEXT SETTINGS FOR INSIDE THE RING MENU:
  62.    $ring_menu_text[0]="Tahoma"      # Font Type
  63.    $ring_menu_text[7]=0                  # Font Color
  64.    $ring_menu_text[8]=22                # Font Size
  65.    $ring_menu_text[1]="Items"         # Items Menu Text
  66.    $ring_menu_text[2]="Skills"          # Skills Menu Text
  67.    $ring_menu_text[3]="Equip"         # Equip Menu Text
  68.    $ring_menu_text[4]="Stats"          # Stats Menu Text
  69.    $ring_menu_text[5]="Save"          # Save Menu Text
  70.    $ring_menu_text[6]="Quit"           # Quit Menu Text
  71.  
  72.    # ▼  CHARACTER SELECTION WINDOW SETTINGS :
  73.    @chara_select[0]=400               # X Axis Position
  74.    @chara_select[1]=0                  # Y Axis Position
  75.    $chara_select[0]="Tahoma"       # Font Type
  76.    $chara_select[1]=0                   # Font Color
  77.    $chara_select[5]=22                  # Font Size
  78.    $chara_select[2]=255               # Window Border Opacity
  79.    $chara_select[3]=130               # Window Background Opacity
  80.    $chara_select[4]="001-Blue01"  # Window Skin to use
  81.   #--------------------------------------------------------------------------------------------------
  82.  
  83. end
  84. #--------------------------------------------------------------------------
  85. # پ? ?پ?C??ڈ??
  86. #--------------------------------------------------------------------------
  87. def main
  88.  
  89.   # Show Player Location Feature:
  90.   if @show_location_window==true    
  91.   @window_location = Window_Location.new
  92.      @window_location.x = @window_position[0]
  93.      @window_location.y = @window_position[1]
  94.      @window_location.opacity = @window_opacity[0]
  95.      @window_location.back_opacity = @window_opacity[1]
  96.      end
  97.   #End of Show Player Location
  98.  
  99.   # ?X?v???C?g?Z?b?g??چ? ?
  100.   @spriteset = Spriteset_Map.new
  101.   # ?R?}???h?E?B???h?E??چ? ?
  102.   px = $game_player.screen_x - 15
  103.   py = $game_player.screen_y - 24
  104.   @command_window = Window_RingMenu.new(px,py)
  105.   @command_window.index = @menu_index
  106.   # ?pپ[?e?B l ??? 0  l??ڈ?چ?
  107.   if $game_party.actors.size == 0
  108.     # ?A?C?e??پA?X?L??پA????پA?X?eپ[?^?X????????
  109.     @command_window.disable_item(0)
  110.     @command_window.disable_item(1)
  111.     @command_window.disable_item(2)
  112.     @command_window.disable_item(3)
  113.   end
  114.   @command_window.z = 100
  115.   # ?Zپ[?u??~??ڈ?چ?
  116.   if $game_system.save_disabled
  117.     # ?Zپ[?u???????????
  118.     @command_window.disable_item(4)
  119.   end
  120.   # ?X?eپ[?^?X?E?B???h?E??چ? ?
  121.   @status_window = Window_RingMenuStatus.new
  122.   @status_window.x = @chara_select[0]
  123.   @status_window.y = @chara_select[1]
  124.   @status_window.z = 200
  125.   @status_window.opacity=$chara_select[2]
  126.   @status_window.back_opacity=$chara_select[3]
  127.   @status_window.visible = false
  128.   # ?g?????W?V??????چs
  129.   Graphics.transition
  130.   # ?پ?C????پ[?v
  131.   loop do
  132.     # ?Qپ[???????چX V
  133.     Graphics.update
  134.     # ????ڈ?????چX V
  135.     Input.update
  136.     # ?t??پ[??چX V
  137.     update
  138.     # ????? ???????????پ[?v?????f
  139.     if $scene != self
  140.       break
  141.     end
  142.   end
  143.   # ?g?????W?V????ڈ???
  144.   Graphics.freeze
  145.   # ?X?v???C?g?Z?b?g??????
  146.   @spriteset.dispose
  147.   # ?E?B???h?E??????
  148.   if @show_location_window==true
  149.   @window_location.dispose
  150.   end
  151.   @command_window.dispose
  152.   @status_window.dispose
  153. end
  154. #--------------------------------------------------------------------------
  155. # پ? ?t??پ[??چX V
  156. #--------------------------------------------------------------------------
  157. def update
  158.   # ?E?B???h?E??چX V
  159.   if @show_location_window==true
  160.   @window_location.update
  161.   end
  162.   @command_window.update
  163.   @status_window.update
  164.   # ?R?}???h?E?B???h?E???A?N?e?B?u??ڈ?چ?: update_command ?????
  165.   if @command_window.active
  166.     update_command
  167.     return
  168.   end
  169.   # ?X?eپ[?^?X?E?B???h?E???A?N?e?B?u??ڈ?چ?: update_status ?????
  170.   if @status_window.active
  171.     update_status
  172.     return
  173.   end
  174. end
  175. #--------------------------------------------------------------------------
  176. # پ? ?t??پ[??چX V (?R?}???h?E?B???h?E???A?N?e?B?u??ڈ?چ?)
  177. #--------------------------------------------------------------------------
  178. def update_command
  179.   # B ?{?^??????????ڈ?چ?
  180.   if Input.trigger?(Input::B)
  181.     # ?L?????Z?? SE ?????t
  182.     $game_system.se_play($data_system.cancel_se)
  183.     # ?}?b?v????? ?????
  184.     $scene = Scene_Map.new
  185.     return
  186.   end
  187.   # C ?{?^??????????ڈ?چ?
  188.   if Input.trigger?(Input::C)
  189.     # ?pپ[?e?B l ??? 0  l??پA?Zپ[?uپA?Qپ[??ڈI????O??R?}???h??ڈ?چ?
  190.     if $game_party.actors.size == 0 and @command_window.index < 4
  191.       # ?u?Uپ[ SE ?????t
  192.       $game_system.se_play($data_system.buzzer_se)
  193.       return
  194.     end
  195.     # ?R?}???h?E?B???h?E??Jپ[?\????u?????
  196.     case @command_window.index
  197.     when 0  # ?A?C?e??
  198.       # ????  SE ?????t
  199.       $game_system.se_play($data_system.decision_se)
  200.       # ?A?C?e??????? ?????
  201.       $scene = Scene_Item.new
  202.     when 1  # ?X?L??
  203.       # ???? SE ?????t
  204.       $game_system.se_play($data_system.decision_se)
  205.       # ?X?eپ[?^?X?E?B???h?E???A?N?e?B?u?????
  206.       @command_window.active = false
  207.       @status_window.active = true
  208.       @status_window.visible = true
  209.       @status_window.index = 0
  210.     when 2  # ????
  211.       # ???? SE ?????t
  212.       $game_system.se_play($data_system.decision_se)
  213.       # ?X?eپ[?^?X?E?B???h?E???A?N?e?B?u?????
  214.       @command_window.active = false
  215.       @status_window.active = true
  216.       @status_window.visible = true
  217.       @status_window.index = 0
  218.     when 3  # ?X?eپ[?^?X
  219.       # ???? SE ?????t
  220.       $game_system.se_play($data_system.decision_se)
  221.       # ?X?eپ[?^?X?E?B???h?E???A?N?e?B?u?????
  222.       @command_window.active = false
  223.       @status_window.active = true
  224.       @status_window.visible = true
  225.       @status_window.index = 0
  226.     when 4  # ?Zپ[?u
  227.       # ?Zپ[?u??~??ڈ?چ?
  228.       if $game_system.save_disabled
  229.         # ?u?Uپ[ SE ?????t
  230.         $game_system.se_play($data_system.buzzer_se)
  231.         return
  232.       end
  233.       # ???? SE ?????t
  234.       $game_system.se_play($data_system.decision_se)
  235.       # ?Zپ[?u????? ?????
  236.       $scene = Scene_Save.new
  237.     when 5  # ?Qپ[??ڈI??
  238.       # ???? SE ?????t
  239.       $game_system.se_play($data_system.decision_se)
  240.       # ?Qپ[??ڈI??????? ?????
  241.       $scene = Scene_End.new
  242.     end
  243.     return
  244.   end
  245.   # ?A?j?پپ[?V??????????Jپ[?\????ڈ?? ??چs?????
  246.   return if @command_window.animation?
  247.   # پ?orپ? ?{?^??????????ڈ?چ?
  248.   if Input.press?(Input::UP) or  Input.press?(Input::LEFT)
  249.     $game_system.se_play($data_system.cursor_se)
  250.     @command_window.setup_move_move(Window_RingMenu::MODE_MOVEL)
  251.     return
  252.   end
  253.   # پ?orپ? ?{?^??????????ڈ?چ?
  254.   if Input.press?(Input::DOWN) or  Input.press?(Input::RIGHT)
  255.     $game_system.se_play($data_system.cursor_se)
  256.     @command_window.setup_move_move(Window_RingMenu::MODE_MOVER)
  257.     return
  258.   end
  259. end
  260. #--------------------------------------------------------------------------
  261. # پ? ?t??پ[??چX V (?X?eپ[?^?X?E?B???h?E???A?N?e?B?u??ڈ?چ?)
  262. #--------------------------------------------------------------------------
  263. def update_status
  264.   # B ?{?^??????????ڈ?چ?
  265.   if Input.trigger?(Input::B)
  266.     # ?L?????Z?? SE ?????t
  267.     $game_system.se_play($data_system.cancel_se)
  268.     # ?R?}???h?E?B???h?E???A?N?e?B?u?????
  269.     @command_window.active = true
  270.     @status_window.active = false
  271.     @status_window.visible = false
  272.     @status_window.index = -1
  273.     return
  274.   end
  275.   # C ?{?^??????????ڈ?چ?
  276.   if Input.trigger?(Input::C)
  277.     # ?R?}???h?E?B???h?E??Jپ[?\????u?????
  278.     case @command_window.index
  279.     when 1  # ?X?L??
  280.       # ????A?N?^پ[??چs?? ????? 2 ??ڈ???ڈ?چ?
  281.       if $game_party.actors[@status_window.index].restriction >= 2
  282.         # ?u?Uپ[ SE ?????t
  283.         $game_system.se_play($data_system.buzzer_se)
  284.         return
  285.       end
  286.       # ???? SE ?????t
  287.       $game_system.se_play($data_system.decision_se)
  288.       # ?X?L??????? ?????
  289.       $scene = Scene_Skill.new(@status_window.index)
  290.     when 2  # ????
  291.       # ???? SE ?????t
  292.       $game_system.se_play($data_system.decision_se)
  293.       # ????????? ?????
  294.       $scene = Scene_Equip.new(@status_window.index)
  295.     when 3  # ?X?eپ[?^?X
  296.       # ???? SE ?????t
  297.       $game_system.se_play($data_system.decision_se)
  298.       # ?X?eپ[?^?X????? ?????
  299.       $scene = Scene_Status.new(@status_window.index)
  300.     end
  301.     return
  302.   end
  303. end
  304. end
  305.  
  306. #===================================================
  307. # ▲ CLASS Scene_Menu Ends
  308. #===================================================
  309.  
  310.  
  311. #===================================================
  312. # ▼ CLASS Window_RingMenu  Begins
  313. #===================================================
  314. class Window_RingMenu < Window_Base
  315. #--------------------------------------------------------------------------
  316. # پ? ?N???X?? ?
  317. #--------------------------------------------------------------------------
  318. STARTUP_FRAMES = 20
  319. MOVING_FRAMES = 5  
  320. RING_R = 64        
  321. ICON_ITEM   = RPG::Cache.icon("034-Item03")
  322. ICON_SKILL  = RPG::Cache.icon("044-Skill01")
  323. ICON_EQUIP  = RPG::Cache.icon("001-Weapon01")
  324. ICON_STATUS = RPG::Cache.icon("050-Skill07")
  325. ICON_SAVE   = RPG::Cache.icon("038-Item07")
  326. ICON_EXIT   = RPG::Cache.icon("046-Skill03")
  327. ICON_DISABLE= RPG::Cache.icon("")
  328. SE_STARTUP = "056-Right02"
  329. MODE_START = 1
  330. MODE_WAIT  = 2
  331. MODE_MOVER = 3
  332. MODE_MOVEL = 4
  333. #--------------------------------------------------------------------------
  334. # پ? ?A?N?Z?T
  335. #--------------------------------------------------------------------------
  336. attr_accessor :index
  337. #--------------------------------------------------------------------------
  338. # پ? ?I?u?W?F?N?gڈ?????
  339. #--------------------------------------------------------------------------
  340. def initialize( center_x, center_y )
  341.   super(0, 0, 640, 480)
  342.   self.contents = Bitmap.new(width-32, height-32)
  343.   self.contents.font.name = $ring_menu_text[0]
  344.   self.contents.font.color = text_color($ring_menu_text[7])
  345.   self.contents.font.size = $ring_menu_text[8]
  346.   self.opacity = 0
  347.   self.back_opacity = 0
  348.   s1 = $ring_menu_text[1]
  349.   s2 = $ring_menu_text[2]
  350.   s3 = $ring_menu_text[3]
  351.   s4 = $ring_menu_text[4]
  352.   s5 = $ring_menu_text[5]
  353.   s6 = $ring_menu_text[6]
  354.   @commands = [ s1, s2, s3, s4, s5, s6 ]
  355.   @item_max = 6
  356.   @index = 0
  357.   @items = [ ICON_ITEM, ICON_SKILL, ICON_EQUIP, ICON_STATUS, ICON_SAVE, ICON_EXIT ]
  358.   @disabled = [ false, false, false, false, false, false ]
  359.   @cx = center_x - 16
  360.   @cy = center_y - 16
  361.   setup_move_start
  362.   refresh
  363. end
  364. #--------------------------------------------------------------------------
  365. # پ? ?t??پ[??چX V
  366. #--------------------------------------------------------------------------
  367. def update
  368.   super
  369.   refresh
  370. end
  371. #--------------------------------------------------------------------------
  372. # پ? ????چ?`??
  373. #--------------------------------------------------------------------------
  374. def refresh
  375.   self.contents.clear
  376.   # ?A?C?R?????`??
  377.   case @mode
  378.   when MODE_START
  379.     refresh_start
  380.   when MODE_WAIT
  381.     refresh_wait
  382.   when MODE_MOVER
  383.     refresh_move(1)
  384.   when MODE_MOVEL
  385.     refresh_move(0)
  386.   end
  387.   # ?A?N?e?B?u??R?}???h???\??
  388.   rect = Rect.new(@cx - 272, @cy + 24, self.contents.width-32, 32)
  389.   self.contents.draw_text(rect, @commands[@index],1)
  390. end
  391. #--------------------------------------------------------------------------
  392. # پ? ????چ?`??(ڈ???????)
  393. #--------------------------------------------------------------------------
  394. def refresh_start
  395.   d1 = 2.0 * Math::PI / @item_max
  396.   d2 = 1.0 * Math::PI / STARTUP_FRAMES
  397.   r = RING_R - 1.0 * RING_R * @steps / STARTUP_FRAMES
  398.   for i in 0...@item_max
  399.     j = i - @index
  400.     d = d1 * j + d2 * @steps
  401.     x = @cx + ( r * Math.sin( d ) ).to_i
  402.     y = @cy - ( r * Math.cos( d ) ).to_i
  403.     draw_item(x, y, i)
  404.   end
  405.   @steps -= 1
  406.   if @steps < 1
  407.     @mode = MODE_WAIT
  408.   end
  409. end
  410. #--------------------------------------------------------------------------
  411. # پ? ????چ?`??(??@??)
  412. #--------------------------------------------------------------------------
  413. def refresh_wait
  414.   d = 2.0 * Math::PI / @item_max
  415.   for i in 0...@item_max
  416.     j = i - @index
  417.     x = @cx + ( RING_R * Math.sin( d * j ) ).to_i
  418.     y = @cy - ( RING_R * Math.cos( d * j ) ).to_i
  419.     draw_item(x, y, i)
  420.   end
  421. end
  422. #--------------------------------------------------------------------------
  423. # پ? ????چ?`??(???]??)
  424. #  mode : 0=?????v???? 1=???v????
  425. #--------------------------------------------------------------------------
  426. def refresh_move( mode )
  427.   d1 = 2.0 * Math::PI / @item_max
  428.   d2 = d1 / MOVING_FRAMES
  429.   d2 *= -1 if mode != 0
  430.   for i in 0...@item_max
  431.     j = i - @index
  432.     d = d1 * j + d2 * @steps
  433.     x = @cx + ( RING_R * Math.sin( d ) ).to_i
  434.     y = @cy - ( RING_R * Math.cos( d ) ).to_i
  435.     draw_item(x, y, i)
  436.   end
  437.   @steps -= 1
  438.   if @steps < 1
  439.     @mode = MODE_WAIT
  440.   end
  441. end
  442. #--------------------------------------------------------------------------
  443. # پ? چ????`??
  444. #     x :
  445. #     y :
  446. #     i : چ????چ?
  447. #--------------------------------------------------------------------------
  448. def draw_item(x, y, i)
  449.   #p "x=" + x.to_s + " y=" + y.to_s + " i=" + @items[i].to_s
  450.   rect = Rect.new(0, 0, @items[i].width, @items[i].height)
  451.   if @index == i
  452.     self.contents.blt( x, y, @items[i], rect )
  453.     if @disabled[@index]
  454.       self.contents.blt( x, y, ICON_DISABLE, rect )
  455.     end
  456.   else
  457.     self.contents.blt( x, y, @items[i], rect, 128 )
  458.     if @disabled[@index]
  459.       self.contents.blt( x, y, ICON_DISABLE, rect, 128 )
  460.     end
  461.   end
  462. end
  463. #--------------------------------------------------------------------------
  464. # پ? چ?????????????
  465. #     index : چ????چ?
  466. #--------------------------------------------------------------------------
  467. def disable_item(index)
  468.   @disabled[index] = true
  469. end
  470. #--------------------------------------------------------------------------
  471. # پ? ڈ??????A?j?پپ[?V??????ڈ???
  472. #--------------------------------------------------------------------------
  473. def setup_move_start
  474.   @mode = MODE_START
  475.   @steps = STARTUP_FRAMES
  476.   if  SE_STARTUP != nil and SE_STARTUP != ""
  477.     Audio.se_play("Audio/SE/" + SE_STARTUP, 80, 100)
  478.   end
  479. end
  480. #--------------------------------------------------------------------------
  481. # پ? ???]?A?j?پپ[?V??????ڈ???
  482. #--------------------------------------------------------------------------
  483. def setup_move_move(mode)
  484.   if mode == MODE_MOVER
  485.     @index -= 1
  486.     @index = @items.size - 1 if @index < 0
  487.   elsif mode == MODE_MOVEL
  488.     @index += 1
  489.     @index = 0 if @index >= @items.size
  490.   else
  491.     return
  492.   end
  493.   @mode = mode
  494.   @steps = MOVING_FRAMES
  495. end
  496. #--------------------------------------------------------------------------
  497. # پ? ?A?j?پپ[?V?????????????
  498. #--------------------------------------------------------------------------
  499. def animation?
  500.   return @mode != MODE_WAIT
  501. end
  502. end
  503.  
  504. #===================================================
  505. # ▲ CLASS Window_RingMenu Ends
  506. #===================================================
  507.  
  508.  
  509. #===================================================
  510. # ▼ CLASS Window_RingMenuStatus Begins
  511. #===================================================
  512.  
  513. class Window_RingMenuStatus < Window_Selectable
  514. #--------------------------------------------------------------------------
  515. # پ? ?I?u?W?F?N?gڈ?????
  516. #--------------------------------------------------------------------------
  517. def initialize
  518.   super(204, 64, 232, 352)
  519.   self.contents = Bitmap.new(width - 32, height - 32)
  520.   self.contents.font.size = $chara_select[5]
  521.   refresh
  522.   self.active = false
  523.   self.index = -1
  524. end
  525. #--------------------------------------------------------------------------
  526. # پ? ???t???b?V??
  527. #--------------------------------------------------------------------------
  528. def refresh
  529.   self.contents.clear
  530.   self.windowskin = RPG::Cache.windowskin($chara_select[4])
  531.   self.contents.font.name = $chara_select[0]
  532.   self.contents.font.color = text_color($chara_select[1])
  533.   @item_max = $game_party.actors.size
  534.   for i in 0...$game_party.actors.size
  535.     x = 80
  536.     y = 80 * i
  537.     actor = $game_party.actors[i]
  538.     draw_actor_graphic(actor, x - 40, y + 80)
  539.     draw_actor_name(actor, x, y + 24)
  540.   end
  541. end
  542. #--------------------------------------------------------------------------
  543. # پ? ?Jپ[?\??????`چX V
  544. #--------------------------------------------------------------------------
  545. def update_cursor_rect
  546.   if @index < 0
  547.     self.cursor_rect.empty
  548.   else
  549.     self.cursor_rect.set(0, @index * 80, self.width - 32, 80)
  550.   end
  551. end
  552. end
  553. #===================================================
  554. # ▲ CLASS Window_RingMenuStatus Ends
  555. #===================================================
  556.  
  557.  
  558. #===================================================
  559. # ▼ CLASS Game_Map Additional Code Begins
  560. #===================================================
  561. class Game_Map
  562.  
  563. #Dubealex Addition (from XRXS) to show Map Name on screen
  564. def name
  565.   $map_infos[@map_id]
  566. end
  567. end
  568.  
  569. #===================================================
  570. # ▲ CLASS Game_Map Additional Code Ends
  571. #===================================================
  572.  
  573.  
  574. #===================================================
  575. # ▼ CLASS Scene_Title Additional Code Begins
  576. #===================================================
  577. class Scene_Title
  578.  
  579. #Dubealex Addition (from XRXS) to show Map Name on screen
  580.   $map_infos = load_data("Data/MapInfos.rxdata")
  581.   for key in $map_infos.keys
  582.     $map_infos[key] = $map_infos[key].name
  583.   end
  584. end
  585.  
  586. #===================================================
  587. # ▲ CLASS Scene_Title Additional Code Ends
  588. #===================================================
  589.  
  590.  
  591. #===================================================
  592. # ▼ CLASS Window_Location Begins
  593. #===================================================
  594.  
  595. class Window_Location < Window_Base
  596.  
  597. def initialize
  598. super(0, 0, $window_size[0], $window_size[1])
  599.   self.contents = Bitmap.new(width - 32, height - 32)
  600.   self.contents.font.name = $location_text[0]
  601.   self.contents.font.size = $location_text[1]
  602. refresh
  603. end
  604.  
  605. def refresh
  606. self.contents.clear
  607. self.windowskin = RPG::Cache.windowskin($window_location_skin)
  608. self.contents.font.color = text_color($location_text[2])
  609. self.contents.draw_text(4, 0, 120, 32, $location_text[3])
  610. self.contents.font.color = text_color($location_text[4])
  611. self.contents.draw_text(4, 32, 120, 32, $game_map.name, 2)
  612. end
  613. end
  614. #===================================================
  615. # ▲ CLASS Window_Location Ends
  616. #===================================================
  617.  
  618. #===================================================
  619. # ▲ Ring Menu - Show Player Location R1 - Ends
  620. #===================================================
Expand to see the code.

And this is the image I want around the menu:
Image Image
Screen shots:
Image.
Here ya go. Put your background image in the Pictures folder & Edit the line:

BG_IMAGE = RPG::Cache.picture("one_ring_black")

with the name of your image file

  1. #===================================================
  2. # ■ Ring Menu - Show Player Location - Release #1 (Enhanced By Dubealex)
  3. #===================================================
  4. # For more infos and update, visit:
  5. # asylum.dubealex.com
  6. #
  7. # Original Ring Menu by: 和希 (From XRXS)
  8. # Original Edit and Fix by: Maki
  9. # Show Player Location Version by: Dubealex
  10. #
  11. # You can customize this script at line #35 - Have fun !!
  12. # If you want to show more stuff, its easy to do, you can try to ask in the forum.
  13. #
  14. # [email hidden]
  15. #===================================================
  16.  
  17.  
  18. #===================================================
  19. # ▼ CLASS Scene_Menu Begins
  20. #===================================================
  21.  
  22. class Scene_Menu
  23. BG_IMAGE    = RPG::Cache.picture("one_ring_black")
  24. #--------------------------------------------------------------------------
  25. # پ? ?I?u?W?F?N?gڈ?????
  26. #     menu_index : ?R?}???h??Jپ[?\??ڈ?????u
  27. #--------------------------------------------------------------------------
  28. def initialize(menu_index = 0)
  29.   @menu_index = menu_index
  30.   $location_text=[]
  31.   $window_size=[]
  32.   $ring_menu_text=[]
  33.   $chara_select=[]
  34.   @window_opacity=[]
  35.   @chara_select=[]
  36.   @window_position=[]
  37.  
  38.    #--------------------------------------------------------------------------------------------------
  39.    # ■ Ring Menu Customization Section: (By Dubealex)
  40.    #--------------------------------------------------------------------------------------------------
  41.    # Those variables defines how the script will act.
  42.    # Simply change the value by those you want.
  43.    # Remember that changing the font size has its limitation due to text space allocation.
  44.    #
  45.    # ▼ TEXT SETTINGS FOR SHOW PLAYER LOCATION WINDOW:
  46.    $location_text[0]="Tahoma"      # Font Type
  47.    $location_text[1]=22                # Font Size
  48.    $location_text[2]=6                  # Location Title Color
  49.    $location_text[4]=0                  # Map Name Color
  50.    $location_text[3]="Location:"     # Customize the "Location" Title Text
  51.  
  52.    # ▼ SHOW LOCATION WINDOW SETTINS:
  53.    @show_location_window=true                       #Set to false to not use it !
  54.    @window_opacity[0]=255                             # Border Opacity
  55.    @window_opacity[1]=130                             # Background Opacity
  56.    $window_location_skin="001-Blue01"            # Window Skin
  57.    @window_position[0]=20                             # X Axis Position
  58.    @window_position[1]=20                             # Y Axis Position
  59.    $window_size[0]=160                                  # Lengh
  60.    $window_size[1]=96                                    # Heigh
  61.  
  62.    # ▼  TEXT SETTINGS FOR INSIDE THE RING MENU:
  63.    $ring_menu_text[0]="Tahoma"      # Font Type
  64.    $ring_menu_text[7]=0                  # Font Color
  65.    $ring_menu_text[8]=22                # Font Size
  66.    $ring_menu_text[1]="Items"         # Items Menu Text
  67.    $ring_menu_text[2]="Skills"          # Skills Menu Text
  68.    $ring_menu_text[3]="Equip"         # Equip Menu Text
  69.    $ring_menu_text[4]="Stats"          # Stats Menu Text
  70.    $ring_menu_text[5]="Save"          # Save Menu Text
  71.    $ring_menu_text[6]="Quit"           # Quit Menu Text
  72.  
  73.    # ▼  CHARACTER SELECTION WINDOW SETTINGS :
  74.    @chara_select[0]=400               # X Axis Position
  75.    @chara_select[1]=0                  # Y Axis Position
  76.    $chara_select[0]="Tahoma"       # Font Type
  77.    $chara_select[1]=0                   # Font Color
  78.    $chara_select[5]=22                  # Font Size
  79.    $chara_select[2]=255               # Window Border Opacity
  80.    $chara_select[3]=130               # Window Background Opacity
  81.    $chara_select[4]="001-Blue01"  # Window Skin to use
  82.   #--------------------------------------------------------------------------------------------------
  83.  
  84. end
  85. #--------------------------------------------------------------------------
  86. # پ? ?پ?C??ڈ??
  87. #--------------------------------------------------------------------------
  88. def main
  89.  
  90.   # Show Player Location Feature:
  91.   if @show_location_window==true    
  92.   @window_location = Window_Location.new
  93.      @window_location.x = @window_position[0]
  94.      @window_location.y = @window_position[1]
  95.      @window_location.opacity = @window_opacity[0]
  96.      @window_location.back_opacity = @window_opacity[1]
  97.      end
  98.   #End of Show Player Location
  99.  
  100.   # ?X?v???C?g?Z?b?g??چ? ?
  101.   @spriteset = Spriteset_Map.new
  102.   # ?R?}???h?E?B???h?E??چ? ?
  103.   px = $game_player.screen_x - 15
  104.   py = $game_player.screen_y - 24
  105.   @command_window = Window_RingMenu.new(px,py)
  106.   @command_window.index = @menu_index
  107.   # create background image
  108.   @bg_image = Sprite.new
  109.   @bg_image.bitmap = BG_IMAGE
  110.   @bg_image.x = $game_player.screen_x - @bg_image.bitmap.width / 2
  111.   @bg_image.y = $game_player.screen_y - @bg_image.bitmap.height / 2
  112.   # ?pپ[?e?B l ??? 0  l??ڈ?چ?
  113.   if $game_party.actors.size == 0
  114.     # ?A?C?e??پA?X?L??پA????پA?X?eپ[?^?X????????
  115.     @command_window.disable_item(0)
  116.     @command_window.disable_item(1)
  117.     @command_window.disable_item(2)
  118.     @command_window.disable_item(3)
  119.   end
  120.   @command_window.z = 100
  121.   # ?Zپ[?u??~??ڈ?چ?
  122.   if $game_system.save_disabled
  123.     # ?Zپ[?u???????????
  124.     @command_window.disable_item(4)
  125.   end
  126.   # ?X?eپ[?^?X?E?B???h?E??چ? ?
  127.   @status_window = Window_RingMenuStatus.new
  128.   @status_window.x = @chara_select[0]
  129.   @status_window.y = @chara_select[1]
  130.   @status_window.z = 200
  131.   @status_window.opacity=$chara_select[2]
  132.   @status_window.back_opacity=$chara_select[3]
  133.   @status_window.visible = false
  134.   # ?g?????W?V??????چs
  135.   Graphics.transition
  136.   # ?پ?C????پ[?v
  137.   loop do
  138.     # ?Qپ[???????چX V
  139.     Graphics.update
  140.     # ????ڈ?????چX V
  141.     Input.update
  142.     # ?t??پ[??چX V
  143.     update
  144.     # ????? ???????????پ[?v?????f
  145.     if $scene != self
  146.       break
  147.     end
  148.   end
  149.   # ?g?????W?V????ڈ???
  150.   Graphics.freeze
  151.   # ?X?v???C?g?Z?b?g??????
  152.   @spriteset.dispose
  153.   # ?E?B???h?E??????
  154.   if @show_location_window==true
  155.   @window_location.dispose
  156.   end
  157.   @command_window.dispose
  158.   @status_window.dispose
  159.   @bg_image.dispose
  160. end
  161. #--------------------------------------------------------------------------
  162. # پ? ?t??پ[??چX V
  163. #--------------------------------------------------------------------------
  164. def update
  165.   # ?E?B???h?E??چX V
  166.   if @show_location_window==true
  167.   @window_location.update
  168.   end
  169.   @command_window.update
  170.   @status_window.update
  171.   # ?R?}???h?E?B???h?E???A?N?e?B?u??ڈ?چ?: update_command ?????
  172.   if @command_window.active
  173.     update_command
  174.     return
  175.   end
  176.   # ?X?eپ[?^?X?E?B???h?E???A?N?e?B?u??ڈ?چ?: update_status ?????
  177.   if @status_window.active
  178.     update_status
  179.     return
  180.   end
  181. end
  182. #--------------------------------------------------------------------------
  183. # پ? ?t??پ[??چX V (?R?}???h?E?B???h?E???A?N?e?B?u??ڈ?چ?)
  184. #--------------------------------------------------------------------------
  185. def update_command
  186.   # B ?{?^??????????ڈ?چ?
  187.   if Input.trigger?(Input::B)
  188.     # ?L?????Z?? SE ?????t
  189.     $game_system.se_play($data_system.cancel_se)
  190.     # ?}?b?v????? ?????
  191.     $scene = Scene_Map.new
  192.     return
  193.   end
  194.   # C ?{?^??????????ڈ?چ?
  195.   if Input.trigger?(Input::C)
  196.     # ?pپ[?e?B l ??? 0  l??پA?Zپ[?uپA?Qپ[??ڈI????O??R?}???h??ڈ?چ?
  197.     if $game_party.actors.size == 0 and @command_window.index < 4
  198.       # ?u?Uپ[ SE ?????t
  199.       $game_system.se_play($data_system.buzzer_se)
  200.       return
  201.     end
  202.     # ?R?}???h?E?B???h?E??Jپ[?\????u?????
  203.     case @command_window.index
  204.     when 0  # ?A?C?e??
  205.       # ????  SE ?????t
  206.       $game_system.se_play($data_system.decision_se)
  207.       # ?A?C?e??????? ?????
  208.       $scene = Scene_Item.new
  209.     when 1  # ?X?L??
  210.       # ???? SE ?????t
  211.       $game_system.se_play($data_system.decision_se)
  212.       # ?X?eپ[?^?X?E?B???h?E???A?N?e?B?u?????
  213.       @command_window.active = false
  214.       @status_window.active = true
  215.       @status_window.visible = true
  216.       @status_window.index = 0
  217.     when 2  # ????
  218.       # ???? SE ?????t
  219.       $game_system.se_play($data_system.decision_se)
  220.       # ?X?eپ[?^?X?E?B???h?E???A?N?e?B?u?????
  221.       @command_window.active = false
  222.       @status_window.active = true
  223.       @status_window.visible = true
  224.       @status_window.index = 0
  225.     when 3  # ?X?eپ[?^?X
  226.       # ???? SE ?????t
  227.       $game_system.se_play($data_system.decision_se)
  228.       # ?X?eپ[?^?X?E?B???h?E???A?N?e?B?u?????
  229.       @command_window.active = false
  230.       @status_window.active = true
  231.       @status_window.visible = true
  232.       @status_window.index = 0
  233.     when 4  # ?Zپ[?u
  234.       # ?Zپ[?u??~??ڈ?چ?
  235.       if $game_system.save_disabled
  236.         # ?u?Uپ[ SE ?????t
  237.         $game_system.se_play($data_system.buzzer_se)
  238.         return
  239.       end
  240.       # ???? SE ?????t
  241.       $game_system.se_play($data_system.decision_se)
  242.       # ?Zپ[?u????? ?????
  243.       $scene = Scene_Save.new
  244.     when 5  # ?Qپ[??ڈI??
  245.       # ???? SE ?????t
  246.       $game_system.se_play($data_system.decision_se)
  247.       # ?Qپ[??ڈI??????? ?????
  248.       $scene = Scene_End.new
  249.     end
  250.     return
  251.   end
  252.   # ?A?j?پپ[?V??????????Jپ[?\????ڈ?? ??چs?????
  253.   return if @command_window.animation?
  254.   # پ?orپ? ?{?^??????????ڈ?چ?
  255.   if Input.press?(Input::UP) or  Input.press?(Input::LEFT)
  256.     $game_system.se_play($data_system.cursor_se)
  257.     @command_window.setup_move_move(Window_RingMenu::MODE_MOVEL)
  258.     return
  259.   end
  260.   # پ?orپ? ?{?^??????????ڈ?چ?
  261.   if Input.press?(Input::DOWN) or  Input.press?(Input::RIGHT)
  262.     $game_system.se_play($data_system.cursor_se)
  263.     @command_window.setup_move_move(Window_RingMenu::MODE_MOVER)
  264.     return
  265.   end
  266. end
  267. #--------------------------------------------------------------------------
  268. # پ? ?t??پ[??چX V (?X?eپ[?^?X?E?B???h?E???A?N?e?B?u??ڈ?چ?)
  269. #--------------------------------------------------------------------------
  270. def update_status
  271.   # B ?{?^??????????ڈ?چ?
  272.   if Input.trigger?(Input::B)
  273.     # ?L?????Z?? SE ?????t
  274.     $game_system.se_play($data_system.cancel_se)
  275.     # ?R?}???h?E?B???h?E???A?N?e?B?u?????
  276.     @command_window.active = true
  277.     @status_window.active = false
  278.     @status_window.visible = false
  279.     @status_window.index = -1
  280.     return
  281.   end
  282.   # C ?{?^??????????ڈ?چ?
  283.   if Input.trigger?(Input::C)
  284.     # ?R?}???h?E?B???h?E??Jپ[?\????u?????
  285.     case @command_window.index
  286.     when 1  # ?X?L??
  287.       # ????A?N?^پ[??چs?? ????? 2 ??ڈ???ڈ?چ?
  288.       if $game_party.actors[@status_window.index].restriction >= 2
  289.         # ?u?Uپ[ SE ?????t
  290.         $game_system.se_play($data_system.buzzer_se)
  291.         return
  292.       end
  293.       # ???? SE ?????t
  294.       $game_system.se_play($data_system.decision_se)
  295.       # ?X?L??????? ?????
  296.       $scene = Scene_Skill.new(@status_window.index)
  297.     when 2  # ????
  298.       # ???? SE ?????t
  299.       $game_system.se_play($data_system.decision_se)
  300.       # ????????? ?????
  301.       $scene = Scene_Equip.new(@status_window.index)
  302.     when 3  # ?X?eپ[?^?X
  303.       # ???? SE ?????t
  304.       $game_system.se_play($data_system.decision_se)
  305.       # ?X?eپ[?^?X????? ?????
  306.       $scene = Scene_Status.new(@status_window.index)
  307.     end
  308.     return
  309.   end
  310. end
  311. end
  312.  
  313. #===================================================
  314. # ▲ CLASS Scene_Menu Ends
  315. #===================================================
  316.  
  317.  
  318. #===================================================
  319. # ▼ CLASS Window_RingMenu  Begins
  320. #===================================================
  321. class Window_RingMenu < Window_Base
  322. #--------------------------------------------------------------------------
  323. # پ? ?N???X?? ?
  324. #--------------------------------------------------------------------------
  325. STARTUP_FRAMES = 20
  326. MOVING_FRAMES = 5  
  327. RING_R = 64        
  328. ICON_ITEM   = RPG::Cache.icon("034-Item03")
  329. ICON_SKILL  = RPG::Cache.icon("044-Skill01")
  330. ICON_EQUIP  = RPG::Cache.icon("001-Weapon01")
  331. ICON_STATUS = RPG::Cache.icon("050-Skill07")
  332. ICON_SAVE   = RPG::Cache.icon("038-Item07")
  333. ICON_EXIT   = RPG::Cache.icon("046-Skill03")
  334. ICON_DISABLE= RPG::Cache.icon("")
  335. SE_STARTUP = "056-Right02"
  336. MODE_START = 1
  337. MODE_WAIT  = 2
  338. MODE_MOVER = 3
  339. MODE_MOVEL = 4
  340. #--------------------------------------------------------------------------
  341. # پ? ?A?N?Z?T
  342. #--------------------------------------------------------------------------
  343. attr_accessor :index
  344. #--------------------------------------------------------------------------
  345. # پ? ?I?u?W?F?N?gڈ?????
  346. #--------------------------------------------------------------------------
  347. def initialize( center_x, center_y )
  348.   super(0, 0, 640, 480)
  349.   self.contents = Bitmap.new(width-32, height-32)
  350.   self.contents.font.name = $ring_menu_text[0]
  351.   self.contents.font.color = text_color($ring_menu_text[7])
  352.   self.contents.font.size = $ring_menu_text[8]
  353.   self.opacity = 0
  354.   self.back_opacity = 0
  355.   s1 = $ring_menu_text[1]
  356.   s2 = $ring_menu_text[2]
  357.   s3 = $ring_menu_text[3]
  358.   s4 = $ring_menu_text[4]
  359.   s5 = $ring_menu_text[5]
  360.   s6 = $ring_menu_text[6]
  361.   @commands = [ s1, s2, s3, s4, s5, s6 ]
  362.   @item_max = 6
  363.   @index = 0
  364.   @items = [ ICON_ITEM, ICON_SKILL, ICON_EQUIP, ICON_STATUS, ICON_SAVE, ICON_EXIT ]
  365.   @disabled = [ false, false, false, false, false, false ]
  366.   @cx = center_x - 16
  367.   @cy = center_y - 16
  368.   setup_move_start
  369.   refresh
  370. end
  371. #--------------------------------------------------------------------------
  372. # پ? ?t??پ[??چX V
  373. #--------------------------------------------------------------------------
  374. def update
  375.   super
  376.   refresh
  377. end
  378. #--------------------------------------------------------------------------
  379. # پ? ????چ?`??
  380. #--------------------------------------------------------------------------
  381. def refresh
  382.   self.contents.clear
  383.   # ?A?C?R?????`??
  384.   case @mode
  385.   when MODE_START
  386.     refresh_start
  387.   when MODE_WAIT
  388.     refresh_wait
  389.   when MODE_MOVER
  390.     refresh_move(1)
  391.   when MODE_MOVEL
  392.     refresh_move(0)
  393.   end
  394.   # ?A?N?e?B?u??R?}???h???\??
  395.   rect = Rect.new(@cx - 272, @cy + 24, self.contents.width-32, 32)
  396.   self.contents.draw_text(rect, @commands[@index],1)
  397. end
  398. #--------------------------------------------------------------------------
  399. # پ? ????چ?`??(ڈ???????)
  400. #--------------------------------------------------------------------------
  401. def refresh_start
  402.   d1 = 2.0 * Math::PI / @item_max
  403.   d2 = 1.0 * Math::PI / STARTUP_FRAMES
  404.   r = RING_R - 1.0 * RING_R * @steps / STARTUP_FRAMES
  405.   for i in 0...@item_max
  406.     j = i - @index
  407.     d = d1 * j + d2 * @steps
  408.     x = @cx + ( r * Math.sin( d ) ).to_i
  409.     y = @cy - ( r * Math.cos( d ) ).to_i
  410.     draw_item(x, y, i)
  411.   end
  412.   @steps -= 1
  413.   if @steps < 1
  414.     @mode = MODE_WAIT
  415.   end
  416. end
  417. #--------------------------------------------------------------------------
  418. # پ? ????چ?`??(??@??)
  419. #--------------------------------------------------------------------------
  420. def refresh_wait
  421.   d = 2.0 * Math::PI / @item_max
  422.   for i in 0...@item_max
  423.     j = i - @index
  424.     x = @cx + ( RING_R * Math.sin( d * j ) ).to_i
  425.     y = @cy - ( RING_R * Math.cos( d * j ) ).to_i
  426.     draw_item(x, y, i)
  427.   end
  428. end
  429. #--------------------------------------------------------------------------
  430. # پ? ????چ?`??(???]??)
  431. #  mode : 0=?????v???? 1=???v????
  432. #--------------------------------------------------------------------------
  433. def refresh_move( mode )
  434.   d1 = 2.0 * Math::PI / @item_max
  435.   d2 = d1 / MOVING_FRAMES
  436.   d2 *= -1 if mode != 0
  437.   for i in 0...@item_max
  438.     j = i - @index
  439.     d = d1 * j + d2 * @steps
  440.     x = @cx + ( RING_R * Math.sin( d ) ).to_i
  441.     y = @cy - ( RING_R * Math.cos( d ) ).to_i
  442.     draw_item(x, y, i)
  443.   end
  444.   @steps -= 1
  445.   if @steps < 1
  446.     @mode = MODE_WAIT
  447.   end
  448. end
  449. #--------------------------------------------------------------------------
  450. # پ? چ????`??
  451. #     x :
  452. #     y :
  453. #     i : چ????چ?
  454. #--------------------------------------------------------------------------
  455. def draw_item(x, y, i)
  456.   #p "x=" + x.to_s + " y=" + y.to_s + " i=" + @items[i].to_s
  457.   rect = Rect.new(0, 0, @items[i].width, @items[i].height)
  458.   if @index == i
  459.     self.contents.blt( x, y, @items[i], rect )
  460.     if @disabled[@index]
  461.       self.contents.blt( x, y, ICON_DISABLE, rect )
  462.     end
  463.   else
  464.     self.contents.blt( x, y, @items[i], rect, 128 )
  465.     if @disabled[@index]
  466.       self.contents.blt( x, y, ICON_DISABLE, rect, 128 )
  467.     end
  468.   end
  469. end
  470. #--------------------------------------------------------------------------
  471. # پ? چ?????????????
  472. #     index : چ????چ?
  473. #--------------------------------------------------------------------------
  474. def disable_item(index)
  475.   @disabled[index] = true
  476. end
  477. #--------------------------------------------------------------------------
  478. # پ? ڈ??????A?j?پپ[?V??????ڈ???
  479. #--------------------------------------------------------------------------
  480. def setup_move_start
  481.   @mode = MODE_START
  482.   @steps = STARTUP_FRAMES
  483.   if  SE_STARTUP != nil and SE_STARTUP != ""
  484.     Audio.se_play("Audio/SE/" + SE_STARTUP, 80, 100)
  485.   end
  486. end
  487. #--------------------------------------------------------------------------
  488. # پ? ???]?A?j?پپ[?V??????ڈ???
  489. #--------------------------------------------------------------------------
  490. def setup_move_move(mode)
  491.   if mode == MODE_MOVER
  492.     @index -= 1
  493.     @index = @items.size - 1 if @index < 0
  494.   elsif mode == MODE_MOVEL
  495.     @index += 1
  496.     @index = 0 if @index >= @items.size
  497.   else
  498.     return
  499.   end
  500.   @mode = mode
  501.   @steps = MOVING_FRAMES
  502. end
  503. #--------------------------------------------------------------------------
  504. # پ? ?A?j?پپ[?V?????????????
  505. #--------------------------------------------------------------------------
  506. def animation?
  507.   return @mode != MODE_WAIT
  508. end
  509. end
  510.  
  511. #===================================================
  512. # ▲ CLASS Window_RingMenu Ends
  513. #===================================================
  514.  
  515.  
  516. #===================================================
  517. # ▼ CLASS Window_RingMenuStatus Begins
  518. #===================================================
  519.  
  520. class Window_RingMenuStatus < Window_Selectable
  521. #--------------------------------------------------------------------------
  522. # پ? ?I?u?W?F?N?gڈ?????
  523. #--------------------------------------------------------------------------
  524. def initialize
  525.   super(204, 64, 232, 352)
  526.   self.contents = Bitmap.new(width - 32, height - 32)
  527.   self.contents.font.size = $chara_select[5]
  528.   refresh
  529.   self.active = false
  530.   self.index = -1
  531. end
  532. #--------------------------------------------------------------------------
  533. # پ? ???t???b?V??
  534. #--------------------------------------------------------------------------
  535. def refresh
  536.   self.contents.clear
  537.   self.windowskin = RPG::Cache.windowskin($chara_select[4])
  538.   self.contents.font.name = $chara_select[0]
  539.   self.contents.font.color = text_color($chara_select[1])
  540.   @item_max = $game_party.actors.size
  541.   for i in 0...$game_party.actors.size
  542.     x = 80
  543.     y = 80 * i
  544.     actor = $game_party.actors[i]
  545.     draw_actor_graphic(actor, x - 40, y + 80)
  546.     draw_actor_name(actor, x, y + 24)
  547.   end
  548. end
  549. #--------------------------------------------------------------------------
  550. # پ? ?Jپ[?\??????`چX V
  551. #--------------------------------------------------------------------------
  552. def update_cursor_rect
  553.   if @index < 0
  554.     self.cursor_rect.empty
  555.   else
  556.     self.cursor_rect.set(0, @index * 80, self.width - 32, 80)
  557.   end
  558. end
  559. end
  560. #===================================================
  561. # ▲ CLASS Window_RingMenuStatus Ends
  562. #===================================================
  563.  
  564.  
  565. #===================================================
  566. # ▼ CLASS Game_Map Additional Code Begins
  567. #===================================================
  568. class Game_Map
  569.  
  570. #Dubealex Addition (from XRXS) to show Map Name on screen
  571. def name
  572.   $map_infos[@map_id]
  573. end
  574. end
  575.  
  576. #===================================================
  577. # ▲ CLASS Game_Map Additional Code Ends
  578. #===================================================
  579.  
  580.  
  581. #===================================================
  582. # ▼ CLASS Scene_Title Additional Code Begins
  583. #===================================================
  584. class Scene_Title
  585.  
  586. #Dubealex Addition (from XRXS) to show Map Name on screen
  587.   $map_infos = load_data("Data/MapInfos.rxdata")
  588.   for key in $map_infos.keys
  589.     $map_infos[key] = $map_infos[key].name
  590.   end
  591. end
  592.  
  593. #===================================================
  594. # ▲ CLASS Scene_Title Additional Code Ends
  595. #===================================================
  596.  
  597.  
  598. #===================================================
  599. # ▼ CLASS Window_Location Begins
  600. #===================================================
  601.  
  602. class Window_Location < Window_Base
  603.  
  604. def initialize
  605. super(0, 0, $window_size[0], $window_size[1])
  606.   self.contents = Bitmap.new(width - 32, height - 32)
  607.   self.contents.font.name = $location_text[0]
  608.   self.contents.font.size = $location_text[1]
  609. refresh
  610. end
  611.  
  612. def refresh
  613. self.contents.clear
  614. self.windowskin = RPG::Cache.windowskin($window_location_skin)
  615. self.contents.font.color = text_color($location_text[2])
  616. self.contents.draw_text(4, 0, 120, 32, $location_text[3])
  617. self.contents.font.color = text_color($location_text[4])
  618. self.contents.draw_text(4, 32, 120, 32, $game_map.name, 2)
  619. end
  620. end
  621. #===================================================
  622. # ▲ CLASS Window_Location Ends
  623. #===================================================
  624.  
  625. #===================================================
  626. # ▲ Ring Menu - Show Player Location R1 - Ends
  627. #===================================================
Expand to see the code.
Ooh a ring menu. Been looking for one of these! *yoink
Thanks! It works.
I still got one more question though.
When I use the Ring Menu Script
  1. #===================================================
  2. # ■ Ring Menu - Show Player Location - Release #1 (Enhanced By Dubealex)
  3. #===================================================
  4. # For more infos and update, visit:
  5. # asylum.dubealex.com
  6. #
  7. # Original Ring Menu by: 和希 (From XRXS)
  8. # Original Edit and Fix by: Maki
  9. # Show Player Location Version by: Dubealex
  10. #
  11. # You can customize this script at line #35 - Have fun !!
  12. # If you want to show more stuff, its easy to do, you can try to ask in the forum.
  13. #
  14. # [email hidden]
  15. #===================================================
  16.  
  17.  
  18. #===================================================
  19. # ▼ CLASS Scene_Menu Begins
  20. #===================================================
  21.  
  22. class Scene_Menu
  23. BG_IMAGE    = RPG::Cache.picture("verse_of_the_ring")
  24. #--------------------------------------------------------------------------
  25. # پ? ?I?u?W?F?N?gڈ?????
  26. #     menu_index : ?R?}???h??Jپ[?\??ڈ?????u
  27. #--------------------------------------------------------------------------
  28. def initialize(menu_index = 0)
  29.   @menu_index = menu_index
  30.   $location_text=[]
  31.   $window_size=[]
  32.   $ring_menu_text=[]
  33.   $chara_select=[]
  34.   @window_opacity=[]
  35.   @chara_select=[]
  36.   @window_position=[]
  37.  
  38.    #--------------------------------------------------------------------------------------------------
  39.    # ■ Ring Menu Customization Section: (By Dubealex)
  40.    #--------------------------------------------------------------------------------------------------
  41.    # Those variables defines how the script will act.
  42.    # Simply change the value by those you want.
  43.    # Remember that changing the font size has its limitation due to text space allocation.
  44.    #
  45.    # ▼ TEXT SETTINGS FOR SHOW PLAYER LOCATION WINDOW:
  46.    $location_text[0]="Tahoma"      # Font Type
  47.    $location_text[1]=22                # Font Size
  48.    $location_text[2]=6                  # Location Title Color
  49.    $location_text[4]=0                  # Map Name Color
  50.    $location_text[3]="Location:"     # Customize the "Location" Title Text
  51.  
  52.    # ▼ SHOW LOCATION WINDOW SETTINS:
  53.    @show_location_window=true                       #Set to false to not use it !
  54.    @window_opacity[0]=255                             # Border Opacity
  55.    @window_opacity[1]=130                             # Background Opacity
  56.    $window_location_skin="001-Blue01"            # Window Skin
  57.    @window_position[0]=20                             # X Axis Position
  58.    @window_position[1]=20                             # Y Axis Position
  59.    $window_size[0]=160                                  # Lengh
  60.    $window_size[1]=96                                    # Heigh
  61.  
  62.    # ▼  TEXT SETTINGS FOR INSIDE THE RING MENU:
  63.    $ring_menu_text[0]="Tahoma"      # Font Type
  64.    $ring_menu_text[7]=0                  # Font Color
  65.    $ring_menu_text[8]=22                # Font Size
  66.    $ring_menu_text[1]="Items"         # Items Menu Text
  67.    $ring_menu_text[2]="Skills"          # Skills Menu Text
  68.    $ring_menu_text[3]="Equip"         # Equip Menu Text
  69.    $ring_menu_text[4]="Stats"          # Stats Menu Text
  70.    $ring_menu_text[5]="Save"          # Save Menu Text
  71.    $ring_menu_text[6]="Quit"           # Quit Menu Text
  72.  
  73.    # ▼  CHARACTER SELECTION WINDOW SETTINGS :
  74.    @chara_select[0]=400               # X Axis Position
  75.    @chara_select[1]=0                  # Y Axis Position
  76.    $chara_select[0]="Tahoma"       # Font Type
  77.    $chara_select[1]=0                   # Font Color
  78.    $chara_select[5]=22                  # Font Size
  79.    $chara_select[2]=255               # Window Border Opacity
  80.    $chara_select[3]=130               # Window Background Opacity
  81.    $chara_select[4]="001-Blue01"  # Window Skin to use
  82.   #--------------------------------------------------------------------------------------------------
  83.  
  84. end
  85. #--------------------------------------------------------------------------
  86. # پ? ?پ?C??ڈ??
  87. #--------------------------------------------------------------------------
  88. def main
  89.  
  90.   # Show Player Location Feature:
  91.   if @show_location_window==true    
  92.   @window_location = Window_Location.new
  93.      @window_location.x = @window_position[0]
  94.      @window_location.y = @window_position[1]
  95.      @window_location.opacity = @window_opacity[0]
  96.      @window_location.back_opacity = @window_opacity[1]
  97.      end
  98.   #End of Show Player Location
  99.  
  100.   # ?X?v???C?g?Z?b?g??چ? ?
  101.   @spriteset = Spriteset_Map.new
  102.   # ?R?}???h?E?B???h?E??چ? ?
  103.   px = $game_player.screen_x - 15
  104.   py = $game_player.screen_y - 24
  105.   @command_window = Window_RingMenu.new(px,py)
  106.   @command_window.index = @menu_index
  107.   # create background image
  108.   @bg_image = Sprite.new
  109.   @bg_image.bitmap = BG_IMAGE
  110.   @bg_image.x = $game_player.screen_x - @bg_image.bitmap.width / 2
  111.   @bg_image.y = $game_player.screen_y - @bg_image.bitmap.height / 2
  112.   # ?pپ[?e?B l ??? 0  l??ڈ?چ?
  113.   if $game_party.actors.size == 0
  114.     # ?A?C?e??پA?X?L??پA????پA?X?eپ[?^?X????????
  115.     @command_window.disable_item(0)
  116.     @command_window.disable_item(1)
  117.     @command_window.disable_item(2)
  118.     @command_window.disable_item(3)
  119.   end
  120.   @command_window.z = 100
  121.   # ?Zپ[?u??~??ڈ?چ?
  122.   if $game_system.save_disabled
  123.     # ?Zپ[?u???????????
  124.     @command_window.disable_item(4)
  125.   end
  126.   # ?X?eپ[?^?X?E?B???h?E??چ? ?
  127.   @status_window = Window_RingMenuStatus.new
  128.   @status_window.x = @chara_select[0]
  129.   @status_window.y = @chara_select[1]
  130.   @status_window.z = 200
  131.   @status_window.opacity=$chara_select[2]
  132.   @status_window.back_opacity=$chara_select[3]
  133.   @status_window.visible = false
  134.   # ?g?????W?V??????چs
  135.   Graphics.transition
  136.   # ?پ?C????پ[?v
  137.   loop do
  138.     # ?Qپ[???????چX V
  139.     Graphics.update
  140.     # ????ڈ?????چX V
  141.     Input.update
  142.     # ?t??پ[??چX V
  143.     update
  144.     # ????? ???????????پ[?v?????f
  145.     if $scene != self
  146.       break
  147.     end
  148.   end
  149.   # ?g?????W?V????ڈ???
  150.   Graphics.freeze
  151.   # ?X?v???C?g?Z?b?g??????
  152.   @spriteset.dispose
  153.   # ?E?B???h?E??????
  154.   if @show_location_window==true
  155.   @window_location.dispose
  156.   end
  157.   @command_window.dispose
  158.   @status_window.dispose
  159.   @bg_image.dispose
  160. end
  161. #--------------------------------------------------------------------------
  162. # پ? ?t??پ[??چX V
  163. #--------------------------------------------------------------------------
  164. def update
  165.   # ?E?B???h?E??چX V
  166.   if @show_location_window==true
  167.   @window_location.update
  168.   end
  169.   @command_window.update
  170.   @status_window.update
  171.   # ?R?}???h?E?B???h?E???A?N?e?B?u??ڈ?چ?: update_command ?????
  172.   if @command_window.active
  173.     update_command
  174.     return
  175.   end
  176.   # ?X?eپ[?^?X?E?B???h?E???A?N?e?B?u??ڈ?چ?: update_status ?????
  177.   if @status_window.active
  178.     update_status
  179.     return
  180.   end
  181. end
  182. #--------------------------------------------------------------------------
  183. # پ? ?t??پ[??چX V (?R?}???h?E?B???h?E???A?N?e?B?u??ڈ?چ?)
  184. #--------------------------------------------------------------------------
  185. def update_command
  186.   # B ?{?^??????????ڈ?چ?
  187.   if Input.trigger?(Input::B)
  188.     # ?L?????Z?? SE ?????t
  189.     $game_system.se_play($data_system.cancel_se)
  190.     # ?}?b?v????? ?????
  191.     $scene = Scene_Map.new
  192.     return
  193.   end
  194.   # C ?{?^??????????ڈ?چ?
  195.   if Input.trigger?(Input::C)
  196.     # ?pپ[?e?B l ??? 0  l??پA?Zپ[?uپA?Qپ[??ڈI????O??R?}???h??ڈ?چ?
  197.     if $game_party.actors.size == 0 and @command_window.index < 4
  198.       # ?u?Uپ[ SE ?????t
  199.       $game_system.se_play($data_system.buzzer_se)
  200.       return
  201.     end
  202.     # ?R?}???h?E?B???h?E??Jپ[?\????u?????
  203.     case @command_window.index
  204.     when 0  # ?A?C?e??
  205.       # ????  SE ?????t
  206.       $game_system.se_play($data_system.decision_se)
  207.       # ?A?C?e??????? ?????
  208.       $scene = Scene_Item.new
  209.     when 1  # ?X?L??
  210.       # ???? SE ?????t
  211.       $game_system.se_play($data_system.decision_se)
  212.       # ?X?eپ[?^?X?E?B???h?E???A?N?e?B?u?????
  213.       @command_window.active = false
  214.       @status_window.active = true
  215.       @status_window.visible = true
  216.       @status_window.index = 0
  217.     when 2  # ????
  218.       # ???? SE ?????t
  219.       $game_system.se_play($data_system.decision_se)
  220.       # ?X?eپ[?^?X?E?B???h?E???A?N?e?B?u?????
  221.       @command_window.active = false
  222.       @status_window.active = true
  223.       @status_window.visible = true
  224.       @status_window.index = 0
  225.     when 3  # ?X?eپ[?^?X
  226.       # ???? SE ?????t
  227.       $game_system.se_play($data_system.decision_se)
  228.       # ?X?eپ[?^?X?E?B???h?E???A?N?e?B?u?????
  229.       @command_window.active = false
  230.       @status_window.active = true
  231.       @status_window.visible = true
  232.       @status_window.index = 0
  233.     when 4  # ?Zپ[?u
  234.       # ?Zپ[?u??~??ڈ?چ?
  235.       if $game_system.save_disabled
  236.         # ?u?Uپ[ SE ?????t
  237.         $game_system.se_play($data_system.buzzer_se)
  238.         return
  239.       end
  240.       # ???? SE ?????t
  241.       $game_system.se_play($data_system.decision_se)
  242.       # ?Zپ[?u????? ?????
  243.       $scene = Scene_Save.new
  244.     when 5  # ?Qپ[??ڈI??
  245.       # ???? SE ?????t
  246.       $game_system.se_play($data_system.decision_se)
  247.       # ?Qپ[??ڈI??????? ?????
  248.       $scene = Scene_End.new
  249.     end
  250.     return
  251.   end
  252.   # ?A?j?پپ[?V??????????Jپ[?\????ڈ?? ??چs?????
  253.   return if @command_window.animation?
  254.   # پ?orپ? ?{?^??????????ڈ?چ?
  255.   if Input.press?(Input::UP) or  Input.press?(Input::LEFT)
  256.     $game_system.se_play($data_system.cursor_se)
  257.     @command_window.setup_move_move(Window_RingMenu::MODE_MOVEL)
  258.     return
  259.   end
  260.   # پ?orپ? ?{?^??????????ڈ?چ?
  261.   if Input.press?(Input::DOWN) or  Input.press?(Input::RIGHT)
  262.     $game_system.se_play($data_system.cursor_se)
  263.     @command_window.setup_move_move(Window_RingMenu::MODE_MOVER)
  264.     return
  265.   end
  266. end
  267. #--------------------------------------------------------------------------
  268. # پ? ?t??پ[??چX V (?X?eپ[?^?X?E?B???h?E???A?N?e?B?u??ڈ?چ?)
  269. #--------------------------------------------------------------------------
  270. def update_status
  271.   # B ?{?^??????????ڈ?چ?
  272.   if Input.trigger?(Input::B)
  273.     # ?L?????Z?? SE ?????t
  274.     $game_system.se_play($data_system.cancel_se)
  275.     # ?R?}???h?E?B???h?E???A?N?e?B?u?????
  276.     @command_window.active = true
  277.     @status_window.active = false
  278.     @status_window.visible = false
  279.     @status_window.index = -1
  280.     return
  281.   end
  282.   # C ?{?^??????????ڈ?چ?
  283.   if Input.trigger?(Input::C)
  284.     # ?R?}???h?E?B???h?E??Jپ[?\????u?????
  285.     case @command_window.index
  286.     when 1  # ?X?L??
  287.       # ????A?N?^پ[??چs?? ????? 2 ??ڈ???ڈ?چ?
  288.       if $game_party.actors[@status_window.index].restriction >= 2
  289.         # ?u?Uپ[ SE ?????t
  290.         $game_system.se_play($data_system.buzzer_se)
  291.         return
  292.       end
  293.       # ???? SE ?????t
  294.       $game_system.se_play($data_system.decision_se)
  295.       # ?X?L??????? ?????
  296.       $scene = Scene_Skill.new(@status_window.index)
  297.     when 2  # ????
  298.       # ???? SE ?????t
  299.       $game_system.se_play($data_system.decision_se)
  300.       # ????????? ?????
  301.       $scene = Scene_Equip.new(@status_window.index)
  302.     when 3  # ?X?eپ[?^?X
  303.       # ???? SE ?????t
  304.       $game_system.se_play($data_system.decision_se)
  305.       # ?X?eپ[?^?X????? ?????
  306.       $scene = Scene_Status.new(@status_window.index)
  307.     end
  308.     return
  309.   end
  310. end
  311. end
  312.  
  313. #===================================================
  314. # ▲ CLASS Scene_Menu Ends
  315. #===================================================
  316.  
  317.  
  318. #===================================================
  319. # ▼ CLASS Window_RingMenu  Begins
  320. #===================================================
  321. class Window_RingMenu < Window_Base
  322. #--------------------------------------------------------------------------
  323. # پ? ?N???X?? ?
  324. #--------------------------------------------------------------------------
  325. STARTUP_FRAMES = 20
  326. MOVING_FRAMES = 5  
  327. RING_R = 64        
  328. ICON_ITEM   = RPG::Cache.icon("034-Item03")
  329. ICON_SKILL  = RPG::Cache.icon("044-Skill01")
  330. ICON_EQUIP  = RPG::Cache.icon("001-Weapon01")
  331. ICON_STATUS = RPG::Cache.icon("050-Skill07")
  332. ICON_SAVE   = RPG::Cache.icon("038-Item07")
  333. ICON_EXIT   = RPG::Cache.icon("046-Skill03")
  334. ICON_DISABLE= RPG::Cache.icon("")
  335. SE_STARTUP = "056-Right02"
  336. MODE_START = 1
  337. MODE_WAIT  = 2
  338. MODE_MOVER = 3
  339. MODE_MOVEL = 4
  340. #--------------------------------------------------------------------------
  341. # پ? ?A?N?Z?T
  342. #--------------------------------------------------------------------------
  343. attr_accessor :index
  344. #--------------------------------------------------------------------------
  345. # پ? ?I?u?W?F?N?gڈ?????
  346. #--------------------------------------------------------------------------
  347. def initialize( center_x, center_y )
  348.   super(0, 0, 640, 480)
  349.   self.contents = Bitmap.new(width-32, height-32)
  350.   self.contents.font.name = $ring_menu_text[0]
  351.   self.contents.font.color = text_color($ring_menu_text[7])
  352.   self.contents.font.size = $ring_menu_text[8]
  353.   self.opacity = 0
  354.   self.back_opacity = 0
  355.   s1 = $ring_menu_text[1]
  356.   s2 = $ring_menu_text[2]
  357.   s3 = $ring_menu_text[3]
  358.   s4 = $ring_menu_text[4]
  359.   s5 = $ring_menu_text[5]
  360.   s6 = $ring_menu_text[6]
  361.   @commands = [ s1, s2, s3, s4, s5, s6 ]
  362.   @item_max = 6
  363.   @index = 0
  364.   @items = [ ICON_ITEM, ICON_SKILL, ICON_EQUIP, ICON_STATUS, ICON_SAVE, ICON_EXIT ]
  365.   @disabled = [ false, false, false, false, false, false ]
  366.   @cx = center_x - 16
  367.   @cy = center_y - 16
  368.   setup_move_start
  369.   refresh
  370. end
  371. #--------------------------------------------------------------------------
  372. # پ? ?t??پ[??چX V
  373. #--------------------------------------------------------------------------
  374. def update
  375.   super
  376.   refresh
  377. end
  378. #--------------------------------------------------------------------------
  379. # پ? ????چ?`??
  380. #--------------------------------------------------------------------------
  381. def refresh
  382.   self.contents.clear
  383.   # ?A?C?R?????`??
  384.   case @mode
  385.   when MODE_START
  386.     refresh_start
  387.   when MODE_WAIT
  388.     refresh_wait
  389.   when MODE_MOVER
  390.     refresh_move(1)
  391.   when MODE_MOVEL
  392.     refresh_move(0)
  393.   end
  394.   # ?A?N?e?B?u??R?}???h???\??
  395.   rect = Rect.new(@cx - 272, @cy + 24, self.contents.width-32, 32)
  396.   self.contents.draw_text(rect, @commands[@index],1)
  397. end
  398. #--------------------------------------------------------------------------
  399. # پ? ????چ?`??(ڈ???????)
  400. #--------------------------------------------------------------------------
  401. def refresh_start
  402.   d1 = 2.0 * Math::PI / @item_max
  403.   d2 = 1.0 * Math::PI / STARTUP_FRAMES
  404.   r = RING_R - 1.0 * RING_R * @steps / STARTUP_FRAMES
  405.   for i in 0...@item_max
  406.     j = i - @index
  407.     d = d1 * j + d2 * @steps
  408.     x = @cx + ( r * Math.sin( d ) ).to_i
  409.     y = @cy - ( r * Math.cos( d ) ).to_i
  410.     draw_item(x, y, i)
  411.   end
  412.   @steps -= 1
  413.   if @steps < 1
  414.     @mode = MODE_WAIT
  415.   end
  416. end
  417. #--------------------------------------------------------------------------
  418. # پ? ????چ?`??(??@??)
  419. #--------------------------------------------------------------------------
  420. def refresh_wait
  421.   d = 2.0 * Math::PI / @item_max
  422.   for i in 0...@item_max
  423.     j = i - @index
  424.     x = @cx + ( RING_R * Math.sin( d * j ) ).to_i
  425.     y = @cy - ( RING_R * Math.cos( d * j ) ).to_i
  426.     draw_item(x, y, i)
  427.   end
  428. end
  429. #--------------------------------------------------------------------------
  430. # پ? ????چ?`??(???]??)
  431. #  mode : 0=?????v???? 1=???v????
  432. #--------------------------------------------------------------------------
  433. def refresh_move( mode )
  434.   d1 = 2.0 * Math::PI / @item_max
  435.   d2 = d1 / MOVING_FRAMES
  436.   d2 *= -1 if mode != 0
  437.   for i in 0...@item_max
  438.     j = i - @index
  439.     d = d1 * j + d2 * @steps
  440.     x = @cx + ( RING_R * Math.sin( d ) ).to_i
  441.     y = @cy - ( RING_R * Math.cos( d ) ).to_i
  442.     draw_item(x, y, i)
  443.   end
  444.   @steps -= 1
  445.   if @steps < 1
  446.     @mode = MODE_WAIT
  447.   end
  448. end
  449. #--------------------------------------------------------------------------
  450. # پ? چ????`??
  451. #     x :
  452. #     y :
  453. #     i : چ????چ?
  454. #--------------------------------------------------------------------------
  455. def draw_item(x, y, i)
  456.   #p "x=" + x.to_s + " y=" + y.to_s + " i=" + @items[i].to_s
  457.   rect = Rect.new(0, 0, @items[i].width, @items[i].height)
  458.   if @index == i
  459.     self.contents.blt( x, y, @items[i], rect )
  460.     if @disabled[@index]
  461.       self.contents.blt( x, y, ICON_DISABLE, rect )
  462.     end
  463.   else
  464.     self.contents.blt( x, y, @items[i], rect, 128 )
  465.     if @disabled[@index]
  466.       self.contents.blt( x, y, ICON_DISABLE, rect, 128 )
  467.     end
  468.   end
  469. end
  470. #--------------------------------------------------------------------------
  471. # پ? چ?????????????
  472. #     index : چ????چ?
  473. #--------------------------------------------------------------------------
  474. def disable_item(index)
  475.   @disabled[index] = true
  476. end
  477. #--------------------------------------------------------------------------
  478. # پ? ڈ??????A?j?پپ[?V??????ڈ???
  479. #--------------------------------------------------------------------------
  480. def setup_move_start
  481.   @mode = MODE_START
  482.   @steps = STARTUP_FRAMES
  483.   if  SE_STARTUP != nil and SE_STARTUP != ""
  484.     Audio.se_play("Audio/SE/" + SE_STARTUP, 80, 100)
  485.   end
  486. end
  487. #--------------------------------------------------------------------------
  488. # پ? ???]?A?j?پپ[?V??????ڈ???
  489. #--------------------------------------------------------------------------
  490. def setup_move_move(mode)
  491.   if mode == MODE_MOVER
  492.     @index -= 1
  493.     @index = @items.size - 1 if @index < 0
  494.   elsif mode == MODE_MOVEL
  495.     @index += 1
  496.     @index = 0 if @index >= @items.size
  497.   else
  498.     return
  499.   end
  500.   @mode = mode
  501.   @steps = MOVING_FRAMES
  502. end
  503. #--------------------------------------------------------------------------
  504. # پ? ?A?j?پپ[?V?????????????
  505. #--------------------------------------------------------------------------
  506. def animation?
  507.   return @mode != MODE_WAIT
  508. end
  509. end
  510.  
  511. #===================================================
  512. # ▲ CLASS Window_RingMenu Ends
  513. #===================================================
  514.  
  515.  
  516. #===================================================
  517. # ▼ CLASS Window_RingMenuStatus Begins
  518. #===================================================
  519.  
  520. class Window_RingMenuStatus < Window_Selectable
  521. #--------------------------------------------------------------------------
  522. # پ? ?I?u?W?F?N?gڈ?????
  523. #--------------------------------------------------------------------------
  524. def initialize
  525.   super(204, 64, 232, 352)
  526.   self.contents = Bitmap.new(width - 32, height - 32)
  527.   self.contents.font.size = $chara_select[5]
  528.   refresh
  529.   self.active = false
  530.   self.index = -1
  531. end
  532. #--------------------------------------------------------------------------
  533. # پ? ???t???b?V??
  534. #--------------------------------------------------------------------------
  535. def refresh
  536.   self.contents.clear
  537.   self.windowskin = RPG::Cache.windowskin($chara_select[4])
  538.   self.contents.font.name = $chara_select[0]
  539.   self.contents.font.color = text_color($chara_select[1])
  540.   @item_max = $game_party.actors.size
  541.   for i in 0...$game_party.actors.size
  542.     x = 80
  543.     y = 80 * i
  544.     actor = $game_party.actors[i]
  545.     draw_actor_graphic(actor, x - 40, y + 80)
  546.     draw_actor_name(actor, x, y + 24)
  547.   end
  548. end
  549. #--------------------------------------------------------------------------
  550. # پ? ?Jپ[?\??????`چX V
  551. #--------------------------------------------------------------------------
  552. def update_cursor_rect
  553.   if @index < 0
  554.     self.cursor_rect.empty
  555.   else
  556.     self.cursor_rect.set(0, @index * 80, self.width - 32, 80)
  557.   end
  558. end
  559. end
  560. #===================================================
  561. # ▲ CLASS Window_RingMenuStatus Ends
  562. #===================================================
  563.  
  564.  
  565. #===================================================
  566. # ▼ CLASS Game_Map Additional Code Begins
  567. #===================================================
  568. class Game_Map
  569.  
  570. #Dubealex Addition (from XRXS) to show Map Name on screen
  571. def name
  572.   $map_infos[@map_id]
  573. end
  574. end
  575.  
  576. #===================================================
  577. # ▲ CLASS Game_Map Additional Code Ends
  578. #===================================================
  579.  
  580.  
  581. #===================================================
  582. # ▼ CLASS Scene_Title Additional Code Begins
  583. #===================================================
  584. class Scene_Title
  585.  
  586. #Dubealex Addition (from XRXS) to show Map Name on screen
  587.   $map_infos = load_data("Data/MapInfos.rxdata")
  588.   for key in $map_infos.keys
  589.     $map_infos[key] = $map_infos[key].name
  590.   end
  591. end
  592.  
  593. #===================================================
  594. # ▲ CLASS Scene_Title Additional Code Ends
  595. #===================================================
  596.  
  597.  
  598. #===================================================
  599. # ▼ CLASS Window_Location Begins
  600. #===================================================
  601.  
  602. class Window_Location < Window_Base
  603.  
  604. def initialize
  605. super(0, 0, $window_size[0], $window_size[1])
  606.   self.contents = Bitmap.new(width - 32, height - 32)
  607.   self.contents.font.name = $location_text[0]
  608.   self.contents.font.size = $location_text[1]
  609. refresh
  610. end
  611.  
  612. def refresh
  613. self.contents.clear
  614. self.windowskin = RPG::Cache.windowskin($window_location_skin)
  615. self.contents.font.color = text_color($location_text[2])
  616. self.contents.draw_text(4, 0, 120, 32, $location_text[3])
  617. self.contents.font.color = text_color($location_text[4])
  618. self.contents.draw_text(4, 32, 120, 32, $game_map.name, 2)
  619. end
  620. end
  621. #===================================================
  622. # ▲ CLASS Window_Location Ends
  623. #===================================================
  624.  
  625. #===================================================
  626. # ▲ Ring Menu - Show Player Location R1 - Ends
  627. #===================================================
Expand to see the code.


Together with this script:
  1. #=============================================================================
  2. # Quest Log Screen
  3. #-----------------------------------------------------------------------------
  4. # ** Version 2.3
  5. # ** Original by Sthrattoff
  6. #=============================================================================
  7. # Description :
  8. # This script enables the ability to show current active quest.
  9.  
  10. # Features :
  11. # EXTREMELY SIMPLIFIED! Now the script is just about 150 lines length including comments.
  12. # Unlimited amount of quest can be added.
  13. # Use variable to mark quest's progress.
  14.  
  15. # Limitation :
  16. # Only can store up to 12 progresses per quest.
  17.  
  18. # History :
  19. # Version 1.0 : Initial release.
  20. # Version 1.2 : Add "Types" features.
  21. # Version 2.0 : Changes in programming style and infinite quest support.
  22. # Version 2.2 : Cut the script length to about 150 lines.
  23. # Version 2.3 : Add "Quest Progress" bar in exchange of "Types" removal.
  24.  
  25. # Instruction
  26. # Just put this script above main.
  27.  
  28. # Configuration :
  29. # To add a quest, fill these information by using .push
  30. # $names.push "Name"
  31. # $types.push "Type"
  32. # $description.push (["line1", "line2", ..., "Line5"])
  33. # $objectives.push (["onjective1", ..., "objective12"])
  34. # $var_ID.push ID_NUMBER
  35. # $end_val.push END_VALUE
  36.  
  37. # Credits
  38. # See the header + Blizzard and Enterbrain
  39. #=============================================================================
  40. class Scene_Quest
  41.  
  42.   # Defines array variables
  43.     $names = []
  44.     $description = []
  45.     $objectives = []
  46.     $var_ID = []
  47.     $end_val = []
  48.  
  49.   # The main process
  50.   def main
  51.     @quest_list = Window_Command.new(160, $names)
  52.     @quest_window = Window_Quest.new
  53.     @quest_window.x = 160
  54.     Graphics.transition
  55.     loop do
  56.       Graphics.update
  57.       Input.update
  58.       update
  59.       break if $scene != self
  60.     end
  61.     Graphics.freeze
  62.     @quest_list.dispose
  63.     @quest_window.dispose
  64.   end
  65.  
  66.   def update
  67.     @quest_list.update
  68.     @quest_window.update
  69.     if @quest_list.active
  70.       update_quest
  71.       return
  72.     end
  73.   end
  74.  
  75.   def update_quest
  76.     if Input.trigger?(Input::B)
  77.       $game_system.se_play($data_system.cancel_se)
  78.       $scene = Scene_Map.new
  79.       return
  80.     end
  81.     $id = @quest_list.index
  82.     return
  83.   end
  84.  
  85. end    
  86.  
  87. class Window_Quest < Window_Base
  88.  
  89.   def initialize
  90.     super(0, 0, 480, 480)
  91.     self.contents = Bitmap.new(width - 32, height - 32)
  92.     refresh
  93.   end
  94.  
  95.   def refresh
  96.     self.contents.clear
  97.     self.contents.font.color = system_color
  98.     self.contents.draw_text(0, 0, self.width - 32, 32, $names[$id.to_i].to_s, 1)
  99.     self.contents.draw_text(0, 192, self.width - 32, 32, "Objectives", 1)
  100.     self.contents.draw_text(0, 416, self.width - 32, 32, "Quest Progress")
  101.     self.contents.font.color = normal_color
  102.     for i in 0..4
  103.       self.contents.draw_text(0, i * 32 + 32, self.width - 32, 32, $description[$id.to_i][i].to_s)
  104.     end
  105.     a = b = $game_variables[$var_ID[$id.to_i]]
  106.     if a > 5
  107.       self.contents.draw_text(240, (a - 6) * 32 + 224, 240, 32, "• " + $objectives[$id.to_i][a].to_s)
  108.     else
  109.       self.contents.draw_text(0, a * 32 + 224, 240, 32, "• " + $objectives[$id.to_i][a].to_s)
  110.     end
  111.     self.contents.font.color = disabled_color
  112.     if b > 0
  113.       for j in 0..(b - 1)
  114.         if j > 5
  115.           self.contents.draw_text(240, (j - 6) * 32 + 224, 240, 32, "• " + $objectives[$id.to_i][j].to_s)
  116.         else
  117.           self.contents.draw_text(0, j * 32 + 224, 240, 32, "• " + $objectives[$id.to_i][j].to_s)
  118.         end
  119.       end
  120.     end
  121.     draw_quest_progress(96, 428, self.width - 128)
  122.   end
  123.  
  124.   def update
  125.     refresh
  126.   end
  127.  
  128. end
  129.  
  130. class Window_Base < Window
  131.  
  132.   def draw_quest_progress(x, y, w = 200)
  133.     current = $game_variables[$var_ID[$id.to_i]]
  134.     ending = $end_val[$id.to_i]
  135.     bordercolor = system_color
  136.     outercolor  = Color.new(180, 210, 120, 255)
  137.     midcolor    = Color.new(180, 210, 140, 255)
  138.     innercolor  = Color.new(180, 210, 160, 255)
  139.     emptycolor  = Color.new(0, 0, 0, 255)
  140.     linewidth = (((current * 1.0) / ending) * (w - 2))
  141.     emptywidth = ((w - 1) - linewidth)
  142.     emptyx = ((x + 1) + linewidth)
  143.     border = Rect.new(x, y, w, 8)
  144.     emptyline = Rect.new(x + 1, y + 1, w - 2, 6)
  145.     outerline = Rect.new(x + 1, y + 1, linewidth, 6)
  146.     midline = Rect.new(x + 2, y + 2, linewidth - 2, 4)
  147.     innerline = Rect.new(x + 3, y + 3, linewidth - 4, 2)
  148.     self.contents.fill_rect(border, bordercolor)
  149.     self.contents.fill_rect(emptyline, emptycolor)
  150.     self.contents.fill_rect(outerline, outercolor)
  151.     self.contents.fill_rect(midline, midcolor)
  152.     self.contents.fill_rect(innerline, innercolor)
  153.   end
  154.  
  155. end
  156.  
  157. class Scene_Save < Scene_File
  158.  
  159.   alias old_save_data write_save_data
  160.   def write_save_data(file)
  161.     old_save_data
  162.     Marshal.dump($names, file)
  163.     Marshal.dump($description, file)
  164.     Marshal.dump($objectives, file)
  165.     Marshal.dump($var_ID, file)
  166.     Marshal.dump($end_val, file)
  167.   end
  168.  
  169. end
  170.  
  171. class Scene_Load < Scene_File
  172.  
  173.   alias old_load_data read_save_data
  174.   def read_save_data(file)
  175.     old_load_data
  176.     $names = Marshal.load(file)
  177.     $description = Marshal.load(file)
  178.     $objectives = Marshal.load(file)
  179.     $var_ID = Marshal.load(file)
  180.     $end_val = Marshal.load(file)
  181.   end
  182.  
  183. end
  184.  
  185. class Scene_Title
  186.  
  187.   alias old_new_game command_new_game
  188.   def command_new_game
  189.     old_new_game
  190.     $names.clear
  191.     $description.clear
  192.     $objectives.clear
  193.     $var_ID.clear
  194.     $end_val.clear
  195.   end
  196.  
  197. end
  198.  
  199. class Scene_Menu
  200.  
  201.   def initialize(menu_index = 0)
  202.     @menu_index = menu_index
  203.     size = $names.size
  204.     for i in 0..size
  205.       var = $var_ID[i]
  206.       ending = $end_val[i]
  207.       if $game_variables[var.to_i] >= ending.to_i
  208.         $names.delete_at i
  209.         $description.delete_at i
  210.         $objectives.delete_at i
  211.         $var_ID.delete_at i
  212.         $end_val.delete_at i
  213.       end
  214.     end
  215.   end
  216.  
  217. end
Expand to see the code.


I get this error when I want to open the menu:

Script "RIng Menu" line 350: NoMethodError occured.

undefined method `[]' for nil:NilClass

How can I solve it?
alias the initialize method in Scene_Menu of the quest script, and make sure it's below the Ring Menu

  1.  
  2. class Scene_Menu
  3.  
  4.   alias quest_init initialize
  5.   def initialize(menu_index = 0)
  6.     quest_init
  7.     @menu_index = menu_index
  8.  
  9. <rest of script>
  10.  
  11.  
Expand to see the code.
Thank you so much, I still go another problem. I really hope that you can help me with this too.
Its with a different script though.
Im using this Quest Log Screen script by Sthrattoff and everything is working fine. Though when I want to load or save anything I get this error:
Script "Window_SaveFile" line 28: EOFError occured.

End of file reached

And this is what the line says:
@characters = Marshal.load(file)

Some people say it has to do with a different script, but I have no idea.
Here is the Scripts.rxdata file, please take a look and tell me what causes the problem:
http://www.megaupload.com/?d=XB8F9D5X
(the ring menu wasn't added yet
Are you trying to load save files from before the Quest script was installed? If so, delete the old save files.

Original thread: https://www.hbgames.org/forums/viewtopic.php?t=66336