I don't know what it's asking me to fix!

angelique

Veteran
Veteran
Joined
Feb 11, 2014
Messages
74
Reaction score
0
First Language
English
Primarily Uses
I think you're misunderstanding the fix I gave you. You need to change each :category entry in RECIPES to :Baking.
Oh ok.

I went to recipes and changed it and it still said error on line 254 no implicit...
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,674
First Language
German
Primarily Uses
RMMV
Did you change any other category than alchemy?


It would be helpful if you can list all changes you made to the original script, and LINK us to it as well (not posting it here).


Sometimes the errors were fixed in the original topic, that's why it usually helps to know where the script originally was from.
 

angelique

Veteran
Veteran
Joined
Feb 11, 2014
Messages
74
Reaction score
0
First Language
English
Primarily Uses
Yes I used find to get all the lines that had alchemy and changed it to Baking 

#Advanced Recipe Crafting v1.0c.1#----------#

#Features: Advanced Recipe crafting! Hold on tight!

#

#Usage:    Set up your recipes, learn recipes, make items! Yay!

#       $crafting_category = :craft         - call before Scene, craft is category

#       SceneManager.call(Scene_Crafting)   - opens the Crafting menu

#       SceneManager.call(Scene_CraftingAll)- opens the category Crafting menu

#       learn_recipe(id)                    - teaches that recipe

#       forget_recipe(id)                   - forgets that recipe

#

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

#-- Script by: V.M of D.T

#

#- Questions or comments can be:

#    given by email: sumptuaryspade@live.ca

#    provided on facebook: http://www.facebook.com/DaimoniousTailsGames

#   All my other scripts and projects can be found here: http://daimonioustails.weebly.com/

#

#- Free to use in any project with credit given, donations always welcome!

 

module ADV_RECIPE

#Whether or not crafted items use Weapon/Armor Randomization

  USE_WA_RANDOMIZATION = false

#The names of the categories for All Crafting Menu, use :All for all recipes

  CATEGORIES = [:Baking,:Blacksmith,:Tailor,:Armorer,:Carpenter,:Builder,:Etceterer]

#The icons for categories, same order as above

  CATEGORY_ICONS = [9128,199,284,332,0,0,0]

#The icon for player level

  LEVEL_ICON = 8683

#Xp needed for crafting level, lvl is used for current level

  XP_NEEDED_EQUATION = "100 * lvl"

#Allow the crafting of multiple items

  CRAFT_MULTIPLE = true

#Allow or disallow menu access to the crafting scene

  ENABLE_MENU_ACCESS = true

#Font Size of Detail window, smaller font size creates more room for materials

  DETAIL_FONT_SIZE = 18

 

 

#The following options disable the display of certain features. They still work

# however if declared in recipes, so edit recipes accordingly.

#Removes Gold Cost

  DISABLE_GOLD_COST = false

#Removes success rate

  DISABLE_SUCCESS = false

#Removes player level requirement

  DISABLE_PLAYER_LEVEL = false

#Removes crafting level requirement and gauge

  DISABLE_CRAFT_LEVEL = false

#Auto-learn all skills (can use forget_recipe to forget certain ones for later)

  AUTO_LEARN_RECIPES = true

 

 

#The fun (read: complicated) part!

#Recipe symbols:

#

#The crafted item, type is 0 for item, 1 for weapon, 2 for armor

# :result => [type,id,amount]

#

#The materials required, same style as result.

# :materials => [ [type,id,amount,consumed?],[type,id,amount] ... ],

#

#  All the following are optional:

# :gold_cost => amount          - amount of gold to craft, can be 0

# :success => percent           - base percent chance of successful craft

# :success_gain => percent      - percent gain on success per crafting level

# :level => value               - Hero level required to craft

# :craft_level => value         - Crafting level required to craft

# :category => :category        - Crafting category :)Baking, :Tailor, etc)

# :multiple => false            - disallows multiple crafts

# :xp => amount                 - base Crafting xp gained per craft

# :xp_deprac => amount          - Xp lost per crafting level

# :pxp => amount                - Player xp gainer per craft

 

# Formula for xp gained is as follows and is never negative:

#  xp gain = xp - (current_level - recipe_level) * xp_deprac

 

  RECIPES = {

  0 => { :result => [0,1,1],

         :materials => [[0,4,2]],

         :gold_cost => 10,

         :success => 95,

         :success_gain => 1,

         :level => 5,

         :craft_level => 1,

         :category => :Baking,

         :xp => 50,

         :xp_deprac => 15,},

         

  1 => { :result => [0,2,1],

         :materials => [[0,4,1],[0,5,2,false]],

         :gold_cost => 50,

         :success => 90,

         :success_gain => 2,

         :level => 15,

         :craft_level => 1,

         :category => :Baking,

         :xp => 150,

         :xp_deprac => 20,},

         

  2 => { :result => [0,3,1],

         :materials => [[0,4,1],[0,5,1],[0,6,2],[0,7,1],[0,8,1],[0,9,2]],

         :gold_cost => 150,

         :success => 85,

         :success_gain => 3,

         :level => 25,

         :craft_level => 1,

         :category => :Baking,

         :xp => 250,

         :xp_deprac => 25,},

         

  }

 

end

 

$crafting_category = :All

class Recipe

  attr_accessor :result

  attr_accessor :materials

  attr_accessor :known

  attr_accessor :id

  attr_accessor :gold_cost

  attr_accessor :level

  attr_accessor :category

  attr_accessor :xp

  def initialize(id,recipe_hash)

    @id = id

    @result = Material.new(recipe_hash[:result])

    @materials = []

    for item in recipe_hash[:materials]

      @materials.push(Material.new(item))

    end

    @known = false

    recipe_hash[:gold_cost] ? @gold_cost = recipe_hash[:gold_cost] : @gold_cost = 0

    recipe_hash[:success] ? @rate = recipe_hash[:success] : @rate = 100

    recipe_hash[:success_gain] ? @rated = recipe_hash[:success_gain] : @rated = 0

    recipe_hash[:level] ? @level = recipe_hash[:level] : @level = 1

    recipe_hash[:category] ? @category = recipe_hash[:category] : @category = CATEGORIES[0]

    recipe_hash[:xp] ? @xp = recipe_hash[:xp] : @xp = 0

    recipe_hash[:xp_deprac] ? @xpd = recipe_hash[:xp_deprac] : @xpd = 0

    recipe_hash[:craft_level] ? @clevel = recipe_hash[:craft_level] : @clevel = 0

    recipe_hash[:pxp] ? @pxp = recipe_hash[:pxp] : @pxp = 0

    !recipe_hash[:multiple].nil? ? @mult = recipe_hash[:multiple] : @mult = true

    @known = ADV_RECIPE::AUTO_LEARN_RECIPES

  end

  def name

    return @result.item.name

  end

  def multiple?

    @mult

  end

  def has_materials?

    for item in @materials

      return false unless $game_party.item_number(item.item) >= item.amount

    end

    return true

  end

  def has_gold?

    $game_party.gold >= @gold_cost

  end

  def has_craft_level?

    craft_level <= $game_party.craft_level_sym(@category)

  end

  def has_level?

    @level <= $game_party.highest_level && has_craft_level?

  end

  def craftable?

    has_gold? && has_materials? && has_level?

  end

  def craft_level

    @clevel

  end

  def amount_craftable?

    mat_amount = []

    for item in @materials

      mat_amount.push($game_party.item_number(item.item) / item.amount)

    end

    if @gold_cost > 0

      return [$game_party.gold / @gold_cost,mat_amount.min].min

    else

      return mat_amount.min

    end

  end

  def craft(fail = 0)

    remove_materials

    if fail < success_rate

      return add_result

    else

      return nil

    end

  end

  def remove_materials

    for item in @materials

      next unless item.consumed?

      $game_party.gain_item(item.item,-item.amount)

    end

    $game_party.gain_gold(-@gold_cost)

  end

  def add_result

    if ADV_RECIPE::USE_WA_RANDOMIZATION

      item = $game_party.add_weapon(@result.item.id,@result.amount) if @result.item.is_a?(RPG::Weapon)

      item = $game_party.add_armor(@result.item.id,@result.amount) if @result.item.is_a?(RPG::Armor)

      item = $game_party.add_item(@result.item.id,@result.amount) if @result.item.is_a?(RPG::Item)

    else

      $game_party.gain_item(@result.item,@result.amount)

      item = @result.item

    end

    $game_party.gain_craft_exp(category_id, xp_gain)

    $game_party.members.each do |actor|

      actor.gain_exp(@pxp)

    end

    item

  end

  def category_id

    ADV_RECIPE::CATEGORIES.index(@category)

  end

  def xp_gain

    level_diff = $game_party.craft_level(category_id) - @clevel

    [@xp - @xpd * level_diff,0].max

  end

  def success_rate

    level_diff = $game_party.craft_level(category_id) - @clevel

    [@rate + @rated * level_diff,100].min

  end

end

 

class Material

  attr_accessor :item

  attr_accessor :amount

  def initialize(mat)

    @item = $data_items[mat[1]] if mat[0] == 0

    @item = $data_weapons[mat[1]] if mat[0] == 1

    @item = $data_armors[mat[1]] if mat[0] == 2

    @amount = mat[2]

    @consumed = mat[3].nil? ? true : mat[3]

  end

  def consumed?

    @consumed

  end

end

 

class Game_Party

  alias recipe_init initialize

  def initialize

    recipe_init

    @crafting_level = [1]*ADV_RECIPE::CATEGORIES.size

    @craft_exp = [0]*ADV_RECIPE::CATEGORIES.size

  end

  def craft_level(id)

    @crafting_level[id]

  end

  def craft_level_sym(sym)

    @crafting_level[ADV_RECIPE::CATEGORIES.index(sym)]

  end

  def craft_exp(id)

    @craft_exp[id]

  end

  def craft_exp_next(id)

    lvl = craft_level(id)

    return eval(ADV_RECIPE::XP_NEEDED_EQUATION)

  end

  def gain_craft_exp(id, val)

    @craft_exp[id] += val

    while craft_exp(id) >= craft_exp_next(id)

      @craft_exp[id] -= craft_exp_next(id)

      @crafting_level[id] += 1

    end

  end

end

 

module DataManager

  class << self

    alias rec_cgo create_game_objects

    alias rec_msc make_save_contents

    alias rec_esc extract_save_contents

  end

  def self.create_game_objects

    rec_cgo

    $game_recipes = create_recipes

  end

  def self.make_save_contents

    contents = rec_msc

    contents[:recipe] = $game_recipes

    contents

  end

  def self.extract_save_contents(contents)

    rec_esc(contents)

    $game_recipes = contents[:recipe]

  end

  def self.create_recipes

    recipes = {}

    ADV_RECIPE::RECIPES.each_pair do |key, val|

      recipes[key] = Recipe.new(key,val)

    end

    recipes

  end

end

 

class Game_Interpreter

  def learn_recipe(id)

    return if $game_recipes[id].nil?

    $game_recipes[id].known = true

  end

  def forget_recipe(id)

    return if $game_recipes[id].nil?

    $game_recipes[id].known = false

  end

end

 

class Window_RecipeList < Window_Selectable

  def initialize(x,y,w,h)

    super

    @data = $game_recipes.values.select {|recipe| include?(recipe)}

    refresh

  end

  def item_max

    @data ? @data.size : 1

  end

  def item

    @data && index >= 0 ? @data[index] : nil

  end

  def current_item_enabled?

    enable?(@data[index])

  end

  def include?(item)

    return false unless item.has_craft_level?

    return false unless item.known

    return true if @category == :All

    return @category == item.category

  end

  def set_category(cat)

    return if cat == @category

    @category = cat

    @data = $game_recipes.values.select {|recipe| include?(recipe)}

    refresh

  end

  def enable?(item)

    return false if item.nil?

    item.craftable?

  end

  def draw_item(index)

    item = @data[index]

    if item

      rect = item_rect(index)

      rect.width -= 4

      draw_item_name(item.result.item, rect.x, rect.y, enable?(item))

      if item.amount_craftable? > 0

        draw_text(rect.x,rect.y,contents.width,24,"x"+item.amount_craftable?.to_s,2)

      end

    end

  end

  def current_item

    index >= 0 ? @data[index] : nil

  end

  def process_ok

    if current_item_enabled?

      Sound.play_ok

      Input.update

      call_ok_handler

    else

      Sound.play_buzzer

    end

  end

  def refresh

    create_contents

    super

  end

  def content_heights

    item_max * 24

  end

end

 

class Window_RecipeDetail < Window_Base

  def initialize(x,y,w,h)

    super

    @recipe = nil

  end

  def set_recipe(recipe)

    @recipe = recipe

    refresh

  end

  def refresh

    contents.clear

    contents.font.size = ADV_RECIPE::DETAIL_FONT_SIZE

    return if @recipe.nil?

    draw_craft_level unless ADV_RECIPE::DISABLE_PLAYER_LEVEL && ADV_RECIPE::DISABLE_CRAFT_LEVEL

    draw_materials

    draw_success_rate unless ADV_RECIPE::DISABLE_SUCCESS

    draw_gold_cost unless ADV_RECIPE::DISABLE_GOLD_COST

  end

  def draw_craft_level

    change_color(system_color, @recipe.has_level?)

    draw_text(0,0,contents.width,contents.font.size,"Craft Level:")

    change_color(normal_color, @recipe.has_level?)

    xx = 0

    if !ADV_RECIPE::DISABLE_PLAYER_LEVEL

      draw_text(0,0,contents.width,contents.font.size,@recipe.level,2)

      draw_icon(ADV_RECIPE::LEVEL_ICON,contents.width - 48,0)

      xx += 48

      text = @recipe.craft_level.to_s + "/"

    else

      text = @recipe.craft_level.to_s

    end

    if !ADV_RECIPE::DISABLE_CRAFT_LEVEL

      draw_text(0,0,contents.width - xx,contents.font.size,text,2)

      draw_icon(ADV_RECIPE::CATEGORY_ICONS[ADV_RECIPE::CATEGORIES.index(@recipe.category)],contents.width - 56 - xx,0)

    end

  end

  def draw_materials

    if ADV_RECIPE::DISABLE_CRAFT_LEVEL && ADV_RECIPE::DISABLE_PLAYER_LEVEL

      yy = 0

    else

      yy = contents.font.size

    end

    change_color(system_color, @recipe.craftable?)

    draw_text(0,yy,self.width,contents.font.size,"Required:")

    yy += contents.font.size

    for item in @recipe.materials

      change_color(normal_color, $game_party.item_number(item.item) >= item.amount)

      draw_icon(item.item.icon_index,0,yy)

      draw_text(24,yy,self.width,contents.font.size,item.item.name)

      string = $game_party.item_number(item.item).to_s + "/" + item.amount.to_s

      draw_text(0,yy,self.contents.width,contents.font.size,string,2)

      yy += contents.font.size

    end

  end

  def draw_success_rate

    change_color(system_color, @recipe.craftable?)

    draw_text(0,contents.height-contents.font.size,contents.width,contents.font.size,"Success Rate:")

    change_color(normal_color, @recipe.craftable?)

    draw_text(0,contents.height-contents.font.size,contents.width,contents.font.size,@recipe.success_rate.to_s + "%",2)

  end

  def draw_gold_cost

    if @recipe.gold_cost > 0

      change_color(system_color, @recipe.has_gold?)

      draw_text(0,contents.height-contents.font.size*2,contents.width,contents.font.size,"Crafting Cost:")

      change_color(normal_color, @recipe.has_gold?)

      draw_currency_value(@recipe.gold_cost,Vocab::currency_unit,0,contents.height-contents.font.size*2,contents.width)

    end  

  end

  def draw_currency_value(value, unit, x, y, width)

    cx = text_size(unit).width

    change_color(normal_color,$game_party.gold >= value)

    draw_text(x, y, width - cx - 2, contents.font.size, value, 2)

    change_color(system_color)

    draw_text(x, y, width, contents.font.size, unit, 2)

  end

end

 

class Window_RecipeConfirm < Window_Selectable

  attr_accessor :amount

  def initialize(x,y,w,h)

    super

    @amount = 1

    refresh

  end

  def item_max; 1; end;

  def enable?(item); true; end;

  def refresh

    super

    draw_text(0,0,self.contents.width,line_height,"Craft",1)

    return unless @recipe && @recipe.craftable?

    draw_text(0,0,contents.width,line_height,"x"+@amount.to_s,2)

  end

  def activate

    super

    select(0)

  end

  def deactivate

    super

    select(-1)

  end

  def set_recipe(rec)

    return if rec == @recipe

    @recipe = rec

    @amount = 1

    refresh

  end

  def cursor_movable?

    active && open? && ADV_RECIPE::CRAFT_MULTIPLE && @recipe.multiple?

  end

  def cursor_down(wrap = false)

    change_amount(-10)

  end

  def cursor_up(wrap = false)

    change_amount(10)

  end

  def cursor_right(wrap = false)

    change_amount(1)

  end

  def cursor_left(wrap = false)

    change_amount(-1)

  end

  def change_amount(val)

    Sound.play_cursor

    @amount += val

    @amount = [[@amount,1].max,@recipe.amount_craftable?].min

    refresh

  end

end

 

class Scene_CraftingAll < Scene_Base

  def start

    super

    @help_window = Window_Help.new

    width = Graphics.width / 2

    height = Graphics.height - @help_window.height - 48

    @list_window = Window_RecipeList.new(0,@help_window.height+48,width,height-48)

    @list_window.set_handler:)ok, method:)list_success))

    @list_window.set_handler:)cancel, method:)cancel))

    @list_window.height += 48 if ADV_RECIPE::DISABLE_CRAFT_LEVEL

    @list_window.create_contents

    @detail_window = Window_RecipeDetail.new(width,@list_window.y,width,height-48*2)

    @detail_window.height += 48 if ADV_RECIPE::DISABLE_GOLD_COST

    @detail_window.create_contents

    height = @detail_window.y + @detail_window.height

    @confirm_window = Window_RecipeConfirm.new(width,height,width,48)

    @confirm_window.set_handler:)ok, method:)craft_success))

    @confirm_window.set_handler:)cancel, method:)confirm_cancel))

    if !ADV_RECIPE::DISABLE_GOLD_COST

      @gold_window = Window_Gold.new

      @gold_window.width = width

      @gold_window.y = Graphics.height - 48

      @gold_window.x = width

    end

    @popup_window = Window_RecPopup.new

    @popup_window.set_handler:)ok, method:)popup_ok))

    @popup_window.set_handler:)cancel, method:)popup_ok))

    @command_window = Window_RecCategory.new

    @command_window.set_handler:)ok, method:)command_ok))

    @command_window.set_handler:)cancel, method:)command_cancel))

    @gauge_window = Window_RecGauge.new unless ADV_RECIPE::DISABLE_CRAFT_LEVEL

  end

  def popup_ok

    @popup_window.deactivate

    @popup_window.close

    @list_window.activate

  end

  def update

    super

    @help_window.set_text(@list_window.current_item.result.item.description) if !@list_window.current_item.nil?

    @detail_window.set_recipe(@list_window.current_item)

    @confirm_window.set_recipe(@list_window.current_item)

    @list_window.set_category(ADV_RECIPE::CATEGORIES[@command_window.index])

    @gauge_window.set_category(ADV_RECIPE::CATEGORIES[@command_window.index]) unless ADV_RECIPE::DISABLE_CRAFT_LEVEL

    return unless @list_window.current_item

    if @list_window.current_item.craftable?

      @confirm_window.opacity = 255

      @confirm_window.contents_opacity = 255

    else

      @confirm_window.opacity = 75

      @confirm_window.contents_opacity = 75

    end

  end

  def list_success

    @list_window.deactivate

    @confirm_window.activate

  end

  def craft_success

    amount = 0

    item = nil

    @confirm_window.amount.times do

      item2 = @list_window.current_item.craft(rand(100))

      if item2

        amount += 1

        item = item2

      end

    end

    if item

      @popup_window.set_text(item, amount)

    else

      @popup_window.set_text_fail

    end

    @confirm_window.change_amount(-1000)

    @gold_window.refresh unless ADV_RECIPE::DISABLE_GOLD_COST

    @list_window.refresh

    @gauge_window.refresh unless ADV_RECIPE::DISABLE_CRAFT_LEVEL

    @popup_window.activate

  end

  def confirm_cancel

    @confirm_window.deactivate

    @list_window.activate

  end

  def command_cancel

    SceneManager.return

  end

  def cancel

    @list_window.select(-1)

    @command_window.activate

  end

  def command_ok

    @list_window.select(0)

    @list_window.activate

  end

end

 

class Scene_Crafting < Scene_CraftingAll

  def start

    super

    @command_window.index = ADV_RECIPE::CATEGORIES.index($crafting_category)

    @command_window.deactivate

    @command_window.visible = false

    @list_window.height += 48

    @list_window.y -= 48

    @detail_window.height += 48

    @detail_window.y -= 48

    @list_window.create_contents

    @detail_window.create_contents

    @list_window.select(0)

    @list_window.activate

  end

  def cancel

    SceneManager.return

  end

end

 

class Window_RecCategory < Window_HorzCommand

  def initialize

    super(0,72)

  end

  def window_width; Graphics.width; end

  def window_height; 48; end

  def make_command_list

    ADV_RECIPE::CATEGORIES.each do |command|

      add_command(command.to_s,command)

    end

  end

  def item_width

    120

  end

  def draw_item(index)

    change_color(normal_color, command_enabled?(index))

    rect = item_rect_for_text(index)

    draw_text(rect, command_name(index))

    draw_icon(ADV_RECIPE::CATEGORY_ICONS[index],rect.x-24,rect.y)

  end

  def item_rect_for_text(index)

    rect = item_rect(index)

    rect.x += 28

    rect.width -= 28

    rect

  end

end

 

class Window_RecPopup < Window_Selectable

  def initialize

    super(Graphics.width/2-window_width/2,Graphics.height/2-window_height/2,120,48)

    self.openness = 0

    deactivate

  end

  def window_width; 120; end

  def window_height; 48; end

  def set_text(item, amount)

    contents.clear

    text = amount.to_s + "x " + item.name + " crafted!"

    width = contents.text_size(text).width

    self.width = width + padding*2

    self.x = Graphics.width/2-width/2

    create_contents

    draw_text(24,0,contents.width,line_height,text)

    draw_icon(item.icon_index,0,0)

    open

  end

  def set_text_fail

    contents.clear

    text = "Crafting failed!"

    width = contents.text_size(text).width

    self.width = width + padding*2

    self.x = Graphics.width/2-width/2

    create_contents

    draw_text(12,0,contents.width,line_height,text)

    open

  end

  def process_ok

    if current_item_enabled?

      Input.update

      deactivate

      call_ok_handler

    else

      Sound.play_buzzer

    end

  end

end

 

class Window_RecGauge < Window_Base

  def initialize

    super(0,Graphics.height-48,Graphics.width/2,48)

    @category = :All

  end

  def refresh

    contents.clear

    return if @category == :All

    draw_icon(ADV_RECIPE::CATEGORY_ICONS[cat_index],0,0)

    draw_text(24,0,contents.width,24,$game_party.craft_level(cat_index))

    rate = $game_party.craft_exp(cat_index).to_f / $game_party.craft_exp_next(cat_index)

    draw_gauge(48, -3, contents.width-48, rate, tp_gauge_color1, tp_gauge_color2)

    if Module.const_defined?:)SPECIAL_GAUGES)

      @gauges[[48,-3]].set_extra("XP",$game_party.craft_exp(cat_index),$game_party.craft_exp_next(cat_index))

    else

      text = $game_party.craft_exp(cat_index).to_s+"/"+$game_party.craft_exp_next(cat_index).to_s

      draw_text(0,0,contents.width,24,text,2)

    end

  end

  def set_category(cat)

    return if cat == @category

    @category = cat

    refresh

  end

  def cat_index

    ADV_RECIPE::CATEGORIES.index(@category)

  end

end

 

class Window_MenuCommand < Window_Command

  alias recipe_aoc add_original_commands

  def add_original_commands

    recipe_aoc

    add_command("Crafting", :recipe) if ADV_RECIPE::ENABLE_MENU_ACCESS

  end

end

 

class Scene_Menu < Scene_MenuBase

  alias recipe_create_command_window create_command_window

  def create_command_window

    recipe_create_command_window

    @command_window.set_handler:)recipe,   method:)command_recipe))

  end

  def command_recipe

    SceneManager.call(Scene_CraftingAll)

  end

end
original: http://pastebin.com/HG1yFEj6
 
Last edited by a moderator:

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,959
First Language
English
Primarily Uses
RMMV
I think one of your other scripts might be interfering with it, because I just copy/pasted that into my sandbox project and it worked.
 

angelique

Veteran
Veteran
Joined
Feb 11, 2014
Messages
74
Reaction score
0
First Language
English
Primarily Uses
I think one of your other scripts might be interfering with it, because I just copy/pasted that into my sandbox project and it worked.
Did you edit the categories and I'm only using yanfly's more equip system and it shouldn't conflict since its changing different parts.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,959
First Language
English
Primarily Uses
RMMV
I literally just copy/pasted what you pasted above, which had :Baking in place of :Alchemy.



I think the quickest way to resolve this would be if you zip up your project and upload it somewhere so we can look at what your actual setup is. We don't seem to be getting anywhere with the usual troubleshooting methods.
 
Last edited by a moderator:

angelique

Veteran
Veteran
Joined
Feb 11, 2014
Messages
74
Reaction score
0
First Language
English
Primarily Uses
I literally just copy/pasted what you pasted above, which had :Baking in place of :Alchemy.
Ah. But if these two scripts are changing different parts then why is it having conflict?

Add this script to the sandbox:

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

# ▼ Yanfly Engine Ace - Ace Equip Engine v1.06

# -- Last Updated: 2014.05.01

# -- Level: Normal, Hard

# -- Requires: n/a



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

 

$imported = {} if $imported.nil?

$imported["YEA-AceEquipEngine"] = true

 

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

# ▼ Updates

# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

# 2014.05.01 - Bug Fixed: Refresh Equip Item List when change slot.

# 2012.02.02 - Bug Fixed: Crash when changing classes to different equip slots.

# 2012.01.22 - Bug Fixed: <equip slot> notetags updated to factor in spaces.

# 2012.01.05 - Compatibility Update: Equip Dynamic Stats

# 2011.12.30 - Bug Fixed: Stats didn't update.

# 2011.12.23 - Script efficiency optimized.

# 2011.12.18 - Script efficiency optimized.

# 2011.12.13 - Started Script and Finished.



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

# ▼ Introduction

# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

# The default equipment system in RPG Maker VX is the standard equipment system

# seen in all of the previous iterations, which consists of weapon, shield,

# headgear, bodygear, and accessory. To break free of that norm, this script

# allows users access to giving actors and/or classes dynamic equipment setups

# (including having multiples of the same categories). In addition to having

# different equip slot setups, newer equipment types can be made to allow for

# more diversity in armour types.



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

# ▼ Instructions

# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

# To install this script, open up your script editor and copy/paste this script

# to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.



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

# Actor Notetags - These notetags go in the actors notebox in the database.

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

# <equip slots>

#  string

#  string

# </equip slots>

# This sets the actor's default slots to whatever is listed in between the two

# notetags. An actor's custom equip slots will take priority over a class's

# custom equip slots, which will take priority over the default equip slots.

# Replace "string" with the proper equipment type name or when in doubt, use

# "equip type: x" with x as the equipment type.



# <starting gear: x>

# <starting gear: x, x>

# Adds armour x to the actor's list of starting gear. This is used primarily

# for the newer pieces of gear that can't be added through the starting set of

# equipment through the RPG Maker VX Ace editor by default. Insert multiple of

# these notetags to add more pieces of starting gear if so desired.



# <fixed equip: x>

# <fixed equip: x, x>

# This will fix the equip type x. Fixed equip slots mean that the equipment

# already on it are unable to be exchanged in or out by the player. This tag

# has been made so that equip types can be fixed for equip type 5 and above.

# Use multiple of these notetags to add more fixed equipment restrictions.



# <sealed equip: x>

# <sealed equip: x, x>

# This will seal the equip type x. Sealed equip slots mean that no equipment

# can be equipped onto that equip type slot. This tag has been made so that

# equip types can be sealed for equip type 5 and above. Use multiple of these

# notetags to add more sealed equipment restrictions.



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

# Class Notetags - These notetags go in the class notebox in the database.

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

# <equip slots>

#  string

#  string

# </equip slots>

# This sets the class's default slots to whatever is listed in between the two

# notetags. An actor's custom equip slots will take priority over a class's

# custom equip slots, which will take priority over the default equip slots.

# Replace "string" with the proper equipment type name or when in doubt, use

# "equip type: x" with x as the equipment type.



# <fixed equip: x>

# <fixed equip: x, x>

# This will fix the equip type x. Fixed equip slots mean that the equipment

# already on it are unable to be exchanged in or out by the player. This tag

# has been made so that equip types can be fixed for equip type 5 and above.

# Use multiple of these notetags to add more fixed equipment restrictions.



# <sealed equip: x>

# <sealed equip: x, x>

# This will seal the equip type x. Sealed equip slots mean that no equipment

# can be equipped onto that equip type slot. This tag has been made so that

# equip types can be sealed for equip type 5 and above. Use multiple of these

# notetags to add more sealed equipment restrictions.



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

# Weapon Notetags - These notetags go in the weapons notebox in the database.

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

# <fixed equip: x>

# <fixed equip: x, x>

# This will fix the equip type x. Fixed equip slots mean that the equipment

# already on it are unable to be exchanged in or out by the player. This tag

# has been made so that equip types can be fixed for equip type 5 and above.

# Use multiple of these notetags to add more fixed equipment restrictions.



# <sealed equip: x>

# <sealed equip: x, x>

# This will seal the equip type x. Sealed equip slots mean that no equipment

# can be equipped onto that equip type slot. This tag has been made so that

# equip types can be sealed for equip type 5 and above. Use multiple of these

# notetags to add more sealed equipment restrictions.



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

# Armour Notetags - These notetags go in the armour notebox in the database.

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

# <equip type: x>

# <equip type: string>

# For the newer equip types, replace x or string with the equip type ID or the

# name of the equip type respectively. This will set that armour to that

# particular equip type.



# <fixed equip: x>

# <fixed equip: x, x>

# This will fix the equip type x. Fixed equip slots mean that the equipment

# already on it are unable to be exchanged in or out by the player. This tag

# has been made so that equip types can be fixed for equip type 5 and above.

# Use multiple of these notetags to add more fixed equipment restrictions.



# <sealed equip: x>

# <sealed equip: x, x>

# This will seal the equip type x. Sealed equip slots mean that no equipment

# can be equipped onto that equip type slot. This tag has been made so that

# equip types can be sealed for equip type 5 and above. Use multiple of these

# notetags to add more sealed equipment restrictions.



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

# State Notetags - These notetags go in the states notebox in the database.

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

# <fixed equip: x>

# <fixed equip: x, x>

# This will fix the equip type x. Fixed equip slots mean that the equipment

# already on it are unable to be exchanged in or out by the player. This tag

# has been made so that equip types can be fixed for equip type 5 and above.

# Use multiple of these notetags to add more fixed equipment restrictions.



# <sealed equip: x>

# <sealed equip: x, x>

# This will seal the equip type x. Sealed equip slots mean that no equipment

# can be equipped onto that equip type slot. This tag has been made so that

# equip types can be sealed for equip type 5 and above. Use multiple of these

# notetags to add more sealed equipment restrictions.



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

# ▼ Compatibility

# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

# This script is made strictly for RPG Maker VX Ace. It is highly unlikely that

# it will run with RPG Maker VX without adjusting.



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

 

module YEA

  module EQUIP

    

    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

    # - General Equip Settings -

    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

    # This adjusts the default equip configuration. While actors can have their

    # own unique equipment configurations, it's recommended to not change too

    # much as things get really hairy when it comes to proper eventing.

    # 

    # ID   Equip Type

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

    #  0   Weapon

    #  1   Shield

    #  2   Headgear

    #  3   Bodygear

    #  4   Accessory

    # 

    # Whatever you set the below slots to, the dual wield setup will be exactly

    # identical except that the second slot will be changed to a weapon (0).

    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

    # Adjust this array to set the default slots used for all of your actors

    # and classes if they do not have a custom equipment slot setup.

    DEFAULT_BASE_SLOTS = [ 0, 1, 2, 3, 5, 6, 4, 4]

    

    # This hash adjusts the new equip types (past 4+). Adjust them to match

    # their names properly. You can choose to allow certain types of equipment

    # be removable or not, or whether or not optimize will affect them.

    TYPES ={

    # TypeID => ["Type Name", Removable?, Optimize?],

           0 => [   "Weapon",      false,      true],

           1 => [   "Shield",       true,      true],

           2 => [ "Headgear",       true,      true],

           3 => [ "Bodygear",       true,      true],

           4 => ["Accessory",       true,     false],

           5 => [    "Cloak",       true,      true],

           6 => [ "Necklace",       true,      true],

    } # Do not remove this.

    

    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

    # - Equip Command List -

    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

    # Here, you can adjust the order at which the commands appear (or even

    # remove commands as you see fit). Here's a list of which does what:

    # 

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

    # :command         Description

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

    # :equip           Activates the manual equip window. Default.

    # :optimize        Optimizes equipment for the actor. Default.

    # :clear           Clears all equipment from the actor. Default

    # 

    # And that's all of the currently available commands. This list will be

    # updated as more scripts become available.

    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

    # This array arranges the order of which the commands appear in the Equip

    # Command window in the Equip Scene.

    COMMAND_LIST =[

      :equip,

      :optimize,

      :clear,

    # :custom1,

    # :custom2,

    ] # Do not remove this.

    

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

    # - Equip Custom Commands -

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

    # For those who use scripts to that may produce unique effects for

    # equipping, use this hash to manage the custom commands for the Equip

    # Command Window. You can disable certain commands or prevent them from

    # appearing by using switches. If you don't wish to bind them to a switch,

    # set the proper switch to 0 for it to have no impact.

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

    CUSTOM_EQUIP_COMMANDS ={

    # :command => ["Display Name", EnableSwitch, ShowSwitch, Handler Method],

      :custom1 => [ "Custom Name",            0,          0, :command_name1],

      :custom2 => [ "Custom Text",           13,          0, :command_name2],

    } # Do not remove this.

    

    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

    # - Misc Window Settings -

    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

    # This section adjusts the minor visuals that you see inside of the newly

    # organized Equip Scene. Adjust the settings as you see fit.

    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

    # This sets the font size used for the status window in the lower right

    # corner of the screen (which shows stats and comparisons).

    STATUS_FONT_SIZE = 20

    

    # This sets the remove equip command in the item window.

    REMOVE_EQUIP_ICON = 185

    REMOVE_EQUIP_TEXT = "<Remove Equip>"

    

    # This sets the no-equipment text in the slot window.

    NOTHING_ICON = 185

    NOTHING_TEXT = "<Empty>"

    

  end # EQUIP

end # YEA

 

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

# ▼ Editting anything past this point may potentially result in causing

# computer damage, incontinence, explosion of user's head, coma, death, and/or

# halitosis so edit at your own risk.

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

 

module YEA

  module REGEXP

  module BASEITEM

    

    EQUIP_SLOTS_ON  = /<(?:EQUIP_SLOTS|equip slots)>/i

    EQUIP_SLOTS_OFF = /<\/(?:EQUIP_SLOTS|equip slots)>/i

    

    EQUIP_TYPE_INT = /<(?:EQUIP_TYPE|equip type):[ ]*(\d+)>/i

    EQUIP_TYPE_STR = /<(?:EQUIP_TYPE|equip type):[ ]*(.*)>/i

    

    STARTING_GEAR = /<(?:STARTING_GEAR|starting gear):[ ](\d+(?:\s*,\s*\d+)*)>/i

    

    FIXED_EQUIP = /<(?:FIXED_EQUIP|fixed equip):[ ](\d+(?:\s*,\s*\d+)*)>/i

    SEALED_EQUIP = /<(?:SEALED_EQUIP|sealed equip):[ ](\d+(?:\s*,\s*\d+)*)>/i

    

  end # BASEITEM

  end # REGEXP

end # YEA

 

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

# ■ Vocab

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

 

module Vocab

  

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

  # overwrite method: self.etype

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

  def self.etype(etype)

    return $data_system.terms.etypes[etype] if [0,1,2,3,4].include?(etype)

    return YEA::EQUIP::TYPES[etype][0] if YEA::EQUIP::TYPES.include?(etype)

    return ""

  end

  

end # Vocab

 

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

# ■ Icon

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

 

module Icon

  

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

  # self.remove_equip

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

  def self.remove_equip; return YEA::EQUIP::REMOVE_EQUIP_ICON; end

  

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

  # self.nothing_equip

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

  def self.nothing_equip; return YEA::EQUIP::NOTHING_ICON; end

    

end # Icon

 

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

# ■ Numeric

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

 

class Numeric

  

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

  # new method: group_digits

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

  unless $imported["YEA-CoreEngine"]

  def group; return self.to_s; end

  end # $imported["YEA-CoreEngine"]

    

end # Numeric

 

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

# ■ DataManager

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

 

module DataManager

  

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

  # alias method: load_database

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

  class <<self; alias load_database_aee load_database; end

  def self.load_database

    load_database_aee

    load_notetags_aee

  end

  

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

  # new method: load_notetags_aee

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

  def self.load_notetags_aee

    groups = [$data_actors, $data_classes, $data_weapons, $data_armors,

      $data_states]

    for group in groups

      for obj in group

        next if obj.nil?

        obj.load_notetags_aee

      end

    end

  end

  

end # DataManager

 

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

# ■ RPG::BaseItem

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

 

class RPG::BaseItem

  

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

  # public instance variables

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

  attr_accessor :base_equip_slots

  attr_accessor :fixed_equip_type

  attr_accessor :sealed_equip_type

  attr_accessor :extra_starting_equips

  

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

  # common cache: load_notetags_aee

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

  def load_notetags_aee

    @base_equip_slots = []

    @equip_slots_on = false

    @fixed_equip_type = []

    @sealed_equip_type = []

    @extra_starting_equips = []

    #---

    self.note.split(/[\r\n]+/).each { |line|

      case line

      #---

      when YEA::REGEXP::BASEITEM::EQUIP_SLOTS_ON

        next unless self.is_a?(RPG::Actor) ||self.is_a?(RPG::Class)

        @equip_slots_on = true

      when YEA::REGEXP::BASEITEM::EQUIP_SLOTS_OFF

        next unless self.is_a?(RPG::Actor) ||self.is_a?(RPG::Class)

        @equip_slots_on = false

      #---

      when YEA::REGEXP::BASEITEM::STARTING_GEAR

        next unless self.is_a?(RPG::Actor)

        $1.scan(/\d+/).each { |num| 

        @extra_starting_equips.push(num.to_i) if num.to_i > 0 }

      when YEA::REGEXP::BASEITEM::FIXED_EQUIP

        $1.scan(/\d+/).each { |num| 

        @fixed_equip_type.push(num.to_i) if num.to_i > 0 }

      when YEA::REGEXP::BASEITEM::SEALED_EQUIP

        $1.scan(/\d+/).each { |num| 

        @sealed_equip_type.push(num.to_i) if num.to_i > 0 }

      #---

      when YEA::REGEXP::BASEITEM::EQUIP_TYPE_INT

        next unless self.is_a?(RPG::Armor)

        @etype_id = [1, $1.to_i].max

      when YEA::REGEXP::BASEITEM::EQUIP_TYPE_STR

        next unless self.is_a?(RPG::Armor)

        for key in YEA::EQUIP::TYPES

          id = key[0]

          next if YEA::EQUIP::TYPES[id][0].upcase != $1.to_s.upcase

          @etype_id = [1, id].max

          break

        end

      #---

      else

        if @equip_slots_on

          case line.upcase

          when /EQUIP TYPE[ ](\d+)/i, /EQUIP TYPE:[ ](\d+)/i

            id = $1.to_i

            @base_equip_slots.push(id) if [0,1,2,3,4].include?(id)

            @base_equip_slots.push(id) if YEA::EQUIP::TYPES.include?(id)

          when /WEAPON/i

            @base_equip_slots.push(0)

          when /SHIELD/i

            @base_equip_slots.push(1)

          when /HEAD/i

            @base_equip_slots.push(2)

          when /BODY/i, /ARMOR/i, /ARMOUR/i

            @base_equip_slots.push(3)

          when /ETC/i, /OTHER/i, /ACCESSOR/i

            @base_equip_slots.push(4)

          else

            text = line.upcase.delete(" ")

            for key in YEA::EQUIP::TYPES

              id = key[0]

              next if YEA::EQUIP::TYPES[id][0].upcase.delete(" ")!= text

              @base_equip_slots.push(id)

              break

            end

          end

        end

      end

    } # self.note.split

    #---

    return unless self.is_a?(RPG::Class)

    if @base_equip_slots.empty?

      @base_equip_slots = YEA::EQUIP::DEFAULT_BASE_SLOTS.clone

    end

  end

  

end # RPG::BaseItem

 

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

# ■ Game_Temp

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

 

class Game_Temp

  

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

  # public instance variables

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

  attr_accessor :eds_actor

  attr_accessor :scene_equip_index

  attr_accessor :scene_equip_oy

  

end # Game_Temp

 

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

# ■ Game_BaseItem

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

 

class Game_BaseItem

  

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

  # public instance variables

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

  attr_accessor :item_id

  

end # Game_BaseItem

 

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

# ■ Game_BattlerBase

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

 

class Game_BattlerBase

  

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

  # alias method: equip_type_fixed?

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

  alias game_battlerbase_equip_type_fixed_aee equip_type_fixed?

  def equip_type_fixed?(etype_id)

    return true if fixed_etypes.include?(etype_id) if actor?

    return game_battlerbase_equip_type_fixed_aee(etype_id)

  end

  

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

  # alias method: equip_type_sealed?

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

  alias game_battlerbase_equip_type_sealed_aee equip_type_sealed?

  def equip_type_sealed?(etype_id)

    return true if sealed_etypes.include?(etype_id) if actor?

    return game_battlerbase_equip_type_sealed_aee(etype_id)

  end

  

end # Game_BattlerBase

 

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

# ■ Game_Actor

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

 

class Game_Actor < Game_Battler

  

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

  # alias method: init_equips

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

  alias game_actor_init_equips_aee init_equips

  def init_equips(equips)

    game_actor_init_equips_aee(equips)

    equip_extra_starting_equips

  end

  

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

  # new method: equip_extra_starting_equips

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

  def equip_extra_starting_equips

    for equip_id in actor.extra_starting_equips

      armour = $data_armors[equip_id]

      next if armour.nil?

      etype_id = armour.etype_id

      next unless equip_slots.include?(etype_id)

      slot_id = empty_slot(etype_id)

      @equips[slot_id].set_equip(etype_id == 0, armour.id)

    end

    refresh

  end

  

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

  # overwrite method: equip_slots

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

  def equip_slots

    return equip_slots_dual if dual_wield?

    return equip_slots_normal

  end

  

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

  # new method: equip_slots_normal

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

  def equip_slots_normal

    return self.actor.base_equip_slots if self.actor.base_equip_slots != []

    return self.class.base_equip_slots

  end

  

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

  # new method: equip_slots_dual

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

  def equip_slots_dual

    array = equip_slots_normal.clone

    array[1] = 0 if array.size >= 2

    return array

  end

  

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

  # new method: fixed_etypes

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

  def fixed_etypes

    array = []

    array |= self.actor.fixed_equip_type

    array |= self.class.fixed_equip_type

    for equip in equips

      next if equip.nil?

      array |= equip.fixed_equip_type

    end

    for state in states

      next if state.nil?

      array |= state.fixed_equip_type

    end

    return array

  end

  

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

  # new method: sealed_etypes

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

  def sealed_etypes

    array = []

    array |= self.actor.sealed_equip_type

    array |= self.class.sealed_equip_type

    for equip in equips

      next if equip.nil?

      array |= equip.sealed_equip_type

    end

    for state in states

      next if state.nil?

      array |= state.sealed_equip_type

    end

    return array

  end

  

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

  # alias method: change_equip

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

  alias game_actor_change_equip_aee change_equip

  def change_equip(slot_id, item)

    if item.nil? && !@optimize_clear

      etype_id = equip_slots[slot_id]

      return unless YEA::EQUIP::TYPES[etype_id][1]

    elsif item.nil? && @optimize_clear

      etype_id = equip_slots[slot_id]

      return unless YEA::EQUIP::TYPES[etype_id][2]

    end

    @equips[slot_id] = Game_BaseItem.new if @equips[slot_id].nil?

    game_actor_change_equip_aee(slot_id, item)

  end

  

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

  # overwrite method: optimize_equipments

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

  def optimize_equipments

    $game_temp.eds_actor = self

    @optimize_clear = true

    clear_equipments

    @optimize_clear = false

    equip_slots.size.times do |i|

      next if !equip_change_ok?(i)

      next unless can_optimize?(i)

      items = $game_party.equip_items.select do |item|

        item.etype_id == equip_slots &&

        equippable?(item) && item.performance >= 0

      end

      change_equip(i, items.max_by {|item| item.performance })

    end

    $game_temp.eds_actor = nil

  end

  

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

  # new method: can_optimize?

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

  def can_optimize?(slot_id)

    etype_id = equip_slots[slot_id]

    return YEA::EQUIP::TYPES[etype_id][2]

  end

  

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

  # alias method: force_change_equip

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

  alias game_actor_force_change_equip_aee force_change_equip

  def force_change_equip(slot_id, item)

    @equips[slot_id] = Game_BaseItem.new if @equips[slot_id].nil?

    game_actor_force_change_equip_aee(slot_id, item)

  end

  

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

  # alias method: weapons

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

  alias game_actor_weapons_aee weapons

  def weapons

    anti_crash_equips

    return game_actor_weapons_aee

  end

  

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

  # alias method: armors

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

  alias game_actor_armors_aee armors

  def armors

    anti_crash_equips

    return game_actor_armors_aee

  end

  

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

  # alias method: equips

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

  alias game_actor_equips_aee equips

  def equips

    anti_crash_equips

    return game_actor_equips_aee

  end

  

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

  # new method: equips

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

  def anti_crash_equips

    for i in 0...@equips.size

      next unless @equips.nil?

      @equips = Game_BaseItem.new

    end

  end

  

end # Game_Actor

 

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

# ■ Game_Interpreter

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

 

class Game_Interpreter

  

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

  # overwrite method: change equip

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

  def command_319

    actor = $game_actors[@params[0]]

    return if actor.nil?

    if @params[1] == 0 && @params[2] != 0

      item = $data_weapons[@params[2]]

      return unless actor.equip_slots.include?(0)

      slot_id = actor.empty_slot(0)

    elsif @params[2] != 0

      item = $data_armors[@params[2]]

      return unless actor.equip_slots.include?(item.etype_id)

      slot_id = actor.empty_slot(item.etype_id)

    else

      slot_id = @params[1]

    end

    actor.change_equip_by_id(slot_id, @params[2])

  end

  

end # Game_Interpreter

 

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

# ■ Window_EquipStatus

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

 

class Window_EquipStatus < Window_Base

  

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

  # overwrite method: initialize

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

  def initialize(dx, dy)

    super(dx, dy, window_width, Graphics.height - dy)

    @actor = nil

    @temp_actor = nil

    refresh

  end

  

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

  # overwrite method: window_width

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

  def window_width; return Graphics.width * 2 / 5; end

  

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

  # overwrite method: refresh

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

  def refresh

    contents.clear

    8.times {|i| draw_item(0, line_height * i, i) }

  end

  

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

  # overwrite method: draw_item

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

  def draw_item(dx, dy, param_id)

    draw_background_colour(dx, dy)

    draw_param_name(dx + 4, dy, param_id)

    draw_current_param(dx + 4, dy, param_id) if @actor

    drx = (contents.width + 22) / 2

    draw_right_arrow(drx, dy)

    draw_new_param(drx + 22, dy, param_id) if @temp_actor

    reset_font_settings

  end

  

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

  # new method: draw_background_colour

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

  def draw_background_colour(dx, dy)

    colour = Color.new(0, 0, 0, translucent_alpha/2)

    rect = Rect.new(dx+1, dy+1, contents.width - 2, line_height - 2)

    contents.fill_rect(rect, colour)

  end

  

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

  # overwrite method: draw_param_name

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

  def draw_param_name(dx, dy, param_id)

    contents.font.size = YEA::EQUIP::STATUS_FONT_SIZE

    change_color(system_color)

    draw_text(dx, dy, contents.width, line_height, Vocab::param(param_id))

  end

  

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

  # overwrite method: draw_current_param

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

  def draw_current_param(dx, dy, param_id)

    change_color(normal_color)

    dw = (contents.width + 22) / 2

    draw_text(0, dy, dw, line_height, @actor.param(param_id).group, 2)

    reset_font_settings

  end

  

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

  # overwrite method: draw_new_param

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

  def draw_new_param(dx, dy, param_id)

    contents.font.size = YEA::EQUIP::STATUS_FONT_SIZE

    new_value = @temp_actor.param(param_id)

    change_color(param_change_color(new_value - @actor.param(param_id)))

    draw_text(0, dy, contents.width-4, line_height, new_value.group, 2)

    reset_font_settings

  end

  

end # Window_EquipStatus

 

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

# ■ Window_EquipCommand

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

 

class Window_EquipCommand < Window_HorzCommand

  

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

  # overwrite method: make_command_list

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

  def make_command_list

    for command in YEA::EQUIP::COMMAND_LIST

      case command

      when :equip

        add_command(Vocab::equip2, :equip)

      when :optimize

        add_command(Vocab::optimize, :optimize)

      when :clear

        add_command(Vocab::clear, :clear)

      else

        process_custom_command(command)

      end

    end

  end

  

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

  # process_ok

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

  def process_ok

    $game_temp.scene_equip_index = index

    $game_temp.scene_equip_oy = self.oy

    super

  end

  

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

  # new method: process_custom_command

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

  def process_custom_command(command)

    return unless YEA::EQUIP::CUSTOM_EQUIP_COMMANDS.include?(command)

    show = YEA::EQUIP::CUSTOM_EQUIP_COMMANDS[command][2]

    continue = show <= 0 ? true : $game_switches[show]

    return unless continue

    text = YEA::EQUIP::CUSTOM_EQUIP_COMMANDS[command][0]

    switch = YEA::EQUIP::CUSTOM_EQUIP_COMMANDS[command][1]

    enabled = switch <= 0 ? true : $game_switches[switch]

    add_command(text, command, enabled)

  end

  

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

  # overwrite method: window_width

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

  def window_width; return 160; end

  

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

  # overwrite method: contents_width

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

  def contents_width; return width - standard_padding * 2; end

  

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

  # overwrite method: contents_height

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

  def contents_height

    ch = height - standard_padding * 2

    return [ch - ch % item_height, row_max * item_height].max

  end

  

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

  # overwrite method: visible_line_number

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

  def visible_line_number; return 4; end

  

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

  # overwrite method: col_max

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

  def col_max; return 1; end

    

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

  # overwrite method: item_rect

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

  def item_rect(index)

    rect = Rect.new

    rect.width = item_width

    rect.height = item_height

    rect.x = index % col_max * (item_width + spacing)

    rect.y = index / col_max * item_height

    rect

  end

  

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

  # overwrite method: ensure_cursor_visible

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

  def ensure_cursor_visible

    self.top_row = row if row < top_row

    self.bottom_row = row if row > bottom_row

  end

    

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

  # overwrite method: cursor_down

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

  def cursor_down(wrap = false)

    if index < item_max - col_max || (wrap && col_max == 1)

      select((index + col_max) % item_max)

    end

  end

  

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

  # overwrite method: cursor_up

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

  def cursor_up(wrap = false)

    if index >= col_max || (wrap && col_max == 1)

      select((index - col_max + item_max) % item_max)

    end

  end

  

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

  # overwrite method: process_pageup

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

  def process_pageup

    Sound.play_cursor

    Input.update

    deactivate

    call_handler:)pageup)

  end

  

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

  # overwrite method: process_pagedown

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

  def process_pagedown

    Sound.play_cursor

    Input.update

    deactivate

    call_handler:)pagedown)

  end

  

end # Window_EquipCommand

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

# ■ Window_EquipSlot

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

class Window_EquipSlot < Window_Selectable

  

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

  # overwrite method: initialize

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

  def initialize(dx, dy, dw)

    super(dx, dy, dw, Graphics.height - dy)

    @actor = nil

    refresh

  end

  

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

  # overwrite method: window_height

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

  def window_height; return self.height; end

  

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

  # overwrite method: visible_line_number

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

  def visible_line_number; return item_max; end

  

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

  # overwrite method: refresh

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

  def refresh

    create_contents

    super

  end

  

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

  # overwrite method: draw_item

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

  def draw_item(index)

    return unless @actor

    rect = item_rect_for_text(index)

    change_color(system_color, enable?(index))

    draw_text(rect.x, rect.y, 92, line_height, slot_name(index))

    item = @actor.equips[index]

    dx = rect.x + 92

    dw = contents.width - dx - 24

    if item.nil?

      draw_nothing_equip(dx, rect.y, false, dw)

    else

      draw_item_name(item, dx, rect.y, enable?(index), dw)

    end

  end

  

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

  # new method: draw_nothing_equip

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

  def draw_nothing_equip(dx, dy, enabled, dw)

    change_color(normal_color, enabled)

    draw_icon(Icon.nothing_equip, dx, dy, enabled)

    text = YEA::EQUIP::NOTHING_TEXT

    draw_text(dx + 24, dy, dw - 24, line_height, text)

  end

  

end # Window_EquipSlot

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

# ■ Window_EquipItem

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

class Window_EquipItem < Window_ItemList

  

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

  # overwrite method: col_max

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

  def col_max; return 1; end

  

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

  # overwrite method: slot_id=

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

  def slot_id=(slot_id)

    return if @slot_id == slot_id

    @slot_id = slot_id

    @last_item = nil

    self.oy = 0

    refresh

  end

  

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

  # overwrite method: draw_item

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

  def draw_item(index)

    item = @data[index]

    rect = item_rect(index)

    rect.width -= 4

    if item.nil?

      draw_remove_equip(rect)

      return

    end

    dw = contents.width - rect.x - 24

    draw_item_name(item, rect.x, rect.y, enable?(item), dw)

    draw_item_number(rect, item)

  end

  

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

  # new method: draw_remove_equip

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

  def draw_remove_equip(rect)

    draw_icon(Icon.remove_equip, rect.x, rect.y)

    text = YEA::EQUIP::REMOVE_EQUIP_TEXT

    rect.x += 24

    rect.width -= 24

    draw_text(rect, text)

  end

  

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

  # overwrite method: include?

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

  def include?(item)

    if item.nil? && !@actor.nil?

      etype_id = @actor.equip_slots[@slot_id]

      return YEA::EQUIP::TYPES[etype_id][1]

    end

    return true if item.nil?

    return false unless item.is_a?(RPG::EquipItem)

    return false if @slot_id < 0

    return false if item.etype_id != @actor.equip_slots[@slot_id]

    return @actor.equippable?(item)

  end

  

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

  # overwrite method: enable?

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

  def enable?(item)

    if item.nil? && !@actor.nil?

      etype_id = @actor.equip_slots[@slot_id]

      return YEA::EQUIP::TYPES[etype_id][1]

    end

    return @actor.equippable?(item)

  end

  

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

  # new method: show

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

  def show

    @last_item = 0

    update_help

    super

  end

  

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

  # overwrite method: update_help

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

  def update_help

    super

    return if @actor.nil?

    return if @status_window.nil?

    return if @last_item == item

    @last_item = item

    temp_actor = Marshal.load(Marshal.dump(@actor))

    temp_actor.force_change_equip(@slot_id, item)

    @status_window.set_temp_actor(temp_actor)

  end

  

end # Window_EquipItem

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

# ■ Window_EquipActor

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

class Window_EquipActor < Window_Base

  

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

  # initialize

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

  def initialize(dx, dy)

    super(dx, dy, window_width, fitting_height(4))

    @actor = nil

  end

  

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

  # window_width

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

  def window_width; return Graphics.width - 160; end

  

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

  # actor=

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

  def actor=(actor)

    return if @actor == actor

    @actor = actor

    refresh

  end

  

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

  # refresh

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

  def refresh

    contents.clear

    return unless @actor

    draw_actor_face(@actor, 0, 0)

    draw_actor_simple_status(@actor, 108, line_height / 2)

  end

  

end # Window_EquipActor

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

# ■ Scene_Equip

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

class Scene_Equip < Scene_MenuBase

  

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

  # overwrite method: create_status_window

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

  def create_status_window

    wx = Graphics.width - (Graphics.width * 2 / 5)

    wy = @help_window.height + 120

    @status_window = Window_EquipStatus.new(wx, wy)

    @status_window.viewport = @viewport

    @status_window.actor = @actor

  end

  

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

  # overwrite method: create_command_window

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

  def create_command_window

    wx = 0

    wy = @help_window.height

    ww = 160

    @command_window = Window_EquipCommand.new(wx, wy, ww)

    @command_window.viewport = @viewport

    @command_window.help_window = @help_window

    if !$game_temp.scene_equip_index.nil?

      @command_window.select($game_temp.scene_equip_index)

      @command_window.oy = $game_temp.scene_equip_oy

    end

    $game_temp.scene_equip_index = nil

    $game_temp.scene_equip_oy = nil

    @command_window.set_handler:)equip,    method:)command_equip))

    @command_window.set_handler:)optimize, method:)command_optimize))

    @command_window.set_handler:)clear,    method:)command_clear))

    @command_window.set_handler:)cancel,   method:)return_scene))

    @command_window.set_handler:)pagedown, method:)next_actor))

    @command_window.set_handler:)pageup,   method:)prev_actor))

    process_custom_equip_commands

    create_actor_window

  end

  

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

  # new method: create_actor_window

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

  def create_actor_window

    wy = @help_window.height

    @actor_window = Window_EquipActor.new(@command_window.width, wy)

    @actor_window.viewport = @viewport

    @actor_window.actor = @actor

  end

  

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

  # new method: process_custom_equip_commands

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

  def process_custom_equip_commands

    for command in YEA::EQUIP::COMMAND_LIST

      next unless YEA::EQUIP::CUSTOM_EQUIP_COMMANDS.include?(command)

      called_method = YEA::EQUIP::CUSTOM_EQUIP_COMMANDS[command][3]

      @command_window.set_handler(command, method(called_method))

    end

  end

  

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

  # overwrite method: create_slot_window

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

  def create_slot_window

    wx = 0

    wy = @command_window.y + @command_window.height

    ww = Graphics.width - @status_window.width

    @slot_window = Window_EquipSlot.new(wx, wy, ww)

    @slot_window.viewport = @viewport

    @slot_window.help_window = @help_window

    @slot_window.status_window = @status_window

    @slot_window.actor = @actor

    @slot_window.set_handler:)ok,       method:)on_slot_ok))

    @slot_window.set_handler:)cancel,   method:)on_slot_cancel))

  end

  

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

  # overwrite method: create_item_window

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

  def create_item_window

    wx = @slot_window.x

    wy = @slot_window.y

    ww = @slot_window.width

    wh = @slot_window.height

    @item_window = Window_EquipItem.new(wx, wy, ww, wh)

    @item_window.viewport = @viewport

    @item_window.help_window = @help_window

    @item_window.status_window = @status_window

    @item_window.actor = @actor

    @item_window.set_handler:)ok,     method:)on_item_ok))

    @item_window.set_handler:)cancel, method:)on_item_cancel))

    @slot_window.item_window = @item_window

    @item_window.hide

  end

  

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

  # alias method: command_optimize

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

  alias scene_equip_command_optimize_aee command_optimize

  def command_optimize

    scene_equip_command_optimize_aee

    @actor_window.refresh

  end

  

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

  # alias method: command_clear

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

  alias scene_equip_command_clear_aee command_clear

  def command_clear

    scene_equip_command_clear_aee

    @actor_window.refresh

  end

  

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

  # alias method: on_slot_ok

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

  alias scene_equip_on_slot_ok_aee on_slot_ok

  def on_slot_ok

    scene_equip_on_slot_ok_aee

    @slot_window.hide

    @item_window.refresh

    @item_window.show

  end

  

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

  # alias method: on_item_ok

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

  alias scene_equip_on_item_ok_aee on_item_ok

  def on_item_ok

    scene_equip_on_item_ok_aee

    @actor_window.refresh

    @slot_window.show

    @item_window.hide

  end

  

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

  # alias method: on_item_cancel

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

  alias scene_equip_on_item_cancel_aee on_item_cancel

  def on_item_cancel

    scene_equip_on_item_cancel_aee

    @slot_window.show

    @item_window.hide

  end

  

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

  # alias method: on_actor_change

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

  alias scene_equip_on_actor_change_aee on_actor_change

  def on_actor_change

    scene_equip_on_actor_change_aee

    @actor_window.actor = @actor

  end

  

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

  # new method: command_name1

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

  def command_name1

    # Do nothing.

  end

  

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

  # new method: command_name2

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

  def command_name2

    # Do nothing.

  end

  

end # Scene_Equip

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



# ▼ End of File



#==============================================================================
link to download game: http://www.mediafire.com/download/q385l6cycag2tuf/Dream_Life.rar
 
Last edited by a moderator:

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,959
First Language
English
Primarily Uses
RMMV
Added that script and it still works for me.

Zip your project, upload it somewhere, and link it.
 

angelique

Veteran
Veteran
Joined
Feb 11, 2014
Messages
74
Reaction score
0
First Language
English
Primarily Uses
Added that script and it still works for me.

Zip your project, upload it somewhere, and link it.
Just did o3o

If both scripts are working for you fine then yanfly's script isn't the cause...then what is?
 
Last edited by a moderator:

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,959
First Language
English
Primarily Uses
RMMV
The "no implicit conversion from nil to integer" error happens because your saved game was presumably created before you edited the scripts, so it's still looking for :Alchemy, which you've removed. Don't use that save any more, it won't work.

The icon index error is happening because your recipes are set to use items which don't exist in the database yet.
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
Vlue's script requires you to start a new game when you add it. I can confirm that because it happened to me too. Also, it saves your alchemy database to your save game, so *every* time you change your recipies, you will need to start a new game to see the effects. Best to either put placeholders in for now, or prepare to restart your game a lot to see the recipe changes.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,959
First Language
English
Primarily Uses
RMMV
The fact that it saves your alchemy recipes is the reason you have to start a new game. :)
 

angelique

Veteran
Veteran
Joined
Feb 11, 2014
Messages
74
Reaction score
0
First Language
English
Primarily Uses
The "no implicit conversion from nil to integer" error happens because your saved game was presumably created before you edited the scripts, so it's still looking for :Alchemy, which you've removed. Don't use that save any more, it won't work.

The icon index error is happening because your recipes are set to use items which don't exist in the database yet.
Vlue's script requires you to start a new game when you add it. I can confirm that because it happened to me too. Also, it saves your alchemy database to your save game, so *every* time you change your recipies, you will need to start a new game to see the effects. Best to either put placeholders in for now, or prepare to restart your game a lot to see the recipe changes.
The fact that it saves your alchemy recipes is the reason you have to start a new game. :)
Ahhh I see thanks! 8D

Another error: ---------------------------

Dream Life

---------------------------

Script 'crafting' line 421: NoMethodError occurred.

 

undefined method `icon_index' for nil:NilClass

---------------------------

OK   

---------------------------

this was the error before and i don't know how to fix it ><
 
Last edited by a moderator:

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,959
First Language
English
Primarily Uses
RMMV
Not speaking against Vlue or anything but I don't think it's a good idea to save the actual recipe hashes to your saved game. All you really need to save is which recipes the player has unlocked; the details of the recipes themselves are always available from the hash itself.
 

angelique

Veteran
Veteran
Joined
Feb 11, 2014
Messages
74
Reaction score
0
First Language
English
Primarily Uses
Yeah but how do I fix the old-new problem now?
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,959
First Language
English
Primarily Uses
RMMV
I fixed the only two problems you had, are you having another one? If you're referring to not being able to use previous saves, that's just the price you have to pay. If you make a change to the recipes or categories, you will have to start a new game.
 

angelique

Veteran
Veteran
Joined
Feb 11, 2014
Messages
74
Reaction score
0
First Language
English
Primarily Uses
I didn't change anything this time. This problem was problem I had before the category problem.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,959
First Language
English
Primarily Uses
RMMV
The only other problem I can see is the icon index one, which was happening because your database doesn't have the items the recipes are looking for. Are you having another problem besides that?
 

angelique

Veteran
Veteran
Joined
Feb 11, 2014
Messages
74
Reaction score
0
First Language
English
Primarily Uses
The only other problem I can see is the icon index one, which was happening because your database doesn't have the items the recipes are looking for. Are you having another problem besides that?
No...so its happening because the items needed aren't in the inventory?
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,959
First Language
English
Primarily Uses
RMMV
Correct. If you look at the recipe setup:

RECIPES = {

  0 => { :result => [0,1,1],

         :materials => [[0,4,2]],

         :gold_cost => 10,

         :success => 95,

         :success_gain => 1,

         :level => 5,

         :craft_level => 1,

         :category => :Baking,

         :xp => 50,

         :xp_deprac => 15,},

 

  1 => { :result => [0,2,1],

         :materials => [[0,4,1],[0,5,2,false]],

         :gold_cost => 50,

         :success => 90,

         :success_gain => 2,

         :level => 15,

         :craft_level => 1,

         :category => :Baking,

         :xp => 150,

         :xp_deprac => 20,},       

  2 => { :result => [0,3,1],

         :materials => [[0,4,1],[0,5,1],[0,6,2],[0,7,1],[0,8,1],[0,9,2]],

         :gold_cost => 150,

         :success => 85,

         :success_gain => 3,

         :level => 25,

         :craft_level => 1,

         :category => :Baking,

         :xp => 250,

         :xp_deprac => 25,},

  }

 

So recipe 0 creates 1 of item #1, requiring 2 of item #4; recipe 1 creates 1 of item #2, requiring 1 of item #4 and 2 of item #5; recipe 2 creates 1 of item #3, requiring 1 of item #4, 1 of item #5, 2 of item #6, 1 of item #7, 1 of item #8 and 2 of item #9.

 

The thing is, your database only has two items right now, Cupcake and Cupcake Recipe. The script is looking at your defined recipes and going "Okay, so this recipe needs this many of item #4. I need to show the icon for item #4...where is item #4? You don't have one!" *crash*

 

Make sense?
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,049
Members
137,569
Latest member
Shtelsky
Top