Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> Advanced Crafting System (ACS) - OMG Mod, a mod of the awesome ACS by cmpsr2000
lomastul
post Oct 12 2008, 08:14 AM
Post #1


Level 7
Group Icon

Group: Member
Posts: 95
Type: Artist
RM Skill: Advanced




Advanced Crafting System (ACS) - OMG Mod
Version: 2.21
Author: Cmpsr2000
Release Date: June 5 2008
Mod Version: 1.0
Mod Author: LoMastul


Introduction

ACS is a system that allows the player to craft weapons, items, and armor from other weapons, items and armor.

Features + Customization

for the list of features and customization tuts go to this link: http://www.rpgrevolution.com/forums/index....59&hl=craft

Screenshots





Demo

http://www.mediafire.com/?rjkdmmnwoam

Script

Get the Modified script from the menu

Instructions

Copy the script into your game above "main".

FAQ

Q: How do I call the crafting system from an event instead of the menu?
A: Use the script function to call: $scene = Scene_Crafting.new

Q: I keep getting this error when i try and start the game :
QUOTE
Script 'Recipe' Line 48: NoMethodError occured.
undefined method 'name' for nil:NilClass


A: You must define an item in your database for EACH item ID in your recipes.txt file.

Q: I added an item to my recipes.txt file, but it doesn't show in my game and the game crashes when I .discover my new item OR I changed an option in $game_crafting but the change doesn't show up in my game.
A: You are most likely loading from a save file. This loads the OLD recipe list and $game_crafting settings from when you saved. When you make a change to recipes.txt or $game_crafting you MUST start a new game to see your changes.


Credits and Thanks

Huge credits to cmpsr2000 for making the script [the un-Moded one] and for permmiting me to post this.

Author's Notes

ask cmpsr2000 tongue.gif

Terms and Conditions

Feel free to use this in your game, tho you will need to credit cmpsr2000 and also [if you would like tongue.gif] credit me as-well.



for any issues or graphical ideas post here so i can make this look better for all of us happy.gif.

--LoMastul.


__________________________
Working On: Tears Of Destiny


Go to the top of the page
 
+Quote Post
   
Poko4Sho
post Oct 12 2008, 09:12 AM
Post #2


Poko2Pro
Group Icon

Group: Revolutionary
Posts: 366
Type: Writer
RM Skill: Masterful




oww oww, goes nice with the mog menus. And I was looking for a nicer way to customize items and I knew of cmpsrs script but it's just great in this style, hoping I'll be able to change the clover into something else ;P. Nice work!


__________________________
Go to the top of the page
 
+Quote Post
   
Big-Boss
post Oct 12 2008, 09:50 AM
Post #3



Group Icon

Group: Member
Posts: 1
Type: None
RM Skill: Undisclosed




It's very good.I love it.


(I'm French excuse for the fault.)
Go to the top of the page
 
+Quote Post
   
lomastul
post Oct 12 2008, 02:36 PM
Post #4


Level 7
Group Icon

Group: Member
Posts: 95
Type: Artist
RM Skill: Advanced




im glad it helped you guys happy.gif if you have any ideas to make this look better [even the smallest idea] post it here and ill try to make it


__________________________
Working On: Tears Of Destiny


Go to the top of the page
 
+Quote Post
   
cmpsr2000
post Oct 14 2008, 10:19 AM
Post #5


Keeper of the Ruby Code of DOOM!
Group Icon

Group: Revolutionary
Posts: 355
Type: Scripter
RM Skill: Masterful




great job Lomastul, keep up the omg-styled work! biggrin.gif


__________________________
Go to the top of the page
 
+Quote Post
   
lomastul
post Oct 14 2008, 05:00 PM
Post #6


Level 7
Group Icon

Group: Member
Posts: 95
Type: Artist
RM Skill: Advanced




ty cmpsr2000 and i will make alot more scripts omg styled happy.gif
tho currently im having problems with my comp [dam viruses...] and if i wont solve it then i gues all i've worked on so far will be deleted when i'll re-install windows :/
but anyway even then i'll continue making OMG styled menus
(if anyone have any request for a OMG styled script send me a pm)


__________________________
Working On: Tears Of Destiny


Go to the top of the page
 
+Quote Post
   
RuGeaR1277
post Oct 14 2008, 09:59 PM
Post #7


Level 12
Group Icon

Group: Revolutionary
Posts: 213
Type: None
RM Skill: Beginner




nice job! =)


__________________________
(ALL TEMPORARY PAUSED)

Current Project


Last Updated on 27th Oct


Click to check it out! ^_^

Go to the top of the page
 
+Quote Post
   
Ken Shiro X
post Oct 16 2008, 10:01 AM
Post #8


Level 3
Group Icon

Group: Member
Posts: 36
Type: None
RM Skill: Skilled




Hi i have a problem smile.gif

I Use the Ring Menù script..

but if i press ESC whit your's script i got a error ...

You know the solution?

Thanks!
Go to the top of the page
 
+Quote Post
   
lomastul
post Oct 16 2008, 04:48 PM
Post #9


Level 7
Group Icon

Group: Member
Posts: 95
Type: Artist
RM Skill: Advanced




it's because inside the ACS there is a part which defines that the crafting system will be accesable from the menu, and it collides with your ring menu, you can post here the ring menu script your using , or alink to it, and ill edit it for you so you can acces the ACS from the menu +that it'll work smoothly.

--LoMastul


__________________________
Working On: Tears Of Destiny


Go to the top of the page
 
+Quote Post
   
Ken Shiro X
post Oct 17 2008, 12:22 AM
Post #10


Level 3
Group Icon

Group: Member
Posts: 36
Type: None
RM Skill: Skilled




Sure Thanks.

This is a Ring Menù script :

CODE
#==============================================================================
# ** Ring Menu
#-------------------------------------------------------------------------------
# by Syvkal
# Version 1.1
# 06-23-08
#==============================================================================

   #===================================================#
   #  **  C O N F I G U R A T I O N   S Y S T E M  **  #
   #===================================================#
  
  # Amount of frames for Startup Animation
  STARTUP_FRAMES = 20
  # Amount of frames for Movement Animation
  MOVING_FRAMES = 15
  # Radius of the Menu Ring
  RING_R = 75
  # Disabled icon to display when disabled
  ICON_DISABLE= Cache::picture('Icon_Disable')
  
  
   #-------------D-O---N-O-T---T-O-U-C-H---------------#
  
  class Scene_Title < Scene_Base
    alias game_objects_original create_game_objects
    def create_game_objects
      game_objects_original
  
   #-------------D-O---N-O-T---T-O-U-C-H---------------#
  
  # As this script allows you to make a custom Menu I thought to make it easier
  # I would make it possible to add extra Menu Options from here
  
  # All you need to do is specify the Text to display, the icon and the command
  # The command must be in a STRING
  # Simply add to the array below :

  $game_ring_menu = [
  
   # Menu Option 0  eg. Item
   [Vocab::item, Cache::picture('Icon_Items'), "$scene = Scene_Item.new"],
  
   # Menu Option 1  eg. Skill
   [Vocab::skill, Cache::picture('Icon_Skills'), "start_actor_selection",
     "$scene = Scene_Skill.new(@status_window.index)"],
  
   # Menu Option 2  eg. Equip
   [Vocab::equip, Cache::picture('Icon_Equip'), "start_actor_selection",
     "$scene = Scene_Equip.new(@status_window.index)"],
  
   # Menu Option 3  eg. Status
   [Vocab::status, Cache::picture('Icon_Status'), "start_actor_selection",
     "$scene = Scene_Status.new(@status_window.index)"],
  
   #---------------------------------------------------#
   #  **      I N S E R T   M O R E   H E R E      **  #
   #---------------------------------------------------#
  
  

  
   # Preferably Insert your custom Menu Options Here
   # Otherwise the existing Menu Options will return to wrong point on the Menu
  
  
   # Menu Option 4  eg. Save
   ["Save Game", Cache::picture('Icon_Save'), "$scene = Scene_File.new(true, false, false)"],
  
   # Menu Option 5  eg. Load
   ["Load Game", Cache::picture('Icon_Load'), "$scene = Scene_File.new(false, false, false)"],
  
   # Menu Option 6  eg. End Game
   [Vocab::game_end, Cache::picture('Icon_End'), "$scene = Scene_End.new"]
  
  
  
  
  
   ] # <--- Do no Delete This
  
   #===================================================#
   #  **     E N D   C O N F I G U R A T I O N     **  #
   #===================================================#
  end
end
#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
#  Edited to add Ring Menu
#==============================================================================

class Scene_Menu < Scene_Base
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  alias initialize_original initialize
  alias start_selection_original start_actor_selection
  alias end_selection_original end_actor_selection
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize(menu_index = 0, move = true)
    @move = move
    initialize_original(menu_index)
  end
  #--------------------------------------------------------------------------
  # * Start processing
  #--------------------------------------------------------------------------
  def start
    super
    create_menu_background
    create_command_window
    @gold_window = Window_Gold.new(0, 360)
    @location_window = Window_location.new(0, 0)
  end
  #--------------------------------------------------------------------------
  # * Termination Processing
  #--------------------------------------------------------------------------
  def terminate
    super
    dispose_menu_background
    @command_window.dispose
    @gold_window.dispose
    @status_window.dispose if @status_window
    @location_window.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    super
    update_menu_background
    @command_window.update
    @gold_window.update
    @status_window.update if @status_window
    @location_window.update
    if @command_window.active
      update_command_selection
    elsif @status_window.active
      update_actor_selection
    end
  end
  #--------------------------------------------------------------------------
  # * Create Command Window
  #--------------------------------------------------------------------------
  def create_command_window
    commands = []
    for i in 0...$game_ring_menu.size
      commands.push($game_ring_menu[i][0])
    end
    icons = []
    for i in 0...$game_ring_menu.size
      icons.push($game_ring_menu[i][1])
    end
    @command_window = Window_RingMenu.new(232, 164, commands, icons, @move, @menu_index)
    if $game_party.members.size == 0
      @command_window.disable_item(0)
      @command_window.disable_item(1)
      @command_window.disable_item(2)
      @command_window.disable_item(3)
    end
    if $game_system.save_disabled
      @command_window.disable_item(4)
    end
  end
  #--------------------------------------------------------------------------
  # * Create Command Window
  #--------------------------------------------------------------------------
  def create_status_window
    names = []
    chars = []
    for i in 0...$game_party.members.size
      names[i] = $game_party.members[i].name
      chars[i] = $game_party.members[i]
    end
    @status_window = Window_RingMenu.new(255, 200, names, chars, true, $game_party.last_actor_index, true)
  end
  #--------------------------------------------------------------------------
  # * Update Command Selection
  #--------------------------------------------------------------------------
  def update_command_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      $scene = Scene_Map.new
    elsif Input.trigger?(Input::C)
      if $game_party.members.size == 0 and @command_window.index < 4
        Sound.play_buzzer
        return
      elsif $game_system.save_disabled and @command_window.index == 4
        Sound.play_buzzer
        return
      end
      Sound.play_decision
      eval($game_ring_menu[@command_window.index][2])
    end
  end
  #--------------------------------------------------------------------------
  # * Start Actor Selection
  #--------------------------------------------------------------------------
  def start_actor_selection
    @command_window.active = false
    @command_window.visible = false
    create_status_window
    if $game_party.last_actor_index < @status_window.item_max
      @status_window.index = $game_party.last_actor_index
    else
      @status_window.index = 0
    end
  end
  #--------------------------------------------------------------------------
  # * End Actor Selection
  #--------------------------------------------------------------------------
  def end_actor_selection
    @command_window.active = true
    @command_window.visible = true
    @status_window.dispose if @status_window
    @status_window = nil
  end
  #--------------------------------------------------------------------------
  # * Update Actor Selection
  #--------------------------------------------------------------------------
  def update_actor_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      end_actor_selection
    elsif Input.trigger?(Input::C)
      $game_party.last_actor_index = @status_window.index
      Sound.play_decision
      eval($game_ring_menu[@command_window.index][3])
    end
  end
end

#==============================================================================
# ** Scene_File
#------------------------------------------------------------------------------
#  Edited to return to the menu properly when loading
#==============================================================================

class Scene_File
  alias return_scene_original return_scene
  def return_scene
    if @from_title
      $scene = Scene_Title.new
    elsif @from_event
      $scene = Scene_Map.new
    else
      if @saving
        $scene = Scene_Menu.new($game_ring_menu.size - 3)
      else
        $scene = Scene_Menu.new($game_ring_menu.size - 2)
      end
    end
  end
end

#==============================================================================
# ** Scene_End
#------------------------------------------------------------------------------
#  Edited to return to the menu properly due to loading being added
#==============================================================================

class Scene_End
  alias return_scene_original return_scene
  def return_scene
    $scene = Scene_Menu.new($game_ring_menu.size - 1)
  end
end

#==============================================================================
# ** Window_Location
#------------------------------------------------------------------------------
#  This class shows the current map name.
#==============================================================================

class Window_location < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize(x, y)
    super(x, y, 160, (WLH*2) + 32)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    $maps = load_data("Data/MapInfos.rvdata")
    @map_id = $game_map.map_id
    @currmap = $maps[@map_id].name
    self.contents.font.color = system_color
    self.contents.draw_text(0, -4, 128, 32, "Location :")
    self.contents.font.color = normal_color
    self.contents.draw_text(0, -4+WLH, 128, 32, @currmap, 1)
  end
end

#==============================================================================
# ** Window_RingMenu
#------------------------------------------------------------------------------
#  This Window creates a Ring Menu system
#==============================================================================

class Window_RingMenu < Window_Base  
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :index
  attr_reader   :item_max
  #--------------------------------------------------------------------------
  # * Refresh Setup
  #--------------------------------------------------------------------------
  START = 1
  WAIT  = 2
  MOVER = 3
  MOVEL = 4
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize(center_x, center_y, commands, items, move = true, index = 0, character = false)
    super(0, 0, 544, 416)
    self.contents = Bitmap.new(width-32, height-32)
    self.opacity = 0
    @move = move
    @char = character
    @startup = STARTUP_FRAMES
    @commands = commands
    @item_max = commands.size
    @index = index
    @items = items
    @disabled = []
    for i in 0...commands.size-1
      @disabled[i] = false
    end
    @cx = center_x
    @cy = center_y
    start_setup
    refresh
  end
  #--------------------------------------------------------------------------
  # * Start Setup
  #--------------------------------------------------------------------------
  def start_setup
    @mode = START
    @steps = @startup
  end
  #--------------------------------------------------------------------------
  # * Disable index
  #     index : item number
  #--------------------------------------------------------------------------
  def disable_item(index)
    @disabled[index] = true
  end
  #--------------------------------------------------------------------------
  # * Determines if is moving
  #--------------------------------------------------------------------------
  def animation?
    return @mode != WAIT
  end
  #--------------------------------------------------------------------------
  # * Determine if cursor is moveable
  #--------------------------------------------------------------------------
  def cursor_movable?
    return false if (not visible or not active)
    return false if (@opening or @closing)
    return false if animation?
    return true
  end
  #--------------------------------------------------------------------------
  # * Move cursor right
  #--------------------------------------------------------------------------
  def cursor_right
    @index -= 1
    @index = @items.size - 1 if @index < 0
    @mode = MOVER
    @steps = MOVING_FRAMES
  end
  #--------------------------------------------------------------------------
  # * Move cursor left
  #--------------------------------------------------------------------------
  def cursor_left
    @index += 1
    @index = 0 if @index >= @items.size
    @mode = MOVEL
    @steps = MOVING_FRAMES
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    super
    if self.active
      if cursor_movable?
        last_index = @index
        if Input.repeat?(Input::DOWN) or Input.repeat?(Input::RIGHT)
          cursor_right
        end
        if Input.repeat?(Input::UP) or Input.repeat?(Input::LEFT)
          cursor_left
        end
        if @index != last_index
          Sound.play_cursor
        end
      end
      refresh
    end
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh    
    self.contents.clear
    case @mode
    when START
      refresh_start
    when WAIT
      refresh_wait
    when MOVER
      refresh_move(1)
    when MOVEL
      refresh_move(0)
    end
    rect = Rect.new(18, 196, self.contents.width-32, 32)
    self.contents.draw_text(rect, @commands[@index], 1)
  end
  #--------------------------------------------------------------------------
  # * Refresh Start Period
  #--------------------------------------------------------------------------
  def refresh_start
    d1 = 2.0 * Math::PI / @item_max
    d2 = 1.0 * Math::PI / @startup
    for i in 0...@item_max
      j = i - @index
      if @move
        r = RING_R - 1.0 * RING_R * @steps / @startup
        d = d1 * j + d2 * @steps
      else
        r = RING_R
        d = d1 * j
      end
      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 = WAIT
    end
  end
  #--------------------------------------------------------------------------
  # * Refresh Wait Period
  #--------------------------------------------------------------------------
  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
  #--------------------------------------------------------------------------
  # * Refresh Movement Period
  #--------------------------------------------------------------------------
  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 = WAIT
    end
  end
  #--------------------------------------------------------------------------
  # * Draw Item
  #     x     : draw spot x-coordinate
  #     y     : draw spot y-coordinate
  #     index : item number
  #--------------------------------------------------------------------------
  def draw_item(x, y, index)
    if @char
      if @index == index
        draw_character(@items[index].character_name, @items[index].character_index , x, y)
        if @mode == WAIT
          draw_actor_hp_ring(@items[index], @cx, @cy-16, 50, 6, 84, 270, true)
          draw_actor_mp_ring(@items[index], @cx, @cy-16, 50, 6, 84, 180, false)
          draw_actor_exp_ring(@items[index], @cx, @cy-16, 50, 6, 155, 12, false)
        end
      else
        draw_character(@items[index].character_name, @items[index].character_index , x, y, false)
      end
    else
      rect = Rect.new(0, 0, @items[index].width, @items[index].height)
      if @index == index
        self.contents.blt( x, y, @items[index], rect )
        if @disabled[@index]
          self.contents.blt( x, y, ICON_DISABLE, rect )
        end
      else
        self.contents.blt( x, y, @items[index], rect, 128 )
      end
    end
  end
end

#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
#  Edited to allow disabled character icons
#==============================================================================

class Window_Base < Window
  #--------------------------------------------------------------------------
  # * Draw Character Graphic
  #--------------------------------------------------------------------------
  def draw_character(character_name, character_index, x, y, enabled = true)
    return if character_name == nil
    bitmap = Cache.character(character_name)
    sign = character_name[/^[\!\$]./]
    if sign != nil and sign.include?('$')
      cw = bitmap.width / 3
      ch = bitmap.height / 4
    else
      cw = bitmap.width / 12
      ch = bitmap.height / 8
    end
    n = character_index
    src_rect = Rect.new((n%4*3+1)*cw, (n/4*4)*ch, cw, ch)
    self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect, enabled ? 255 : 128)
  end
end
Go to the top of the page
 
+Quote Post
   
lomastul
post Oct 17 2008, 08:42 AM
Post #11


Level 7
Group Icon

Group: Member
Posts: 95
Type: Artist
RM Skill: Advanced




oh nvm i forgot it requires another script to work correctly, ok here's the edited ring menu:
[Show/Hide] Ring menu
CODE

#==============================================================================
# ** Ring Menu
#-------------------------------------------------------------------------------
# by Syvkal
# Version 1.1
# 06-23-08
#==============================================================================

#===================================================#
# ** C O N F I G U R A T I O N S Y S T E M ** #
#===================================================#

# Amount of frames for Startup Animation
STARTUP_FRAMES = 20
# Amount of frames for Movement Animation
MOVING_FRAMES = 15
# Radius of the Menu Ring
RING_R = 75
# Disabled icon to display when disabled
ICON_DISABLE= Cache::picture('Icon_Disable')


#-------------D-O---N-O-T---T-O-U-C-H---------------#

class Scene_Title < Scene_Base
alias game_objects_original create_game_objects
def create_game_objects
game_objects_original

#-------------D-O---N-O-T---T-O-U-C-H---------------#

# As this script allows you to make a custom Menu I thought to make it easier
# I would make it possible to add extra Menu Options from here

# All you need to do is specify the Text to display, the icon and the command
# The command must be in a STRING
# Simply add to the array below :

$game_ring_menu = [

# Menu Option 0 eg. Item
[Vocab::item, Cache::picture('Icon_Items'), "$scene = Scene_Item.new"],

# Menu Option 1 eg. Skill
[Vocab::skill, Cache::picture('Icon_Skills'), "start_actor_selection",
"$scene = Scene_Skill.new(@status_window.index)"],

# Menu Option 2 eg. Equip
[Vocab::equip, Cache::picture('Icon_Equip'), "start_actor_selection",
"$scene = Scene_Equip.new(@status_window.index)"],

# Menu Option 3 eg. Status
[Vocab::status, Cache::picture('Icon_Status'), "start_actor_selection",
"$scene = Scene_Status.new(@status_window.index)"],

#---------------------------------------------------#
# ** I N S E R T M O R E H E R E ** #
#---------------------------------------------------#




# Preferably Insert your custom Menu Options Here
# Otherwise the existing Menu Options will return to wrong point on the Menu

# Menu Option 4 eg. Craft
["Craft", Cache::picture('Icon_Craft'), "$scene = Scene_Crafting.new"],

# Menu Option 5 eg. Save
["Save Game", Cache::picture('Icon_Save'), "$scene = Scene_File.new(true, false, false)"],

# Menu Option 6 eg. Load
["Load Game", Cache::picture('Icon_Load'), "$scene = Scene_File.new(false, false, false)"],

# Menu Option 7 eg. End Game
[Vocab::game_end, Cache::picture('Icon_End'), "$scene = Scene_End.new"]





] # <--- Do no Delete This

#===================================================#
# ** E N D C O N F I G U R A T I O N ** #
#===================================================#
end
end
#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
# Edited to add Ring Menu
#==============================================================================

class Scene_Menu < Scene_Base
#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
alias initialize_original initialize
alias start_selection_original start_actor_selection
alias end_selection_original end_actor_selection
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(menu_index = 0, move = true)
@move = move
initialize_original(menu_index)
end
#--------------------------------------------------------------------------
# * Start processing
#--------------------------------------------------------------------------
def start
super
create_menu_background
create_command_window
@gold_window = Window_Gold.new(0, 360)
@location_window = Window_location.new(0, 0)
end
#--------------------------------------------------------------------------
# * Termination Processing
#--------------------------------------------------------------------------
def terminate
super
dispose_menu_background
@command_window.dispose
@gold_window.dispose
@status_window.dispose if @status_window
@location_window.dispose
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
super
update_menu_background
@command_window.update
@gold_window.update
@status_window.update if @status_window
@location_window.update
if @command_window.active
update_command_selection
elsif @status_window.active
update_actor_selection
end
end
#--------------------------------------------------------------------------
# * Create Command Window
#--------------------------------------------------------------------------
def create_command_window
commands = []
for i in 0...$game_ring_menu.size
commands.push($game_ring_menu[i][0])
end
icons = []
for i in 0...$game_ring_menu.size
icons.push($game_ring_menu[i][1])
end
@command_window = Window_RingMenu.new(232, 164, commands, icons, @move, @menu_index)
if $game_party.members.size == 0
@command_window.disable_item(0)
@command_window.disable_item(1)
@command_window.disable_item(2)
@command_window.disable_item(3)
end
if $game_system.save_disabled
@command_window.disable_item(4)
end
end
#--------------------------------------------------------------------------
# * Create Command Window
#--------------------------------------------------------------------------
def create_status_window
names = []
chars = []
for i in 0...$game_party.members.size
names[i] = $game_party.members[i].name
chars[i] = $game_party.members[i]
end
@status_window = Window_RingMenu.new(255, 200, names, chars, true, $game_party.last_actor_index, true)
end
#--------------------------------------------------------------------------
# * Update Command Selection
#--------------------------------------------------------------------------
def update_command_selection
if Input.trigger?(Input::cool.gif
Sound.play_cancel
$scene = Scene_Map.new
elsif Input.trigger?(Input::C)
if $game_party.members.size == 0 and @command_window.index < 4
Sound.play_buzzer
return
elsif $game_system.save_disabled and @command_window.index == 4
Sound.play_buzzer
return
end
Sound.play_decision
eval($game_ring_menu[@command_window.index][2])
end
end
#--------------------------------------------------------------------------
# * Start Actor Selection
#--------------------------------------------------------------------------
def start_actor_selection
@command_window.active = false
@command_window.visible = false
create_status_window
if $game_party.last_actor_index < @status_window.item_max
@status_window.index = $game_party.last_actor_index
else
@status_window.index = 0
end
end
#--------------------------------------------------------------------------
# * End Actor Selection
#--------------------------------------------------------------------------
def end_actor_selection
@command_window.active = true
@command_window.visible = true
@status_window.dispose if @status_window
@status_window = nil
end
#--------------------------------------------------------------------------
# * Update Actor Selection
#--------------------------------------------------------------------------
def update_actor_selection
if Input.trigger?(Input::cool.gif
Sound.play_cancel
end_actor_selection
elsif Input.trigger?(Input::C)
$game_party.last_actor_index = @status_window.index
Sound.play_decision
eval($game_ring_menu[@command_window.index][3])
end
end
end

#==============================================================================
# ** Scene_File
#------------------------------------------------------------------------------
# Edited to return to the menu properly when loading
#==============================================================================

class Scene_File
alias return_scene_original return_scene
def return_scene
if @from_title
$scene = Scene_Title.new
elsif @from_event
$scene = Scene_Map.new
else
if @saving
$scene = Scene_Menu.new($game_ring_menu.size - 3)
else
$scene = Scene_Menu.new($game_ring_menu.size - 2)
end
end
end
end

#==============================================================================
# ** Scene_End
#------------------------------------------------------------------------------
# Edited to return to the menu properly due to loading being added
#==============================================================================

class Scene_End
alias return_scene_original return_scene
def return_scene
$scene = Scene_Menu.new($game_ring_menu.size - 1)
end
end

#==============================================================================
# ** Window_Location
#------------------------------------------------------------------------------
# This class shows the current map name.
#==============================================================================

class Window_location < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(x, y)
super(x, y, 160, (WLH*2) + 32)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
$maps = load_data("Data/MapInfos.rvdata")
@map_id = $game_map.map_id
@currmap = $maps[@map_id].name
self.contents.font.color = system_color
self.contents.draw_text(0, -4, 128, 32, "Location :")
self.contents.font.color = normal_color
self.contents.draw_text(0, -4+WLH, 128, 32, @currmap, 1)
end
end

#==============================================================================
# ** Window_RingMenu
#------------------------------------------------------------------------------
# This Window creates a Ring Menu system
#==============================================================================

class Window_RingMenu < Window_Base
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :index
attr_reader :item_max
#--------------------------------------------------------------------------
# * Refresh Setup
#--------------------------------------------------------------------------
START = 1
WAIT = 2
MOVER = 3
MOVEL = 4
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(center_x, center_y, commands, items, move = true, index = 0, character = false)
super(0, 0, 544, 416)
self.contents = Bitmap.new(width-32, height-32)
self.opacity = 0
@move = move
@char = character
@startup = STARTUP_FRAMES
@commands = commands
@item_max = commands.size
@index = index
@items = items
@disabled = []
for i in 0...commands.size-1
@disabled[i] = false
end
@cx = center_x
@cy = center_y
start_setup
refresh
end
#--------------------------------------------------------------------------
# * Start Setup
#--------------------------------------------------------------------------
def start_setup
@mode = START
@steps = @startup
end
#--------------------------------------------------------------------------
# * Disable index
# index : item number
#--------------------------------------------------------------------------
def disable_item(index)
@disabled[index] = true
end
#--------------------------------------------------------------------------
# * Determines if is moving
#--------------------------------------------------------------------------
def animation?
return @mode != WAIT
end
#--------------------------------------------------------------------------
# * Determine if cursor is moveable
#--------------------------------------------------------------------------
def cursor_movable?
return false if (not visible or not active)
return false if (@opening or @closing)
return false if animation?
return true
end
#--------------------------------------------------------------------------
# * Move cursor right
#--------------------------------------------------------------------------
def cursor_right
@index -= 1
@index = @items.size - 1 if @index < 0
@mode = MOVER
@steps = MOVING_FRAMES
end
#--------------------------------------------------------------------------
# * Move cursor left
#--------------------------------------------------------------------------
def cursor_left
@index += 1
@index = 0 if @index >= @items.size
@mode = MOVEL
@steps = MOVING_FRAMES
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
super
if self.active
if cursor_movable?
last_index = @index
if Input.repeat?(Input::DOWN) or Input.repeat?(Input::RIGHT)
cursor_right
end
if Input.repeat?(Input::UP) or Input.repeat?(Input::LEFT)
cursor_left
end
if @index != last_index
Sound.play_cursor
end
end
refresh
end
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
case @mode
when START
refresh_start
when WAIT
refresh_wait
when MOVER
refresh_move(1)
when MOVEL
refresh_move(0)
end
rect = Rect.new(18, 196, self.contents.width-32, 32)
self.contents.draw_text(rect, @commands[@index], 1)
end
#--------------------------------------------------------------------------
# * Refresh Start Period
#--------------------------------------------------------------------------
def refresh_start
d1 = 2.0 * Math:tongue.gifI / @item_max
d2 = 1.0 * Math:tongue.gifI / @startup
for i in 0...@item_max
j = i - @index
if @move
r = RING_R - 1.0 * RING_R * @steps / @startup
d = d1 * j + d2 * @steps
else
r = RING_R
d = d1 * j
end
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 = WAIT
end
end
#--------------------------------------------------------------------------
# * Refresh Wait Period
#--------------------------------------------------------------------------
def refresh_wait
d = 2.0 * Math:tongue.gifI / @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
#--------------------------------------------------------------------------
# * Refresh Movement Period
#--------------------------------------------------------------------------
def refresh_move( mode )
d1 = 2.0 * Math:tongue.gifI / @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 = WAIT
end
end
#--------------------------------------------------------------------------
# * Draw Item
# x : draw spot x-coordinate
# y : draw spot y-coordinate
# index : item number
#--------------------------------------------------------------------------
def draw_item(x, y, index)
if @char
if @index == index
draw_character(@items[index].character_name, @items[index].character_index , x, y)
if @mode == WAIT
draw_actor_hp_ring(@items[index], @cx, @cy - 16, 50, 6, 84, 270, true)
draw_actor_mp_ring(@items[index], @cx, @cy - 16, 50, 6, 84, 180, false)
draw_actor_exp+ring(@items[index], @cx, @cy - 16, 50, 6, 155, 12, false)
end
else
draw_character(@items[index].character_name, @items[index].character_index , x, y, false)
end
else
rect = Rect.new(0, 0, @items[index].width, @items[index].height)
if @index == index
self.contents.blt( x, y, @items[index], rect )
if @disabled[@index]
self.contents.blt( x, y, ICON_DISABLE, rect )
end
else
self.contents.blt( x, y, @items[index], rect, 128 )
end
end
end
end

#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
# Edited to allow disabled character icons
#==============================================================================

class Window_Base < Window
#--------------------------------------------------------------------------
# * Draw Character Graphic
#--------------------------------------------------------------------------
def draw_character(character_name, character_index, x, y, enabled = true)
return if character_name == nil
bitmap = Cache.character(character_name)
sign = character_name[/^[\!\$]./]
if sign != nil and sign.include?('$')
cw = bitmap.width / 3
ch = bitmap.height / 4
else
cw = bitmap.width / 12
ch = bitmap.height / 8
end
n = character_index
src_rect = Rect.new((n%4*3+1)*cw, (n/4*4)*ch, cw, ch)
self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect, enabled ? 255 : 128)
end
end


and also replace this with the script called "Redefinitions" in your script list:
[Show/Hide] Redefenitions
CODE
#---------------------------------------------------------------
# Redefine the menu to add the crafting window
# &
# Add a definition for crafting terminoligy to the Vocab
#---------------------------------------------------------------

module Vocab
def self.crafting
#change this term if you want to call crafting something else in your game
return "Crafting"
end
end

module Sound
#play critical success. change the SE if you want a different one
def self.play_critical
Audio.se_play("Audio/SE/Chime2", 100, 100)
end
end

#class Scene_Menu < Scene_Base
#
# def start
#--------------------------------------------------------------------------
# Set this to true if you want to disable the "crafting" entry in the menu
#--------------------------------------------------------------------------
# @disableMenuChoice = true
#
# super
# create_menu_background
# if @disableMenuChoice
# oldCmdWindow
# else
# create_command_window
# end
# @gold_window = Window_Gold.new(0, 360)
# @status_window = Window_MenuStatus.new(160, 0)
# end
#
# def update
# super
# update_menu_background
# @command_window.update
# @gold_window.update
# @status_window.update
# if @command_window.active
# if @disableMenuChoice
# oldUpdCmdSel
# else
# update_command_selection
# end
# elsif @status_window.active
# update_actor_selection
# end
# end
#
# alias oldCmdWindow create_command_window
# def create_command_window
# s1 = Vocab::item
# s2 = Vocab::skill
# s3 = Vocab::equip
# s4 = Vocab::status
# s5 = Vocab::crafting
# s6 = Vocab::save
# s7 = Vocab::game_end
# @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7])
# @command_window.index = @menu_index
# if $game_party.members.size == 0 # If number of party members is 0
# @command_window.draw_item(0, false) # Disable item
# @command_window.draw_item(1, false) # Disable skill
# @command_window.draw_item(2, false) # Disable equipment
# @command_window.draw_item(3, false) # Disable status
# end
# if $game_system.save_disabled # If save is forbidden
# @command_window.draw_item(4, false) # Disable save
# end
# end
#
# alias oldUpdCmdSel update_command_selection
# def update_command_selection
# if Input.trigger?(Input::cool.gif
# Sound.play_cancel
# $scene = Scene_Map.new
# elsif Input.trigger?(Input::C)
# if $game_party.members.size == 0 and @command_window.index < 4
# Sound.play_buzzer
# return
# elsif $game_system.save_disabled and @command_window.index == 4
# Sound.play_buzzer
# return
# end
# Sound.play_decision
# case @command_window.index
# when 0 # Item
# $scene = Scene_Item.new
# when 1,2,3 # Skill, equipment, status
# start_actor_selection
# when 4 # Crafting window
# $scene = Scene_Crafting.new
# when 5 #save
# $scene = Scene_File.new(true, false, false)
# when 6 # End Game
# $scene = Scene_End.new
# end
# end
# end
#end
#
#-------------------------------------------------------------------------------
#
# Redefined the Scene_Title class to add the new systems into the game object
# creation method.
#
#-------------------------------------------------------------------------------

class Scene_Title < Scene_Base

alias oldCreateGameObjectsACS create_game_objects
def create_game_objects
oldCreateGameObjectsACS
$game_crafting = Game_Crafting.new
end
end

#-------------------------------------------------------------------------------
#
# Wouldn't it be great if we could save our custom system data?
#
#-------------------------------------------------------------------------------
class Scene_File < Scene_Base

alias oldWriteSaveACS write_save_data
def write_save_data(file)
oldWriteSaveACS(file)
Marshal.dump($game_crafting, file)
end
#-------------------------------------------------------------------------------
# We need to be able to load it again though!
#-------------------------------------------------------------------------------
alias oldReadSaveACS read_save_data
def read_save_data(file)
oldReadSaveACS(file)
$game_crafting = Marshal.load(file)
end
end

#-------------------------------------------------------------------------------
#
# Extra methods are added to keep track of whether or not a party member
# has been discovered. This allows for party hotswaping and accurate equip
# feedback in the crafting status window
#
#-------------------------------------------------------------------------------

class Game_Actors

attr_accessor :discovered

def initialize
@data = []
initDiscovered
end

#-----------------------------------------------------------------------------
# Sets all party members to discovered false, then checks the DB data to see
# who actually has been discovered
#-----------------------------------------------------------------------------
def initDiscovered
@discovered = []
for x in 1..@data.length
@discovered[x-1] = false
end
for i in $data_system.party_members
@discovered[i] = true
end
end

def length
return @data.length
end
end

#------------------------------------------------------------------------------
#
# The game actor class needs to have some discovery methods
#
#------------------------------------------------------------------------------
class Game_Actor < Game_Battler
#---------------------------------------------------
# Checks to see if an actor has been discovered yet
#---------------------------------------------------
def isDiscovered?
return $game_actors.discovered[@actor_id]
end

def discover
$game_actors.discovered[@actor_id] = true
end

def hide
$game_actors.discovered[@actor_id] = false
end
end


if it gives you any problems just send me a pm or contact me on my msn account: lomastul@gmail.com
btw you should use also spoiler tags next time.

--Lomastul

This post has been edited by lomastul: Nov 9 2008, 08:22 AM


__________________________
Working On: Tears Of Destiny


Go to the top of the page
 
+Quote Post
   
Metamorphoze
post Nov 9 2008, 07:29 AM
Post #12


Level 8
Group Icon

Group: Revolutionary
Posts: 115
Type: Developer
RM Skill: Skilled




QUOTE (lomastul @ Oct 17 2008, 09:42 AM) *
oh nvm i forgot it requires another script to work correctly, ok here's the edited ring menu:
[Show/Hide] Ring menu
CODE
#================================================================
==============
# ** Ring Menu
#-------------------------------------------------------------------------------
# by Syvkal
# Version 1.1
# 06-23-08
#==============================================================================

#===================================================#
# ** C O N F I G U R A T I O N S Y S T E M ** #
#===================================================#

# Amount of frames for Startup Animation
STARTUP_FRAMES = 20
# Amount of frames for Movement Animation
MOVING_FRAMES = 15
# Radius of the Menu Ring
RING_R = 75
# Disabled icon to display when disabled
ICON_DISABLE= Cache::picture('Icon_Disable')


#-------------D-O---N-O-T---T-O-U-C-H---------------#

class Scene_Title < Scene_Base
alias game_objects_original create_game_objects
def create_game_objects
game_objects_original

#-------------D-O---N-O-T---T-O-U-C-H---------------#

# As this script allows you to make a custom Menu I thought to make it easier
# I would make it possible to add extra Menu Options from here

# All you need to do is specify the Text to display, the icon and the command
# The command must be in a STRING
# Simply add to the array below :

$game_ring_menu = [

# Menu Option 0 eg. Item
[Vocab::item, Cache::picture('Icon_Items'), "$scene = Scene_Item.new"],

# Menu Option 1 eg. Skill
[Vocab::skill, Cache::picture('Icon_Skills'), "start_actor_selection",
"$scene = Scene_Skill.new(@status_window.index)"],

# Menu Option 2 eg. Equip
[Vocab::equip, Cache::picture('Icon_Equip'), "start_actor_selection",
"$scene = Scene_Equip.new(@status_window.index)"],

# Menu Option 3 eg. Status
[Vocab::status, Cache::picture('Icon_Status'), "start_actor_selection",
"$scene = Scene_Status.new(@status_window.index)"],

#---------------------------------------------------#
# ** I N S E R T M O R E H E R E ** #
#---------------------------------------------------#




# Preferably Insert your custom Menu Options Here
# Otherwise the existing Menu Options will return to wrong point on the Menu

# Menu Option 4 eg. Craft
["Craft", Cache::picture('Icon_Craft'), "$scene = Scene_Crafting.new"],

# Menu Option 5 eg. Save
["Save Game", Cache::picture('Icon_Save'), "$scene = Scene_File.new(true, false, false)"],

# Menu Option 6 eg. Load
["Load Game", Cache::picture('Icon_Load'), "$scene = Scene_File.new(false, false, false)"],

# Menu Option 7 eg. End Game
[Vocab::game_end, Cache::picture('Icon_End'), "$scene = Scene_End.new"]





] # <--- Do no Delete This

#===================================================#
# ** E N D C O N F I G U R A T I O N ** #
#===================================================#
end
end
#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
# Edited to add Ring Menu
#==============================================================================

class Scene_Menu < Scene_Base
#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
alias initialize_original initialize
alias start_selection_original start_actor_selection
alias end_selection_original end_actor_selection
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(menu_index = 0, move = true)
@move = move
initialize_original(menu_index)
end
#--------------------------------------------------------------------------
# * Start processing
#--------------------------------------------------------------------------
def start
super
create_menu_background
create_command_window
@gold_window = Window_Gold.new(0, 360)
@location_window = Window_location.new(0, 0)
end
#--------------------------------------------------------------------------
# * Termination Processing
#--------------------------------------------------------------------------
def terminate
super
dispose_menu_background
@command_window.dispose
@gold_window.dispose
@status_window.dispose if @status_window
@location_window.dispose
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
super
update_menu_background
@command_window.update
@gold_window.update
@status_window.update if @status_window
@location_window.update
if @command_window.active
update_command_selection
elsif @status_window.active
update_actor_selection
end
end
#--------------------------------------------------------------------------
# * Create Command Window
#--------------------------------------------------------------------------
def create_command_window
commands = []
for i in 0...$game_ring_menu.size
commands.push($game_ring_menu[i][0])
end
icons = []
for i in 0...$game_ring_menu.size
icons.push($game_ring_menu[i][1])
end
@command_window = Window_RingMenu.new(232, 164, commands, icons, @move, @menu_index)
if $game_party.members.size == 0
@command_window.disable_item(0)
@command_window.disable_item(1)
@command_window.disable_item(2)
@command_window.disable_item(3)
end
if $game_system.save_disabled
@command_window.disable_item(4)
end
end
#--------------------------------------------------------------------------
# * Create Command Window
#--------------------------------------------------------------------------
def create_status_window
names = []
chars = []
for i in 0...$game_party.members.size
names[i] = $game_party.members[i].name
chars[i] = $game_party.members[i]
end
@status_window = Window_RingMenu.new(255, 200, names, chars, true, $game_party.last_actor_index, true)
end
#--------------------------------------------------------------------------
# * Update Command Selection
#--------------------------------------------------------------------------
def update_command_selection
if Input.trigger?(Input::cool.gif
Sound.play_cancel
$scene = Scene_Map.new
elsif Input.trigger?(Input::C)
if $game_party.members.size == 0 and @command_window.index < 4
Sound.play_buzzer
return
elsif $game_system.save_disabled and @command_window.index == 4
Sound.play_buzzer
return
end
Sound.play_decision
eval($game_ring_menu[@command_window.index][2])
end
end
#--------------------------------------------------------------------------
# * Start Actor Selection
#--------------------------------------------------------------------------
def start_actor_selection
@command_window.active = false
@command_window.visible = false
create_status_window
if $game_party.last_actor_index < @status_window.item_max
@status_window.index = $game_party.last_actor_index
else
@status_window.index = 0
end
end
#--------------------------------------------------------------------------
# * End Actor Selection
#--------------------------------------------------------------------------
def end_actor_selection
@command_window.active = true
@command_window.visible = true
@status_window.dispose if @status_window
@status_window = nil
end
#--------------------------------------------------------------------------
# * Update Actor Selection
#--------------------------------------------------------------------------
def update_actor_selection
if Input.trigger?(Input::cool.gif
Sound.play_cancel
end_actor_selection
elsif Input.trigger?(Input::C)
$game_party.last_actor_index = @status_window.index
Sound.play_decision
eval($game_ring_menu[@command_window.index][3])
end
end
end

#==============================================================================
# ** Scene_File
#------------------------------------------------------------------------------
# Edited to return to the menu properly when loading
#==============================================================================

class Scene_File
alias return_scene_original return_scene
def return_scene
if @from_title
$scene = Scene_Title.new
elsif @from_event
$scene = Scene_Map.new
else
if @saving
$scene = Scene_Menu.new($game_ring_menu.size - 3)
else
$scene = Scene_Menu.new($game_ring_menu.size - 2)
end
end
end
end

#==============================================================================
# ** Scene_End
#------------------------------------------------------------------------------
# Edited to return to the menu properly due to loading being added
#==============================================================================

class Scene_End
alias return_scene_original return_scene
def return_scene
$scene = Scene_Menu.new($game_ring_menu.size - 1)
end
end

#==============================================================================
# ** Window_Location
#------------------------------------------------------------------------------
# This class shows the current map name.
#==============================================================================

class Window_location < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(x, y)
super(x, y, 160, (WLH*2) + 32)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
$maps = load_data("Data/MapInfos.rvdata")
@map_id = $game_map.map_id
@currmap = $maps[@map_id].name
self.contents.font.color = system_color
self.contents.draw_text(0, -4, 128, 32, "Location :")
self.contents.font.color = normal_color
self.contents.draw_text(0, -4+WLH, 128, 32, @currmap, 1)
end
end

#==============================================================================
# ** Window_RingMenu
#------------------------------------------------------------------------------
# This Window creates a Ring Menu system
#==============================================================================

class Window_RingMenu < Window_Base
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :index
attr_reader :item_max
#--------------------------------------------------------------------------
# * Refresh Setup
#--------------------------------------------------------------------------
START = 1
WAIT = 2
MOVER = 3
MOVEL = 4
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(center_x, center_y, commands, items, move = true, index = 0, character = false)
super(0, 0, 544, 416)
self.contents = Bitmap.new(width-32, height-32)
self.opacity = 0
@move = move
@char = character
@startup = STARTUP_FRAMES
@commands = commands
@item_max = commands.size
@index = index
@items = items
@disabled = []
for i in 0...commands.size-1
@disabled[i] = false
end
@cx = center_x
@cy = center_y
start_setup
refresh
end
#--------------------------------------------------------------------------
# * Start Setup
#--------------------------------------------------------------------------
def start_setup
@mode = START
@steps = @startup
end
#--------------------------------------------------------------------------
# * Disable index
# index : item number
#--------------------------------------------------------------------------
def disable_item(index)
@disabled[index] = true
end
#--------------------------------------------------------------------------
# * Determines if is moving
#--------------------------------------------------------------------------
def animation?
return @mode != WAIT
end
#--------------------------------------------------------------------------
# * Determine if cursor is moveable
#--------------------------------------------------------------------------
def cursor_movable?
return false if (not visible or not active)
return false if (@opening or @closing)
return false if animation?
return true
end
#--------------------------------------------------------------------------
# * Move cursor right
#--------------------------------------------------------------------------
def cursor_right
@index -= 1
@index = @items.size - 1 if @index < 0
@mode = MOVER
@steps = MOVING_FRAMES
end
#--------------------------------------------------------------------------
# * Move cursor left
#--------------------------------------------------------------------------
def cursor_left
@index += 1
@index = 0 if @index >= @items.size
@mode = MOVEL
@steps = MOVING_FRAMES
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
super
if self.active
if cursor_movable?
last_index = @index
if Input.repeat?(Input::DOWN) or Input.repeat?(Input::RIGHT)
cursor_right
end
if Input.repeat?(Input::UP) or Input.repeat?(Input::LEFT)
cursor_left
end
if @index != last_index
Sound.play_cursor
end
end
refresh
end
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
case @mode
when START
refresh_start
when WAIT
refresh_wait
when MOVER
refresh_move(1)
when MOVEL
refresh_move(0)
end
rect = Rect.new(18, 196, self.contents.width-32, 32)
self.contents.draw_text(rect, @commands[@index], 1)
end
#--------------------------------------------------------------------------
# * Refresh Start Period
#--------------------------------------------------------------------------
def refresh_start
d1 = 2.0 * Math:tongue.gifI / @item_max
d2 = 1.0 * Math:tongue.gifI / @startup
for i in 0...@item_max
j = i - @index
if @move
r = RING_R - 1.0 * RING_R * @steps / @startup
d = d1 * j + d2 * @steps
else
r = RING_R
d = d1 * j
end
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 = WAIT
end
end
#--------------------------------------------------------------------------
# * Refresh Wait Period
#--------------------------------------------------------------------------
def refresh_wait
d = 2.0 * Math:tongue.gifI / @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
#--------------------------------------------------------------------------
# * Refresh Movement Period
#--------------------------------------------------------------------------
def refresh_move( mode )
d1 = 2.0 * Math:tongue.gifI / @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 = WAIT
end
end
#--------------------------------------------------------------------------
# * Draw Item
# x : draw spot x-coordinate
# y : draw spot y-coordinate
# index : item number
#--------------------------------------------------------------------------
def draw_item(x, y, index)
if @char
if @index == index
draw_character(@items[index].character_name, @items[index].character_index , x, y)
if @mode == WAIT
draw_actor_hp_ring(@items[index], @cx, @cy - 16, 50, 6, 84, 270, true)
draw_actor_mp_ring(@items[index], @cx, @cy - 16, 50, 6, 84, 180, false)
draw_actor_exp+ring(@items[index], @cx, @cy - 16, 50, 6, 155, 12, false)
end
else
draw_character(@items[index].character_name, @items[index].character_index , x, y, false)
end
else
rect = Rect.new(0, 0, @items[index].width, @items[index].height)
if @index == index
self.contents.blt( x, y, @items[index], rect )
if @disabled[@index]
self.contents.blt( x, y, ICON_DISABLE, rect )
end
else
self.contents.blt( x, y, @items[index], rect, 128 )
end
end
end
end

#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
# Edited to allow disabled character icons
#==============================================================================

class Window_Base < Window
#--------------------------------------------------------------------------
# * Draw Character Graphic
#--------------------------------------------------------------------------
def draw_character(character_name, character_index, x, y, enabled = true)
return if character_name == nil
bitmap = Cache.character(character_name)
sign = character_name[/^[\!\$]./]
if sign != nil and sign.include?('$')
cw = bitmap.width / 3
ch = bitmap.height / 4
else
cw = bitmap.width / 12
ch = bitmap.height / 8
end
n = character_index
src_rect = Rect.new((n%4*3+1)*cw, (n/4*4)*ch, cw, ch)
self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect, enabled ? 255 : 128)
end
end


and also replace this with the script called "Redefinitions" in your script list:
[Show/Hide] Redefenitions
CODE
#---------------------------------------------------------------
# Redefine the menu to add the crafting window
# &
# Add a definition for crafting terminoligy to the Vocab
#---------------------------------------------------------------

module Vocab
def self.crafting
#change this term if you want to call crafting something else in your game
return "Crafting"
end
end

module Sound
#play critical success. change the SE if you want a different one
def self.play_critical
Audio.se_play("Audio/SE/Chime2", 100, 100)
end
end

#class Scene_Menu < Scene_Base
#
# def start
#--------------------------------------------------------------------------
# Set this to true if you want to disable the "crafting" entry in the menu
#--------------------------------------------------------------------------
# @disableMenuChoice = true
#
# super
# create_menu_background
# if @disableMenuChoice
# oldCmdWindow
# else
# create_command_window
# end
# @gold_window = Window_Gold.new(0, 360)
# @status_window = Window_MenuStatus.new(160, 0)
# end
#
# def update
# super
# update_menu_background
# @command_window.update
# @gold_window.update
# @status_window.update
# if @command_window.active
# if @disableMenuChoice
# oldUpdCmdSel
# else
# update_command_selection
# end
# elsif @status_window.active
# update_actor_selection
# end
# end
#
# alias oldCmdWindow create_command_window
# def create_command_window
# s1 = Vocab::item
# s2 = Vocab::skill
# s3 = Vocab::equip
# s4 = Vocab::status
# s5 = Vocab::crafting
# s6 = Vocab::save
# s7 = Vocab::game_end
# @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7])
# @command_window.index = @menu_index
# if $game_party.members.size == 0 # If number of party members is 0
# @command_window.draw_item(0, false) # Disable item
# @command_window.draw_item(1, false) # Disable skill
# @command_window.draw_item(2, false) # Disable equipment
# @command_window.draw_item(3, false) # Disable status
# end
# if $game_system.save_disabled # If save is forbidden
# @command_window.draw_item(4, false) # Disable save
# end
# end
#
# alias oldUpdCmdSel update_command_selection
# def update_command_selection
# if Input.trigger?(Input::cool.gif
# Sound.play_cancel
# $scene = Scene_Map.new
# elsif Input.trigger?(Input::C)
# if $game_party.members.size == 0 and @command_window.index < 4
# Sound.play_buzzer
# return
# elsif $game_system.save_disabled and @command_window.index == 4
# Sound.play_buzzer
# return
# end
# Sound.play_decision
# case @command_window.index
# when 0 # Item
# $scene = Scene_Item.new
# when 1,2,3 # Skill, equipment, status
# start_actor_selection
# when 4 # Crafting window
# $scene = Scene_Crafting.new
# when 5 #save
# $scene = Scene_File.new(true, false, false)
# when 6 # End Game
# $scene = Scene_End.new
# end
# end
# end
#end
#
#-------------------------------------------------------------------------------
#
# Redefined the Scene_Title class to add the new systems into the game object
# creation method.
#
#-------------------------------------------------------------------------------

class Scene_Title < Scene_Base

alias oldCreateGameObjectsACS create_game_objects
def create_game_objects
oldCreateGameObjectsACS
$game_crafting = Game_Crafting.new
end
end

#-------------------------------------------------------------------------------
#
# Wouldn't it be great if we could save our custom system data?
#
#-------------------------------------------------------------------------------
class Scene_File < Scene_Base

alias oldWriteSaveACS write_save_data
def write_save_data(file)
oldWriteSaveACS(file)
Marshal.dump($game_crafting, file)
end
#-------------------------------------------------------------------------------
# We need to be able to load it again though!
#-------------------------------------------------------------------------------
alias oldReadSaveACS read_save_data
def read_save_data(file)
oldReadSaveACS(file)
$game_crafting = Marshal.load(file)
end
end

#-------------------------------------------------------------------------------
#
# Extra methods are added to keep track of whether or not a party member
# has been discovered. This allows for party hotswaping and accurate equip
# feedback in the crafting status window
#
#-------------------------------------------------------------------------------

class Game_Actors

attr_accessor :discovered

def initialize
@data = []
initDiscovered
end

#-----------------------------------------------------------------------------
# Sets all party members to discovered false, then checks the DB data to see
# who actually has been discovered
#-----------------------------------------------------------------------------
def initDiscovered
@discovered = []
for x in 1..@data.length
@discovered[x-1] = false
end
for i in $data_system.party_members
@discovered[i] = true
end
end

def length
return @data.length
end
end

#------------------------------------------------------------------------------
#
# The game actor class needs to have some discovery methods
#
#------------------------------------------------------------------------------
class Game_Actor < Game_Battler
#---------------------------------------------------
# Checks to see if an actor has been discovered yet
#---------------------------------------------------
def isDiscovered?
return $game_actors.discovered[@actor_id]
end

def discover
$game_actors.discovered[@actor_id] = true
end

def hide
$game_actors.discovered[@actor_id] = false
end
end


if it gives you any problems just send me a pm or contact me on my msn account: lomastul@gmail.com
btw you should use also spoiler tags next time.

--Lomastul


your script doesn't work because there aren't any " # ".... why try to trick a guy like him?


__________________________
I QUIT RRR, HEY Zehnire, i'm sorry i cannot finish your request, first off, i'll need some information and second, i can't post =(
MY NEW ACCOUNT WILL BE http://www.rpgmakervx.net/index.php?showuser=28688
I'm deeply sorry, message me on there and i'll ask a few questions and complete your request. SORRY MAN...
I HATE RRR MODS
Go to the top of the page
 
+Quote Post
   
lomastul
post Nov 9 2008, 08:20 AM
Post #13


Level 7
Group Icon

Group: Member
Posts: 95
Type: Artist
RM Skill: Advanced




what are you talking about? i got no intention to trick anyone >.>, and if there is a problem with the ring menu or the redefenitions then it is due to the code tags or spoilers because it worked alright on my comp, tho i dont use ring menu.

EDIT:
ok figured out what you meant and i was right it was caused by the spoiler and code tags, sorry if it caused any inconviniece to anyone.
fixed the script.


This post has been edited by lomastul: Nov 9 2008, 08:24 AM


__________________________
Working On: Tears Of Destiny


Go to the top of the page
 
+Quote Post
   
KureiguDude
post Feb 24 2011, 04:56 AM
Post #14



Group Icon

Group: Member
Posts: 2
Type: None
RM Skill: Undisclosed




It keeps crashing with this message? sad.gif

Script 'Window_Crafting_Details' line 77: NoMethodError occurred.

undefined method `[]' for nil:NilClass
Go to the top of the page
 
+Quote Post
   
lillunatik
post Mar 24 2011, 03:19 PM
Post #15



Group Icon

Group: Member
Posts: 2
Type: None
RM Skill: Undisclosed




I have a problem with this and i just can't seem to get it to work right after 1 hour of playing with it.....I get an error that says "Script 'Game_Crafting' line 252 :NoMethodError occurred undefined method 'setDiscovered' for nil:NilClass" any help with this?
Go to the top of the page
 
+Quote Post
   
Hexgame
post May 3 2011, 09:31 PM
Post #16


Level 1
Group Icon

Group: Member
Posts: 14
Type: Musician
RM Skill: Intermediate




QUOTE
????????? NameError ??????????

uninitialized constant Game_Interpreter::Scene_Crafting


I get this error when trying to call the crafting window.


EDIT:

Nevermind, noob mistake, turns out I duplicated the main scipts and had this script below it.

This post has been edited by Hexgame: May 3 2011, 11:47 PM
Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 17th June 2013 - 09:39 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker