This is what the first recipe in the demo looks like:
Recipes[1] = { # Loaf of Bread :recipe_type => 1, # Cooking Recipe :auto_learn => true, # Auto-learn this recipe when level is reached :req_level => 1, # Level required to use this recipe :shop_fee => 20, # Fee charged if crafted at a shop :craft_time => 200, # Time it takes to make the item :earned_exp => 3, # Exp gained on success :crafted_item => [:i20, 2], # Makes 2x Loaf of Bread :failed_item => [:i29, 1], # 1x Piece of Charcoal if failed attempt 😛re_failed => [:i19, 1], # Failed item if crafted before timer :ingredients => [ # 2x Eggs, 1x Flour, 1x Fresh Milk, 5 Gold [:i21, 2], [:i22, 1], [:i23, 1], [:g5], ]} # <- DO NOT REMOVEAgain, just like with the craft info from the first spoiler tags, you can keep what's in the demo or scratch them and start with all new ones.
Going with the example from the first spoiler tags where I showed how to make a new craft.. I'll make a new recipe for the new craft. The first line should get changed to something like this:
Recipes[10] = { # SpearI set the recipe's id to 10 just so it doesn't stop on the toes of any of the other already made recipes.
:recipe_type => 4, # Woodsman RecipeWhen I made the Woodsman craft, I set it's ID to 4, so this recipe will be set to 4 on this line so the script will know it's a recipe that should be shown for the Woodsman and not any of the other craft types. It is also how it determines where the exp goes.
:auto_learn => true, # Auto-learn this recipe when level is reachedThis line is optional. Only use it if you want a recipe to be learned automatically when the crafting level is reached. So say you can craft spears as a level 3 woodsman, and auto_learn is set to true, then as soon as you reach level 3 as a woodsman, then this recipe will instantly show up in you recipe list. If you omit this line or set it to false then you can only learn this recipe with a script call used in an event in game.
:req_level => 3, # Level required to use this recipeJust set the required level to start crafting a spear to level 3.
:shop_fee => 25, # Fee charged if crafted at a shopYou only need to worry about this line if you're using the shops add on script. If you don't plan to use that script add on then just leave this line out. If you plan on using the add on, then this is the amount of money the shop keeper will charge the player to craft the recipe for them (plus some extra ingredients, you can set how much more ingredients the shop keeper will charge in the add on script).
:craft_time => 180, # Time it takes to make the itemThis is how long it will take the player to craft the item. If you are not using the timer gauge, then this line won't matter. If you set it to timer, this is how long the gauge will last, if using the active setting, then this is how long they must wait before then can trigger a successful item, if they wait too much longer after this time, then they'll fail. For this time, 60 = 1 second in real time. So 180 would be 3 seconds real time.
:earned_exp => 3, # Exp gained on successThis will set the recipe to reward 3 exp for the Woodsman craft if an item is successfully made. Failures can get less or no exp (depending on how you set it up elsewhere in the script).
:crafted_item => [:w13, 1], # 1x SpearThis is where you set what item you'll receive when you successfully make an item. In this case, we're making a Spear. If you look in the default database on the weapons tab, Spear is number 13. So for this script you can craft items from the Items tab in the database, or the Weapons tab or the Armor tab. So without getting into too much coding... we'll use an "i" for items, "a" for armor, and "w" for weapons. So when we tell the script we want to make a Spear from the weapons tab use ":w13". The last number is how many of the items to craft.. in this case we are only going to create 1 spear at a time.
:failed_item => [:i35, 1], # 1x Wooden Shaft if failed attemptIn the demo, I have already created some new items for the crafting system. The Wooden Shaft is one of the created items not found in the default database. So to tell the script which item to recieve on a failed attempted, I used the letter i to let it know it can be found in the Items tab and used ID 35 because that's the Wooden Shaft's ID in the Item tab. Then the last number is 1 because only one item is needed. You could set it to 2 or 10 or whatever you'd like. You can also omit this item if you don't want any item created on failure. Failed items can only ever be created if you are using the active style gauge (a setting towards the top of the script). This is the item that would be created if the player never presses the action button while crafting or if they press it after their window of opportunity.
😛re_failed => [:i35, 1], # Failed item if crafted before timerThis is exactly the same as the previous line, but this is the item the player will get if they hit the action key too soon.
:ingredients => [ # 1x Wooden Shaft, 1x Knife [:i35, 1], [:w37, 1],These are the ingredients needed to make the recipe. Each ingredient needed to make the recipe will be inside the square brackets []. So the first required item is a Wooden Shaft (item 35 in the Items tab of the database). The second required item is a Knife from the weapons tab.
]} # <- DO NOT REMOVELike with the craft into, this is the line that tells the script that you are finished setting up the recipe.