- Pokémon Essentials Version
- v21.1 ✅
- Also compatible with
- v20.1
- v20
An updated version of Simple item crafting system + interface (v20.1) for both ease of use and added functionality.
What's New:
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
A recipe consists of its internal name (
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)
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
Recipes can be locked using
Using the Item Crafter
The easiest form of calling the item crafter is
Generic Ingredients
Generic ingredients use an item flag instead of a regular item. To faciliate this, a new
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
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.
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
Example Recipe:
[BreakMaxRevive]
Item=REVIVE
Yield=5
Ingredients=MAXREVIVE,1
Flags=Crafting
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)
Example Generic Recipe:
[BerryJuice]
Item=BERRYJUICE
Ingredients=Berry,1
Flags=Cooking
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 recipeRecipes 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
next unless r.has_flag?(flag)
pbUnlockRecipe(r.id)
end[/code]