Crafting With Leftovers

GaryTheGreat

Veteran
Veteran
Joined
Mar 8, 2017
Messages
118
Reaction score
3
First Language
Russian
Primarily Uses
RMVXA
There's many a crafting system script out there, but what I've trouble finding is the one that lets you set up leftover material after crafting.

For instance, you have 2x Small Potion.
You can craft them together into 1x Big Potion. But you also receive Empty Flask in the process (because you poured one potion into another).

You could also call it a secondary crafting result, but it has to be hidden - Empty Flask is not the goal you're aiming for when you craft, it's just a bonus item on top of your result. So it mustn't be displayed in the crafting window or anything.
 
Last edited:

A-Moonless-Night

WINTER IS COMING
Veteran
Joined
Mar 17, 2012
Messages
682
Reaction score
446
First Language
English
Primarily Uses
RMVXA
I'd say it would be easiest to find a crafting system that you like and then get someone to add that feature to it.
 

Ebanyle

açspasl~d~dfflass
Veteran
Joined
Sep 2, 2016
Messages
338
Reaction score
200
First Language
Portuguese
Primarily Uses
RMVXA
Isn't there some scripts you can both add recipes but also create items by mixing them? You could make the "leftover recipes" be an unclassified recipe
 

GaryTheGreat

Veteran
Veteran
Joined
Mar 8, 2017
Messages
118
Reaction score
3
First Language
Russian
Primarily Uses
RMVXA
That would mean I have a recipe that has nothing listed except Empty Flask as a result or what?
I don't quite get the idea, could you elaborate more?
 

A-Moonless-Night

WINTER IS COMING
Veteran
Joined
Mar 17, 2012
Messages
682
Reaction score
446
First Language
English
Primarily Uses
RMVXA
Do you have a crafting script that you're currently using that you would like this to be a feature of?
 

A-Moonless-Night

WINTER IS COMING
Veteran
Joined
Mar 17, 2012
Messages
682
Reaction score
446
First Language
English
Primarily Uses
RMVXA
Try this out and see how you go:
Code:
=begin
#==============================================================================#
#   AMN Coelocanth's Crafting System Addon
#   Version 1.01
#   Author: AMoonlessNight
#   Date: 16 Dec 2018
#   Latest: 16 Dec 2018
#==============================================================================#
#   UPDATE LOG
#------------------------------------------------------------------------------#
# 16 Dec 2018 - created the script
#==============================================================================#
#   TERMS OF USE
#------------------------------------------------------------------------------#
# - Please credit AMoonlessNight or A-Moonless-Night
# - Please credit Coelocanth
# - Free for non-commercial use
# - See Coelocanth for commercial use
# - I'd love to see your game if you end up using one of my scripts
#==============================================================================#

This script is an addon for Coelocanth's Item Crafting System. It allows you to
set other items, weapons and armours to be gained from crafting a particular
item. They will not appear in the ingredient or results lists.

Use the following in an item's notes:

  <craft extra: i7>           this would give 1x item 7
  <craft extra: w2:9>         this would give 9x weapon 2
 
  <craft break extra: w8:3>   this would give 3x weapon 8
  <craft break extra: a1>     this would give 1x armour 1
 
  where i is for item, w is for weapon and a is for armour.
 
=end

module AMN_Craft_Addon
  Regex =       /<craft\sextra:*\s([iwa])\s*(\d+|\d+:\d+)>/i
  Break_Regex = /<craft\sbreak\sextra:*\s([iwa])\s*(\d+|\d+:\d+)>/i
end

class RPG::BaseItem
  attr_reader :crafting_extra_items
  attr_reader :crafting_extra_weapons
  attr_reader :crafting_extra_armors

  attr_reader :craft_break_extra_items
  attr_reader :craft_break_extra_weapons
  attr_reader :craft_break_extra_armors
    
  alias amn_craftaddon_rpgbaseitem_loadnotetagscrafting load_notetags_crafting
  def load_notetags_crafting
    amn_craftaddon_rpgbaseitem_loadnotetagscrafting
    @crafting_extra_items = {}
    @crafting_extra_weapons = {}
    @crafting_extra_armors = {}

    @craft_break_extra_items = {}
    @craft_break_extra_weapons = {}
    @craft_break_extra_armors = {}
    #---
    self.note.split(/[\r\n]+/).each { |line|
    case line
    when AMN_Craft_Addon::Regex
      hash = $1 == "w" ? @crafting_extra_weapons : $1 == "a" ? @crafting_extra_armors : @crafting_extra_items
      res = $2.split(':')
      hash[res[0].to_i] = (res[1] ? res[1].to_i : 1)
    when AMN_Craft_Addon::Break_Regex
      hash = $1 == "w" ? @craft_break_extra_weapons : $1 == "a" ? @craft_break_extra_armors : @craft_break_extra_items
      res = $2.split(':')
      hash[res[0].to_i] = (res[1] ? res[1].to_i : 1)
    end
    }
  end
end

class Scene_Crafting < Scene_CraftBase

  alias amn_craftaddon_scenecrafting_onitemok on_item_ok
  def on_item_ok
    item.crafting_extra_items.each { |key, value|
      $game_party.gain_item($data_items[key], value) }
    item.crafting_extra_weapons.each { |key, value|
      $game_party.gain_item($data_weapons[key], value) }
    item.crafting_extra_armors.each { |key, value|
      $game_party.gain_item($data_armors[key], value) }
    amn_craftaddon_scenecrafting_onitemok
  end

end

class Scene_Craft_Breakdown < Scene_CraftBase

  alias amn_craftaddon_scenecraftbreakdown_onitemok on_item_ok
  def on_item_ok
    item.craft_break_extra_items.each { |key, value|
      $game_party.gain_item($data_items[key], value) }
    item.craft_break_extra_weapons.each { |key, value|
      $game_party.gain_item($data_weapons[key], value) }
    item.craft_break_extra_armors.each { |key, value|
      $game_party.gain_item($data_armors[key], value) }
    amn_craftaddon_scenecraftbreakdown_onitemok
  end

end
 

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

Latest Threads

Latest Posts

Latest Profile Posts

He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!

Forum statistics

Threads
106,036
Messages
1,018,461
Members
137,821
Latest member
Capterson
Top