1. These forums are being retired. Please ask all questions and help threads and any other type of discussions on GitHub. During this time, new threads and user registrations have been disabled.

1.23 (obsolete) CommandRecipes 1.5.0.0

Command-based crafting with server-defined recipes

  1. aMoka
    API Version:
    1.23
    TShock Version:
    4.3
    Source URL:
    https://github.com/aMoka/CommandRecipes
    Author: aMoka and Enerdy

    Features:
    • Allows crafting items via commands.
    • Allows pre-made, config-based, recipes (one or more items).
    • Allows restriction of crafting recipes to regions or permissions.
    • Crafting can be done via dropping items or inventory in SSC.
    • Logs all crafted recipes (player, ingredients, and products).
    • Because collecting 1000 shackles should really reward something.
    • Meow.
    Permissions:
    • cmdrec.player.craft - gives access to the sorta all-powerful craft command (/craft)
    • cmdrec.admin.reload - gives access to reload the config (/recrld)
    Commands:
    • /craft <recipename/-quit/-list/-allcats/-cat/-confirm>
      • recipename - name of the recipe as defined in config.
      • -quit - quits crafting and gives back all items invested into crafting.
      • -list - lists all recipes available for crafting.
      • -allcats - lists all categories that recipes are a part of.
      • -cat <category name> - lists all recipes in a category.
      • -confirm - confirms inventory crafting (applicable in SSC and config enabled only)
    • /recrld - Reloads AllRecipes.json.
    Config:
    Code:
    {
      "CraftFromInventory": true,
      "Recipes": [
        {
          "name": "1",
          "ingredients": [
            {
              "name": "Copper Bar",
              "stack": 8,
              "prefix": 0,
              "group": 1
            },
            {
              "name": "22",
              "stack": 8,
              "prefix": 0,
              "group": 1
            },
            {
              "name": "Stone Block",
              "stack": 20,
              "prefix": 0,
              "group": 0
            },
            {
              "name": "Wooden Hammer",
              "stack": 1,
              "prefix": -1,
              "group": 0
            }
          ],
          "products": [
            {
              "name": "Copper Broadsword",
              "stack": 1,
              "prefix": 41,
              "group": 1,
              "weight": 50
            },
            {
              "name": "-15",
              "stack": 1,
              "prefix": 41,
              "group": 1,
              "weight": 50
            },
            {
              "name": "Wooden Hammer",
              "stack": 1,
              "prefix": 39,
              "group": 0,
              "weight": 100
            }
          ],
          "categories": [
            "Example"
          ],
          "permissions": [
            ""
          ],
          "regions": [
            ""
          ]
        },
        {
          "name": "Iron Broadsword",
          "ingredients": [
            {
              "name": "Iron Bar",
              "stack": 8,
              "prefix": 0,
              "group": 0
            },
            {
              "name": "Stone Block",
              "stack": 20,
              "prefix": 0,
              "group": 0
            },
            {
              "name": "Wooden Hammer",
              "stack": 1,
              "prefix": -1,
              "group": 0
            }
          ],
          "products": [
            {
              "name": "Iron Broadsword",
              "stack": 1,
              "prefix": 41,
              "group": 0,
              "weight": 100
            },
            {
              "name": "Wooden Hammer",
              "stack": 1,
              "prefix": 39,
              "group": 0,
              "weight": 100
            }
          ],
          "categories": [
            "Example",
            "Example2"
          ],
          "permissions": [
            "cmdrec.craft.example",
            "craft"
          ],
          "regions": [
            ""
          ],
          "invisibility": true,
          "commands": [
          "/i \"Dynamite\"",
          "/firework $playername red"
          ]
        }
      ]
    }
    • CraftFromInventory: <bool>
      • True only works in SSC. Instead of dropping items to craft, items are taken directly from inventory. False works in both non-SSC and SSC.
    • name: <string>
      • Name of the recipe, does not have to be the name of the item.
    • ingredients: List<item>
      • A list of all the items required to complete the recipe.
      • name: <string>
        • The name of the item.
      • stack: <number>
        • How many need to be dropped.
      • prefix: <number>
        • The prefix of the item. If set to -1, the recipe will accept items of any prefix.
      • group: <number>
        • The group of the item. Only one ingredient of the group is required to fulfill the recipe. All ingredients of group 0 are individually required.
    • products: List<item>
      • A list of all the items that get pooped out when all ingredients are fulfilled.
      • name: <string>
        • The name of the item.
      • stack: <number>
        • How many are received.
      • prefix: <number>
        • The prefix of the item. If set to -1, the product's prefix will be randomized with a weight on 0. If set to -2, the product's prefix will be randomized with equal chances for all valid prefixes.
      • group: <number>
        • The group of the item. Only one product of the group is given, according to weight (see below). All products of group 0 are given.
      • weight: <number>
        • The percentage chance the item of a group will be selected out of 100 percent. The sum of the weight of all products of a group must not exceed 100! Accepts whole numbers.
    • categories: List<string>
      • A list of categories you want your recipe to be a part of.
    • permissions: List<string>
      • A list of permissions that your recipe requires only one of to allow the person to craft. Permissions are added to the group.
    • regions: List<string>
      • A list of regions that your recipe can only be crafted in.
    • invisible: <bool>
      • makes recipes invisible to any listing, for your covert, shady needs.
    • commands: string[]
      • a list of command strings ("/command [args...]") which are executed once the recipe has finished crafting.
      • Available Wildcards
        • $group - the player's group name;
        • $ip - the player's current session IP;
        • $playername - the player's character name;
        • $username - the player's user account name.
    Kojiro_S likes this.

Recent Reviews

  1. OFF
    OFF
    5/5,
    Version: 1.4.5.0
    I r8 8/8 m8 best icon
  2. Kojiro_S
    Kojiro_S
    5/5,
    Version: 1.4.5.0
    The core functions and many recent additions work flawlessly. You can create recipes the way you want, and they are not limited to crafting items. You can also trigger a command when crafting certain recipes, which adds to the fun. For instance, what about mixing master bait and worm food to create the ultimate delicacy for worms, getting a bunch of worms for your fishing needs? Except its so tasty for worms even world feeders and eaters of worlds will want to have a bite...