Skip to content

Instantly share code, notes, and snippets.

@KageDesu
Last active April 11, 2025 20:46
Show Gist options
  • Save KageDesu/36ab2df91604513b772a21a35d108403 to your computer and use it in GitHub Desktop.
Save KageDesu/36ab2df91604513b772a21a35d108403 to your computer and use it in GitHub Desktop.
Simple Crafting Plugin Guide

๐Ÿ› ๏ธ Simple Crafting Plugin Guide for RPG Maker MV and MZ

This plugin adds a simple crafting system to your RPG Maker game.


๐Ÿ”ง Plugin Setup

  • You can configure the crafting scene and window positions in the plugin parameters.
  • The plugin uses resources located in:
    img/pSimpleCrafting
    (You can replace or modify these images to suit your project.)

๐Ÿ“œ Script Calls

Use these script calls to control the crafting system during gameplay:

๐Ÿ”น OpenCraftingMenu();

  • Opens the main crafting scene.

๐Ÿ”น ShowCraftRecipe(ID);

  • Displays the recipe for an item (Item, Weapon, or Armor) by ID.
    Note: All items (weapons, armors) used in ShowCrafRecipe as ID should have <craft> notetag.

Usage Examples:

ShowCraftRecipe("5");    // Shows recipe for Item with ID 5
ShowCraftRecipe("w5");   // Shows recipe for Weapon with ID 5
ShowCraftRecipe("a5");   // Shows recipe for Armor with ID 5

ID Notes:

  • Use plain numbers for Items (e.g., "5")
  • Use "wX" for Weapons (e.g., "w12")
  • Use "aX" for Armors (e.g., "a7")

๐Ÿ”น ShowCraftAutoRecipe();

  • Displays a recipe automatically based on the last item used in the menu.
  • The item must have the notetag <craftAutoRecipe:ID>. The recipe shown will be for the specified ID.

๐Ÿ”น ShowAllCraftRecipes();

  • Opens a list of all recipe items in the database that include the <craftAutoRecipe:X> notetag.

๐Ÿ”น ShowMyCraftRecipes();

  • Opens a list of only the recipes for items currently in the playerโ€™s inventory.

๐Ÿท๏ธ Notetags

โœจ General Crafting Notetags (Items, Weapons, Armors)

Tag Description
<craftMat> Marks this item as a crafting material. Will appear in the material list.
<craft:ID,ID,...> Defines a recipe for the item. Each ID refers to a material in a specific slot. You can use multiple <craft:...> tags to define alternative recipes.
<craftImg:NAME> Uses an image from img/pSimpleCrafting/NAME.png instead of an icon in the crafting scene.
<craftSound:SE> Plays a sound effect from audio/SE upon successful crafting.
<craftType:TYPE> Custom type label shown in the itemโ€™s description window (e.g., Material, Weapon Part, etc.).
<craftTypeColor:#HEX> Sets the color of the type label (e.g., #d93fd1).
<craftFreePositions> Disables strict slot order. Materials can be in any order/position.
<craftChance:X> Defines success chance as a percent (1โ€“100). If the crafting fails, materials are lost. Requires the plugin parameter "Is Use Chance System?" to be set to TRUE. Can also use JavaScript formulas.
<craftExp:VALUE> Grants experience to the actor upon successful crafting.
<craftVar:ID,VALUE> Increments a game variable by a specified value when the item is crafted.
<craftCE:ID> Calls a common event (ID) upon successful crafting. Note: Common event will be executed when you leave the Crafting Scene

Examples:

<craft:35,35,35>
<!-- Requires 3x Item with ID 35, each in a specific slot -->

<craft:w11,0,a10,33>
<!-- Weapon ID 11 in slot 1, slot 2 empty, Armor ID 10 in slot 3, Item ID 33 in slot 4 -->

<craftChance:25>
<!-- 25% success rate -->

<craftChance:$gameVariables.value(33)>
<!-- Success rate equals the value of game variable 33 -->

<craftVar:10,1>
<!-- Increments game variable 10 by 1 upon successful crafting -->

<craftExp:50>
<!-- Grants 50 experience points to the actor (party leader) upon successful crafting -->

<craftCE:5>
<!-- Calls common event 5 upon successful crafting -->

๐Ÿงช Additional Notetag (Items Only)

Tag Description
<craftAutoRecipe:ID> Links this item to a specific recipe that will be shown when using ShowCraftAutoRecipe();. The linked item (Armor/Weapon) must have a <craft> notetag.

Example:

<craftAutoRecipe:w5>
<!-- Displays recipe for Weapon with ID 5 -->

Plugin Parameters (Information for some of them)

  • Can Craft Immediately - if true, the player can craft items directly from their recipe list (if the player has materials).

If player has enough materials, a special message will appear under the item icon, and when the player clicks on the item icon, they can craft it immediately.

2025-04-11_23-32-40

For editing the visual appearance (and text), edit data\PKD_SimpleCrafting\NUI_CraftReadyStatus.json file.

๐Ÿ“Œ Notes

  • Recipes are validated strictly by position, unless <craftFreePositions> is used.
  • Items used as ingredients must have the <craftMat> tag to appear in crafting material lists.
  • You can define multiple crafting recipes for a single item using several <craft:...> tags.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment