iPhone App Directory
RPG Maker VX
 
Gallery Members Search Calendar Help


Welcome Guest ( Log In | Register )

Collapse

>Announcement

The 2nd Quarter Contest has arrived! Go check it out in the Community Announcements now!
2 Pages V   1 2 >  
Reply to this topicStart new topic
> Synthesis Shop, My first 'real' script. :)
Rating 5 V
Cyl
post May 24 2010, 03:44 AM
Post #1


inactive.
Group Icon


Type: Coder
Alignment: Neutral Good




Synthesis Shop
Script Version: 1.1
Last Updated: 5/25/2010

by: Cylindrical


Introduction
After taking a few lessons and reading other scripts, I finally made my first script! This script copies Final Fantasy IX's synthesis Shops where you can create new powerful items using two existing items from your inventory. You can create any type of item, be it a consumable, weapon, or an armor. Just follow the instructions and you'll be able to make your own shops.

How to use
Place above Main. Read the comments inside to learn the loops. Also, talk to Bennett to learn the possible errors you might encounter while using this script.

Screenshots

I need those items to make a Dragon Sword, and 30,000G!

Yeah, I already have the Bastard Sword! Thanks to a green haired guy giving me lotsa money!

Talk to Bennett to learn all the possible errors that you might encounter. You can also chat with him. smile.gif

Script
Spoiler:
CODE
#-------------------------------------------------------------------------------
# Synthesis Shop v1.1
# by: Cylindrical
# May 25, 2010
#-------------------------------------------------------------------------------
# Aliases:
#   None
# Overwrites:
#   None
# Compatible with:
#   Most KGC scripts (tested with Raukue's KGCYanflyPLUS Base Demo)
#   Most Yanfly scripts (tested with Raukue's KGCYanflyPLUS Base Demo)
# Not Compatible with:
#   Probably no incompatibilities
#-------------------------------------------------------------------------------
# Version History
# v1.1 - The Requirements window now properly works.
#         * It grays out the item that you don't have.
#         * Many thanks to RPGI for this.
#      - Removed Game_Party#has_item? rewrite
#         * Replaced with a better one.
#         * Thanks again to RPGI.
# v1.0 - Initial release
#         * BUG: The Requirements window does not gray out an item if the
#                resulting item needs two of the same type of item and you have
#                only one. (Fixed on v1.1)
#-------------------------------------------------------------------------------
# What is it?
#   This script copies Final Fantasy IX's Synth Shops where the player is
# allowed to create new items using different materials.
#
# How to use
#   Place above Main. Before you open the synthesize shop, you need to define
# the shop items. In the SETUP part, you can create arrays to add in your shop.
# This is the format:
#
#            Result Item       Requirement 1     Requirement 2
# NAME = [ ["<type>", <id>], ["<type>", <id>], ["<type>", <id>] ]
#
# where: NAME is what you call it. Should be relevant but unique. Must be ALLCAPS
#        <type> is either "WEAPON", "ARMOR", or "ITEM"
#        <id> is the item ID
#
#   Then, using $synth_items, put in the items you want to synth. It can be as
# many as you like.
#
#   $synth_items = [NAME1, NAME2, ... , NAMEn]
#
#   To open the shop window, use the 'Script' command in an event and put it
# this piece of code:
#
#    $scene = Scene_SynthShop.new
#
# Notes
#  * Make sure you fill in $synth_items first before opening the shop.
#  * You MUST GIVE ME CREDIT if you used this in your game.
#  * Free to use for commercial games, as long as you give credit to me.
#  * This is my first script so don't expect too much glamore. I still
#    consider myself a beginner.
#-------------------------------------------------------------------------------
# Special Thanks
#   Raukue for his KGCYanflyPLUS Base Demo
#   RPGI for his help with Window_SynthReq and check_required_item
#-------------------------------------------------------------------------------
# Bugs (v1.1)
#  * None. I hope it stays that way.
#-------------------------------------------------------------------------------
# FAQs
# Q: Can I make it require three ingredients?
# A: No, as of late. But I might do some updates.
#
# Q: How do I set up cost?
# A: The synthesis cost is equal to the item price of the resulting item.
#
# Q: Will this be compatible with <insert script here>?
# A: Most likely, yes since this script uses its own class/methods/functions.
#    With some tests, I find this one compatible with MOST commonly used scripts.
#    I tried this script with a script pack compiled by Raukue. It's called
#    'KGCYanflyPLUS Base'. It has many KGC and Yanfly scripts. I tested it there
#    and no errors were found. Phew! :)
#
# Q: What do you mean by 'relevant but unique' up there?
# A: It means you have to make a unique name for that item and make it so that
#    you can easily tell what it is. You can't use spaces and no repetition of
#    names. As much as possible, make it short.
#    Example:
#       GOOD                BAD
#    MAGIC_HAMMER     MAGIC HAMMER <- No spaces.
#    CYL_MAGHAMMER    SYNTH_ITEM1  <- No sense at all.
#    DEATHSCYTHE      A or X or D  <- AVOID this.
#    BIGBOMB_1        SUPER_ULTRA_HYPER_ETERNAL_MAGIC_BELL <- No comment.
#
#    So basically, make it 'unique' and 'relevant'.
#
# Q: I want more items to be synthesized but the Script Dialog in the Event
#    Editor can't hold too much letters. What should I do?
# A: You can make two arrays and combine them, like this:
#    Example:
#      $synth_items = [KATANA, MORNING_STAR] <- Assuming you can't type anymore.
#    Use the Script command again and do the same except that you need to add
#    a plus sign (+) before the equal sign (=). Like this:
#      $synth_items += [MANI_KATTI, TIGER_RACKET, EXCALIBUR_2]
#    
#    Another way is to place the whole array into another variable, like this.
#    This technique is good if you have several shops that offers the same items.
#      LINDBLUM_SYNTH_SHOP = [KATANA, MORNING_STAR, MANI_KATTI, TIGER_RACKET,
#                             EXCALIBUR_2]
#      $synth_items = LINDBLUM_SYNTH_SHOP
#
# Q: Can we trust you? You said you're a beginner.
# A: If you're a user that doesn't mind dirty codes, you can. This script works.
#    If you're a scripter who doesn't like dirty codes, I don't know. It's really
#    messy, if you know what I mean...
#-------------------------------------------------------------------------------

#-------------------------------------------------------------------------------
# SETUP START
#-------------------------------------------------------------------------------

  # Welcome Message
  SYNTH_WELCOME = "Welcome! What can I do for you?"
  
  # Replace 'Synthesize' with this.
  SYNTH_COMMAND = "Synthesize"
  
  # Replace 'Requirements' with this.
  SYNTH_REQUIREMENTS = "Requirements"
  
  # Synth-able Items Database - Follow the format. Spaces doesn't really matter.
  #                             The numbers here MUST exist in the database.
#                      Result         Material 1     Material 2
#      NAME           TYPE     ID     TYPE      ID    TYPE     ID
  BASTARD_SWORD = [ ["WEAPON", 10], ["WEAPON",  2], ["WEAPON", 6] ]
  FLAME_SHIELD  = [ ["ARMOR",   3], ["ARMOR",   1], ["ITEM",  15] ]
  FULL_POTION   = [ ["ITEM",    3], ["ITEM",    2], ["ITEM",   2] ]
  DRAGON_SWORD  = [ ["WEAPON", 29], ["WEAPON", 10], ["ARMOR", 29] ]
  LIFE_RING     = [ ["ARMOR",  29], ["ARMOR",  10], ["ITEM",   3] ]
  DRAGON_MAIL   = [ ["ARMOR",  22], ["ARMOR",   3], ["ARMOR",  3] ]
  FLAME_SCROLL  = [ ["ITEM",   16], ["ITEM",    2], ["ITEM",  15] ]
  
  # Common Shops - If you want to use a shop over and over again, you might
  #                want to use this. Define the synth-able items above and
  #                place them here. This is the format:
  #                       NAME = [ITEM1, ITEM2, ..., ITEMn]
  #                NAME must be ALLCAPS
  #                ITEMs must match with those above. If you put something that
  #                does not match with even one of those above, you'll get an error.
  #                Check the Whitesmith to see how to use this array.
  TEST_MAP_SYNTH_SHOP = [BASTARD_SWORD, FLAME_SHIELD, FLAME_SCROLL, FULL_POTION,
                         LIFE_RING, DRAGON_SWORD, DRAGON_MAIL]
  
  # If you use Common Shops, create a list by doing this:
  #             $synth_items = TEST_MAP_SYNTH_SHOP
  # If not, do this:
  #             $synth_items = [BASTARD_SWORD, FLAME_SHIELD, ETC]
  #                            ^(Notice the square brackets)

  
#-------------------------------------------------------------------------------
# SETUP END - Do not touch anything beyond this point unless you know what you
#             are doing.
#-------------------------------------------------------------------------------

#===============================================================================
# ** Scene_SynthShop
#-------------------------------------------------------------------------------
#  This class performs the synthesis shop processing.
#===============================================================================
class Scene_SynthShop < Scene_Base
  #-----------------------------------------------------------------------------
  # * Start Processing
  #-----------------------------------------------------------------------------
  def start
    super
    @synth_items = []
    @item_index = 0
    @sold_item = nil
    @checking = []
    create_menu_background
    create_command_window
    @help_window = Window_Help.new
    @gold_window = Window_Gold.new(384, 56)
    @dummy_window = Window_Base.new(0, 112, 544, 304)
    @synth_window = Window_Synth.new(0, 112)
    @synth_window.active = false
    @synth_window.visible = false
    @status_window = Window_ShopStatus.new(304, 112)
    @status_window.visible = false
    @requirements_window = Window_SynthReq.new(0, 264, @item_index)
    @requirements_window.visible = false
    @synth_window.index = 0
    @help_window.set_text(SYNTH_WELCOME)
  end
  #-----------------------------------------------------------------------------
  # * Terminate Process
  #-----------------------------------------------------------------------------
  def terminate
    super
    dispose_menu_background
    dispose_command_window
    @help_window.dispose
    @gold_window.dispose
    @dummy_window.dispose
    @synth_window.dispose
    @status_window.dispose
    @requirements_window.dispose
  end
  #-----------------------------------------------------------------------------
  # * Frame Update
  #-----------------------------------------------------------------------------
  def update
    super
    update_menu_background
    @help_window.update
    @command_window.update
    @gold_window.update
    @dummy_window.update
    @synth_window.update
    @status_window.update
    @requirements_window.update(@item_index)
    @gold_window.update
    if @command_window.active
      update_command_selection
    elsif @synth_window.active
      update_synth_selection
    end
    update_help
  end
  #-----------------------------------------------------------------------------
  # * Create Command Window
  #-----------------------------------------------------------------------------
  def create_command_window
    s1 = SYNTH_COMMAND
    s2 = Vocab::ShopCancel
    @command_window = Window_Command.new(384, [s1, s2], 3)
    @command_window.y = 56
  end
  #-----------------------------------------------------------------------------
  # * Dispose Command Window
  #-----------------------------------------------------------------------------
  def dispose_command_window
    @command_window.dispose
  end
  #-----------------------------------------------------------------------------
  # * Update Command Selection
  #-----------------------------------------------------------------------------
  def update_command_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      $scene = Scene_Map.new
    elsif Input.trigger?(Input::C)
      case @command_window.index
      when 0 # Synth
        Sound.play_decision
        @command_window.active = false
        @dummy_window.visible = false
        @synth_window.active = true
        @synth_window.visible = true
        @synth_window.refresh
        @status_window.visible = true
        @requirements_window.visible = true
        @synth_window.index = 0
      when 1
        Sound.play_decision
        $scene = Scene_Map.new
      end
    end
  end
  #-----------------------------------------------------------------------------
  # * Update Synthesize Selection
  #-----------------------------------------------------------------------------
  def update_synth_selection
    @status_window.item = @synth_window.item
    @item = @synth_window.item
    update_help
    @requirements_window.update_price(@item.price)
    if Input.trigger?(Input::DOWN) or Input::trigger?(Input::UP)
      @item_index = @synth_window.index
    end
    if Input.trigger?(Input::B)
      Sound.play_cancel
      @item = nil
      @command_window.active = true
      @dummy_window.visible = true
      @synth_window.active = false
      @synth_window.visible = false
      @status_window.visible = false
      @status_window.item = nil
      @help_window.set_text(SYNTH_WELCOME)
      @requirements_window.visible = false
      return
    end
    if Input.trigger?(Input::C)
      e = check_required_item(@synth_window.index)
      number = $game_party.item_number(@item)
      if @item == nil or @item.price > $game_party.gold or number == 99 or !e
        Sound.play_buzzer
      else
        idx = @synth_window.index
        get_result_item(@synth_window.index)
        $game_party.lose_item(@checking[0], 1)
        $game_party.lose_item(@checking[1], 1)
        $game_party.gain_item(@sold_item, 1)
        $game_party.lose_gold(@item.price)
        Sound.play_shop
        @gold_window.refresh
        @status_window.refresh
        @synth_window.refresh
        @synth_window.index = idx
      end
    end
  end
  #-----------------------------------------------------------------------------
  # * Check Required Item
  #     item_index : Index of item selected
  #-----------------------------------------------------------------------------
  def check_required_item(item_index)
    @checking.clear
    @index = item_index
    base = $synth_items[@index]
    sub1 = base[1]
    sub2 = base[2]
    case sub1[0]
    when "ITEM"
      p = $data_items[sub1[1]]
    when "WEAPON"
      p = $data_weapons[sub1[1]]
    when "ARMOR"
      p = $data_armors[sub1[1]]
    end
    @checking.push(p)
    case sub2[0]
    when "ITEM"
      p = $data_items[sub2[1]]
    when "WEAPON"
      p = $data_weapons[sub2[1]]
    when "ARMOR"
      p = $data_armors[sub2[1]]
    end
    @checking.push(p)
    valid = false
    if @checking[0] == @checking[1]
      valid = true if $game_party.item_number(@checking[0]) >= 2
    else
      valid = true if $game_party.has_item?(@checking[0]) and $game_party.has_item?(@checking[1]) and @checking[0] != @checking[1]
    end
    return valid
  end
  #-----------------------------------------------------------------------------
  # * Get Resulting Item
  #     i : Item index
  #-----------------------------------------------------------------------------
  def get_result_item(i)
      base = $synth_items[i]
      sub = base[0]
      case sub[0]
      when "ITEM"
        p = $data_items[sub[1]]
      when "WEAPON"
        p = $data_weapons[sub[1]]
      when "ARMOR"
        p = $data_armors[sub[1]]
      end
      @sold_item = p
    end
  #-----------------------------------------------------------------------------
  # * Update Help Window
  #-----------------------------------------------------------------------------
  def update_help
    @help_window.set_text(@item == nil ? SYNTH_WELCOME : @item.description)
  end
  
end

#===============================================================================
# ** Window_Synth
#-------------------------------------------------------------------------------
#  This window shows the synth-able items defined by $synth_items.
#===============================================================================
class Window_Synth < Window_Selectable
  #-----------------------------------------------------------------------------
  # * Object Initialization
  #-----------------------------------------------------------------------------
  def initialize(x, y)
    super(x, y, 304, 152)
    @checking = []
    @synth_items = []
    refresh
    self.index = 0
  end
  #-----------------------------------------------------------------------------
  # * Get Item
  #-----------------------------------------------------------------------------
  def item
    return @data[self.index]
  end
  #-----------------------------------------------------------------------------
  # * Refresh
  #-----------------------------------------------------------------------------
  def refresh
    @data = []
    @synth_items.clear
    get_result_item
    for x in 0...@synth_items.size
      item = @synth_items[x]
      if item != nil
        @data.push(item)
      end
    end
    @item_max = @data.size
    create_contents
    for i in 0...@item_max
      e = check_required_item(i)
      draw_item(i, e)
    end
  end
  #-----------------------------------------------------------------------------
  # * Draw Item
  #     index : Item number
  #     valid : enabled or disabled?
  #-----------------------------------------------------------------------------
  def draw_item(index, valid)
    item = @data[index]
    number = $game_party.item_number(item)
    enabled = (item.price <= $game_party.gold and number < 99 and valid)
    rect = item_rect(index)
    self.contents.clear_rect(rect)
    draw_item_name(item, rect.x, rect.y, enabled)
    rect.width -= 4
  end
  #-----------------------------------------------------------------------------
  # * Get Result Item
  #-----------------------------------------------------------------------------
  def get_result_item
    for i in 0...$synth_items.size
      base = $synth_items[i]
      sub = base[0]
      case sub[0]
      when "ITEM"
        p = $data_items[sub[1]]
      when "WEAPON"
        p = $data_weapons[sub[1]]
      when "ARMOR"
        p = $data_armors[sub[1]]
      end
      @synth_items.push(p)
    end
  end
  #-----------------------------------------------------------------------------
  # * Check Required Item
  #     item_index : Item number
  #-----------------------------------------------------------------------------
  def check_required_item(item_index)
    @checking.clear
    @index = item_index
    base = $synth_items[@index]
    sub1 = base[1]
    sub2 = base[2]
    case sub1[0]
    when "ITEM"
      p = $data_items[sub1[1]]
    when "WEAPON"
      p = $data_weapons[sub1[1]]
    when "ARMOR"
      p = $data_armors[sub1[1]]
    end
    @checking.push(p)
    case sub2[0]
    when "ITEM"
      p = $data_items[sub2[1]]
    when "WEAPON"
      p = $data_weapons[sub2[1]]
    when "ARMOR"
      p = $data_armors[sub2[1]]
    end
    @checking.push(p)
    valid = false
    if @checking[0] == @checking[1]
      valid = true if $game_party.item_number(@checking[0]) >= 2
      return valid
    else
      valid = true if $game_party.has_item?(@checking[0]) && $game_party.has_item?(@checking[1])
    end
    return valid
  end
end

#===============================================================================
# ** Window_SynthReq
#-------------------------------------------------------------------------------
#  This window shows the required items needed for synthesis.
#===============================================================================
class Window_SynthReq < Window_Base
  #-----------------------------------------------------------------------------
  # * Object Initialization
  #-----------------------------------------------------------------------------
  def initialize (x, y, index)
    super(x, y, 304, 152)
    @req = []
    @lacking = false
    refresh
  end
  #-----------------------------------------------------------------------------
  # * Frame Update
  #     req_item_index : Required item number
  #-----------------------------------------------------------------------------
  def update(req_item_index)
    get_required_item(req_item_index)
    refresh
  end
  #-----------------------------------------------------------------------------
  # * Price Update
  #     item_price : Item price
  #-----------------------------------------------------------------------------
  def update_price(item_price)
    @price = item_price
    refresh
  end
  #-----------------------------------------------------------------------------
  # * Refresh
  #-----------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, 200, WLH, SYNTH_REQUIREMENTS)
    self.contents.font.color = normal_color
    self.contents.draw_text(120, WLH * 4, 120, WLH, @price.to_s, 2)
    self.contents.font.color = system_color
    self.contents.draw_text(120, WLH * 4, 140, WLH, Vocab.gold, 2)
    if @req != nil
      self.contents.font.color = normal_color
      req_x = 0
      req_y = WLH
      for i in 0...2
        if @req[0] == @req[1]
          enabled = $game_party.item_number(@req[i]) >= i + 1
        else
          enabled = $game_party.has_item?(@req[i])
        end
        draw_item_name(@req[i], req_x, req_y, enabled)
        req_y += WLH
      end
    end
  end
  #-----------------------------------------------------------------------------
  # * Get Required Item
  #     item_index : Item number
  #-----------------------------------------------------------------------------
  def get_required_item(item_index)
    @req.clear
    @index = item_index
    base = $synth_items[@index]
    sub1 = base[1]
    sub2 = base[2]
    case sub1[0]
    when "ITEM"
      p = $data_items[sub1[1]]
    when "WEAPON"
      p = $data_weapons[sub1[1]]
    when "ARMOR"
      p = $data_armors[sub1[1]]
    end
    @req.push(p)
    case sub2[0]
    when "ITEM"
      p = $data_items[sub2[1]]
    when "WEAPON"
      p = $data_weapons[sub2[1]]
    when "ARMOR"
      p = $data_armors[sub2[1]]
    end
    @req.push(p)
    @lacking = true
    if @req[0] == @req[1]
      @lacking = false if $game_party.item_number(@req[0]) >= 2
      return
    else
      @lacking = true if $game_party.has_item?(@req[0]) && $game_party.has_item?(@req[1])
    end
  end
end


Demo
Host: Mediafire
File Size: 248.34 KB

Credit
This script is one of my greatest achievements so you need to credit me for my work!
Special thanks to Raukue for his awesome KGCYanflyPLUS Demo.
Many Thanks to RPGI for his help.

If you find any bugs, post them here.

This post has been edited by Cylindrical: May 27 2010, 07:53 AM


--------------------
One word:
Paradichlorobenzene

(Currently inactive)
Go to the top of the page
 
+Quote Post
   
manat31790
post May 25 2010, 06:50 AM
Post #2


RPGPlayer
Group Icon


Type: Undisclosed
Alignment: Neutral Good




I got line 435: NoMethodError occurred. Undefined method 'size' for NilClass for some reason. I test this with a default new project.

CODE
    for i in 0...$synth_items.size


I was trying to make a Bastard Sword (ID_10) and it crashed when I was calling the scene.

This post has been edited by manat31790: May 25 2010, 06:57 AM


--------------------
Go to the top of the page
 
+Quote Post
   
Cyl
post May 27 2010, 07:19 AM
Post #3


inactive.
Group Icon


Type: Coder
Alignment: Neutral Good




Sorry for the really late reply, been really busy.

You must first fill in $synth_items before you call the scene.
In the setup part, you'll see:
CODE
BASTARD_SWORD = [ ["WEAPON", 10], ["WEAPON",  2], ["WEAPON", 6] ]
  FLAME_SHIELD  = [ ["ARMOR",   3], ["ARMOR",   1], ["ITEM",  15] ]
  FULL_POTION   = [ ["ITEM",    3], ["ITEM",    2], ["ITEM",   2] ]

This is where you setup your synth-able items. It is explained on the comments. Uploading the new demo now.
Then after that, fill in $synth_items like this:
CODE
$synth_items = [BASTARD_SWORD, FLAME_SHIELD, FULL_POTION]

The you are free to open the shop anytime.


--------------------
One word:
Paradichlorobenzene

(Currently inactive)
Go to the top of the page
 
+Quote Post
   
Dairu
post May 27 2010, 08:15 AM
Post #4


your RGSS kitteh!
Group Icon


Type: Coder
Alignment: Chaotic Evil




This is very nice... :-bd too bad I haven't planned any synthesizing in my game, or else I would've used it >w<, maybe I'll use this on my next game. xD
Good to see Filipinos making such nice scripts in the forums. :3 :-bd
*Galingan mo pa!* biggrin.gif


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

Look here for the scripts I've made: だいるのぶろぐ: RPG Maker VX Corner

I am...
Spoiler:

(got this from Cy, but it's actually from Chiaki xD)

I support the following...
Spoiler:







Currently working for:
Makryu
Go to the top of the page
 
+Quote Post
   
Cyl
post May 27 2010, 08:21 AM
Post #5


inactive.
Group Icon


Type: Coder
Alignment: Neutral Good




Well, I'm not as good as you though tongue.gif.
Don't worry, I'll continue learning. smile.gif


--------------------
One word:
Paradichlorobenzene

(Currently inactive)
Go to the top of the page
 
+Quote Post
   
SowS
post May 27 2010, 10:05 AM
Post #6


I'm still smiling. My jaw hurts now.
Group Icon


Type: Coder
Alignment: Neutral Good




well, it's good to see your type is changed from developer to coder.
continue learning and keep up the good work. biggrin.gif


--------------------
Go to the top of the page
 
+Quote Post
   
Cyl
post May 27 2010, 10:09 AM
Post #7


inactive.
Group Icon


Type: Coder
Alignment: Neutral Good




^ It's been Coder from the start. xD Anyways, I'm pretty much getting the hang of Scenes and Windows. I'm thinking of a Takentai add-on next time.

Anyways, don't you think the syntax for synth-able items are too confusing (because of those brackets) or they are just fine the way they are?
I wanted to use the Notes part of the database but unfortunately I don't know how to use that. sad.gif


--------------------
One word:
Paradichlorobenzene

(Currently inactive)
Go to the top of the page
 
+Quote Post
   
SowS
post May 27 2010, 10:13 AM
Post #8


I'm still smiling. My jaw hurts now.
Group Icon


Type: Coder
Alignment: Neutral Good




it's Coder from the start? i didn't notice that!

read regexp if you want to use notes. biggrin.gif

for your syntax, if all other scripters became confused with that, then it really is confusing. tongue.gif


--------------------
Go to the top of the page
 
+Quote Post
   
Kyriaki
post Jun 3 2010, 12:49 PM
Post #9


Reviewer
Group Icon


Type: Writer
Alignment: Lawful Neutral




I really like this script for its simplicity and will definitely be using it! I look forward to future updates, including more ingredients! ^^

This post has been edited by Kyriaki: Jun 3 2010, 12:50 PM


--------------------
.: Current Project :.


Go to the top of the page
 
+Quote Post
   
captainregal
post Jun 16 2010, 12:30 PM
Post #10



Group Icon






I really love/want to use your script. I really need to be able to have more ingredients. Is this something your working on? How long do you think this update will take?

Thanks again.
Go to the top of the page
 
+Quote Post
   
Albion
post Jul 9 2010, 02:01 PM
Post #11



Group Icon


Type: Undisclosed




Sorry for bumping old threads.

But,this is awesome. I might use it for my game.
And I'll be sure to put credits there. And I'll put credits for all who created the scripts which I use.

Thanks a bunch.
Go to the top of the page
 
+Quote Post
   
Philacus
post Oct 17 2010, 01:40 AM
Post #12



Group Icon


Type: Designer
Alignment: Lawful Neutral




Well I was tinkering with it, and I was wondering how i could scoot the G over to the right a bit, so the money would fit.

It wont allow me to give my full money name, without the numbers overlapping the letters.

*Edit*
About an hour and a half of learning scripting and I came up with a little fix.

I simply scooted over the money to the right a bit, and the money name to the left side. I don't think it will cause any problems, but if it does feel free to tell me.

I want to use this for smelting and forging. I would also like to modify it for fishing if that would be possible.

I plan to use this for multiple things. I would like to figure out a free one, but I don't think I'm skilled enough yet.

Spoiler:
#===============================================================================
# ** Window_SynthReq
#-------------------------------------------------------------------------------
# This window shows the required items needed for synthesis.
#===============================================================================
class Window_SynthReq < Window_Base
#-----------------------------------------------------------------------------
# * Object Initialization
#-----------------------------------------------------------------------------
def initialize (x, y, index)
super(x, y, 304, 152)
@req = []
@lacking = false
refresh
end
#-----------------------------------------------------------------------------
# * Frame Update
# req_item_index : Required item number
#-----------------------------------------------------------------------------
def update(req_item_index)
get_required_item(req_item_index)
refresh
end
#-----------------------------------------------------------------------------
# * Price Update
# item_price : Item price
#-----------------------------------------------------------------------------
def update_price(item_price)
@price = item_price
refresh
end
#-----------------------------------------------------------------------------
# * Refresh
#-----------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(4, 0, 200, WLH, SYNTH_REQUIREMENTS)
self.contents.font.color = normal_color
self.contents.draw_text(120, WLH * 4, 125, WLH, @price.to_s, 2)
self.contents.font.color = system_color
self.contents.draw_text(120, WLH * 4, 65, WLH, Vocab.gold, 2)
if @req != nil
self.contents.font.color = normal_color
req_x = 0
req_y = WLH
for i in 0...2
if @req[0] == @req[1]
enabled = $game_party.item_number(@req[i]) >= i + 1
else
enabled = $game_party.has_item?(@req[i])
end
draw_item_name(@req[i], req_x, req_y, enabled)
req_y += WLH
end
end
end


This post has been edited by Philacus: Oct 17 2010, 01:57 AM


--------------------
Buffet Bushi: I gain power with the belly slaps! *slaps belly*
Everyone else: ... Something is wrong with this guy.
Go to the top of the page
 
+Quote Post
   
Riokogen
post Oct 17 2010, 01:46 AM
Post #13


継続は力なり。
Group Icon


Type: Designer
Alignment: Neutral Good




I don't think you can "scoot" the G over. If anything, you can go into the Database --> Terms, and modify the money representation "G" to your liking.


--------------------
Go to the top of the page
 
+Quote Post
   
HMoon
post Oct 17 2010, 01:53 AM
Post #14



Group Icon


Type: Coder




Nice script. Did you get better enough to add Notetags support? I'm learning how to use them right now (need for my own project), and since I'd like to use your script I'll probably update it too if you don't.


--------------------
Work in progress:

I support:
Spoiler:





Useful RMXP related links from other websites:
Spoiler:
Scripting tutorial by Khatharr from creationasylum.net, smooth and very well done, mostly about graphics (or so you'd think, but you'll end learning a lot more):
Chaptah 1 - Chapper 2 - Choperta 3 - Veloci-Chaptor 4
Go to the top of the page
 
+Quote Post
   
VII
post Oct 18 2010, 04:07 AM
Post #15



Group Icon


Type: Coder
Alignment: Unaligned




Im seriously looking forwards to more ingredients. I was going to use your script for "Smithing" it was only until after i had everything set up i noticed you could only have "2" ingredients. needless to say i was sad. sad.gif

5 Copper Ore = 1 Copper Bar ...ya know? lol

For real, add more ingredients. at least 5 minimum. plz and ty.

Edit:

and/or add a "stack" function for the same item. so instead of listing out copper ore 5 times, you just do it once with a quantity indicator.

This post has been edited by VII: Oct 18 2010, 04:09 AM
Go to the top of the page
 
+Quote Post
   
Kureigu95
post Oct 19 2010, 04:13 PM
Post #16



Group Icon


Type: Designer
Alignment: Neutral Good




Great script!
i looked through and i cudnt find a point to change the sound coz i dont think it makes sense once you've merged the items to make a new one, it plays the "kerching" sound.
Can i change the sound?


--------------------
I Support
Spoiler:








Go to the top of the page
 
+Quote Post
   
Philacus
post Dec 10 2010, 03:28 AM
Post #17



Group Icon


Type: Designer
Alignment: Lawful Neutral




My game when released, will feature a heavily modified Synthesis Screen with support up to 4 items. More work will be done to it, possibly tying it with an inventory limiter and an item storage box. I have my little brother working on it, and hes a great script coder.

Currently Supports:
1-4 item synth
synth items into switches

Soon to be:
Items used from storage to craft with synth screen
Switches can be requirements
multiple arrays of synth screens for "New" or "Upgrade" items, complete custom mapping.
support for inventory capper per item

I'll post my own release giving credit to Cylindrical as the backbone for what we worked to make.


--------------------
Buffet Bushi: I gain power with the belly slaps! *slaps belly*
Everyone else: ... Something is wrong with this guy.
Go to the top of the page
 
+Quote Post
   
SiDD123
post Dec 14 2010, 01:18 AM
Post #18



Group Icon


Type: Designer




Thanks pal love it!
Go to the top of the page
 
+Quote Post
   
new
post Jan 2 2011, 07:08 AM
Post #19



Group Icon


Type: Designer
Alignment: Chaotic Evil




can i have a copy of that modified? can you ad a success rate too if possible.


--------------------
download here
(Ask before using a bar from someone's sig -Touchfuzzy)
Go to the top of the page
 
+Quote Post
   
Drakonais
post Jan 4 2011, 10:47 PM
Post #20



Group Icon


Type: Designer




Agreed. I'd love to see a modified version of this.
Go to the top of the page
 
+Quote Post
   

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

 

Lo-Fi Version Time is now: 24th April 2014 - 09:56 PM

RPGMakerVX.net is an Privacy Policy, Legal.