Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

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:
Code:
#===================================================

# ■ Ring Menu - Show Player Location - Release #1 (Enhanced By Dubealex)

#===================================================

# For more infos and update, visit:

# asylum.dubealex.com

#

# Original Ring Menu by: 和希 (From XRXS)

# Original Edit and Fix by: Maki

# Show Player Location Version by: Dubealex

#

# You can customize this script at line #35 - Have fun !!

# If you want to show more stuff, its easy to do, you can try to ask in the forum.

#

# [email=alex@dubealex.com]alex@dubealex.com[/email]

#===================================================

 

 

#===================================================

# ▼ CLASS Scene_Menu Begins

#===================================================

 

class Scene_Menu

#--------------------------------------------------------------------------

# پ? ?I?u?W?F?N?gڈ?????

#     menu_index : ?R?}???h??Jپ[?\??ڈ?????u

#--------------------------------------------------------------------------

def initialize(menu_index = 0)

  @menu_index = menu_index

  $location_text=[]

  $window_size=[]

  $ring_menu_text=[]

  $chara_select=[]

  @window_opacity=[]

  @chara_select=[]

  @window_position=[]

 

   #--------------------------------------------------------------------------------------------------

   # ■ Ring Menu Customization Section: (By Dubealex)

   #--------------------------------------------------------------------------------------------------

   # Those variables defines how the script will act.

   # Simply change the value by those you want.

   # Remember that changing the font size has its limitation due to text space allocation.

   #

   # ▼ TEXT SETTINGS FOR SHOW PLAYER LOCATION WINDOW:

   $location_text[0]="Tahoma"      # Font Type

   $location_text[1]=22                # Font Size

   $location_text[2]=6                  # Location Title Color

   $location_text[4]=0                  # Map Name Color

   $location_text[3]="Location:"     # Customize the "Location" Title Text

 

   # ▼ SHOW LOCATION WINDOW SETTINS:

   @show_location_window=true                       #Set to false to not use it !

   @window_opacity[0]=255                             # Border Opacity

   @window_opacity[1]=130                             # Background Opacity

   $window_location_skin="001-Blue01"            # Window Skin

   @window_position[0]=20                             # X Axis Position

   @window_position[1]=20                             # Y Axis Position

   $window_size[0]=160                                  # Lengh

   $window_size[1]=96                                    # Heigh

 

   # ▼  TEXT SETTINGS FOR INSIDE THE RING MENU:

   $ring_menu_text[0]="Tahoma"      # Font Type

   $ring_menu_text[7]=0                  # Font Color

   $ring_menu_text[8]=22                # Font Size

   $ring_menu_text[1]="Items"         # Items Menu Text

   $ring_menu_text[2]="Skills"          # Skills Menu Text

   $ring_menu_text[3]="Equip"         # Equip Menu Text

   $ring_menu_text[4]="Stats"          # Stats Menu Text

   $ring_menu_text[5]="Save"          # Save Menu Text

   $ring_menu_text[6]="Quit"           # Quit Menu Text

 

   # ▼  CHARACTER SELECTION WINDOW SETTINGS :

   @chara_select[0]=400               # X Axis Position

   @chara_select[1]=0                  # Y Axis Position

   $chara_select[0]="Tahoma"       # Font Type

   $chara_select[1]=0                   # Font Color

   $chara_select[5]=22                  # Font Size

   $chara_select[2]=255               # Window Border Opacity

   $chara_select[3]=130               # Window Background Opacity

   $chara_select[4]="001-Blue01"  # Window Skin to use

  #--------------------------------------------------------------------------------------------------

 

end

#--------------------------------------------------------------------------

# پ? ?پ?C??ڈ?? 

#--------------------------------------------------------------------------

def main

 

  # Show Player Location Feature:

  if @show_location_window==true    

  @window_location = Window_Location.new

     @window_location.x = @window_position[0]

     @window_location.y = @window_position[1]

     @window_location.opacity = @window_opacity[0]

     @window_location.back_opacity = @window_opacity[1]

     end

  #End of Show Player Location

 

  # ?X?v???C?g?Z?b?g??چ? ?

  @spriteset = Spriteset_Map.new

  # ?R?}???h?E?B???h?E??چ? ?

  px = $game_player.screen_x - 15

  py = $game_player.screen_y - 24

  @command_window = Window_RingMenu.new(px,py)

  @command_window.index = @menu_index

  # ?pپ[?e?B l ??? 0  l??ڈ?چ?

  if $game_party.actors.size == 0

    # ?A?C?e??پA?X?L??پA????پA?X?eپ[?^?X????????

    @command_window.disable_item(0)

    @command_window.disable_item(1)

    @command_window.disable_item(2)

    @command_window.disable_item(3)

  end

  @command_window.z = 100

  # ?Zپ[?u??~??ڈ?چ?

  if $game_system.save_disabled

    # ?Zپ[?u???????????

    @command_window.disable_item(4)

  end

  # ?X?eپ[?^?X?E?B???h?E??چ? ?

  @status_window = Window_RingMenuStatus.new

  @status_window.x = @chara_select[0]

  @status_window.y = @chara_select[1]

  @status_window.z = 200

  @status_window.opacity=$chara_select[2]

  @status_window.back_opacity=$chara_select[3]

  @status_window.visible = false

  # ?g?????W?V??????چs

  Graphics.transition

  # ?پ?C????پ[?v

  loop do

    # ?Qپ[???????چX V

    Graphics.update

    # ????ڈ?????چX V

    Input.update

    # ?t??پ[??چX V

    update

    # ????? ???????????پ[?v?????f

    if $scene != self

      break

    end

  end

  # ?g?????W?V????ڈ???

  Graphics.freeze

  # ?X?v???C?g?Z?b?g??????

  @spriteset.dispose

  # ?E?B???h?E??????

  if @show_location_window==true

  @window_location.dispose

  end

  @command_window.dispose

  @status_window.dispose

end

#--------------------------------------------------------------------------

# پ? ?t??پ[??چX V

#--------------------------------------------------------------------------

def update

  # ?E?B???h?E??چX V

  if @show_location_window==true

  @window_location.update

  end

  @command_window.update

  @status_window.update

  # ?R?}???h?E?B???h?E???A?N?e?B?u??ڈ?چ?: update_command ?????

  if @command_window.active

    update_command

    return

  end

  # ?X?eپ[?^?X?E?B???h?E???A?N?e?B?u??ڈ?چ?: update_status ?????

  if @status_window.active

    update_status

    return

  end

end

#--------------------------------------------------------------------------

# پ? ?t??پ[??چX V (?R?}???h?E?B???h?E???A?N?e?B?u??ڈ?چ?)

#--------------------------------------------------------------------------

def update_command

  # B ?{?^??????????ڈ?چ?

  if Input.trigger?(Input::B)

    # ?L?????Z?? SE ?????t

    $game_system.se_play($data_system.cancel_se)

    # ?}?b?v????? ?????

    $scene = Scene_Map.new

    return

  end

  # C ?{?^??????????ڈ?چ?

  if Input.trigger?(Input::C)

    # ?pپ[?e?B l ??? 0  l??پA?Zپ[?uپA?Qپ[??ڈI????O??R?}???h??ڈ?چ?

    if $game_party.actors.size == 0 and @command_window.index < 4

      # ?u?Uپ[ SE ?????t

      $game_system.se_play($data_system.buzzer_se)

      return

    end

    # ?R?}???h?E?B???h?E??Jپ[?\????u?????

    case @command_window.index

    when 0  # ?A?C?e??

      # ????  SE ?????t

      $game_system.se_play($data_system.decision_se)

      # ?A?C?e??????? ?????

      $scene = Scene_Item.new

    when 1  # ?X?L??

      # ???? SE ?????t

      $game_system.se_play($data_system.decision_se)

      # ?X?eپ[?^?X?E?B???h?E???A?N?e?B?u?????

      @command_window.active = false

      @status_window.active = true

      @status_window.visible = true

      @status_window.index = 0

    when 2  # ????

      # ???? SE ?????t

      $game_system.se_play($data_system.decision_se)

      # ?X?eپ[?^?X?E?B???h?E???A?N?e?B?u?????

      @command_window.active = false

      @status_window.active = true

      @status_window.visible = true

      @status_window.index = 0

    when 3  # ?X?eپ[?^?X

      # ???? SE ?????t

      $game_system.se_play($data_system.decision_se)

      # ?X?eپ[?^?X?E?B???h?E???A?N?e?B?u?????

      @command_window.active = false

      @status_window.active = true

      @status_window.visible = true

      @status_window.index = 0

    when 4  # ?Zپ[?u

      # ?Zپ[?u??~??ڈ?چ?

      if $game_system.save_disabled

        # ?u?Uپ[ SE ?????t

        $game_system.se_play($data_system.buzzer_se)

        return

      end

      # ???? SE ?????t

      $game_system.se_play($data_system.decision_se)

      # ?Zپ[?u????? ?????

      $scene = Scene_Save.new

    when 5  # ?Qپ[??ڈI??

      # ???? SE ?????t

      $game_system.se_play($data_system.decision_se)

      # ?Qپ[??ڈI??????? ?????

      $scene = Scene_End.new

    end

    return

  end

  # ?A?j?پپ[?V??????????Jپ[?\????ڈ?? ??چs?????

  return if @command_window.animation?

  # پ?orپ? ?{?^??????????ڈ?چ?

  if Input.press?(Input::UP) or  Input.press?(Input::LEFT)

    $game_system.se_play($data_system.cursor_se)

    @command_window.setup_move_move(Window_RingMenu::MODE_MOVEL)

    return

  end

  # پ?orپ? ?{?^??????????ڈ?چ?

  if Input.press?(Input::DOWN) or  Input.press?(Input::RIGHT)

    $game_system.se_play($data_system.cursor_se)

    @command_window.setup_move_move(Window_RingMenu::MODE_MOVER)

    return

  end

end

#--------------------------------------------------------------------------

# پ? ?t??پ[??چX V (?X?eپ[?^?X?E?B???h?E???A?N?e?B?u??ڈ?چ?)

#--------------------------------------------------------------------------

def update_status

  # B ?{?^??????????ڈ?چ?

  if Input.trigger?(Input::B)

    # ?L?????Z?? SE ?????t

    $game_system.se_play($data_system.cancel_se)

    # ?R?}???h?E?B???h?E???A?N?e?B?u?????

    @command_window.active = true

    @status_window.active = false

    @status_window.visible = false

    @status_window.index = -1

    return

  end

  # C ?{?^??????????ڈ?چ?

  if Input.trigger?(Input::C)

    # ?R?}???h?E?B???h?E??Jپ[?\????u?????

    case @command_window.index

    when 1  # ?X?L??

      # ????A?N?^پ[??چs?? ????? 2 ??ڈ???ڈ?چ?

      if $game_party.actors[@status_window.index].restriction >= 2

        # ?u?Uپ[ SE ?????t

        $game_system.se_play($data_system.buzzer_se)

        return

      end

      # ???? SE ?????t

      $game_system.se_play($data_system.decision_se)

      # ?X?L??????? ?????

      $scene = Scene_Skill.new(@status_window.index)

    when 2  # ????

      # ???? SE ?????t

      $game_system.se_play($data_system.decision_se)

      # ????????? ?????

      $scene = Scene_Equip.new(@status_window.index)

    when 3  # ?X?eپ[?^?X

      # ???? SE ?????t

      $game_system.se_play($data_system.decision_se)

      # ?X?eپ[?^?X????? ?????

      $scene = Scene_Status.new(@status_window.index)

    end

    return

  end

end

end

 

#===================================================

# ▲ CLASS Scene_Menu Ends

#===================================================

 

 

#===================================================

# ▼ CLASS Window_RingMenu  Begins

#===================================================

class Window_RingMenu < Window_Base

#--------------------------------------------------------------------------

# پ? ?N???X?? ?

#--------------------------------------------------------------------------

STARTUP_FRAMES = 20

MOVING_FRAMES = 5  

RING_R = 64        

ICON_ITEM   = RPG::Cache.icon("034-Item03")

ICON_SKILL  = RPG::Cache.icon("044-Skill01")

ICON_EQUIP  = RPG::Cache.icon("001-Weapon01")

ICON_STATUS = RPG::Cache.icon("050-Skill07")

ICON_SAVE   = RPG::Cache.icon("038-Item07")

ICON_EXIT   = RPG::Cache.icon("046-Skill03")

ICON_DISABLE= RPG::Cache.icon("")

SE_STARTUP = "056-Right02"

MODE_START = 1

MODE_WAIT  = 2

MODE_MOVER = 3

MODE_MOVEL = 4

#--------------------------------------------------------------------------

# پ? ?A?N?Z?T

#--------------------------------------------------------------------------

attr_accessor :index

#--------------------------------------------------------------------------

# پ? ?I?u?W?F?N?gڈ?????

#--------------------------------------------------------------------------

def initialize( center_x, center_y )

  super(0, 0, 640, 480)

  self.contents = Bitmap.new(width-32, height-32)

  self.contents.font.name = $ring_menu_text[0]

  self.contents.font.color = text_color($ring_menu_text[7])

  self.contents.font.size = $ring_menu_text[8]

  self.opacity = 0

  self.back_opacity = 0

  s1 = $ring_menu_text[1]

  s2 = $ring_menu_text[2]

  s3 = $ring_menu_text[3]

  s4 = $ring_menu_text[4]

  s5 = $ring_menu_text[5]

  s6 = $ring_menu_text[6]

  @commands = [ s1, s2, s3, s4, s5, s6 ]

  @item_max = 6

  @index = 0

  @items = [ ICON_ITEM, ICON_SKILL, ICON_EQUIP, ICON_STATUS, ICON_SAVE, ICON_EXIT ]

  @disabled = [ false, false, false, false, false, false ]

  @cx = center_x - 16

  @cy = center_y - 16

  setup_move_start

  refresh

end

#--------------------------------------------------------------------------

# پ? ?t??پ[??چX V

#--------------------------------------------------------------------------

def update

  super

  refresh

end

#--------------------------------------------------------------------------

# پ? ????چ?`??

#--------------------------------------------------------------------------

def refresh

  self.contents.clear

  # ?A?C?R?????`??

  case @mode

  when MODE_START

    refresh_start

  when MODE_WAIT

    refresh_wait

  when MODE_MOVER

    refresh_move(1)

  when MODE_MOVEL

    refresh_move(0)

  end

  # ?A?N?e?B?u??R?}???h???\??

  rect = Rect.new(@cx - 272, @cy + 24, self.contents.width-32, 32)

  self.contents.draw_text(rect, @commands[@index],1)

end

#--------------------------------------------------------------------------

# پ? ????چ?`??(ڈ???????)

#--------------------------------------------------------------------------

def refresh_start

  d1 = 2.0 * Math::PI / @item_max

  d2 = 1.0 * Math::PI / STARTUP_FRAMES

  r = RING_R - 1.0 * RING_R * @steps / STARTUP_FRAMES

  for i in 0...@item_max

    j = i - @index

    d = d1 * j + d2 * @steps

    x = @cx + ( r * Math.sin( d ) ).to_i

    y = @cy - ( r * Math.cos( d ) ).to_i

    draw_item(x, y, i)

  end

  @steps -= 1

  if @steps < 1

    @mode = MODE_WAIT

  end

end

#--------------------------------------------------------------------------

# پ? ????چ?`??(??@??)

#--------------------------------------------------------------------------

def refresh_wait

  d = 2.0 * Math::PI / @item_max

  for i in 0...@item_max

    j = i - @index

    x = @cx + ( RING_R * Math.sin( d * j ) ).to_i

    y = @cy - ( RING_R * Math.cos( d * j ) ).to_i

    draw_item(x, y, i)

  end

end

#--------------------------------------------------------------------------

# پ? ????چ?`??(???]??)

#  mode : 0=?????v???? 1=???v????

#--------------------------------------------------------------------------

def refresh_move( mode )

  d1 = 2.0 * Math::PI / @item_max

  d2 = d1 / MOVING_FRAMES

  d2 *= -1 if mode != 0

  for i in 0...@item_max

    j = i - @index

    d = d1 * j + d2 * @steps

    x = @cx + ( RING_R * Math.sin( d ) ).to_i

    y = @cy - ( RING_R * Math.cos( d ) ).to_i

    draw_item(x, y, i)

  end

  @steps -= 1

  if @steps < 1

    @mode = MODE_WAIT

  end

end

#--------------------------------------------------------------------------

# پ? چ????`??

#     x :

#     y :

#     i : چ????چ?

#--------------------------------------------------------------------------

def draw_item(x, y, i)

  #p "x=" + x.to_s + " y=" + y.to_s + " i=" + @items[i].to_s

  rect = Rect.new(0, 0, @items[i].width, @items[i].height)

  if @index == i

    self.contents.blt( x, y, @items[i], rect )

    if @disabled[@index]

      self.contents.blt( x, y, ICON_DISABLE, rect )

    end

  else

    self.contents.blt( x, y, @items[i], rect, 128 )

    if @disabled[@index]

      self.contents.blt( x, y, ICON_DISABLE, rect, 128 )

    end

  end

end

#--------------------------------------------------------------------------

# پ? چ?????????????

#     index : چ????چ?

#--------------------------------------------------------------------------

def disable_item(index)

  @disabled[index] = true

end

#--------------------------------------------------------------------------

# پ? ڈ??????A?j?پپ[?V??????ڈ???

#--------------------------------------------------------------------------

def setup_move_start

  @mode = MODE_START

  @steps = STARTUP_FRAMES

  if  SE_STARTUP != nil and SE_STARTUP != ""

    Audio.se_play("Audio/SE/" + SE_STARTUP, 80, 100)

  end

end

#--------------------------------------------------------------------------

# پ? ???]?A?j?پپ[?V??????ڈ???

#--------------------------------------------------------------------------

def setup_move_move(mode)

  if mode == MODE_MOVER

    @index -= 1

    @index = @items.size - 1 if @index < 0

  elsif mode == MODE_MOVEL

    @index += 1

    @index = 0 if @index >= @items.size

  else

    return

  end

  @mode = mode

  @steps = MOVING_FRAMES

end

#--------------------------------------------------------------------------

# پ? ?A?j?پپ[?V?????????????

#--------------------------------------------------------------------------

def animation?

  return @mode != MODE_WAIT

end

end

 

#===================================================

# ▲ CLASS Window_RingMenu Ends

#===================================================

 

 

#===================================================

# ▼ CLASS Window_RingMenuStatus Begins

#===================================================

 

class Window_RingMenuStatus < Window_Selectable

#--------------------------------------------------------------------------

# پ? ?I?u?W?F?N?gڈ?????

#--------------------------------------------------------------------------

def initialize

  super(204, 64, 232, 352)

  self.contents = Bitmap.new(width - 32, height - 32)

  self.contents.font.size = $chara_select[5]

  refresh

  self.active = false

  self.index = -1

end

#--------------------------------------------------------------------------

# پ? ???t???b?V??

#--------------------------------------------------------------------------

def refresh

  self.contents.clear

  self.windowskin = RPG::Cache.windowskin($chara_select[4])

  self.contents.font.name = $chara_select[0]

  self.contents.font.color = text_color($chara_select[1])

  @item_max = $game_party.actors.size

  for i in 0...$game_party.actors.size

    x = 80

    y = 80 * i

    actor = $game_party.actors[i]

    draw_actor_graphic(actor, x - 40, y + 80)

    draw_actor_name(actor, x, y + 24)

  end

end

#--------------------------------------------------------------------------

# پ? ?Jپ[?\??????`چX V

#--------------------------------------------------------------------------

def update_cursor_rect

  if @index < 0

    self.cursor_rect.empty

  else

    self.cursor_rect.set(0, @index * 80, self.width - 32, 80)

  end

end

end

#===================================================

# ▲ CLASS Window_RingMenuStatus Ends

#===================================================

 

 

#===================================================

# ▼ CLASS Game_Map Additional Code Begins

#===================================================

class Game_Map

 

#Dubealex Addition (from XRXS) to show Map Name on screen

def name

  $map_infos[@map_id]

end

end

 

#===================================================

# ▲ CLASS Game_Map Additional Code Ends

#===================================================

 

 

#===================================================

# ▼ CLASS Scene_Title Additional Code Begins

#===================================================

class Scene_Title

 

#Dubealex Addition (from XRXS) to show Map Name on screen

  $map_infos = load_data("Data/MapInfos.rxdata")

  for key in $map_infos.keys

    $map_infos[key] = $map_infos[key].name

  end

end

 

#===================================================

# ▲ CLASS Scene_Title Additional Code Ends

#===================================================

 

 

#===================================================

# ▼ CLASS Window_Location Begins

#===================================================

 

class Window_Location < Window_Base

 

def initialize

super(0, 0, $window_size[0], $window_size[1])

  self.contents = Bitmap.new(width - 32, height - 32)

  self.contents.font.name = $location_text[0]

  self.contents.font.size = $location_text[1]

refresh

end

 

def refresh

self.contents.clear

self.windowskin = RPG::Cache.windowskin($window_location_skin)

self.contents.font.color = text_color($location_text[2])

self.contents.draw_text(4, 0, 120, 32, $location_text[3])

self.contents.font.color = text_color($location_text[4])

self.contents.draw_text(4, 32, 120, 32, $game_map.name, 2)

end

end

#===================================================

# ▲ CLASS Window_Location Ends

#===================================================

 

#===================================================

# ▲ Ring Menu - Show Player Location R1 - Ends

#===================================================
And this is the image I want around the menu:
verse%20of%20the%20ring.png
verse%20of%20the%20ring_black.png

Screen shots:
the%20one%20ring%20menu%20(example).png
.
 
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

Code:
#===================================================

# ■ Ring Menu - Show Player Location - Release #1 (Enhanced By Dubealex)

#===================================================

# For more infos and update, visit:

# asylum.dubealex.com

#

# Original Ring Menu by: 和希 (From XRXS)

# Original Edit and Fix by: Maki

# Show Player Location Version by: Dubealex

#

# You can customize this script at line #35 - Have fun !!

# If you want to show more stuff, its easy to do, you can try to ask in the forum.

#

# [email=alex@dubealex.com]alex@dubealex.com[/email]

#===================================================

 

 

#===================================================

# ▼ CLASS Scene_Menu Begins

#===================================================

 

class Scene_Menu

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

#--------------------------------------------------------------------------

# پ? ?I?u?W?F?N?gڈ?????

#     menu_index : ?R?}???h??Jپ[?\??ڈ?????u

#--------------------------------------------------------------------------

def initialize(menu_index = 0)

  @menu_index = menu_index

  $location_text=[]

  $window_size=[]

  $ring_menu_text=[]

  $chara_select=[]

  @window_opacity=[]

  @chara_select=[]

  @window_position=[]

 

   #--------------------------------------------------------------------------------------------------

   # ■ Ring Menu Customization Section: (By Dubealex)

   #--------------------------------------------------------------------------------------------------

   # Those variables defines how the script will act.

   # Simply change the value by those you want.

   # Remember that changing the font size has its limitation due to text space allocation.

   #

   # ▼ TEXT SETTINGS FOR SHOW PLAYER LOCATION WINDOW:

   $location_text[0]="Tahoma"      # Font Type

   $location_text[1]=22                # Font Size

   $location_text[2]=6                  # Location Title Color

   $location_text[4]=0                  # Map Name Color

   $location_text[3]="Location:"     # Customize the "Location" Title Text

 

   # ▼ SHOW LOCATION WINDOW SETTINS:

   @show_location_window=true                       #Set to false to not use it !

   @window_opacity[0]=255                             # Border Opacity

   @window_opacity[1]=130                             # Background Opacity

   $window_location_skin="001-Blue01"            # Window Skin

   @window_position[0]=20                             # X Axis Position

   @window_position[1]=20                             # Y Axis Position

   $window_size[0]=160                                  # Lengh

   $window_size[1]=96                                    # Heigh

 

   # ▼  TEXT SETTINGS FOR INSIDE THE RING MENU:

   $ring_menu_text[0]="Tahoma"      # Font Type

   $ring_menu_text[7]=0                  # Font Color

   $ring_menu_text[8]=22                # Font Size

   $ring_menu_text[1]="Items"         # Items Menu Text

   $ring_menu_text[2]="Skills"          # Skills Menu Text

   $ring_menu_text[3]="Equip"         # Equip Menu Text

   $ring_menu_text[4]="Stats"          # Stats Menu Text

   $ring_menu_text[5]="Save"          # Save Menu Text

   $ring_menu_text[6]="Quit"           # Quit Menu Text

 

   # ▼  CHARACTER SELECTION WINDOW SETTINGS :

   @chara_select[0]=400               # X Axis Position

   @chara_select[1]=0                  # Y Axis Position

   $chara_select[0]="Tahoma"       # Font Type

   $chara_select[1]=0                   # Font Color

   $chara_select[5]=22                  # Font Size

   $chara_select[2]=255               # Window Border Opacity

   $chara_select[3]=130               # Window Background Opacity

   $chara_select[4]="001-Blue01"  # Window Skin to use

  #--------------------------------------------------------------------------------------------------

 

end

#--------------------------------------------------------------------------

# پ? ?پ?C??ڈ??

#--------------------------------------------------------------------------

def main

 

  # Show Player Location Feature:

  if @show_location_window==true    

  @window_location = Window_Location.new

     @window_location.x = @window_position[0]

     @window_location.y = @window_position[1]

     @window_location.opacity = @window_opacity[0]

     @window_location.back_opacity = @window_opacity[1]

     end

  #End of Show Player Location

 

  # ?X?v???C?g?Z?b?g??چ? ?

  @spriteset = Spriteset_Map.new

  # ?R?}???h?E?B???h?E??چ? ?

  px = $game_player.screen_x - 15

  py = $game_player.screen_y - 24

  @command_window = Window_RingMenu.new(px,py)

  @command_window.index = @menu_index

  # create background image

  @bg_image = Sprite.new

  @bg_image.bitmap = BG_IMAGE

  @bg_image.x = $game_player.screen_x - @bg_image.bitmap.width / 2

  @bg_image.y = $game_player.screen_y - @bg_image.bitmap.height / 2

  # ?pپ[?e?B l ??? 0  l??ڈ?چ?

  if $game_party.actors.size == 0

    # ?A?C?e??پA?X?L??پA????پA?X?eپ[?^?X????????

    @command_window.disable_item(0)

    @command_window.disable_item(1)

    @command_window.disable_item(2)

    @command_window.disable_item(3)

  end

  @command_window.z = 100

  # ?Zپ[?u??~??ڈ?چ?

  if $game_system.save_disabled

    # ?Zپ[?u???????????

    @command_window.disable_item(4)

  end

  # ?X?eپ[?^?X?E?B???h?E??چ? ?

  @status_window = Window_RingMenuStatus.new

  @status_window.x = @chara_select[0]

  @status_window.y = @chara_select[1]

  @status_window.z = 200

  @status_window.opacity=$chara_select[2]

  @status_window.back_opacity=$chara_select[3]

  @status_window.visible = false

  # ?g?????W?V??????چs

  Graphics.transition

  # ?پ?C????پ[?v

  loop do

    # ?Qپ[???????چX V

    Graphics.update

    # ????ڈ?????چX V

    Input.update

    # ?t??پ[??چX V

    update

    # ????? ???????????پ[?v?????f

    if $scene != self

      break

    end

  end

  # ?g?????W?V????ڈ???

  Graphics.freeze

  # ?X?v???C?g?Z?b?g??????

  @spriteset.dispose

  # ?E?B???h?E??????

  if @show_location_window==true

  @window_location.dispose

  end

  @command_window.dispose

  @status_window.dispose

  @bg_image.dispose

end

#--------------------------------------------------------------------------

# پ? ?t??پ[??چX V

#--------------------------------------------------------------------------

def update

  # ?E?B???h?E??چX V

  if @show_location_window==true

  @window_location.update

  end

  @command_window.update

  @status_window.update

  # ?R?}???h?E?B???h?E???A?N?e?B?u??ڈ?چ?: update_command ?????

  if @command_window.active

    update_command

    return

  end

  # ?X?eپ[?^?X?E?B???h?E???A?N?e?B?u??ڈ?چ?: update_status ?????

  if @status_window.active

    update_status

    return

  end

end

#--------------------------------------------------------------------------

# پ? ?t??پ[??چX V (?R?}???h?E?B???h?E???A?N?e?B?u??ڈ?چ?)

#--------------------------------------------------------------------------

def update_command

  # B ?{?^??????????ڈ?چ?

  if Input.trigger?(Input::B)

    # ?L?????Z?? SE ?????t

    $game_system.se_play($data_system.cancel_se)

    # ?}?b?v????? ?????

    $scene = Scene_Map.new

    return

  end

  # C ?{?^??????????ڈ?چ?

  if Input.trigger?(Input::C)

    # ?pپ[?e?B l ??? 0  l??پA?Zپ[?uپA?Qپ[??ڈI????O??R?}???h??ڈ?چ?

    if $game_party.actors.size == 0 and @command_window.index < 4

      # ?u?Uپ[ SE ?????t

      $game_system.se_play($data_system.buzzer_se)

      return

    end

    # ?R?}???h?E?B???h?E??Jپ[?\????u?????

    case @command_window.index

    when 0  # ?A?C?e??

      # ????  SE ?????t

      $game_system.se_play($data_system.decision_se)

      # ?A?C?e??????? ?????

      $scene = Scene_Item.new

    when 1  # ?X?L??

      # ???? SE ?????t

      $game_system.se_play($data_system.decision_se)

      # ?X?eپ[?^?X?E?B???h?E???A?N?e?B?u?????

      @command_window.active = false

      @status_window.active = true

      @status_window.visible = true

      @status_window.index = 0

    when 2  # ????

      # ???? SE ?????t

      $game_system.se_play($data_system.decision_se)

      # ?X?eپ[?^?X?E?B???h?E???A?N?e?B?u?????

      @command_window.active = false

      @status_window.active = true

      @status_window.visible = true

      @status_window.index = 0

    when 3  # ?X?eپ[?^?X

      # ???? SE ?????t

      $game_system.se_play($data_system.decision_se)

      # ?X?eپ[?^?X?E?B???h?E???A?N?e?B?u?????

      @command_window.active = false

      @status_window.active = true

      @status_window.visible = true

      @status_window.index = 0

    when 4  # ?Zپ[?u

      # ?Zپ[?u??~??ڈ?چ?

      if $game_system.save_disabled

        # ?u?Uپ[ SE ?????t

        $game_system.se_play($data_system.buzzer_se)

        return

      end

      # ???? SE ?????t

      $game_system.se_play($data_system.decision_se)

      # ?Zپ[?u????? ?????

      $scene = Scene_Save.new

    when 5  # ?Qپ[??ڈI??

      # ???? SE ?????t

      $game_system.se_play($data_system.decision_se)

      # ?Qپ[??ڈI??????? ?????

      $scene = Scene_End.new

    end

    return

  end

  # ?A?j?پپ[?V??????????Jپ[?\????ڈ?? ??چs?????

  return if @command_window.animation?

  # پ?orپ? ?{?^??????????ڈ?چ?

  if Input.press?(Input::UP) or  Input.press?(Input::LEFT)

    $game_system.se_play($data_system.cursor_se)

    @command_window.setup_move_move(Window_RingMenu::MODE_MOVEL)

    return

  end

  # پ?orپ? ?{?^??????????ڈ?چ?

  if Input.press?(Input::DOWN) or  Input.press?(Input::RIGHT)

    $game_system.se_play($data_system.cursor_se)

    @command_window.setup_move_move(Window_RingMenu::MODE_MOVER)

    return

  end

end

#--------------------------------------------------------------------------

# پ? ?t??پ[??چX V (?X?eپ[?^?X?E?B???h?E???A?N?e?B?u??ڈ?چ?)

#--------------------------------------------------------------------------

def update_status

  # B ?{?^??????????ڈ?چ?

  if Input.trigger?(Input::B)

    # ?L?????Z?? SE ?????t

    $game_system.se_play($data_system.cancel_se)

    # ?R?}???h?E?B???h?E???A?N?e?B?u?????

    @command_window.active = true

    @status_window.active = false

    @status_window.visible = false

    @status_window.index = -1

    return

  end

  # C ?{?^??????????ڈ?چ?

  if Input.trigger?(Input::C)

    # ?R?}???h?E?B???h?E??Jپ[?\????u?????

    case @command_window.index

    when 1  # ?X?L??

      # ????A?N?^پ[??چs?? ????? 2 ??ڈ???ڈ?چ?

      if $game_party.actors[@status_window.index].restriction >= 2

        # ?u?Uپ[ SE ?????t

        $game_system.se_play($data_system.buzzer_se)

        return

      end

      # ???? SE ?????t

      $game_system.se_play($data_system.decision_se)

      # ?X?L??????? ?????

      $scene = Scene_Skill.new(@status_window.index)

    when 2  # ????

      # ???? SE ?????t

      $game_system.se_play($data_system.decision_se)

      # ????????? ?????

      $scene = Scene_Equip.new(@status_window.index)

    when 3  # ?X?eپ[?^?X

      # ???? SE ?????t

      $game_system.se_play($data_system.decision_se)

      # ?X?eپ[?^?X????? ?????

      $scene = Scene_Status.new(@status_window.index)

    end

    return

  end

end

end

 

#===================================================

# ▲ CLASS Scene_Menu Ends

#===================================================

 

 

#===================================================

# ▼ CLASS Window_RingMenu  Begins

#===================================================

class Window_RingMenu < Window_Base

#--------------------------------------------------------------------------

# پ? ?N???X?? ?

#--------------------------------------------------------------------------

STARTUP_FRAMES = 20

MOVING_FRAMES = 5  

RING_R = 64        

ICON_ITEM   = RPG::Cache.icon("034-Item03")

ICON_SKILL  = RPG::Cache.icon("044-Skill01")

ICON_EQUIP  = RPG::Cache.icon("001-Weapon01")

ICON_STATUS = RPG::Cache.icon("050-Skill07")

ICON_SAVE   = RPG::Cache.icon("038-Item07")

ICON_EXIT   = RPG::Cache.icon("046-Skill03")

ICON_DISABLE= RPG::Cache.icon("")

SE_STARTUP = "056-Right02"

MODE_START = 1

MODE_WAIT  = 2

MODE_MOVER = 3

MODE_MOVEL = 4

#--------------------------------------------------------------------------

# پ? ?A?N?Z?T

#--------------------------------------------------------------------------

attr_accessor :index

#--------------------------------------------------------------------------

# پ? ?I?u?W?F?N?gڈ?????

#--------------------------------------------------------------------------

def initialize( center_x, center_y )

  super(0, 0, 640, 480)

  self.contents = Bitmap.new(width-32, height-32)

  self.contents.font.name = $ring_menu_text[0]

  self.contents.font.color = text_color($ring_menu_text[7])

  self.contents.font.size = $ring_menu_text[8]

  self.opacity = 0

  self.back_opacity = 0

  s1 = $ring_menu_text[1]

  s2 = $ring_menu_text[2]

  s3 = $ring_menu_text[3]

  s4 = $ring_menu_text[4]

  s5 = $ring_menu_text[5]

  s6 = $ring_menu_text[6]

  @commands = [ s1, s2, s3, s4, s5, s6 ]

  @item_max = 6

  @index = 0

  @items = [ ICON_ITEM, ICON_SKILL, ICON_EQUIP, ICON_STATUS, ICON_SAVE, ICON_EXIT ]

  @disabled = [ false, false, false, false, false, false ]

  @cx = center_x - 16

  @cy = center_y - 16

  setup_move_start

  refresh

end

#--------------------------------------------------------------------------

# پ? ?t??پ[??چX V

#--------------------------------------------------------------------------

def update

  super

  refresh

end

#--------------------------------------------------------------------------

# پ? ????چ?`??

#--------------------------------------------------------------------------

def refresh

  self.contents.clear

  # ?A?C?R?????`??

  case @mode

  when MODE_START

    refresh_start

  when MODE_WAIT

    refresh_wait

  when MODE_MOVER

    refresh_move(1)

  when MODE_MOVEL

    refresh_move(0)

  end

  # ?A?N?e?B?u??R?}???h???\??

  rect = Rect.new(@cx - 272, @cy + 24, self.contents.width-32, 32)

  self.contents.draw_text(rect, @commands[@index],1)

end

#--------------------------------------------------------------------------

# پ? ????چ?`??(ڈ???????)

#--------------------------------------------------------------------------

def refresh_start

  d1 = 2.0 * Math::PI / @item_max

  d2 = 1.0 * Math::PI / STARTUP_FRAMES

  r = RING_R - 1.0 * RING_R * @steps / STARTUP_FRAMES

  for i in 0...@item_max

    j = i - @index

    d = d1 * j + d2 * @steps

    x = @cx + ( r * Math.sin( d ) ).to_i

    y = @cy - ( r * Math.cos( d ) ).to_i

    draw_item(x, y, i)

  end

  @steps -= 1

  if @steps < 1

    @mode = MODE_WAIT

  end

end

#--------------------------------------------------------------------------

# پ? ????چ?`??(??@??)

#--------------------------------------------------------------------------

def refresh_wait

  d = 2.0 * Math::PI / @item_max

  for i in 0...@item_max

    j = i - @index

    x = @cx + ( RING_R * Math.sin( d * j ) ).to_i

    y = @cy - ( RING_R * Math.cos( d * j ) ).to_i

    draw_item(x, y, i)

  end

end

#--------------------------------------------------------------------------

# پ? ????چ?`??(???]??)

#  mode : 0=?????v???? 1=???v????

#--------------------------------------------------------------------------

def refresh_move( mode )

  d1 = 2.0 * Math::PI / @item_max

  d2 = d1 / MOVING_FRAMES

  d2 *= -1 if mode != 0

  for i in 0...@item_max

    j = i - @index

    d = d1 * j + d2 * @steps

    x = @cx + ( RING_R * Math.sin( d ) ).to_i

    y = @cy - ( RING_R * Math.cos( d ) ).to_i

    draw_item(x, y, i)

  end

  @steps -= 1

  if @steps < 1

    @mode = MODE_WAIT

  end

end

#--------------------------------------------------------------------------

# پ? چ????`??

#     x :

#     y :

#     i : چ????چ?

#--------------------------------------------------------------------------

def draw_item(x, y, i)

  #p "x=" + x.to_s + " y=" + y.to_s + " i=" + @items[i].to_s

  rect = Rect.new(0, 0, @items[i].width, @items[i].height)

  if @index == i

    self.contents.blt( x, y, @items[i], rect )

    if @disabled[@index]

      self.contents.blt( x, y, ICON_DISABLE, rect )

    end

  else

    self.contents.blt( x, y, @items[i], rect, 128 )

    if @disabled[@index]

      self.contents.blt( x, y, ICON_DISABLE, rect, 128 )

    end

  end

end

#--------------------------------------------------------------------------

# پ? چ?????????????

#     index : چ????چ?

#--------------------------------------------------------------------------

def disable_item(index)

  @disabled[index] = true

end

#--------------------------------------------------------------------------

# پ? ڈ??????A?j?پپ[?V??????ڈ???

#--------------------------------------------------------------------------

def setup_move_start

  @mode = MODE_START

  @steps = STARTUP_FRAMES

  if  SE_STARTUP != nil and SE_STARTUP != ""

    Audio.se_play("Audio/SE/" + SE_STARTUP, 80, 100)

  end

end

#--------------------------------------------------------------------------

# پ? ???]?A?j?پپ[?V??????ڈ???

#--------------------------------------------------------------------------

def setup_move_move(mode)

  if mode == MODE_MOVER

    @index -= 1

    @index = @items.size - 1 if @index < 0

  elsif mode == MODE_MOVEL

    @index += 1

    @index = 0 if @index >= @items.size

  else

    return

  end

  @mode = mode

  @steps = MOVING_FRAMES

end

#--------------------------------------------------------------------------

# پ? ?A?j?پپ[?V?????????????

#--------------------------------------------------------------------------

def animation?

  return @mode != MODE_WAIT

end

end

 

#===================================================

# ▲ CLASS Window_RingMenu Ends

#===================================================

 

 

#===================================================

# ▼ CLASS Window_RingMenuStatus Begins

#===================================================

 

class Window_RingMenuStatus < Window_Selectable

#--------------------------------------------------------------------------

# پ? ?I?u?W?F?N?gڈ?????

#--------------------------------------------------------------------------

def initialize

  super(204, 64, 232, 352)

  self.contents = Bitmap.new(width - 32, height - 32)

  self.contents.font.size = $chara_select[5]

  refresh

  self.active = false

  self.index = -1

end

#--------------------------------------------------------------------------

# پ? ???t???b?V??

#--------------------------------------------------------------------------

def refresh

  self.contents.clear

  self.windowskin = RPG::Cache.windowskin($chara_select[4])

  self.contents.font.name = $chara_select[0]

  self.contents.font.color = text_color($chara_select[1])

  @item_max = $game_party.actors.size

  for i in 0...$game_party.actors.size

    x = 80

    y = 80 * i

    actor = $game_party.actors[i]

    draw_actor_graphic(actor, x - 40, y + 80)

    draw_actor_name(actor, x, y + 24)

  end

end

#--------------------------------------------------------------------------

# پ? ?Jپ[?\??????`چX V

#--------------------------------------------------------------------------

def update_cursor_rect

  if @index < 0

    self.cursor_rect.empty

  else

    self.cursor_rect.set(0, @index * 80, self.width - 32, 80)

  end

end

end

#===================================================

# ▲ CLASS Window_RingMenuStatus Ends

#===================================================

 

 

#===================================================

# ▼ CLASS Game_Map Additional Code Begins

#===================================================

class Game_Map

 

#Dubealex Addition (from XRXS) to show Map Name on screen

def name

  $map_infos[@map_id]

end

end

 

#===================================================

# ▲ CLASS Game_Map Additional Code Ends

#===================================================

 

 

#===================================================

# ▼ CLASS Scene_Title Additional Code Begins

#===================================================

class Scene_Title

 

#Dubealex Addition (from XRXS) to show Map Name on screen

  $map_infos = load_data("Data/MapInfos.rxdata")

  for key in $map_infos.keys

    $map_infos[key] = $map_infos[key].name

  end

end

 

#===================================================

# ▲ CLASS Scene_Title Additional Code Ends

#===================================================

 

 

#===================================================

# ▼ CLASS Window_Location Begins

#===================================================

 

class Window_Location < Window_Base

 

def initialize

super(0, 0, $window_size[0], $window_size[1])

  self.contents = Bitmap.new(width - 32, height - 32)

  self.contents.font.name = $location_text[0]

  self.contents.font.size = $location_text[1]

refresh

end

 

def refresh

self.contents.clear

self.windowskin = RPG::Cache.windowskin($window_location_skin)

self.contents.font.color = text_color($location_text[2])

self.contents.draw_text(4, 0, 120, 32, $location_text[3])

self.contents.font.color = text_color($location_text[4])

self.contents.draw_text(4, 32, 120, 32, $game_map.name, 2)

end

end

#===================================================

# ▲ CLASS Window_Location Ends

#===================================================

 

#===================================================

# ▲ Ring Menu - Show Player Location R1 - Ends

#===================================================
 
Thanks! It works.
I still got one more question though.
When I use the Ring Menu Script
Code:
#===================================================

# ■ Ring Menu - Show Player Location - Release #1 (Enhanced By Dubealex)

#===================================================

# For more infos and update, visit:

# asylum.dubealex.com

#

# Original Ring Menu by: 和希 (From XRXS)

# Original Edit and Fix by: Maki

# Show Player Location Version by: Dubealex

#

# You can customize this script at line #35 - Have fun !!

# If you want to show more stuff, its easy to do, you can try to ask in the forum.

#

# [email=alex@dubealex.com]alex@dubealex.com[/email]

#===================================================

 

 

#===================================================

# ▼ CLASS Scene_Menu Begins

#===================================================

 

class Scene_Menu

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

#--------------------------------------------------------------------------

# پ? ?I?u?W?F?N?gڈ?????

#     menu_index : ?R?}???h??Jپ[?\??ڈ?????u

#--------------------------------------------------------------------------

def initialize(menu_index = 0)

  @menu_index = menu_index

  $location_text=[]

  $window_size=[]

  $ring_menu_text=[]

  $chara_select=[]

  @window_opacity=[]

  @chara_select=[]

  @window_position=[]

 

   #--------------------------------------------------------------------------------------------------

   # ■ Ring Menu Customization Section: (By Dubealex)

   #--------------------------------------------------------------------------------------------------

   # Those variables defines how the script will act.

   # Simply change the value by those you want.

   # Remember that changing the font size has its limitation due to text space allocation.

   #

   # ▼ TEXT SETTINGS FOR SHOW PLAYER LOCATION WINDOW:

   $location_text[0]="Tahoma"      # Font Type

   $location_text[1]=22                # Font Size

   $location_text[2]=6                  # Location Title Color

   $location_text[4]=0                  # Map Name Color

   $location_text[3]="Location:"     # Customize the "Location" Title Text

 

   # ▼ SHOW LOCATION WINDOW SETTINS:

   @show_location_window=true                       #Set to false to not use it !

   @window_opacity[0]=255                             # Border Opacity

   @window_opacity[1]=130                             # Background Opacity

   $window_location_skin="001-Blue01"            # Window Skin

   @window_position[0]=20                             # X Axis Position

   @window_position[1]=20                             # Y Axis Position

   $window_size[0]=160                                  # Lengh

   $window_size[1]=96                                    # Heigh

 

   # ▼  TEXT SETTINGS FOR INSIDE THE RING MENU:

   $ring_menu_text[0]="Tahoma"      # Font Type

   $ring_menu_text[7]=0                  # Font Color

   $ring_menu_text[8]=22                # Font Size

   $ring_menu_text[1]="Items"         # Items Menu Text

   $ring_menu_text[2]="Skills"          # Skills Menu Text

   $ring_menu_text[3]="Equip"         # Equip Menu Text

   $ring_menu_text[4]="Stats"          # Stats Menu Text

   $ring_menu_text[5]="Save"          # Save Menu Text

   $ring_menu_text[6]="Quit"           # Quit Menu Text

 

   # ▼  CHARACTER SELECTION WINDOW SETTINGS :

   @chara_select[0]=400               # X Axis Position

   @chara_select[1]=0                  # Y Axis Position

   $chara_select[0]="Tahoma"       # Font Type

   $chara_select[1]=0                   # Font Color

   $chara_select[5]=22                  # Font Size

   $chara_select[2]=255               # Window Border Opacity

   $chara_select[3]=130               # Window Background Opacity

   $chara_select[4]="001-Blue01"  # Window Skin to use

  #--------------------------------------------------------------------------------------------------

 

end

#--------------------------------------------------------------------------

# پ? ?پ?C??ڈ??

#--------------------------------------------------------------------------

def main

 

  # Show Player Location Feature:

  if @show_location_window==true    

  @window_location = Window_Location.new

     @window_location.x = @window_position[0]

     @window_location.y = @window_position[1]

     @window_location.opacity = @window_opacity[0]

     @window_location.back_opacity = @window_opacity[1]

     end

  #End of Show Player Location

 

  # ?X?v???C?g?Z?b?g??چ? ?

  @spriteset = Spriteset_Map.new

  # ?R?}???h?E?B???h?E??چ? ?

  px = $game_player.screen_x - 15

  py = $game_player.screen_y - 24

  @command_window = Window_RingMenu.new(px,py)

  @command_window.index = @menu_index

  # create background image

  @bg_image = Sprite.new

  @bg_image.bitmap = BG_IMAGE

  @bg_image.x = $game_player.screen_x - @bg_image.bitmap.width / 2

  @bg_image.y = $game_player.screen_y - @bg_image.bitmap.height / 2

  # ?pپ[?e?B l ??? 0  l??ڈ?چ?

  if $game_party.actors.size == 0

    # ?A?C?e??پA?X?L??پA????پA?X?eپ[?^?X????????

    @command_window.disable_item(0)

    @command_window.disable_item(1)

    @command_window.disable_item(2)

    @command_window.disable_item(3)

  end

  @command_window.z = 100

  # ?Zپ[?u??~??ڈ?چ?

  if $game_system.save_disabled

    # ?Zپ[?u???????????

    @command_window.disable_item(4)

  end

  # ?X?eپ[?^?X?E?B???h?E??چ? ?

  @status_window = Window_RingMenuStatus.new

  @status_window.x = @chara_select[0]

  @status_window.y = @chara_select[1]

  @status_window.z = 200

  @status_window.opacity=$chara_select[2]

  @status_window.back_opacity=$chara_select[3]

  @status_window.visible = false

  # ?g?????W?V??????چs

  Graphics.transition

  # ?پ?C????پ[?v

  loop do

    # ?Qپ[???????چX V

    Graphics.update

    # ????ڈ?????چX V

    Input.update

    # ?t??پ[??چX V

    update

    # ????? ???????????پ[?v?????f

    if $scene != self

      break

    end

  end

  # ?g?????W?V????ڈ???

  Graphics.freeze

  # ?X?v???C?g?Z?b?g??????

  @spriteset.dispose

  # ?E?B???h?E??????

  if @show_location_window==true

  @window_location.dispose

  end

  @command_window.dispose

  @status_window.dispose

  @bg_image.dispose

end

#--------------------------------------------------------------------------

# پ? ?t??پ[??چX V

#--------------------------------------------------------------------------

def update

  # ?E?B???h?E??چX V

  if @show_location_window==true

  @window_location.update

  end

  @command_window.update

  @status_window.update

  # ?R?}???h?E?B???h?E???A?N?e?B?u??ڈ?چ?: update_command ?????

  if @command_window.active

    update_command

    return

  end

  # ?X?eپ[?^?X?E?B???h?E???A?N?e?B?u??ڈ?چ?: update_status ?????

  if @status_window.active

    update_status

    return

  end

end

#--------------------------------------------------------------------------

# پ? ?t??پ[??چX V (?R?}???h?E?B???h?E???A?N?e?B?u??ڈ?چ?)

#--------------------------------------------------------------------------

def update_command

  # B ?{?^??????????ڈ?چ?

  if Input.trigger?(Input::B)

    # ?L?????Z?? SE ?????t

    $game_system.se_play($data_system.cancel_se)

    # ?}?b?v????? ?????

    $scene = Scene_Map.new

    return

  end

  # C ?{?^??????????ڈ?چ?

  if Input.trigger?(Input::C)

    # ?pپ[?e?B l ??? 0  l??پA?Zپ[?uپA?Qپ[??ڈI????O??R?}???h??ڈ?چ?

    if $game_party.actors.size == 0 and @command_window.index < 4

      # ?u?Uپ[ SE ?????t

      $game_system.se_play($data_system.buzzer_se)

      return

    end

    # ?R?}???h?E?B???h?E??Jپ[?\????u?????

    case @command_window.index

    when 0  # ?A?C?e??

      # ????  SE ?????t

      $game_system.se_play($data_system.decision_se)

      # ?A?C?e??????? ?????

      $scene = Scene_Item.new

    when 1  # ?X?L??

      # ???? SE ?????t

      $game_system.se_play($data_system.decision_se)

      # ?X?eپ[?^?X?E?B???h?E???A?N?e?B?u?????

      @command_window.active = false

      @status_window.active = true

      @status_window.visible = true

      @status_window.index = 0

    when 2  # ????

      # ???? SE ?????t

      $game_system.se_play($data_system.decision_se)

      # ?X?eپ[?^?X?E?B???h?E???A?N?e?B?u?????

      @command_window.active = false

      @status_window.active = true

      @status_window.visible = true

      @status_window.index = 0

    when 3  # ?X?eپ[?^?X

      # ???? SE ?????t

      $game_system.se_play($data_system.decision_se)

      # ?X?eپ[?^?X?E?B???h?E???A?N?e?B?u?????

      @command_window.active = false

      @status_window.active = true

      @status_window.visible = true

      @status_window.index = 0

    when 4  # ?Zپ[?u

      # ?Zپ[?u??~??ڈ?چ?

      if $game_system.save_disabled

        # ?u?Uپ[ SE ?????t

        $game_system.se_play($data_system.buzzer_se)

        return

      end

      # ???? SE ?????t

      $game_system.se_play($data_system.decision_se)

      # ?Zپ[?u????? ?????

      $scene = Scene_Save.new

    when 5  # ?Qپ[??ڈI??

      # ???? SE ?????t

      $game_system.se_play($data_system.decision_se)

      # ?Qپ[??ڈI??????? ?????

      $scene = Scene_End.new

    end

    return

  end

  # ?A?j?پپ[?V??????????Jپ[?\????ڈ?? ??چs?????

  return if @command_window.animation?

  # پ?orپ? ?{?^??????????ڈ?چ?

  if Input.press?(Input::UP) or  Input.press?(Input::LEFT)

    $game_system.se_play($data_system.cursor_se)

    @command_window.setup_move_move(Window_RingMenu::MODE_MOVEL)

    return

  end

  # پ?orپ? ?{?^??????????ڈ?چ?

  if Input.press?(Input::DOWN) or  Input.press?(Input::RIGHT)

    $game_system.se_play($data_system.cursor_se)

    @command_window.setup_move_move(Window_RingMenu::MODE_MOVER)

    return

  end

end

#--------------------------------------------------------------------------

# پ? ?t??پ[??چX V (?X?eپ[?^?X?E?B???h?E???A?N?e?B?u??ڈ?چ?)

#--------------------------------------------------------------------------

def update_status

  # B ?{?^??????????ڈ?چ?

  if Input.trigger?(Input::B)

    # ?L?????Z?? SE ?????t

    $game_system.se_play($data_system.cancel_se)

    # ?R?}???h?E?B???h?E???A?N?e?B?u?????

    @command_window.active = true

    @status_window.active = false

    @status_window.visible = false

    @status_window.index = -1

    return

  end

  # C ?{?^??????????ڈ?چ?

  if Input.trigger?(Input::C)

    # ?R?}???h?E?B???h?E??Jپ[?\????u?????

    case @command_window.index

    when 1  # ?X?L??

      # ????A?N?^پ[??چs?? ????? 2 ??ڈ???ڈ?چ?

      if $game_party.actors[@status_window.index].restriction >= 2

        # ?u?Uپ[ SE ?????t

        $game_system.se_play($data_system.buzzer_se)

        return

      end

      # ???? SE ?????t

      $game_system.se_play($data_system.decision_se)

      # ?X?L??????? ?????

      $scene = Scene_Skill.new(@status_window.index)

    when 2  # ????

      # ???? SE ?????t

      $game_system.se_play($data_system.decision_se)

      # ????????? ?????

      $scene = Scene_Equip.new(@status_window.index)

    when 3  # ?X?eپ[?^?X

      # ???? SE ?????t

      $game_system.se_play($data_system.decision_se)

      # ?X?eپ[?^?X????? ?????

      $scene = Scene_Status.new(@status_window.index)

    end

    return

  end

end

end

 

#===================================================

# ▲ CLASS Scene_Menu Ends

#===================================================

 

 

#===================================================

# ▼ CLASS Window_RingMenu  Begins

#===================================================

class Window_RingMenu < Window_Base

#--------------------------------------------------------------------------

# پ? ?N???X?? ?

#--------------------------------------------------------------------------

STARTUP_FRAMES = 20

MOVING_FRAMES = 5  

RING_R = 64        

ICON_ITEM   = RPG::Cache.icon("034-Item03")

ICON_SKILL  = RPG::Cache.icon("044-Skill01")

ICON_EQUIP  = RPG::Cache.icon("001-Weapon01")

ICON_STATUS = RPG::Cache.icon("050-Skill07")

ICON_SAVE   = RPG::Cache.icon("038-Item07")

ICON_EXIT   = RPG::Cache.icon("046-Skill03")

ICON_DISABLE= RPG::Cache.icon("")

SE_STARTUP = "056-Right02"

MODE_START = 1

MODE_WAIT  = 2

MODE_MOVER = 3

MODE_MOVEL = 4

#--------------------------------------------------------------------------

# پ? ?A?N?Z?T

#--------------------------------------------------------------------------

attr_accessor :index

#--------------------------------------------------------------------------

# پ? ?I?u?W?F?N?gڈ?????

#--------------------------------------------------------------------------

def initialize( center_x, center_y )

  super(0, 0, 640, 480)

  self.contents = Bitmap.new(width-32, height-32)

  self.contents.font.name = $ring_menu_text[0]

  self.contents.font.color = text_color($ring_menu_text[7])

  self.contents.font.size = $ring_menu_text[8]

  self.opacity = 0

  self.back_opacity = 0

  s1 = $ring_menu_text[1]

  s2 = $ring_menu_text[2]

  s3 = $ring_menu_text[3]

  s4 = $ring_menu_text[4]

  s5 = $ring_menu_text[5]

  s6 = $ring_menu_text[6]

  @commands = [ s1, s2, s3, s4, s5, s6 ]

  @item_max = 6

  @index = 0

  @items = [ ICON_ITEM, ICON_SKILL, ICON_EQUIP, ICON_STATUS, ICON_SAVE, ICON_EXIT ]

  @disabled = [ false, false, false, false, false, false ]

  @cx = center_x - 16

  @cy = center_y - 16

  setup_move_start

  refresh

end

#--------------------------------------------------------------------------

# پ? ?t??پ[??چX V

#--------------------------------------------------------------------------

def update

  super

  refresh

end

#--------------------------------------------------------------------------

# پ? ????چ?`??

#--------------------------------------------------------------------------

def refresh

  self.contents.clear

  # ?A?C?R?????`??

  case @mode

  when MODE_START

    refresh_start

  when MODE_WAIT

    refresh_wait

  when MODE_MOVER

    refresh_move(1)

  when MODE_MOVEL

    refresh_move(0)

  end

  # ?A?N?e?B?u??R?}???h???\??

  rect = Rect.new(@cx - 272, @cy + 24, self.contents.width-32, 32)

  self.contents.draw_text(rect, @commands[@index],1)

end

#--------------------------------------------------------------------------

# پ? ????چ?`??(ڈ???????)

#--------------------------------------------------------------------------

def refresh_start

  d1 = 2.0 * Math::PI / @item_max

  d2 = 1.0 * Math::PI / STARTUP_FRAMES

  r = RING_R - 1.0 * RING_R * @steps / STARTUP_FRAMES

  for i in 0...@item_max

    j = i - @index

    d = d1 * j + d2 * @steps

    x = @cx + ( r * Math.sin( d ) ).to_i

    y = @cy - ( r * Math.cos( d ) ).to_i

    draw_item(x, y, i)

  end

  @steps -= 1

  if @steps < 1

    @mode = MODE_WAIT

  end

end

#--------------------------------------------------------------------------

# پ? ????چ?`??(??@??)

#--------------------------------------------------------------------------

def refresh_wait

  d = 2.0 * Math::PI / @item_max

  for i in 0...@item_max

    j = i - @index

    x = @cx + ( RING_R * Math.sin( d * j ) ).to_i

    y = @cy - ( RING_R * Math.cos( d * j ) ).to_i

    draw_item(x, y, i)

  end

end

#--------------------------------------------------------------------------

# پ? ????چ?`??(???]??)

#  mode : 0=?????v???? 1=???v????

#--------------------------------------------------------------------------

def refresh_move( mode )

  d1 = 2.0 * Math::PI / @item_max

  d2 = d1 / MOVING_FRAMES

  d2 *= -1 if mode != 0

  for i in 0...@item_max

    j = i - @index

    d = d1 * j + d2 * @steps

    x = @cx + ( RING_R * Math.sin( d ) ).to_i

    y = @cy - ( RING_R * Math.cos( d ) ).to_i

    draw_item(x, y, i)

  end

  @steps -= 1

  if @steps < 1

    @mode = MODE_WAIT

  end

end

#--------------------------------------------------------------------------

# پ? چ????`??

#     x :

#     y :

#     i : چ????چ?

#--------------------------------------------------------------------------

def draw_item(x, y, i)

  #p "x=" + x.to_s + " y=" + y.to_s + " i=" + @items[i].to_s

  rect = Rect.new(0, 0, @items[i].width, @items[i].height)

  if @index == i

    self.contents.blt( x, y, @items[i], rect )

    if @disabled[@index]

      self.contents.blt( x, y, ICON_DISABLE, rect )

    end

  else

    self.contents.blt( x, y, @items[i], rect, 128 )

    if @disabled[@index]

      self.contents.blt( x, y, ICON_DISABLE, rect, 128 )

    end

  end

end

#--------------------------------------------------------------------------

# پ? چ?????????????

#     index : چ????چ?

#--------------------------------------------------------------------------

def disable_item(index)

  @disabled[index] = true

end

#--------------------------------------------------------------------------

# پ? ڈ??????A?j?پپ[?V??????ڈ???

#--------------------------------------------------------------------------

def setup_move_start

  @mode = MODE_START

  @steps = STARTUP_FRAMES

  if  SE_STARTUP != nil and SE_STARTUP != ""

    Audio.se_play("Audio/SE/" + SE_STARTUP, 80, 100)

  end

end

#--------------------------------------------------------------------------

# پ? ???]?A?j?پپ[?V??????ڈ???

#--------------------------------------------------------------------------

def setup_move_move(mode)

  if mode == MODE_MOVER

    @index -= 1

    @index = @items.size - 1 if @index < 0

  elsif mode == MODE_MOVEL

    @index += 1

    @index = 0 if @index >= @items.size

  else

    return

  end

  @mode = mode

  @steps = MOVING_FRAMES

end

#--------------------------------------------------------------------------

# پ? ?A?j?پپ[?V?????????????

#--------------------------------------------------------------------------

def animation?

  return @mode != MODE_WAIT

end

end

 

#===================================================

# ▲ CLASS Window_RingMenu Ends

#===================================================

 

 

#===================================================

# ▼ CLASS Window_RingMenuStatus Begins

#===================================================

 

class Window_RingMenuStatus < Window_Selectable

#--------------------------------------------------------------------------

# پ? ?I?u?W?F?N?gڈ?????

#--------------------------------------------------------------------------

def initialize

  super(204, 64, 232, 352)

  self.contents = Bitmap.new(width - 32, height - 32)

  self.contents.font.size = $chara_select[5]

  refresh

  self.active = false

  self.index = -1

end

#--------------------------------------------------------------------------

# پ? ???t???b?V??

#--------------------------------------------------------------------------

def refresh

  self.contents.clear

  self.windowskin = RPG::Cache.windowskin($chara_select[4])

  self.contents.font.name = $chara_select[0]

  self.contents.font.color = text_color($chara_select[1])

  @item_max = $game_party.actors.size

  for i in 0...$game_party.actors.size

    x = 80

    y = 80 * i

    actor = $game_party.actors[i]

    draw_actor_graphic(actor, x - 40, y + 80)

    draw_actor_name(actor, x, y + 24)

  end

end

#--------------------------------------------------------------------------

# پ? ?Jپ[?\??????`چX V

#--------------------------------------------------------------------------

def update_cursor_rect

  if @index < 0

    self.cursor_rect.empty

  else

    self.cursor_rect.set(0, @index * 80, self.width - 32, 80)

  end

end

end

#===================================================

# ▲ CLASS Window_RingMenuStatus Ends

#===================================================

 

 

#===================================================

# ▼ CLASS Game_Map Additional Code Begins

#===================================================

class Game_Map

 

#Dubealex Addition (from XRXS) to show Map Name on screen

def name

  $map_infos[@map_id]

end

end

 

#===================================================

# ▲ CLASS Game_Map Additional Code Ends

#===================================================

 

 

#===================================================

# ▼ CLASS Scene_Title Additional Code Begins

#===================================================

class Scene_Title

 

#Dubealex Addition (from XRXS) to show Map Name on screen

  $map_infos = load_data("Data/MapInfos.rxdata")

  for key in $map_infos.keys

    $map_infos[key] = $map_infos[key].name

  end

end

 

#===================================================

# ▲ CLASS Scene_Title Additional Code Ends

#===================================================

 

 

#===================================================

# ▼ CLASS Window_Location Begins

#===================================================

 

class Window_Location < Window_Base

 

def initialize

super(0, 0, $window_size[0], $window_size[1])

  self.contents = Bitmap.new(width - 32, height - 32)

  self.contents.font.name = $location_text[0]

  self.contents.font.size = $location_text[1]

refresh

end

 

def refresh

self.contents.clear

self.windowskin = RPG::Cache.windowskin($window_location_skin)

self.contents.font.color = text_color($location_text[2])

self.contents.draw_text(4, 0, 120, 32, $location_text[3])

self.contents.font.color = text_color($location_text[4])

self.contents.draw_text(4, 32, 120, 32, $game_map.name, 2)

end

end

#===================================================

# ▲ CLASS Window_Location Ends

#===================================================

 

#===================================================

# ▲ Ring Menu - Show Player Location R1 - Ends

#===================================================

Together with this script:
Code:
#=============================================================================

# Quest Log Screen

#-----------------------------------------------------------------------------

# ** Version 2.3

# ** Original by Sthrattoff

#=============================================================================

# Description :

# This script enables the ability to show current active quest.

 

# Features :

# EXTREMELY SIMPLIFIED! Now the script is just about 150 lines length including comments.

# Unlimited amount of quest can be added.

# Use variable to mark quest's progress.

 

# Limitation :

# Only can store up to 12 progresses per quest.

 

# History :

# Version 1.0 : Initial release.

# Version 1.2 : Add "Types" features.

# Version 2.0 : Changes in programming style and infinite quest support.

# Version 2.2 : Cut the script length to about 150 lines.

# Version 2.3 : Add "Quest Progress" bar in exchange of "Types" removal.

 

# Instruction

# Just put this script above main.

 

# Configuration :

# To add a quest, fill these information by using .push

# $names.push "Name"

# $types.push "Type"

# $description.push (["line1", "line2", ..., "Line5"])

# $objectives.push (["onjective1", ..., "objective12"])

# $var_ID.push ID_NUMBER

# $end_val.push END_VALUE

 

# Credits

# See the header + Blizzard and Enterbrain

#=============================================================================

class Scene_Quest

  

  # Defines array variables

    $names = []

    $description = []

    $objectives = []

    $var_ID = []

    $end_val = []

  

  # The main process

  def main

    @quest_list = Window_Command.new(160, $names)

    @quest_window = Window_Quest.new

    @quest_window.x = 160

    Graphics.transition

    loop do

      Graphics.update

      Input.update

      update

      break if $scene != self

    end

    Graphics.freeze

    @quest_list.dispose

    @quest_window.dispose

  end

  

  def update

    @quest_list.update

    @quest_window.update

    if @quest_list.active

      update_quest

      return

    end

  end

  

  def update_quest

    if Input.trigger?(Input::B)

      $game_system.se_play($data_system.cancel_se)

      $scene = Scene_Map.new

      return

    end

    $id = @quest_list.index

    return

  end

  

end    

 

class Window_Quest < Window_Base

  

  def initialize

    super(0, 0, 480, 480)

    self.contents = Bitmap.new(width - 32, height - 32)

    refresh

  end

  

  def refresh

    self.contents.clear

    self.contents.font.color = system_color

    self.contents.draw_text(0, 0, self.width - 32, 32, $names[$id.to_i].to_s, 1)

    self.contents.draw_text(0, 192, self.width - 32, 32, "Objectives", 1)

    self.contents.draw_text(0, 416, self.width - 32, 32, "Quest Progress")

    self.contents.font.color = normal_color

    for i in 0..4

      self.contents.draw_text(0, i * 32 + 32, self.width - 32, 32, $description[$id.to_i][i].to_s)

    end

    a = b = $game_variables[$var_ID[$id.to_i]]

    if a > 5

      self.contents.draw_text(240, (a - 6) * 32 + 224, 240, 32, "• " + $objectives[$id.to_i][a].to_s)

    else

      self.contents.draw_text(0, a * 32 + 224, 240, 32, "• " + $objectives[$id.to_i][a].to_s)

    end

    self.contents.font.color = disabled_color

    if b > 0

      for j in 0..(b - 1)

        if j > 5

          self.contents.draw_text(240, (j - 6) * 32 + 224, 240, 32, "• " + $objectives[$id.to_i][j].to_s)

        else

          self.contents.draw_text(0, j * 32 + 224, 240, 32, "• " + $objectives[$id.to_i][j].to_s)

        end

      end

    end

    draw_quest_progress(96, 428, self.width - 128)

  end

  

  def update

    refresh

  end

  

end

 

class Window_Base < Window

  

  def draw_quest_progress(x, y, w = 200)

    current = $game_variables[$var_ID[$id.to_i]]

    ending = $end_val[$id.to_i]

    bordercolor = system_color

    outercolor  = Color.new(180, 210, 120, 255)

    midcolor    = Color.new(180, 210, 140, 255)

    innercolor  = Color.new(180, 210, 160, 255)

    emptycolor  = Color.new(0, 0, 0, 255)

    linewidth = (((current * 1.0) / ending) * (w - 2))

    emptywidth = ((w - 1) - linewidth)

    emptyx = ((x + 1) + linewidth)

    border = Rect.new(x, y, w, 8)

    emptyline = Rect.new(x + 1, y + 1, w - 2, 6)

    outerline = Rect.new(x + 1, y + 1, linewidth, 6)

    midline = Rect.new(x + 2, y + 2, linewidth - 2, 4)

    innerline = Rect.new(x + 3, y + 3, linewidth - 4, 2)

    self.contents.fill_rect(border, bordercolor)

    self.contents.fill_rect(emptyline, emptycolor)

    self.contents.fill_rect(outerline, outercolor)

    self.contents.fill_rect(midline, midcolor)

    self.contents.fill_rect(innerline, innercolor)

  end

  

end

 

class Scene_Save < Scene_File

  

  alias old_save_data write_save_data

  def write_save_data(file)

    old_save_data

    Marshal.dump($names, file)

    Marshal.dump($description, file)

    Marshal.dump($objectives, file)

    Marshal.dump($var_ID, file)

    Marshal.dump($end_val, file)

  end

  

end

 

class Scene_Load < Scene_File

  

  alias old_load_data read_save_data

  def read_save_data(file)

    old_load_data

    $names = Marshal.load(file)

    $description = Marshal.load(file)

    $objectives = Marshal.load(file)

    $var_ID = Marshal.load(file)

    $end_val = Marshal.load(file)

  end

  

end

 

class Scene_Title

  

  alias old_new_game command_new_game

  def command_new_game

    old_new_game

    $names.clear

    $description.clear

    $objectives.clear

    $var_ID.clear

    $end_val.clear

  end

  

end

 

class Scene_Menu

  

  def initialize(menu_index = 0)

    @menu_index = menu_index

    size = $names.size

    for i in 0..size

      var = $var_ID[i]

      ending = $end_val[i]

      if $game_variables[var.to_i] >= ending.to_i

        $names.delete_at i

        $description.delete_at i

        $objectives.delete_at i

        $var_ID.delete_at i

        $end_val.delete_at i

      end

    end

  end

  

end

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

Code:
 

class Scene_Menu

 

  alias quest_init initialize

  def initialize(menu_index = 0)

    quest_init

    @menu_index = menu_index

 

<rest of script>

 

 
 
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
 
Thank you so much! It worked :)
I don't know if you could help me with one more thing?
Cause when I want to extract the .exe file of my game, I get an error with Extract failed.
Do you know what could cause that?
 
How big is your .exe file? I think there's a limit of 128mb. If that's the case, it's usually audio files that blow the limit. You can move your Audio folder, compress your game, then zip the .exe & the Audio folder together to distribute.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top