• Hi, Guest!
    Some images might be missing as we move away from using embedded images, sorry for the mess!
    From now on, you'll be required to use a third party to host images. You can learn how to add images here, and if your thread is missing images you can request them here.
    Do not use Discord to host any images you post, these links expire quickly!
Simple item crafting system + interface

v20.1 Simple item crafting system + interface 1.2.2

This resource pertains to version 20.1 of Pokémon Essentials.
Pokémon Essentials Version
v20.1 ➖
This resource has been updated to v20.1. Older versions of this script will no longer be supported, but are still available for download (see below).

This script allows you to implement item crafting into your game, with a clean and partially customisable UI!

Features
  • Fully customisable crafting recipes.
  • Ability to craft multiple of any given item at a time (if ingredients allow).
  • Up to 6 ingredients per recipe.
  • Animated background, with the option to disable this if you do not like it.
  • Easy to customise the background into whatever you like by editing the bg.png graphic.
  • Sprite and text positions are agnostic to screen resolution.
Here's what the UI looks like by default.
screenshot.png
And here's what it looks like with the default animated background.

Installation (v20/20.1)
1. Download the .zip file from the MediaFire link by clicking on "Go to download" in the top right of this page.
2. Once downloaded, open the .zip file.
3. Drag the two folders you see into your project's main folder (where you have Game.exe), allowing them to merge with your existing folders.

Installation (v19/19.1)
1. Download the .zip file from this MediaFire link.
2. Once downloaded, open the .zip file.
3. Drag the two folders you see into your project's main folder (where you have Game.exe), allowing them to merge with your existing folders.

Installation (v18/18.1)
1. Download the .zip file from this MediaFire link.
2. Once downloaded, open the .zip file.
3. Copy the contents of script.txt and paste it into a new script section above Main.
4. Drag the Graphics folder into your project's main folder (where you have Game.exe), allowing it to merge with your existing Graphics folder.

How to use
In an event, you need to call pbItemCrafter(stock, speech1, speech2).
Here, stock is an array that contains two elements. First, the symbolic name of the item you wish to craft (e.g. :FULLRESTORE). Second, an array of ingredients (symbolic names) and their costs. I'll give an example of this shortly.
speech1 and speech2 are text that display on screen when you begin and finish crafting, respectively. These are optional arguments. By default, speech1 is "Let's get started!" and speech2 is "Come back soon!".

Here's a simple example of how to set up the event:
Ruby:
pbItemCrafter([
[:FULLRESTORE,[:POTION,5,:ORANBERRY,10,:REVIVE,1,:LUMBERRY,2,:FULLHEAL,1,:XSPEED,3]]
])
In this example, we want to craft a Full Restore. The ingredients for 1 Full Restore are 5 Potions, 10 Oran Berries, 1 Revive, 2 Lum Berries, 1 Full Heal and 3 X Speeds. The ingredients array must be formatted in this way: ingredient_1, cost_1, ingredient_2, cost_2, etc.

You can specify up to 6 ingredients in any given recipe and whatever costs you deem appropriate.

Here's an example of more than one item being offered by the item crafter:
Ruby:
pbItemCrafter([
[:FULLRESTORE,[:POTION,5,:ORANBERRY,10,:REVIVE,1,:LUMBERRY,2,:FULLHEAL,1,:XSPEED,3]],
[:TM01,[:YELLOWAPRICORN,5,:POKEBALL,10,:REPEL,22]],
[:LAGGINGTAIL,[:HARDSTONE,1,:IRONBALL,1]],
[:SITRUSBERRY,[:POTION,2]]
])

There are 4 possible items to craft here, all with varying recipe lengths and costs. There's no limit to the number of items to be crafted, only on the number of ingredients (at the moment).

Here's a final example where you can change the text that appears when beginning/ending item crafting:
Ruby:
pbItemCrafter([
[:FULLRESTORE,[:POTION,5,:ORANBERRY,10,:REVIVE,1,:LUMBERRY,2,:FULLHEAL,1,:XSPEED,3]],
[:TM01,[:YELLOWAPRICORN,5,:POKEBALL,10,:REPEL,22]],
[:LAGGINGTAIL,[:HARDSTONE,1,:IRONBALL,1]],
[:SITRUSBERRY,[:POTION,2]]
], speech1="I heard a rumour...", speech2="...that you installed this script.")

Controls
Press the left/right arrows to move between recipes.
Press the up/down arrows to increase/decrease the quantity you wish to craft.
Press C/Space/Enter to begin crafting. In v19+, this is now whatever you have mapped to "Use".
Press X/Esc to close the UI. In v19+, this is now whatever you have mapped to "Back".

Current limitations
  • Maybe you want more than 6 ingredients in a recipe? It could be tricky to fit additional icons on the screen.
  • Longer item names might overlap icons/other text. I can look into this if this is a problem for lots of people.

Please let me know if there are any issues/questions either here or via Discord (ThatWelshOne_#3324). I'm always happy to help where I can.

Thanks for reading!
Credits
Please credit ThatWelshOne_ if used.
Author
ThatWelshOne_
Downloads
1,938
Views
11,044
First release
Last update
Rating
5.00 star(s) 5 ratings

More resources from ThatWelshOne_

Latest updates

  1. Updated for v20/20.1 compatibility

    Some minor tweaks for v20/20.1 compatibility.
  2. Minor update to improve screen fade in/out

    Small update to make the screen fade in/out more naturally. Updated both the v18 and v19...
  3. Tiny update for v19.1 compatibility

    Hello, everyone! Just a quick update to have this resource work in v19.1 (also works in v19). Enjoy!

Latest reviews

This Plugin saved me a ton of time! And it works perfectly as far as I can tell
Are recipes unlockable or they are all unloncked from the begginning? It would be nice if they get unlockeable as you get them.
ThatWelshOne_
ThatWelshOne_
I talk about how to do that in the Discussion section. Feel free to DM me or leave a comment if you can't work it out.
This is fun but im wondering if we can craft multiple items from one ingredient for example getting 6 shards from 1 star piece
ThatWelshOne_
ThatWelshOne_
Hello! That's currently not possible, but you're not the first person to ask me if it is. I'll see if I can implement this. Keep an eye out for future updates!
Outstanding plugin, fantastic for my Mega Stone crafting
Back
Top