GenRecipe

From CoffeeMud Wiki
Revision as of 02:05, 25 February 2021 by Loki (talk | contribs) (→‎Recipe Data)
Jump to navigation Jump to search
CoffeeMUD
Administrator                                                  Builder                                                              Player
=CoffeeMUD Builder Information=
Basics Praetor     Player Support     Commands     Zapper Masks Advanced Races     Classes     Abilities     Socials     Scripting    
Building Behaviors     Properties     Areas     Rooms     Exits     Items     Mobs Systems Achievements     Crafting     Help Info     Ships     Planes of Existence     Quests     Triumphs    

A GenRecipe is a sub-type of GenReadable that contains one or more custom recipes from a single crafting skill. Players who have a GenRecipe in their immediately accessible inventory (inventory, or a container with accessible contents flag) will be able to craft items from this GenRecipe if they meet the level requirements. The recipes will appear on their skill's LIST command, and will be subject to their skill's INFO command, as if the recipe was part of the skill. Dropping the recipe, or putting it in a non-accessible container, will result in all recipes from the GenRecipe no longer appearing on the skill's LIST.

Creating a GenRecipe

GenRecipes can be created from the Command Line with the command CREATE GENRECIPE or from the MUDGrinder in a room or mob's inventory.

Recipe Data

This field contains the information unique to recipes.

  • Skill ID : This should be the crafting skill name that the GenRecipe will add new recipes to the owner
  • Maximum Recipe Count : A GenRecipe may hold 1 or more recipes. Be conservative with this value, as players will use any remaining slot to create their own recipe books from your GenRecipe.
  • Recipe data: From the command line, you may edit existing recipes or add a new one by selecting the appropriate number (1 for a new recipe on a blank GenRecipe, for example)
    • After selecting the recipe number, you must enter a valid comma-delimited recipe code. The number of fields varies by the crafting skill selected. If you select "?", it will return a string valid for that crafting skill.
    • Each field in the comma-delimited recipe code has a specific purpose, and some fields have multiple purposes depending on other fields. The fields with the or (||) operands are fields whose purpose is derived from another field, most likely the Item_Class_ID field.
:: For Example, at the time of this entry, the blacksmithing comma-delimited recipe code reads: 

ITEM_NAME,ITEM_LEVEL,BUILD_TIME_TICKS,MATERIALS_REQUIRED,ITEM_BASE_VALUE,ITEM_CLASS_ID,STATUE||RIDE_BASIS||CONTAINER_TYPE_OR_LIDLOCK||CODED_WEAR_LOCATION,CONTAINER_CAPACITY||LIQUID_CAPACITY||MAX_WAND_USES||LIGHT_DURATION||DICE_SIDES,CODED_SPELL_LIST

Breaking that up into individual fields:

ITEM_NAME,
ITEM_LEVEL,
BUILD_TIME_TICKS,
MATERIALS_REQUIRED,
ITEM_BASE_VALUE,
ITEM_CLASS_ID,
STATUE||RIDE_BASIS||CONTAINER_TYPE_OR_LIDLOCK||CODED_WEAR_LOCATION,
CONTAINER_CAPACITY||LIQUID_CAPACITY||MAX_WAND_USES||LIGHT_DURATION||DICE_SIDES,
CODED_SPELL_LIST

::
  • Using this Blacksmithing Skill as a sample
    • The entire recipe code will need to be entered in one continuous line of text, with a comma between each field:
      • ITEM_NAME - This field should be the simple name of the item. Avoid adding color or other special text to item names, since this may confuse players on how to actually create the item. For example, "a ^rred^? hat" is a poor name for a hat since the ^r is parsed as the color red in the LIST command for the crafting ability, but is REQUIRED in commands to get INFO or craft the item.
      • ITEM_LEVEL - This is the base level of the item, before any material modifiers or expertises are applied.
      • BUILD_TIME_TICKS - This is the bse time in Ticks (~4 seconds) required to build the item. This is reduced by a number of factors, such as how many levels over the recipe level the crafter is, or certain expertises.
      • MATERIALS_REQUIRED - This field can be a number, in which case it will accept the type of materials the skill normally works with, or a number and a material type, or a number and a material name, or a number and an item name. Multiple materials can be ANDed together with a double-ampersand (&&). There are a variety of more complicated versions of materials required that I will update at a later time.
      • ITEM_BASE_VALUE - This is the base price of the item, before any material or expertise modifiers.
      • ITEM_CLASS_ID - This is the resultant item type, like GenArmor or GenItem. It will likely determine what the next few columns require. Not all crafting skills support all item types. There are some work-arounds to this, but there is probably a good reason that you don't make shields from the wainwrighting skill.
      • STATUE||RIDE_BASIS||CONTAINER_TYPE_OR_LIDLOCK||CODED_WEAR_LOCATION - This field is specific to Blacksmithing. This particular string shows 4 different options, each separated by an OR (||) operand. Only one option is used, and that is based on the ITEM_CLASS_ID.
        • For GenItems, the STATUE parameter may be called out, in which case the item will accept a parameter when being made, and pass along that description to the item. For example, if the item was called A BUST, and the crafter used BLACKSMITH BUST LOKI, it would create an item called A BUST OF LOKI and pass along the description of the user LOKI in the description of the item.
        • RIDE_BASIS, for GenRideables and GenFurniture and other derivatives, this further defines what type of rideable the item is (a table, a chair, etc)
        • CONTAINER_TYPE_OR_LIDLOCK - If the item is a GenContainer, this parameter will accept a numerical bit field for what type of items can go in it, or a LIDLOCK parameter (I need to research how this works).
        • CODED_WEAR_LOCATION - For GenArmor or other derivatives, this field determines where the armor can be worn, and can include optional special prefixes strung together with a colon(:) before the wear location:
          • S means the item is see-through, and armor worn underneath it may be seen.
          • M means the armor is multi-wear, and any number of that type of item may be worn (this is very dangerous to allow, especially if players can somehow modify the defensive value or magical ability of the items).
          • [Number] means the layer number that the item is worn on, with 0 being where normal clothes are worn, and each non-adjacent whole number means the item may be worn over that layer. (So a player could wear a -2,0,2 grouping of armor, or a -3,-1,1,3 or a -3,0,2).
          • Putting it all together, you could make a (SM-4:WAIST) item, or a (2:TORSO) item, or simply a (HEAD) item. Please do NOT include the parenthesis in your CODED_WEAR_LOCATION.
      • CONTAINER_CAPACITY||LIQUID_CAPACITY||MAX_WAND_USES||LIGHT_DURATION||DICE_SIDES - Similar to the previous field, this skill-specific field provides additional parameters based on the ITEM_CLASS_ID field.
      • CODED_SPELL_LIST - This field is the ultimate field for GenRecipes, since you may add behaviors, affects, or field keys in this field to complete your item. More on this later.


Balancing Recipes

Items should be balanced with your other items from your MUD. You may need to use Appendix C in the Archon's Guide, or your own scale. Recipes may be intentionally overbalanced due to scarcity, prop_itembinders or how to obtain them (GenShopkeepers requiring a special faction rating, a specific tattoo, etc).

Recipe Testing

It is highly recommended that you test your recipe to ensure it properly generates each item on the page. Some properties of the item may be ill-defined in the initial recipe code. You can use the CODED_SPELL_LIST to provide additional key field information (like damage=5).

Reverse Engineering

If you are having difficulties creating a genrecipe for a specific item, consider making the item by hand, copying the item, then creating a blank GenRecipe with the appropriate skill type of the item you want the recipe to make. Then SkillName LEARN ItemName to create a recipe (have spares of the item you are trying to build in case something goes wrong). Once you have "learned" the item, you can edit the GenRecipe and look at the resultant recipe code, and modify it to meet your needs.

It is also useful to review the recipe files for existing crafting skills using the MUDGrinder "Skill Recipes" editor.

Notes

.