Category Add-on For Deke's Crafting System
#1
This is a locked, single-post thread from Creation Asylum. Archived here to prevent its loss.
No support is given. If you are the owner of the thread, please contact administration.


Upgrade to Deke's crafting system for multiple categories:
Note, I assumed that you seperated the masterlist and the main script, if not, the lines will not be correct.
In the master list you need to change each recipe:

After each result_type = * line add this (replace ### by category):
Code:
category = ###

And replace every line that looks like this:
Code:
@recipe_list.push(Game_Recipe.new(ingredients,ingredient_types,quantities,result,result_type))

With the following line:
Code:
@recipe_list.push(Game_Recipe.new(ingredients,ingredient_types,quantities,result,result_type,category))

For the main script you need to change this:
Add after line 88 this:
Code:
attr_reader :category

Replace line 92 with this:
Code:
def initialize(ingredients, ingredient_types, quantities, result, result_type, category)

Add after line 97 this:
Code:
@category = category

Replace line 197 with this:
Code:
def initialize(category = 0)

After line 199 put this:
Code:
@category = category

Replace lines 217 to 219 with this:
Code:
for i in 0...$game_party.recipes.size
  if $game_party.recipes[i].category == @category or @category == 0 or @category == "all"
      @data.push($game_party.recipes[i])
    end
  end

Replace lines 395 to 398 with this:
Code:
def initialize(category = 0, craft_index=0, return_scene = "menu")
  @category = category
  @craft_index = craft_index
  @return_scene = return_scene
end

Replace line 403 with this:
Code:
@craft_window = Window_Craft.new(@category)

Replace line 511, 514 and 519 by this line:
Code:
$scene=Scene_Craft.new(@category, @craft_index)

Now if you want to call the crafting scene use this:
Code:
$scene = Scene_Craft.new(category)
It will stay the same for the commands.
NOTE: Using "0" or "all" as category will show all recipes.
NOTE2: You can use strings for categories
NOTE3: Will give an error if there is no recipe with the category learned, no fix yet

Enjoy it
}


Possibly Related Threads…
Thread Author Replies Views Last Post
  Caldaron's Time System Caldaron 0 3,119 11-05-2006, 01:00 PM
Last Post: Caldaron
  Lives System Constance 0 2,581 08-10-2006, 01:00 PM
Last Post: Constance
  Level Up system Jimmie 0 2,647 07-24-2006, 01:00 PM
Last Post: Jimmie
  Equipment Scrolling System Legacy 0 2,494 05-12-2006, 01:00 PM
Last Post: Legacy
  Inn & Savepoint System SephirothSpawn 0 2,496 03-08-2006, 01:00 PM
Last Post: SephirothSpawn
  New Battle System V1.5 (Added Side View) Guedez 0 2,815 01-12-2006, 01:00 PM
Last Post: Guedez
  Slipknot Advance Message System Sheol 0 2,676 01-02-2006, 01:00 PM
Last Post: Sheol
  Guedez's Atrubutes Select System V2.1 Guedez 0 2,825 12-09-2005, 01:00 PM
Last Post: Guedez
  My own Message System Sheol 0 2,623 11-22-2005, 01:00 PM
Last Post: Sheol
  ToP food system Jimmie 0 2,433 10-04-2005, 01:00 PM
Last Post: Jimmie



Users browsing this thread: 1 Guest(s)