|
  |
Advanced Crafting System 2.2, A system for crafting items. (v2.21 since 6-5-08) |
|
|
|
|
May 4 2008, 12:54 AM
|

Keeper of the Ruby Code of DOOM!

Group: Revolutionary
Posts: 355
Type: Scripter
RM Skill: Masterful

|
Advanced Crafting System (ACS) Version: 2.21 Author: Cmpsr2000 Release Date: June 5 2008 IntroductionACS is a system that allows the player to craft weapons, items, and armor from other weapons, items and armor. Features- Craft any item in your DB from any combination of items using recipes YOU define.
- Instantly see how a crafted weapon or armor will affect the actors you have discovered.
Recipes automatically unlock when a single ingredient is discovered, or when forced to unlock by a script call in an event.- Up to 9 ingredients per recipe.
- Unlimited number of recipes!
- Set difficulty levels for each recipe (up to 10!)
Recipe's are not craftable if the party's average spirit (intelligence) required for the difficulty level has not been reached or if the party does not have all the ingredients.- Critical successes can generate different items or more of the original item.
Set a base critical success for each recipe. The party gets a bonus percent for each interval of spirit (intelligence) above the required amount for that recipe.- New in version 2.0!
- Recipe unlock behavior can now be customized.
- Recipes can now rely on any stat for requirements and criticals.
- Bonus intervals of the critical stat can be customized per recipe.
- Recipes can now be categorized.
- Categories can be hidden or expanded in the crafting interface. This behavior can be customized or disabled!
- Recipe's of the same category can now require tools for crafting.
- A detail window can now be accessed from the crafting interface by holding down a button. (Y, for the demo)
- The information displayed in the detail window can be customized.
- Customization added for including/excluding the crafting option in the menu.
ScriptRedefinitions Recipe Game_Crafting Scene_Crafting Window_Crafting_Message Window_Crafting_Recipes Window_Crafting_Ingredients Window_Crafting_Status Window_Crafting_Details
CustomizationCustomize the name of the crafting system and sound effect played for criticals in Redefinitions:
CODE module Vocab def self.crafting #change this term if you want to call crafting something else in your game return "Crafting" end end
module Sound #play critical success. change the SE if you want a different one def self.play_critical Audio.se_play("Audio/SE/Chime2", 100, 100) end end
Recipes are defined in the recipes.txt file in the /data/ folder of your game. Format instructions are in Game_Crafting:
CODE #---------------------------------------------------------------------------- # returns a new Recipe object. the recpies.txt file should have data in the # following format: # # name: Name of the item being created # itemType: 0 for item, 1 for weapon, 2 for armor. The normal # and critical form MUST be the same item type! # numOfIngs: number of different ingredients from 1 to 9 # ingreds 01..2999: the item indexes of the ingredients. the first # character determines the item type for each # ingredient. 0 for item, 1 for weapon, 2 for armor # amounts 1..999: amount of each ingredient # normalItem: index of item created on normal success # normalAmount: amount of normal item created on success # criticalItem: item created from a critical success # critAmount: amount of crit item created # critChance: chance to crit (out of 100) # difficulty: integer 0 to 9 where 0 is easiest and 9 is hardest # bonusStat: The statistic that will be used to calculate the # bonus critical chance. 0 for attack, 1 for defense, # 2 for spirit, 3 for agility. # bonusInterval: The amount of the bonus stat it takes to get a 1% # higher critical chance # category: The type of crafting (smithing, woodworking, etc.) # As an integer from 0 to 9! # # The file allows for empty lines and comments using '#' to start a line # Here's some example lines from the file: # # #Leather Working # Rough_Leather 0 1 0204 2 205 1 205 3 10 0 2 10 1 # # NOTE: whitespace in the name must be replaced with underscores!!! # #----------------------------------------------------------------------------
Game_Crafting also contains the customization area for the stat thresholds for difficulty levels:
CODE def initDifficulties @atkThresholds = [25, 40, 55, 70, 85, 100, 115, 130, 145, 160] @defThresholds = [25, 40, 55, 70, 85, 100, 115, 130, 145, 160] @spiThresholds = [25, 50, 75, 100, 125, 150, 175, 200, 225, 250] @agiThresholds = [25, 50, 75, 100, 125, 150, 175, 200, 225, 250] end
In the Window_Crafting_Status, you can customize the icon indexes of the icons you wish to use to indicate normal, increased, or decreased stats. Each set of 4 icons (up, down, same) need to be adjacent to each other in the iconset:
CODE #--------------------------------------------------------------------------- # Change these if you need to use different attribute up/down icons #--------------------------------------------------------------------------- @atkIconUp = 1916 @atkIconDown = 1932 @atkIconSame = 1948 @defIconUp = 1917 @defIconDown = 1933 @defIconSame = 1949 @spiIconUp = 1918 @spiIconDown = 1934 @spiIconSame = 1950 @agiIconUp = 1919 @agiIconDown = 1935 @agiIconSame = 1951
New in 2.0! Category customization is in Game_Crafting
CODE #--------------------------------------------------------------------------- # Type in the names of your crafting categories here. As you can see, you # are not required to use all 10 spaces! Just make sure to have a comma # after the quotations for every item EXCEPT the last. #--------------------------------------------------------------------------- @categoryLabels = [ #Category 0 "Tailoring", #Category 1 "Leatherworking", #Category 2 "Alchemy", #Category 3 "Smithing", #Category 4 "Weaponsmithing", #Category 5 "Armorsmithing", #Category 6 "Woodworking", #Category 7 "Jewelsmithing" #Category 8 #Category 9 ] #--------------------------------------------------------------------------- # Each number refers to the RPG::Item index of the required tool. You # should have the same number of categories here as you did above! # Make sure there is a comma after every bracket pair [] EXCEPT the last! #--------------------------------------------------------------------------- @requiredTools = [ #Category 0 [196], #Category 1 [196, 197], #Category 2 [190, 191], #Category 3 [194, 195], #Category 4 [194, 195], #Category 5 [194, 195], #Category 6 [198], #Category 7 [192, 193] #Category 8 #Category 9 ] #--------------------------------------------------------------------------- # This is the text that appears in the help box of the crafting menu # when hovering over a category label. Same rule for commas! #--------------------------------------------------------------------------- @categoryText = [ #Category 0 "Makes clothing and cloth armor.", #Category 1 "Treats hides and stitches medium armor.", #Category 2 "Brews potions and other useful substances.", #Category 3 "Forges ingots and casts small parts.", #Category 4 "Sculpts all manner of metal weapons.", #Category 5 "Hammers together strong metal armors.", #Category 6 "Mills raw wood and carves wooden weapons.", #Category 7 "Polishes stones and sets jems." #Category 8 #Category 9 ]
The names for each stat that are displayed in the detail window can be modified in Game_Crafting:
CODE #---------------------------------------------------------------------------- # Returns the name of the statistic being requested #---------------------------------------------------------------------------- def statName(stat) case stat when 0 return "Attack" when 1 return "Defense" when 2 return "Intelligence" when 3 return "Agility" end end
Turn off the crafting menu item in redefinitions:
CODE #-------------------------------------------------------------------------- # Set this to true if you want to disable the "crafting" entry in the menu #-------------------------------------------------------------------------- @disableMenuChoice = false
Massive amounts of recipe behavior customization are available in Recipe.
CODE #-------------------------------------------------------------------------- # Recipe behavior customization starts here. # # @allowDiscoveryByItems: Allows recipes to be discovered when # ingredients of the recipe have been found # @requireAllItems: Requires all items of a recipe to be found # before the recipe will be revealed. # @allowStatBonuses: Allows bonus critical chance from the party's # current stats. # @requireStatThreshold: Requires an amount of the bonus stat in order # to craft the item. # @requireTools: Requires the presence of crafting tools to # make an item. #-------------------------------------------------------------------------- @allowDiscoveryByItems = true @requireAllItems = false @allowStatBonuses = true @requireStatThreshold = true @requireTools = true
You can change the button that shows the detail window in Scene_Crafting:
CODE #--------------------------------------------------------------------------- # If you don't like getting details from pressing y, change this to another # button. #--------------------------------------------------------------------------- @detailButton = Input::Y
The recipe window has several new options with the creation of categories. You can modify them in Window_Crafting_Recipes:
CODE #--------------------------------------------------------------------------- # Icon indexes for the show/hide toggle for recipe categories #--------------------------------------------------------------------------- @showIcon = 1807 @hideIcon = 1806 #--------------------------------------------------------------------------- # Change this to false if you do not wish for the game to remember # whether a category was show or hidden the last time the player used the # crafting interface #--------------------------------------------------------------------------- @rememberCategoryStates = true #--------------------------------------------------------------------------- # If you do not want to remember category states, then a default state is # chosen when the crafting menu is launched. Change this to true if you wish # to launch the menu with categories expanded. #--------------------------------------------------------------------------- @defaultShowState = false #--------------------------------------------------------------------------- # Change this to false if you would like to disable sorting by category #--------------------------------------------------------------------------- @usingCategories = true
Finaly, to customize the contents of the detail window, modify these entries in Window_Crafting_Details
CODE #--------------------------------------------------------------------------- # These variables control whether or not to display different sections of # The detail window. In this way, you can limit the information the player # has about the mechanisms of the crafting system. #--------------------------------------------------------------------------- @drawResults = true @drawTools = true @drawIngredients = true @drawStatInfo = true
CompatibilityRequires RGSS2. Redefines Game_Actors, Scene_Menu, Scene_Title and Scene_File. Screenshot


New in v2.0!

 DEMORight Here! InstallationCopy the script files into your game under the materials section. Todo List:- Move some customization options so they are all in Game_Crafting
FAQQ: How do I call the crafting system from an event instead of the menu? A: Use the script function to call: $scene = Scene_Crafting.new
Q: I keep getting this error when i try and start the game :
QUOTE Script 'Recipe' Line 48: NoMethodError occured. undefined method 'name' for nil:NilClass A: You must define an item in your database for EACH item ID in your recipes.txt file.
Q: I added an item to my recipes.txt file, but it doesn't show in my game and the game crashes when I .discover my new item OR I changed an option in $game_crafting but the change doesn't show up in my game. A: You are most likely loading from a save file. This loads the OLD recipe list and $game_crafting settings from when you saved. When you make a change to recipes.txt or $game_crafting you MUST start a new game to see your changes. Terms and ConditionsFeel free to use this in your game, but please give me a shout in the credits! Also, feel free to edit this for your own personal purposes but please do not repost an edited version without my consent first.
Thanks ^^/
Also, mad props to whoever threw together the original icon set I worked from. (DLed it from the resource section before the site went down and I can't remember who made the file!)
This post has been edited by cmpsr2000: Jul 9 2008, 07:22 AM
__________________________
|
|
|
|
|
|
|
|
Guest_From_Ariel_*
|
May 4 2008, 02:15 AM
|
Guests

|
This is really excellent work!
|
|
|
|
|
|
|
|
|
May 4 2008, 08:28 AM
|

Because Tomorrow Will Surely Come...

Group: Revolutionary
Posts: 1,137
Type: None
RM Skill: Skilled

|
Some screenshot would help  anyway,you might want to use this script submission template,so that it will look more organized. CODE [center][size=5][b][/size][/b][/center] [b]Version[/b] [b]Author[/b] [b]Release Date[/b]
[size=5][b]Introduction[/b][/size]
[size=5][b]Features[/b][/size]
[size=5][b]Script[/b][/size]
[size=5][b]Customization[/b][/size]
[size=5][b]Compatibility[/b][/size]
[size=5][b]Screenshot[/b][/size]
[size=5][b]DEMO[/b][/size]
[size=5][b]Installation[/b][/size]
[size=5][b]FAQ[/b][/size]
[size=5][b]Terms and Conditions[/b][/size] ( `ー´)cheers,puppeto4.
__________________________
|
|
|
|
|
|
|
|
|
May 4 2008, 10:45 AM
|
Level 4

Group: Member
Posts: 52
Type: Event Designer
RM Skill: Undisclosed

|
Do you think that you may be able to use a Call Script instead of accessing it from he menu(I'm using the KGC Custom Menu Command)?
__________________________
|
|
|
|
|
|
|
|
|
May 4 2008, 10:52 AM
|

Because Tomorrow Will Surely Come...

Group: Revolutionary
Posts: 1,137
Type: None
RM Skill: Skilled

|
Use this to call the crafting scene from script event command : CODE $scene = Scene_Crafting.new ( ¯3¯)cheers,puppeto4.
__________________________
|
|
|
|
|
|
|
|
|
May 4 2008, 12:14 PM
|

Keeper of the Ruby Code of DOOM!

Group: Revolutionary
Posts: 355
Type: Scripter
RM Skill: Masterful

|
QUOTE (woratana @ May 4 2008, 12:04 PM)  I've tried the demo. Very nice script  Thanks! QUOTE (puppeto4 @ May 4 2008, 10:42 AM)  Some screenshot would help  anyway,you might want to use this script submission template,so that it will look more organized. cheers,puppeto4.  Yes, you're right, I'll update some of the formating and add screen shots! And thank you for answering Destin's question while I was away from the board ^^
__________________________
|
|
|
|
|
|
|
|
|
May 4 2008, 01:19 PM
|
Level 4

Group: Member
Posts: 52
Type: Event Designer
RM Skill: Undisclosed

|
Hate to bother you but how do I prevent Crafting from appearing in the menu?
__________________________
|
|
|
|
|
|
|
|
|
May 4 2008, 01:27 PM
|

Because Tomorrow Will Surely Come...

Group: Revolutionary
Posts: 1,137
Type: None
RM Skill: Skilled

|
Remove these lines from the "Redefinition" script part : CODE class Scene_Menu < Scene_Base alias oldCmdWindow create_command_window def create_command_window s1 = Vocab::item s2 = Vocab::skill s3 = Vocab::equip s4 = Vocab::status s5 = Vocab::crafting s6 = Vocab::save s7 = Vocab::game_end @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7]) @command_window.index = @menu_index if $game_party.members.size == 0 # If number of party members is 0 @command_window.draw_item(0, false) # Disable item @command_window.draw_item(1, false) # Disable skill @command_window.draw_item(2, false) # Disable equipment @command_window.draw_item(3, false) # Disable status end if $game_system.save_disabled # If save is forbidden @command_window.draw_item(4, false) # Disable save end end alias oldUpdCmdSel update_command_selection def update_command_selection if Input.trigger?(Input::B) Sound.play_cancel $scene = Scene_Map.new elsif Input.trigger?(Input::C) if $game_party.members.size == 0 and @command_window.index < 4 Sound.play_buzzer return elsif $game_system.save_disabled and @command_window.index == 4 Sound.play_buzzer return end Sound.play_decision case @command_window.index when 0 # Item $scene = Scene_Item.new when 1,2,3 # Skill, equipment, status start_actor_selection when 4 # Crafting window $scene = Scene_Crafting.new when 5 #save $scene = Scene_File.new(true, false, false) when 6 # End Game $scene = Scene_End.new end end end end ┐( ¯௰¯)┌cheers,puppeto4.
__________________________
|
|
|
|
|
|
|
|
|
May 4 2008, 07:26 PM
|

Keeper of the Ruby Code of DOOM!

Group: Revolutionary
Posts: 355
Type: Scripter
RM Skill: Masterful

|
QUOTE (ERZENGEL @ May 4 2008, 05:24 PM)  Woow... this is a very long script but a nice one too. I'm looking forward to more scripts done by you  Thanks, I appreciate the kind words ^^ QUOTE (DestinMancer @ May 4 2008, 03:33 PM)  Hate to bother you but how do I prevent Crafting from appearing in the menu? Yes, do what puppet said. The next version will have a customization option for this to make it a simple change.
__________________________
|
|
|
|
|
|
|
|
|
May 5 2008, 06:25 AM
|

Love me! I wanna you to love me!

Group: Revolutionary
Posts: 196
Type: Event Designer
RM Skill: Beginner

|
Very nice script! btw, can this script craft skill, then hero can learn the skill direct? it isn't using scroll or whatever...
__________________________
~Time To sWallow tHe Pain and VaniSH OuR HuRt~
|
|
|
|
|
|
|
|
|
May 5 2008, 10:04 AM
|

Keeper of the Ruby Code of DOOM!

Group: Revolutionary
Posts: 355
Type: Scripter
RM Skill: Masterful

|
QUOTE (neclords @ May 5 2008, 08:39 AM)  Very nice script! btw, can this script craft skill, then hero can learn the skill direct? it isn't using scroll or whatever... well, you could easily craft an item that would bestow a skill upon activation, but there is no built in support for crafting "skill" objects themselves. I'll take a stab at it in one of the later versions.
__________________________
|
|
|
|
|
|
|
|
|
May 6 2008, 01:16 AM
|

Level 1

Group: Member
Posts: 6
Type: None
RM Skill: Beginner

|
Wonderful!!! This is the hell i was searching for! Thanks!!! Arigato!!! Terima kasih!!! Sie Sie!!!
__________________________
~Nothing's possible if there's no try~
-FANASARI DIAN ANNALIA-
|
|
|
|
|
|
|
|
|
May 6 2008, 11:28 PM
|

Level 8

Group: Revolutionary
Posts: 124
Type: Event Designer
RM Skill: Advanced

|
Oh wow! This is exactly what I need! Thanks so much! EDIT: It works great in your demo but I copied over everything to my game and it give me this error... hmmm.
error.jpg ( 58.24K )
Number of downloads: 101EDIT: problem fixed
This post has been edited by oblivionator: May 7 2008, 05:27 AM
__________________________
|
|
|
|
|
|
|
|
|
May 7 2008, 07:03 AM
|
Level 2

Group: Member
Posts: 21
Type: None
RM Skill: Undisclosed

|
i can't download the demo...
EDIT: I have already downloaded it. Very good script indeed!
This post has been edited by marlucas: May 7 2008, 07:06 AM
|
|
|
|
|
|
|
|
  |
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
RPG RPG Revolution is an Privacy
Policy and Legal
|
|