Crafting

Mr. Trivel

Glasses
Veteran
Joined
Jun 9, 2014
Messages
284
Reaction score
467
First Language
Lithuanian
Primarily Uses
Author: Mr. Trivel


Name: Crafting


Created: 2016-03-27


Version: 1.0




 


What does it do?


Allows players to craft items.


 


Video:










 


How to use?


First, you'll need 2 new files in data folder:
Recipes.json
Disciplines.json



Recipes file will hold all recipe data and Disciplines file will hold data about disciplines. I *highly* recommend checking sample files that are located in the demo of this plugin.


 


Discipline object looks like this:


Code:
{
   "ID": 999,
   "Name": "NAME",
   "IconID": 1337,
   "ExpFormula": "10000*level",
   "MaxLevel": 2,
   "Categories": ["1", "2", "3", ... , "n"],
   "Background": "FileName"
}
 



And file structure looks like this:

Code:
[
null,
object,
object,
...,
object
]
"ID" - to identify which disciiplice is which and for plugin calls. ID > 0
"Name" - how discipline is called
"IconID" - icon for discipline
"ExpFormula" - leveling formula for discipline, level stands for current discipline level
"MaxLevel" - max possible discipline level
"Categories" - Categories to organize items when crafting
"Background" - Give a background to crafting. Leave it empty - "" to use default background. Images go into img\System


 


Recipe object looks like this:


Code:
{
   "ID": 192312,
   "Name": "Ultimate Sword of Ascension",
   "IconIndex": 122,
   "Result": [
   {
      "Type": "weapon",
      "ID": 99999,
      "Amount": 1
   }
   ],
   "Requires": [
   {
      "Type": "item",
      "ID": 1337,
      "Amount": 99
   }
   ],
   "Discipline": ID,
   "Category": ["Swords", "Weapons"],
   "XP": 999999999,
   "LevelReq": 150,
   "Learned": "command"
}


And file structure looks like this:


[
null,
object,
object,
...,
object
]


"ID" - To know which recipe is which. ID > 0
"Name" - How it appears in crafting window
"IconIndex" - Icon for recipe
"Result" - What items and how many of them result by crafting it, can be more than one item.
"Requires" - What items and how many of them are required to craft it.
{
"Type" - item type - "weapon", "item", "armor"
"ID" - item ID
"Amount" - how much of the item
}
"Discipline" - which disicipline's recipe is this
"Category" - under which categories will item be shown, can be multiple
"XP" - XP given for the discipline
"LevelReq" - Discipline level requirement to craft it
"Learned" - how is the recipe learned - "start" - from the start, "command" by plugin command, "levelhit" - unlocks automatically when hits  required level



Plugin Commands:



Crafting Start [DISCIPLINE_ID] - opens scene to craft with discipline
Crafting GainExp [DISCIPLINE_ID] [EXP] - give exp to certain discipline
Crafting Learn [RECIPE_ID] - learn a specific recipe
Examples:
Crafting Start 3
Crafting GainExp 1 100
Crafting Learn 5



Script Calls:



$gameSystem.getDisciplineExp(DISCIPLINE_ID) - returns EXP of a discipline
$gameSystem.getDisciplineLevel(DISCIPLINE_ID) - returns LEVEL of a discipline
$gameSystem.isRecipeKnown(RECIPE_ID) - returns if recipe is learned
$gameSystem.knownRecipesNumber(DISCIPLINE_ID) - returns amount of recipes known


 


Plugin: <Link: Github>


How to download the Plugin: Click the link above, there will be a button named Raw, press Right Click -> Save As.


Demo: <Link: Mediafire>


 


Terms of Use:


Don't remove the header or claim that you wrote this plugin.


Credit Mr. Trivel if using this plugin in your project.


Free non-commercial projects.


For commercial use contact Mr. Trivel.
 

InBlast

The Mad Hamster
Veteran
Joined
Nov 2, 2015
Messages
287
Reaction score
89
First Language
French
Ah, Trivel. You will never cease to amaze me x)


Thanks a lot for this amazing plugin !
 

Solis

Veteran
Veteran
Joined
Oct 24, 2015
Messages
376
Reaction score
84
First Language
English
Agreed, love crafting in game :) thanks for the contribution. 
 

Roguedeus

It's never too late to procrastinate...
Veteran
Joined
Mar 19, 2013
Messages
542
Reaction score
111
First Language
English
Primarily Uses
N/A
This is an excellent crafting mechanic!


I especially like the discipline setup with separate categories. It helps keep very large recipe catalogues from becoming unwieldy.


It also allows for some Foreshadowing. Empty categories hint at future discovery.


Would you consider the possibility of a scrolling Recipe Requirement window?


- If the recipe has more than 4 required ingredients, it gets cut off.
 

16_0430_trivel_crafting_1.JPG


(Note: I added the ability to require party gold... If curious)



Also. Would you be willing to allow for the window size, and its divisions (Left/Right) to be defined as plugin parameters?


Thanks again!


edit:


There are a few other things I've started to add for myself that you may wish to add for everyone to use. Such as 'chance' for each result, as well as displaying it, in the Product: section.
 
Last edited by a moderator:

Mr. Trivel

Glasses
Veteran
Joined
Jun 9, 2014
Messages
284
Reaction score
467
First Language
Lithuanian
Primarily Uses
@Roguedeus,


Params for window sizes are no problem.


As for scrolling, what would be a nice way to scroll it since? Since right now input just goes from list window to buy window and up/down are reserved for quantity.
 

Roguedeus

It's never too late to procrastinate...
Veteran
Joined
Mar 19, 2013
Messages
542
Reaction score
111
First Language
English
Primarily Uses
N/A
@Roguedeus,


Params for window sizes are no problem.


As for scrolling, what would be a nice way to scroll it since? Since right now input just goes from list window to buy window and up/down are reserved for quantity.


The first thing that pops into my head would be allowing for the player to input (RIGHT) when the recipe is selected, to move from the recipe list to the ingredients list, and scroll it accordingly. Currently, you must select the recipe to input the quality desired so a (RIGHT) input shouldn't cause a conflict. Also, imputing (ENTER) while in the requirement window can select it as normal.


But that is just a quick suggestion. Any solution that will allow for more than 4 ingredients to be shown would be great (including resizing the window or its elements). Whichever takes the least effort for you. :)


I would add it myself, and share it here if I was familiar with windows.


Speaking of which. Once you get around to adjusting the window (as mentioned) I will share my edits here if you don't object.


If they are acceptable (code wise), maybe I will have saved you some time. :)
 

NPK

Warper
Member
Joined
Apr 16, 2016
Messages
1
Reaction score
0
First Language
Japanese
Primarily Uses
Thank you for this awesome plugin.


Your works have helped me tremendously.


However, I seemed to be having an issue with this plugin.


As for its basic functionality, it works well in my environment, but when I try to write the names of the disciplines or recipe objects in Japanese, the characters do not display correctly doing gameplay. However, when I enter them in the European alphabets, it works correctly.


Do you have any solutions for this problem or any future plans to fix it?


Is it possible to display names normally in Japanese characters?
 

orrden

Warper
Member
Joined
Mar 3, 2016
Messages
1
Reaction score
0
First Language
English
Primarily Uses
Good day and thank you for this nice mod, I've been playing around with it a bit and seem to have found an issue.


I have attached the error log (F8) with this post.


It happens in conjunction with the YEP_ItemCore plugin.  I make about 200 Copper Ingot, then make a bunch of copper sword blades, then hold down enter while crafting 1 each copper swords and I get a TypeError: Cannot read property 'length' of undefined.

View attachment error_log.txt
 

Diretooth

Lv. 25 Werewolf
Veteran
Joined
Mar 10, 2013
Messages
1,228
Reaction score
443
First Language
English
Primarily Uses
RMMV

Nedwal

Veteran
Veteran
Joined
Oct 31, 2014
Messages
31
Reaction score
7
First Language
German
Primarily Uses
is there a way to forget a recipe?

can there be more subcategories? f.e. i want to craft up to 2000 different runes in 2-3 different ways, and would like one tab for 1 way of crafting them (4x rune of 1 lvl lower) and another for the second way ( craft them from x amount of Rune Dust (gained by desynth)
 

Roguedeus

It's never too late to procrastinate...
Veteran
Joined
Mar 19, 2013
Messages
542
Reaction score
111
First Language
English
Primarily Uses
N/A
For anyone still interested in using this plugin, but are having issues with it, I would recommend using the crafting plugin here instead.
(Rather than asking for the edits I mentioned above)

YR Plugins
https://forums.rpgmakerweb.com/index.php?threads/yr-plugins.69148/

It is essentially, the best parts of this, and a few other crafting plugins. It also happens to be what I am using now, FYI.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

The Ace attorney series are so great games... But at the same time such a travesty.
Made a video showcasing a plugin (by Lanza) that adds 5 more weather effects to our MV games. :LZYsmile: Namely:
Ash-dust,
bloodrain,
Cherry Blossom Petals,
Hail,
and bubbles.

I just like this website:
lol

Forum statistics

Threads
103,239
Messages
998,295
Members
134,729
Latest member
Takufy
Top