• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Script: [v20\v21] Item Crafter UI Plus

1,681
Posts
8
Years
    • Seen yesterday
    An updated version of Simple item crafting system + interface (v20.1) by ThatWelshOne_ for both ease of use and added functionality.
    aOoY7Uo.png
    Mikyi6x.png
    What's New:
    • A new PBS file, recipes.txt, allowing for the definition of new recipes in one place.
    • Recipes that yield more than 1 units of the crafted item.
    • Recipes that can take ingredients with a specific flag, instead of hardcoded items.
      • Generic ingredients now have icons based off their flag.
    • Recipes sorted by flags.
    • Locking and Unlocking recipes.
    Installation:
    Just drag and drop in all the folders in the downloaded zip into your root folder so they merge with the folders already there.

    Usage:
    Defining a Recipe
    A recipes.txt entry consists of several components
    INI:
    [BreakMaxRevive]
    Item=REVIVE
    Yield=5
    Ingredients=MAXREVIVE,1
    Flags=Crafting
    A recipe consists of its internal name (BreakMaxRevive), the Item that is produced (REVIVE), the number of items produced from 1 set of ingredients (defaults to 1 if not included), the ingredients (Item ID or flag and quantity), and a set of flags.
    If the Ingredient is a valid Item ID, then it is treated as an item, otherwise it is considered an item flag (from items.txt)
    INI:
    [BerryJuice]
    Item=BERRYJUICE
    Ingredients=Berry,1
    Flags=Cooking
    A generic ingredient is consumed in order of cheapest price, and if two potential items share the same price, it is consumed in the order defined in items.txt (with ones defined earlier consumed first).

    Unlocking & Locking Recipes
    Recipes can be unlocked with pbUnlockRecipe(recipe_id), where recipe_id is the internal name from recipes.txt. pbUnlockRecipe(:BerryJuice) unlocks the BerryJuice recipe.
    Recipes can be locked using pbLockRecipe(recipe_id). pbLockRecipe(:BerryJuice) locks the BerryJuice Recipe.

    Using the Item Crafter
    The easiest form of calling the item crafter is pbItemCrafter(pbGetRecipes). pbGetRecipes returns an array of all the unlocked Recipe IDs. It can also be called with a flag string pbGetRecipes("Cooking"), to filter for only Recipes with the Cooking flag.

    Generic Ingredients
    Generic ingredients use an item flag instead of a regular item. To faciliate this, a new self.flag_icon_filename method is added to GameData::Item, which pulls an image named the respective flag (in lowercase) from Graphics\Items\Category. So the generic Berry ingredient will use the filename Graphics\Items\Category\berry.

    Generic ingredients by default use the flag as the name of the ingredient. If this isn't fitting, you can add the flag (in lowercase) to FLAG_TO_TEXT in 001_UI_ItemCrafting.rb, to define a different user facing name, like "Any Berry" for Berry.

    Credits:
    ThatWelshOne_ for the original script
    Vendily

    Download:
     
    Back
    Top