[XP] Castlevania CoD style Crafting System

Started by Leon_Westbrooke, January 18, 2008, 02:53:48 am

Previous topic - Next topic

Leon_Westbrooke

January 18, 2008, 02:53:48 am Last Edit: February 21, 2009, 05:56:17 am by Blizzard
Castlevania CoD style Crafting System
Authors: Leon_Westbrooke
Version: 1.3
Type: Crafting
Key Term: Misc System



Introduction
This script is based on the Castlevania: Curse of Darkness system.  It allows you to specify 1 or more recipes per item made.  For instance, 2 ways to make a 'Full Potion'.


Features


  • Set up 1 or more recipes per item.
  • You can set up if the menu automatically update (or not) if you have the items to craft a new item.
  • You can set this to be 'recipe based'.



Screenshots




Demo
Craft_System_Demo.zip


Instructions
The instructions are in the script.


Compatibility
I know of no known compatability issues.


Credits and Thanks
Please, credit Leon for this script, but I in turn, credit Tiberius_XXVII for teaching me to script.


Author's Notes
No notes.

Nortos

looks good :) I'll take a look at it later when I have time

Evilbob

Lol I miss read it and was like, WTF call of duty didn't have a crafting system did it?  Nice script though!

Fantasist

January 19, 2008, 11:00:57 am #3 Last Edit: January 19, 2008, 11:06:55 am by Fantasist
Nice script, I can learn from it. I should explore the RMXP data structure more *downloads demo and tries out*

EDIT: You need to have an account in RMXP Unlimited to dl the demo, could you host it on File Factory or Sendspace :)
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)


The best of freeware reviews: Gizmo's Freeware Reviews




Sally


Leon_Westbrooke

I sincerely apologize with the demo's upload location.  It has been changed from RMXP_Unlimited, to mega upload.  If anyone cannot get it from there, please, PM me. I'll be more than happy to send you the demo.

Fantasist

Okay, thanks but I personally prefer non-megaupload download. Just mentioning :)
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)


The best of freeware reviews: Gizmo's Freeware Reviews




Nortos


Blizzard

Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Leon_Westbrooke

I have posted a new url using filefactory instead of megaupload.  Just a small update.

Kathis

February 05, 2008, 03:47:25 pm #10 Last Edit: February 05, 2008, 04:03:54 pm by Kathis
This might just be me, but I believe you forgot to post the script and we are required to hunt it off the demo...
Kathis attention span for game making is based on a meter depending on his mood changes how far he'll go with the project,
Right now 25%,
Currently working on Random game version 3 on rpg maker xp. current status...2% compleat,

Nortos

no you do have to get it off demo there's post limit unless Blizz increased it

Blizzard

It's 50000 characters if I'm not wrong. I can increase it if Leon needs it, though.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Kathis

I see was not aware of that..however looking at the script in the demo... is it possible to make it so that the recipies don't show unless it is "unlocked" ? that way its not like "Hey I have all the herbs and I am only level 2 lets make the strongest potion in the game!" >_>;; or create the strongest weapon or armor or anything really...
Kathis attention span for game making is based on a meter depending on his mood changes how far he'll go with the project,
Right now 25%,
Currently working on Random game version 3 on rpg maker xp. current status...2% compleat,

Sally


tSwitch

I don't have the demo, but here's the script for you.

#========================================
#  Leon's Crafting System
#  v1.03
#-------------------------------------------------------
#
#  Features:
#    By default, if the player has the items for a recipe, they will learn it.
#    You can set some to be triggered by events.
#
#  Instructions:
#    Put below all default scripts, but above Main.
#    Follow the examples in the module, and put in the numbers where needed.
#     it is the easiest way to make it usable without too much coding.
#
#  To make an item so an event must be triggered:
#     Add the ID number to the right area.  The right area for:
#       Items:  Item_Event_Triggered = []
#       Weapons:  Weapon_Event_Triggered = []
#       Armors:  Armor_Event_Triggered = []
#
#  If the item is evented, and needs to be added to the list, use this in script
#  (without the 'For Items', 'For Weapons', and 'For Armors'):
#    For items:
#      $game_party.event_item.push(item_id)
#      $game_party.compile
#
#    For weapons:
#      $game_party.event_weapon.push(weapon_id)
#      $game_party.compile
#
#    For armors:
#      $game_party.event_armor.push(armor_id)
#      $game_party.compile
#
#  If you want each item to be added via 'recipe':
#    Set each item to be 'evented'.
#    To add them, use this in call script (without the 'For Items', 'For Weapons', and 'For Armors'):
#      For Items:
#        $game_party.item_recipe_availible.push(item_id)
#        $game_party.item_recipes_made[item_id] = 0
#      For Weapons:
#        $game_party.weapon_recipe_availible.push(weapon_id)
#        $game_party.weapon_recipes_made[weapon_id] = 0
#      For Armors:
#        $game_party.armor_recipe_availible.push(armor_id)
#        $game_party.armor_recipes_made[armor_id] = 0
#     
#
#
#  Additional Information:
#    If you are having troubles with the Craft_Item_Comp, Craft_Weapon_Comp, and
#    Craft_Armor_Comp:
#      The way it is set up is:
#        Craft_Item_Comp = {
#        item.id => [[item_id, item_type, number_needed], [item_id, item_type, number_needed]]
#        }
#      Make sure you have it set up like that, and you can have many more than that.  Also, as stated
#      below, the item_types are: 0-item, 1-weapon, 2-armor
#
#========================================


#========================================
#  module Craft_Items
#    Notes:
#      item.types are:  0-item, 1-weapon, 2-armor
#========================================
module Craft_Items
  #---------------------------------------------
  #  Recipes for Items
  #  Craft_Item_Comp = {item_id => [[item.id, item.type, # needed], etc...]
  #---------------------------------------------
  Craft_Item_Comp = {
  128 => [[140, 0, 1], [141, 0, 1], [142, 0, 1]]
  }
  #---------------------------------------------
  #  Recipes for Weapons
  #  Craft_Weapon_Comp = {weapon_id => [[item.id, item.type, # needed], etc...]
  #---------------------------------------------
  Craft_Weapon_Comp = {
  1 => [[1, 0, 1], [2, 0, 1]],
  2 => [[1, 0, 1], [2, 0, 1]],
  3 => [[1, 0, 1], [2, 0, 1]],
  4 => [[1, 0, 1], [2, 0, 1]],
  5 => [[1, 0, 1], [2, 0, 1]],
  6 => [[1, 0, 1], [2, 0, 1]],
  7 => [[1, 0, 1], [2, 0, 1]],
  8 => [[1, 0, 1], [2, 0, 1]],
  9 => [[1, 0, 1], [2, 0, 1]],
  10 => [[1, 0, 1], [2, 0, 1]],
  11 => [[1, 0, 1], [2, 0, 1]],
  12 => [[1, 0, 1], [2, 0, 1]],
  13 => [[1, 0, 1], [2, 0, 1]]
  }
  #---------------------------------------------
  #  Recipes for Armors
  #  Craft_Armor_Comp = {Armor_id => [[item.id, item.type, # needed], etc...]
  #---------------------------------------------
  Craft_Armor_Comp = {
  #3 => [[2, 0, 1], [1, 1, 1]]
  }
  #---------------------------------------------
  #  Tells which item recipes are evented.
  #  Item_Event_Triggered = [id1, id2...etc]
  #---------------------------------------------
  Item_Event_Triggered = []
  #---------------------------------------------
  #  Tells which weapon recipes are evented.
  #  Weapon_Event_Triggered = [id1, id2...etc]
  #---------------------------------------------
  Weapon_Event_Triggered = []
  #---------------------------------------------
  #  Tells which armor recipes are evented.
  #  Armor_Event_Triggered = [id1, id2...etc]
  #---------------------------------------------
  Armor_Event_Triggered = []
end
#========================================
#  END module Craft_Items
#========================================


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  Game_Party
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
class Game_Party
 
  alias leon_cs_gameparty_initialize initialize
  alias leon_cs_gameparty_gainitem gain_item
  alias leon_cs_gameparty_gainweapon gain_weapon
  alias leon_cs_gameparty_gainarmor gain_armor
 
  attr_accessor :item_recipes_made
  attr_accessor :item_recipe_availible
  attr_accessor :weapon_recipes_made
  attr_accessor :weapon_recipe_availible
  attr_accessor :armor_recipes_made
  attr_accessor :armor_recipe_availible
  attr_accessor :event_item
  attr_accessor :event_weapon
  attr_accessor :event_armor
 
  def initialize
    #------------------------------------------------
    # Used to record what items have been made.
    #------------------------------------------------
    @item_recipes_made = {}
    #------------------------------------------------
    # Used to show availible item recipes.
    #------------------------------------------------
    @item_recipe_availible = []
    #------------------------------------------------
    # Used to record what items have been made.
    #------------------------------------------------
    @weapon_recipes_made = {}
    #------------------------------------------------
    # Used to show availible item recipes.
    #------------------------------------------------
    @weapon_recipe_availible = []
    #------------------------------------------------
    # Used to record what items have been made.
    #------------------------------------------------
    @armor_recipes_made = {}
    #------------------------------------------------
    # Used to show availible item recipes.
    #------------------------------------------------
    @armor_recipe_availible = []
    #------------------------------------------------
    #  Shows which ones need triggered events
    #------------------------------------------------
    @event_item = []
    @event_weapon = []
    @event_armor = []
    leon_cs_gameparty_initialize
  end
 
  def gain_item(item_id, n)
    leon_cs_gameparty_gainitem(item_id, n)
    compile
  end
 
  def gain_weapon(weapon_id, n)
    leon_cs_gameparty_gainweapon(weapon_id, n)
    compile
  end
 
  def gain_armor(armor_id, n)
    leon_cs_gameparty_gainarmor (armor_id, n)
    compile
  end
 
  def compile
    ci = Craft_Items
    for i in 0...ci::Craft_Item_Comp.keys.size
      @counter = 0
      for j in 0...ci::Craft_Item_Comp[ci::Craft_Item_Comp.keys[i]].size
        case ci::Craft_Item_Comp[ci::Craft_Item_Comp.keys[i]][j][1]
        when 0
          item = ci::Craft_Item_Comp[ci::Craft_Item_Comp.keys[i]][j][0]
          if @items.keys.include?(item) and @items[item] >= ci::Craft_Item_Comp[ci::Craft_Item_Comp.keys[i]][j][2]
            @counter += 1
          end
        when 1
          item = ci::Craft_Item_Comp[ci::Craft_Item_Comp.keys[i]][j][0]
          if @weapons.keys.include?(item) and @weapons[item] >= ci::Craft_Item_Comp[ci::Craft_Item_Comp.keys[i]][j][2]
            @counter += 1
          end
        when 2
          item = ci::Craft_Item_Comp[ci::Craft_Item_Comp.keys[i]][j][0]
          if @armors.keys.include?(item) and @armors[item] >= ci::Craft_Item_Comp[ci::Craft_Item_Comp.keys[i]][j][2]
            @counter += 1
          end
        end
        if @counter == ci::Craft_Item_Comp[ci::Craft_Item_Comp.keys[i]].size
          unless @item_recipe_availible.include?(ci::Craft_Item_Comp.keys[i])
            if ci::Item_Event_Triggered.include?(ci::Craft_Item_Comp.keys[i])
              if @event_item.include?(ci::Craft_Item_Comp.keys[i])
                @item_recipe_availible.push(ci::Craft_Item_Comp.keys[i])
                @item_recipes_made[ci::Craft_Item_Comp.keys[i]] = 0
                return
              end
            else
              @item_recipe_availible.push(ci::Craft_Item_Comp.keys[i])
              @item_recipes_made[ci::Craft_Item_Comp.keys[i]] = 0
            end
          end
        end
      end
    end
   
    for i in 0...ci::Craft_Weapon_Comp.keys.size
      @counter = 0
      for j in 0...ci::Craft_Weapon_Comp[ci::Craft_Weapon_Comp.keys[i]].size
        case ci::Craft_Weapon_Comp[ci::Craft_Weapon_Comp.keys[i]][j][1]
        when 0
          item = ci::Craft_Weapon_Comp[ci::Craft_Weapon_Comp.keys[i]][j][0]
          if @items.keys.include?(item) and @items[item] >= ci::Craft_Weapon_Comp[ci::Craft_Weapon_Comp.keys[i]][j][2]
            @counter += 1
          end
        when 1
          item = ci::Craft_Weapon_Comp[ci::Craft_Weapon_Comp.keys[i]][j][0]
          if @weapons.keys.include?(item) and @weapons[item] >= ci::Craft_Weapon_Comp[ci::Craft_Weapon_Comp.keys[i]][j][2]
            @counter += 1
          end
        when 2
          item = ci::Craft_Weapon_Comp[ci::Craft_Weapon_Comp.keys[i]][j][0]
          if @armors.keys.include?(item) and @armors[item] >= ci::Craft_Weapon_Comp[ci::Craft_Weapon_Comp.keys[i]][j][2]
            @counter += 1
          end
        end
        if @counter == ci::Craft_Weapon_Comp[ci::Craft_Weapon_Comp.keys[i]].size
          unless @weapon_recipe_availible.include?(ci::Craft_Weapon_Comp.keys[i])
            if ci::Weapon_Event_Triggered.include?(ci::Craft_Weapon_Comp.keys[i])
              if @event_weapon.include?(ci::Craft_Weapon_Comp.keys[i])
                @weapon_recipe_availible.push(ci::Craft_Weapon_Comp.keys[i])
                @weapon_recipes_made[ci::Craft_Weapon_Comp.keys[i]] = 0
                return
              end
            else
              @weapon_recipe_availible.push(ci::Craft_Weapon_Comp.keys[i])
              @weapon_recipes_made[ci::Craft_Weapon_Comp.keys[i]] = 0
            end
          end
        end
      end
    end
   
    for i in 0...ci::Craft_Armor_Comp.keys.size
      @counter = 0
      for j in 0...ci::Craft_Armor_Comp[ci::Craft_Armor_Comp.keys[i]].size
        case ci::Craft_Armor_Comp[ci::Craft_Armor_Comp.keys[i]][j][1]
        when 0
          item = ci::Craft_Armor_Comp[ci::Craft_Armor_Comp.keys[i]][j][0]
          if @items.keys.include?(item) and @items[item] >= ci::Craft_Armor_Comp[ci::Craft_Armor_Comp.keys[i]][j][2]
            @counter += 1
          end
        when 1
          item = ci::Craft_Armor_Comp[ci::Craft_Armor_Comp.keys[i]][j][0]
          if @weapons.keys.include?(item) and @weapons[item] >= ci::Craft_Armor_Comp[ci::Craft_Armor_Comp.keys[i]][j][2]
            @counter += 1
          end
        when 2
          item = ci::Craft_Armor_Comp[ci::Craft_Armor_Comp.keys[i]][j][0]
          if @armors.keys.include?(item) and @armors[item] >= ci::Craft_Armor_Comp[ci::Craft_Armor_Comp.keys[i]][j][2]
            @counter += 1
          end
        end
        if @counter == ci::Craft_Armor_Comp[ci::Craft_Armor_Comp.keys[i]].size
          unless @armor_recipe_availible.include?(ci::Craft_Armor_Comp.keys[i])
            if ci::Armor_Event_Triggered.include?(ci::Craft_Armor_Comp.keys[i])
              if @event_armor.include?(ci::Craft_Armor_Comp.keys[i])
                @armor_recipe_availible.push(ci::Craft_Armor_Comp.keys[i])
                @armor_recipes_made[ci::Craft_Armor_Comp.keys[i]] = 0
                return
              end
            else
              @armor_recipe_availible.push(ci::Craft_Armor_Comp.keys[i])
              @armor_recipes_made[ci::Craft_Armor_Comp.keys[i]] = 0
            end
          end
        end
      end
    end
  end
 
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  END Game_Party
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


#=============================================
#  Window_Craft_Info
#=============================================
class Window_Craft_Info < Window_Base
  def initialize
    super(0, 0, 640, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = "Tahoma"
    self.contents.font.size = 22
  end

  def update(help_text)
    self.contents.clear
    self.contents.draw_text(0, 0, 614, 32, help_text)
  end
end
#=============================================
#  END Window_Craft_Info
#=============================================


#=============================================
#  Window_Craft_Name
#=============================================
class Window_Craft_Name < Window_Base
  def initialize
    super(0, 64, 256, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = "Tahoma"
    self.contents.font.size = 22
    refresh
  end
 
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(0, 0, 120, 32, "Name:")
    self.contents.draw_text(0, 0, 224, 32, "Made:", 2)
    self.contents.font.color = normal_color
  end
end
#=============================================
#  Window_Craft_Name
#=============================================


#=============================================
#  Window_Craft_List
#=============================================
class Window_Craft_List < Window_Selectable
  def initialize
    super(0, 128, 256, 352)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = "Tahoma"
    self.contents.font.size = 22
    self.index = 0
    refresh
  end
 
  def list
    if @data[index] != nil
      return @data[index]
    end
  end
 
  def refresh
    ci = Craft_Items
    if self.contents != nil
      self.contents.dispose
      self.contents = nil
    end
    @data = []
    for i in 0...$game_party.item_recipe_availible.size
      @data.push($data_items[$game_party.item_recipe_availible[i]])
    end
    for i in 0...$game_party.weapon_recipe_availible.size
      @data.push($data_weapons[$game_party.weapon_recipe_availible[i]])
    end
    for i in 0...$game_party.armor_recipe_availible.size
      @data.push($data_armors[$game_party.armor_recipe_availible[i]])
    end
    @item_max = @data.size
    if @item_max > 0
      self.contents = Bitmap.new(width - 32, row_max * 32)
    self.contents.font.name = "Tahoma"
    self.contents.font.size = 22
      for i in 0...@item_max
        draw_item(i)
      end
    end
  end
 
  def draw_item(index)
    item = @data[index]
    x = 4
    y = index * 32
    case item
    when RPG::Item
      if $game_party.item_recipes_made[item.id] > 0
        self.contents.draw_text(x, y, 224, 32, item.name)
        self.contents.draw_text(x - 8, y, 224, 32, $game_party.item_recipes_made[item.id].to_s, 2)
      else
        self.contents.draw_text(x, y, 224, 32, "???????????")
      end
    when RPG::Weapon
      if $game_party.weapon_recipes_made[item.id] > 0
        self.contents.draw_text(x, y, 224, 32, item.name)
        self.contents.draw_text(x - 8, y, 224, 32, $game_party.weapon_recipes_made[item.id].to_s, 2)
      else
        self.contents.draw_text(x, y, 224, 32, "???????????")
      end
    when RPG::Armor
      if $game_party.armor_recipes_made[item.id] > 0
        self.contents.draw_text(x, y, 224, 32, item.name)
        self.contents.draw_text(x - 8, y, 224, 32, $game_party.armor_recipes_made[item.id].to_s, 2)
      else
        self.contents.draw_text(x, y, 224, 32, "???????????")
      end
    end
  end
 
end
#=============================================
#  END Window_Craft_List
#=============================================

   
#=============================================
#  Window_Craft_Desc
#=============================================
class Window_Craft_Desc < Window_Base
  def initialize(item)
    super(256, 64, 384, 416)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = "Tahoma"
    self.contents.font.size = 22
    refresh(item)
  end
 
  def refresh(item)
    self.contents.clear
    ci = Craft_Items
    if item != nil
      self.contents.font.color = system_color
      self.contents.draw_text(0, 64, 352, 32, "Materials:", 1)
      self.contents.draw_text(0, 96, 150, 32, "Name:")
      self.contents.draw_text(190, 96, 120, 32, "Needed:")
      self.contents.draw_text(280, 96, 120, 32, "Own:")
      self.contents.font.color = normal_color
      @items = []
      bitmap = RPG::Cache.icon(item.icon_name)
      opacity = self.contents.font.color == normal_color ? 255 : 128
      self.contents.blt(0, 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
      case item
      when RPG::Item
        if $game_party.item_recipes_made[item.id] > 0
          self.contents.draw_text(28, 0, 200, 32, item.name)
          self.contents.font.size = 16
          self.contents.draw_text(10, 32, 352, 32, item.description)
          self.contents.font.size = $defaultfontsize
        else
          self.contents.draw_text(28, 0, 200, 32, "???????????")
          self.contents.draw_text(10, 32, 352, 32, "????????????????????????")
        end
      when RPG::Weapon
        if $game_party.weapon_recipes_made[item.id] > 0
          self.contents.draw_text(28, 0, 200, 32, item.name)
          self.contents.font.size = 16
          self.contents.draw_text(10, 32, 352, 32, item.description)
          self.contents.font.size = $defaultfontsize
        else
          self.contents.draw_text(28, 0, 200, 32, "???????????")
          self.contents.draw_text(10, 32, 352, 32, "????????????????????????")
        end
      when RPG::Armor
        if $game_party.armor_recipes_made[item.id] > 0
          self.contents.draw_text(28, 0, 200, 32, item.name)
          self.contents.font.size = 16
          self.contents.draw_text(10, 32, 352, 32, item.description)
          self.contents.font.size = $defaultfontsize
        else
          self.contents.draw_text(28, 0, 200, 32, "???????????")
          self.contents.draw_text(10, 32, 352, 32, "????????????????????????")
        end
      end
      case item
      when RPG::Item
        #p ci::Craft_Item_Comp[item.id]
        for i in 0...ci::Craft_Item_Comp[item.id].size
          item2 = ci::Craft_Item_Comp[item.id][i][0]
          case ci::Craft_Item_Comp[item.id][i][1]
          when 0
            @items.push([$data_items[ci::Craft_Item_Comp[item.id][i][0]], ci::Craft_Item_Comp[item.id][i][2]])
          when 1
            @items.push([$data_weapons[ci::Craft_Item_Comp[item.id][i][0]], ci::Craft_Item_Comp[item.id][i][2]])
          when 2
            @items.push([$data_armors[ci::Craft_Item_Comp[item.id][i][0]], ci::Craft_Item_Comp[item.id][i][2]])
          end
        end
      when RPG::Weapon
        for i in 0...ci::Craft_Weapon_Comp[item.id].size
          item2 = ci::Craft_Weapon_Comp[item.id][i][0]
          case ci::Craft_Weapon_Comp[item.id][i][1]
          when 0
            @items.push([$data_items[ci::Craft_Weapon_Comp[item.id][i][0]], ci::Craft_Weapon_Comp[item.id][i][2]])
          when 1
           @items.push([$data_weapons[ci::Craft_Weapon_Comp[item.id][i][0]], ci::Craft_Weapon_Comp[item.id][i][2]])
          when 2
            @items.push([$data_armors[ci::Craft_Weapon_Comp[item.id][i][0]], ci::Craft_Weapon_Comp[item.id][i][2]])
          end
        end
      when RPG::Armor
        for i in 0...ci::Craft_Armor_Comp[item.id].size
          item2 = ci::Craft_Armor_Comp[item.id][i][0]
          case ci::Craft_Armor_Comp[item.id][i][1]
          when 0
            @items.push([$data_items[ci::Craft_Armor_Comp[item.id][i][0]], ci::Craft_Armor_Comp[item.id][i][2]])
          when 1
            @items.push([$data_weapons[ci::Craft_Armor_Comp[item.id][i][0]], ci::Craft_Armor_Comp[item.id][i][2]])
          when 2
            @items.push([$data_armors[ci::Craft_Armor_Comp[item.id][i][0]], ci::Craft_Armor_Comp[item.id][i][2]])
          end
        end
      end
      for i in 0...@items.size
        x = 5
        y = i * 32 + 128
        case @items[i][0]
        when RPG::Item
          if $game_party.item_number(@items[i][0].id) >= @items[i][1]
            self.contents.font.color = normal_color
          else
            self.contents.font.color = disabled_color
          end
          bitmap = RPG::Cache.icon(@items[i][0].icon_name)
          opacity = self.contents.font.color == normal_color ? 255 : 128
          self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
          self.contents.draw_text(x + 28, y, 200, 32, @items[i][0].name)
          self.contents.draw_text(x + 210, y, 50, 32, @items[i][1].to_s)
          self.contents.draw_text(x + 290, y, 50, 32, $game_party.item_number(@items[i][0].id).to_s)
        when RPG::Weapon
          if $game_party.weapon_number(@items[i][0].id) >= @items[i][1]
            self.contents.font.color = normal_color
          else
            self.contents.font.color = disabled_color
          end
          bitmap = RPG::Cache.icon(@items[i][0].icon_name)
          opacity = self.contents.font.color == normal_color ? 255 : 128
          self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
          self.contents.draw_text(x + 28, y, 200, 32, @items[i][0].name)
          self.contents.draw_text(x + 210, y, 50, 32, @items[i][1].to_s)
          self.contents.draw_text(x + 290, y, 50, 32, $game_party.weapon_number(@items[i][0].id).to_s)
        when RPG::Armor
          if $game_party.armor_number(@items[i][0].id) >= @items[i][1]
            self.contents.font.color = normal_color
          else
            self.contents.font.color = disabled_color
          end
          bitmap = RPG::Cache.icon(@items[i][0].icon_name)
          opacity = self.contents.font.color == normal_color ? 255 : 128
          self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
          self.contents.draw_text(x + 28, y, 200, 32, @items[i][0].name)
          self.contents.draw_text(x + 210, y, 50, 32, @items[i][1].to_s)
          self.contents.draw_text(x + 290, y, 50, 32, $game_party.armor_number(@items[i][0].id).to_s)
        end
      end
    end
  end
end
#=============================================
#  END Window_Craft_Desc
#=============================================


#=============================================
#  Scene_Craft
#=============================================
class Scene_Craft
  def main
    @info_window = Window_Craft_Info.new
    @list_window = Window_Craft_List.new
    @desc_window = Window_Craft_Desc.new(@list_window.list)
    @name_window = Window_Craft_Name.new
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    Graphics.freeze
   
    @info_window.dispose
    @list_window.dispose
    @desc_window.dispose
    @name_window.dispose
  end
 
  def update
    ci = Craft_Items
    @info_window.update("Select an item to create.")
    @list_window.update
    @desc_window.update
    @name_window.update
    if Input.trigger?(Input::UP) or Input.trigger?(Input::DOWN) or Input.repeat?(Input::DOWN) or
        Input.repeat?(Input::UP)
      @desc_window.refresh(@list_window.list)
    end
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Menu.new(4)
    end
    if Input.trigger?(Input::C)
      @counter = 0
      case @list_window.list
      when RPG::Item
        for i in 0...ci::Craft_Item_Comp[@list_window.list.id].size
          case ci::Craft_Item_Comp[@list_window.list.id][i][1]
          when 0
            if $game_party.item_number(ci::Craft_Item_Comp[@list_window.list.id][i][0]) >= ci::Craft_Item_Comp[@list_window.list.id][i][2]
              @counter += 1
            end
          when 1
            if $game_party.weapon_number(ci::Craft_Item_Comp[@list_window.list.id][i][0]) >= ci::Craft_Item_Comp[@list_window.list.id][i][2]
              @counter += 1
            end
          when 2
            if $game_party.armor_number(ci::Craft_Item_Comp[@list_window.list.id][i][0]) >= ci::Craft_Item_Comp[@list_window.list.id][i][2]
              @counter += 1
            end
          end
        end
        if @counter == ci::Craft_Item_Comp[@list_window.list.id].size
          for i in 0...ci::Craft_Item_Comp[@list_window.list.id].size
            case ci::Craft_Item_Comp[@list_window.list.id][i][1]
            when 0
              if $game_party.item_number(ci::Craft_Item_Comp[@list_window.list.id][i][0]) >= ci::Craft_Item_Comp[@list_window.list.id][i][2]
                $game_party.lose_item(ci::Craft_Item_Comp[@list_window.list.id][i][0], ci::Craft_Item_Comp[@list_window.list.id][i][2])
              end
            when 1
              if $game_party.weapon_number(ci::Craft_Item_Comp[@list_window.list.id][i][0]) >= ci::Craft_Item_Comp[@list_window.list.id][i][2]
                $game_party.lose_weapon(ci::Craft_Item_Comp[@list_window.list.id][i][0], ci::Craft_Item_Comp[@list_window.list.id][i][2])
              end
            when 2
              if $game_party.armor_number(ci::Craft_Item_Comp[@list_window.list.id][i][0]) >= ci::Craft_Item_Comp[@list_window.list.id][i][2]
                $game_party.lose_armor(ci::Craft_Item_Comp[@list_window.list.id][i][0], ci::Craft_Item_Comp[@list_window.list.id][i][2])
              end
            end
          end
          $game_system.se_play($data_system.decision_se)
          $game_party.gain_item(@list_window.list.id, 1)
          $game_party.item_recipes_made[@list_window.list.id] += 1
          @list_window.refresh
          @desc_window.refresh(@list_window.list)
        else
          $game_system.se_play($data_system.buzzer_se)
        end
      when RPG::Weapon
        for i in 0...ci::Craft_Weapon_Comp[@list_window.list.id].size
          case ci::Craft_Weapon_Comp[@list_window.list.id][i][1]
          when 0
            if $game_party.item_number(ci::Craft_Weapon_Comp[@list_window.list.id][i][0]) >= ci::Craft_Weapon_Comp[@list_window.list.id][i][2]
              @counter += 1
            end
          when 1
            if $game_party.weapon_number(ci::Craft_Weapon_Comp[@list_window.list.id][i][0]) >= ci::Craft_Weapon_Comp[@list_window.list.id][i][2]
              @counter += 1
            end
          when 2
            if $game_party.armor_number(ci::Craft_Weapon_Comp[@list_window.list.id][i][0]) >= ci::Craft_Weapon_Comp[@list_window.list.id][i][2]
              @counter += 1
            end
          end
        end
        if @counter == ci::Craft_Weapon_Comp[@list_window.list.id].size
          for i in 0...ci::Craft_Weapon_Comp[@list_window.list.id].size
            case ci::Craft_Weapon_Comp[@list_window.list.id][i][1]
            when 0
              if $game_party.item_number(ci::Craft_Weapon_Comp[@list_window.list.id][i][0]) >= ci::Craft_Weapon_Comp[@list_window.list.id][i][2]
                $game_party.lose_item(ci::Craft_Weapon_Comp[@list_window.list.id][i][0], ci::Craft_Weapon_Comp[@list_window.list.id][i][2])
              end
            when 1
              if $game_party.weapon_number(ci::Craft_Weapon_Comp[@list_window.list.id][i][0]) >= ci::Craft_Weapon_Comp[@list_window.list.id][i][2]
                $game_party.lose_weapon(ci::Craft_Weapon_Comp[@list_window.list.id][i][0], ci::Craft_Weapon_Comp[@list_window.list.id][i][2])
              end
            when 2
              if $game_party.armor_number(ci::Craft_Weapon_Comp[@list_window.list.id][i][0]) >= ci::Craft_Weapon_Comp[@list_window.list.id][i][2]
                $game_party.lose_armor(ci::Craft_Weapon_Comp[@list_window.list.id][i][0], ci::Craft_Weapon_Comp[@list_window.list.id][i][2])
              end
            end
          end
        $game_system.se_play($data_system.decision_se)
        $game_party.gain_weapon(@list_window.list.id, 1)
        $game_party.weapon_recipes_made[@list_window.list.id] += 1
        @list_window.refresh
        @desc_window.refresh(@list_window.list)
        else
          $game_system.se_play($data_system.buzzer_se)
        end
      when RPG::Armor
        for i in 0...ci::Craft_Armor_Comp[@list_window.list.id].size
          case ci::Craft_Armor_Comp[@list_window.list.id][i][1]
          when 0
            if $game_party.item_number(ci::Craft_Armor_Comp[@list_window.list.id][i][0]) >= ci::Craft_Armor_Comp[@list_window.list.id][i][2]
              @counter += 1
            end
          when 1
            if $game_party.weapon_number(ci::Craft_Armor_Comp[@list_window.list.id][i][0]) >= ci::Craft_Armor_Comp[@list_window.list.id][i][2]
              @counter += 1
            end
          when 2
            if $game_party.armor_number(ci::Craft_Armor_Comp[@list_window.list.id][i][0]) >= ci::Craft_Armor_Comp[@list_window.list.id][i][2]
              @counter += 1
            end
          end
        end
        if @counter == ci::Craft_Armor_Comp[@list_window.list.id].size
          for i in 0...ci::Craft_Armor_Comp[@list_window.list.id].size
            case ci::Craft_Armor_Comp[@list_window.list.id][i][1]
            when 0
              if $game_party.item_number(ci::Craft_Armor_Comp[@list_window.list.id][i][0]) >= ci::Craft_Armor_Comp[@list_window.list.id][i][2]
                $game_party.lose_item(ci::Craft_Armor_Comp[@list_window.list.id][i][0], ci::Craft_Armor_Comp[@list_window.list.id][i][2])
              end
            when 1
              if $game_party.weapon_number(ci::Craft_Armor_Comp[@list_window.list.id][i][0]) >= ci::Craft_Armor_Comp[@list_window.list.id][i][2]
                $game_party.lose_weapon(ci::Craft_Armor_Comp[@list_window.list.id][i][0], ci::Craft_Armor_Comp[@list_window.list.id][i][2])
              end
            when 2
              if $game_party.armor_number(ci::Craft_Armor_Comp[@list_window.list.id][i][0]) >= ci::Craft_Armor_Comp[@list_window.list.id][i][2]
                $game_party.lose_armor(ci::Craft_Armor_Comp[@list_window.list.id][i][0], ci::Craft_Armor_Comp[@list_window.list.id][i][2])
              end
            end
          end
        $game_system.se_play($data_system.decision_se)
        $game_party.gain_armor(@list_window.list.id, 1)
        $game_party.armor_recipes_made[@list_window.list.id] += 1
        @list_window.refresh
        @desc_window.refresh(@list_window.list)
        else
          $game_system.se_play($data_system.buzzer_se)
        end
      end
    end
    return
  end
end


FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: tSwitch.us | Twitter | Tumblr

Jragyn

It seems like a great idea!
With the download link not working, I just copied the script from namkor...
however, what do I do with it?
Do you use a tidbit of script to call this scene, like blizz's stat distribution thing?
This seems like a nifty idea, but I'm just too inept to grasp it from this point.
Can someone tell me the secret?
A bright light can either illuminate or blind, but how will you know which until you open your eyes?

Shining Riku

This is a great script, by the looks of things, but the demo's down and the script doesn't have a $scene_new craft thingy or anything. No instructions on ACTIVATING it at least.  :(

You may as well hand me a locked suitcase and tell me everything I need is inside it. An indestructible suitcase.

It's impossible to use in its current state. Anybody mind sharing its secrets so it can be used?

Juan

Quote from: Shining Riku on May 19, 2009, 11:11:42 pm
This is a great script, by the looks of things, but the demo's down and the script doesn't have a $scene_new craft thingy or anything. No instructions on ACTIVATING it at least.  :(

You may as well hand me a locked suitcase and tell me everything I need is inside it. An indestructible suitcase.

It's impossible to use in its current state. Anybody mind sharing its secrets so it can be used?

I'm pretty sure it's
$scene = Scene_Craft.new
Dropbox Who need luck when you can make your own.
3ds Friend code: ShowHide
 4468 1422  6617

Shining Riku

YES! Finally!

Thanks for the script snipet, Juan. Sorry I took so long to reply, I've been away from Chaos Project for a while.

I tested it already and it worked, so you've honestly saved me a crazy amount of trouble. THANK YOOOU!!!

(Powers up)