OLC Section 8

From Immwiki
Revision as of 23:12, 16 April 2021 by Taski (Talk | contribs) (Created page with "= Recipe Data = == Overview == Recipes are stored on the crafted item, that is the [i]result[/i] of the crafting combo. == The Recipe Data Viewer == +---------------------...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Recipe Data

Overview

Recipes are stored on the crafted item, that is the [i]result[/i] of the crafting combo.

The Recipe Data Viewer

+----------------------------------------------------------------------------------+ | Recipe Settings (Slot 0) | | Recipe type: 1 (Cooking) | | Flags: [needs_fire cooking_kit use_keywords] | | Keyword 1: cooking_barley | | Keyword 2: cooking_mushroom | | Keyword 3: (null) | | Keyword 4: (null) | +----------------------------------------------------------------------------------+

This will appear in Oedit after you've started a recipe. To begin a recipe, you need to first declare its slot.

Recipe commands use the following format:

 recipe <command> <value>

Available Commands

Slot

Syntax: recipe slot <value>

This specifies which slot you are using. An item can have multiple recipes with different ingredient combinations that result in the same item. In prog, the craft_script data_progs correspond to the recipe slot, allowing a great deal of flexibility. See [ 3588] sauteed broccoli in orange sauce for an example; recipe slot 0 requires broccoli, and recipe slot 1 requires asparagus. The prog, craft_prog1, is triggered when someone crafts recipe 1, and it restrings the broccoli to asparagus in the final crafted item.

There is presumably a limit to the number of recipe slots an item may have. NINJA FILL IN HERE.

Type

Syntax: recipe type <value>

Specifies what skill the crafter will be using to craft the item. The types are (NOTE: these types are preliminary):

 1: Cooking. For edible and drinkable items.
 2: Alchemy. Potions and pills probably.
 3: Smithing. Armor and weapons.
 4: Tailoring. Clothes.
 5. Scribing. ????
Flags

Syntax: recipe flags <flag>

Recipe flags can alter the requirements or format for the recipe.

 needs_fire: A fire must be present in the room, or the recipe will fail.
 cooking_kit: Crafter must have a cooking kit in their inventory, or the recipe will fail.
 use_keywords: By default, recipes want specific ingredient vnums. Use-Keywords swaps to using keywords (words in the item's name string, such as cooking_broccoli). You can only use one of these modes at a time.
Comp

Syntax: recipe comp<value> <vnum>

Example: recipe comp1 17134

The recipe adds [17134] some broccoli to the ingredient list.

Short for component, comp uses an exact vnum to specify an ingredient.

Key

Syntax: recipe key<value> <keyword>

Example: recipe key1 cooking_broccoli