Vlue's Plugin's (Crafting,Quests,Inventory,Time,Steal)

Discussion in 'JS Plugin Releases (RMMV)' started by Screech1989, Nov 3, 2015.

  1. Screech1989

    Screech1989 King Pin! Veteran

    Messages:
    107
    Likes Received:
    88
    Location:
    Pontypool, South Wales, UK
    First Language:
    English
    Vlue's (Daimonious Tails) Complete Plugin's


    Vlue also known as Daimonious Tails is a great scriptwriter and has been working on scripts for a while making various plugins for older RPG makers, and is now working on


    new Plugins for MV, Here is a complete list of all his work. I did not make any of the plugins here, i have contacted Vlue and have been given permission to add his work to the forums, All his work can be found on his


    Official Website.


    All his time making scripts, Plugins and maintaining his website i decided to post his work here for him to spread work to the RPG community, please show your support on his website.


    [​IMG]Game Time - v1.1

    Name: Game TimeAuthor: VlueCurrent Version: 1.1


    Download .JS script


    - Download Example ProjectAbout


    All the time-based features from Basic Game Time that you love with a whole bunch more added on. A customizable clock for both the menu and map, days of the week/month, months, and years as well, all fully customizable and nameable. You want 28 months all named after one of your nephews? That's weird, but you can do it and I won't judge. Also comes with message codes to use in text boxes to display the current time. Now you can be yelled at by an NPC for playing on a Tuesday, what fun! Other features include saving and recalling times as well as timer variables, which count down by 1 every minute/second.Feature List

    • Time and Date display on both the main game screen and in Menu
    • Screen tints automatically setup for the time displayed in game (Night time - Dark tint over the game etc)
    • Option to turn the display on or off at any time by pressing the "SHIFT" key mid game.

                       - Minimum or Full display 


                       - Minimum Display (HH:MM)


                       - Full Display (HH:MM:SS - DD/MM/YYYY)

    • Adjustable windows so you can have the time displayed anywhere on the screen, both In game and on Menu.
    • 24 hour or 12 hour clock mode.
    • Have your own in game time or set it to display the real time based on your system/device clock.
    • Interactive NPC moments based on time of day/night
       

    Screenshot[​IMG]


    Update History


    Version 1.1 - Added timer variables
    Version 1.0b-d - Fixed things... year post change command
    Version 1.0a - Added message codes, error handling
    Version 1.0 - Created

    [​IMG]Inventory Menu  - v1.0

    Name: Icon Inventory and Details WindowAuthor: VlueCurrent Version: 1.0Download HereAboutVlue's Detail windows offers a different look on your menu when browsing and selecting items, with icon display and details.Features

    • 100% plug and play, no adjustments needed
    • Font only items
    • Icons and Font
    • New window layout for the items menu
    • Easy to understand
    • Fit more items on one page in the item slot using this



    Screenshot[​IMG]
     

    [​IMG]Crafting System - v1.3e

    Name: Recipe CraftingAuthor: Vlue (with additions from DragonPC and MuteDay)Current Version: 1.3e


    Download .JS script


    - Download Example Project


    AboutWhat's this? It's Crafting! The simple act of taking one item (or a bunch of them) and making them into something better, something useful! Well, not always. But that is the idea. You even have different crafting categories, crafting levels, numerous options to customize and a banana! (Banana not always included).Features

    • Add as many Crafting Skills as you would like to your menu
    • Optional Icons to display for each Crafting Skill
    • Adjustable level up XP needed for leveling up your skills
    • 3 different views for the menu.

                    - Off (You can only craft when the script command has been called at an event)


                    - View (You can view all your crafting information for the menu, but can only craft at an event)


                    - Craft (You have full access to craft anything anywhere by going to the crafting section in the menu)

    • Choose what is displayed on the crafting screen:

                     - Gold (How much Gold it costs to craft that item)


                     - Success Chance (How successful you will be at crafting the item)


                     - Player Level (What Level the main player needs to be to craft this item)


                      - Skill Level (What Level your skill needs to be to craft this item)

    • Easy simple to understand code to add to your items to make them craft-able
    • Adjustable Font colors various sections, (No enough of a material, enough materials, enough gold etc)
    • Craft Multiple items in one touch.
    • Adjustable Crafting Sounds for Success and Failed.
    • More added - check update history below screenshot.



    Screenshot

    • [​IMG]





    Update History


    Version 1.3c(d)(e) - Auto-teach recipes, recipe name override, padding issues, fixed gold window issues
    Version 1.3a(b) - Minor compatibility, Main menu string (Moved Scene_Crafting to allow outside calls)
    Version 1.3 - Added dismantling!
    Version 1.2a - Added several features!
    Version 1.2 - Error messages, new features, different recipe input
    Version 1.1 - You know, some stuff
    Version 1.0 - Created

    [​IMG]Quest System - v1.2b

    Name: Quest SystemAuthor: VlueCurrent Version: 1.2bDownload LinkAboutQuests, quests quests quests quests quests quest quests quests quests quests. Erm.. ahem. That'd make more sense if you heard what tune I was singing that too. Anyways, this script does exactly what you'd expect, allows you to have quests! Not just any old boring evented quests, that's just normal stuff. No, this has like.. objectives, and rewards, and a whole journal/log scene to view quests in! How much fancier could you get? Really, I'm asking. I've done near everything but put a bow tie on it. ... Anyways... I'm digressing, this is a plugin that gives you quests. Enjoy.
     


    Features

    • Full Quest Information:
    • Quest Name
    • Level Requirement
    • Difficulty
    • Auto Complete
    • Choose to abandon the quest or not
    • Force player to Turn the Quest in
    • Quest Givers name
    • Location of receiving the quest
    • Quest Description
    • Quest Objectives
    • Quest Rewards
    •                     - XP, Gold, Items, Weapons...etc
    • Unlimited amount of quests can be made.
    • All Quests kept clean and tidy in 1 .txt document in your Data folder

    Screenshots[​IMG]


    [​IMG]


    [​IMG]


    Update History


    Version 1.2b - New plugin commands, new script calls, failed quest, editable max obj values


    Version 1.2(a) - Auto objectives (monster and items), minor visuals (fixed formatting and added scrolling)


    Version 1.1a - Added new script calls and manual scene plugin command


    Version 1.1 - A whole bunch of stuff, basically it works and it's cooler now


    Version 1.0 - Created

    [​IMG]Quest System Editor (Add On) - v1.1

    Name: Quest System EditorAuthor: FouruCurrent Version: 1.1Download Link


    ***Please Note this Editor Requires .NET Framework 4.0 to run***


           ***This Quest Editor is for Non-Commercial use ONLY***AboutA fantastic editing tool that is used with the Quest System, this is a seperate .exe file that is used to easily create quests instead of manually typing each one into the .txt document, with a smooth and clean UI and descriptions for everything within the editor, anyone from a professional to a noob could use this to create the most adventures quests in a game.


    Features

    • Full quest display as you edit various sections.
    • Changeable Options:

                   -  Quest ID Number


                   -  Quest Name


                   -  Level Requirements to begin a quest


                   -  Quest Difficulty


                   -  Quest Giver


                   -  Location of quest


                   -  Auto Complete on clicking the turn in NPC etc


                   -  Abandon quest on/off


                   -  Force accept/TurnIn


                   -  Quest description


                   -  Objectives


                          -  Name


                          -  Hidden objective or not hidden


                          -  Objective description


                   -  Rewards
                          -  Gold Amount



                          -  Exp Amount (Also scaleable based on level on completion of quest)


                          -  Item, weapons etc (Icon, name and amount)


    Video Tutorial



    Update History


    Version 1.1 - Added Save button, Auto update ID (now it will ask you when you save), delete quest error solved


    Version 1.0 - Created






    [​IMG]Steal Ability - v1.0a

    Name: Steal AbilityAuthor: VlueCurrent Version: 1.0aDownload LinkAboutWhat's an RPG without a thief? An honest one, that's what. But also boring. This plugin let's you set up specific stealing abilities, and specify what items can be stolen from an enemy (with variable chances), how much gold they carry which can be stolen, and even special skills that you can learn (steal) from them. In addition various note tags extend to actors, classes, and equipment which means you can have say a Thief class be better at stealing then a Warrior, or even some special Thief Glove item that increases steal chance. What's more? Well, you could also set the abilities learned from monsters to be permanent! Blue Mage Ho! (Don't call it that, though.)


    Features

    • Teaching players the ability 'Steal'
    • Using 'Steal' in battle to gain extra loot :

                  - Items


                  - Gold

    • Variable chances of stealing
    • How much gold certain enemies have to be stolen
    • Able to Steal abilities and moves to teach your own character permanently
    • Player stats to increase chances of stealing with certain items or weapons

    Screenshots
    No Screenshot Available


    Update History


    Version 1.0 - Created



    Latest Updates :

    • Quest System Editor - Version 1.1 - Added Save button, Auto update ID (now it will ask you when you save), delete quest error solved
    • Game Time - Version 1.1 - Added timer variables
    • Crafting System - Version 1.3e - Auto-teach recipes, recipe name override, padding issues, fixed gold window issues
    • Quest System - Version 1.2b - New plugin commands, new script calls, failed quest, editable max obj values



    Terms of use


    All of Vlue's work is free for both commercial and non-commercial use with the exception he is credit of course as well as anyone else who has contributed to his work and helped create the scripts we have today, if you use any of his plugins dont forget to show some


    support and as stated at the top, check out his official page when you get 2 minutes for more info and updates.


    http://daimonioustails.weebly.com/
     
    Last edited by a moderator: Feb 19, 2016
    #1
    Guiguimu, Archeia, Oriceles and 29 others like this.
  2. Prescott

    Prescott argggghhh Veteran

    Messages:
    410
    Likes Received:
    199
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    I'd like to see your plugins... but all of the spoilers are broken except the top one :(
     
    #2
    SOC and Chaos17 like this.
  3. brunovisk2

    brunovisk2 Veteran Veteran

    Messages:
    53
    Likes Received:
    40
    Location:
    São Paulo
    First Language:
    Portuguese
    please Vlue tell me you're going to remake your vxAce summon system to MV *---*?
     
    #3
  4. timothy-henri

    timothy-henri Villager Member

    Messages:
    6
    Likes Received:
    0
    @reddelite you could check them on his weebly :3
     
    Last edited by a moderator: Nov 4, 2015
    #4
  5. Chickenlump

    Chickenlump Veteran Veteran

    Messages:
    40
    Likes Received:
    21
    First Language:
    English
    I'm in love with the Icon Inventory plugin.  <3
     
    #5
  6. gokuby

    gokuby Veteran Veteran

    Messages:
    96
    Likes Received:
    14
    First Language:
    German
    Primarily Uses:
    N/A
    These are all really awesome PlugIns, thanks for finding and posting them!

    Sadly I got a problem with the three plugins I want to use q.q

    Interesting Stats and Formulas: Is simply not working. If I increase the crit by 5% per luck and the character has 20 crit, he/she should crit with every attack, sadly it doesn´t happen. Tested in a completly new game as well.

    Crafting System: In my project I get a "Syntax Error: Unexpected Token +" even if I delete all other plugins, in a completly fresh game it works perfectly(and is absolutely awesome!) <--weird?

    Icon Inventory: Works fine, but the displays overlap with "Yanflys Item Core"
     
    #6
  7. PlatypusOfDoom

    PlatypusOfDoom Villager Member

    Messages:
    24
    Likes Received:
    5
    I can confirm that the Interesting Stats and Forumals doesn't seem to be working. Unfortunately none of the adjustments seem to actually take effect, even when I turn off all other plugins.
     
    #7
  8. dragonpc

    dragonpc Veteran Veteran

    Messages:
    109
    Likes Received:
    78
    First Language:
    English
    Hello, I liked the Crafting Plugin so I fixed a bunch of things, and added a bunch of things... I hope nobody minds.(I didn't see any ToS listing here and the post seems to have been wiped out by something.)  But I thought I would repost the script here for the Owner to get, and maybe keep or change the edits I have done on it. As well as anyone else who may want a working version.

    Changelog of my Edits:

     * ----------- DragonPC Update 1.2 (bug fixes + features) ----------------

     *

     * - Fixed Crafting popup to no longer be truncated.

     * - Fixed Gauge Overlap.

     * - Player EXP no-longer levels you excessively.

     * - Added custom text display for inputting your own terms.

     * - Added custom sound option to choose your own sounds for "Success" and "Failure".

     * - Added Volume control of Success And Failure Sounds.

     * - Removed Gauge when at max level and displayed MAX LEVEL (Customizable).

     * - Changed Colors of Numbers when not enough, and more than you need, to Red and Green Respecitvely.

     * - Gold Cost Turns red when you don't have enough Gold and green when you do.

     * - Custom Colors for Levels of Success chance %.

     * - Assorted Visual Upgrades.

     * 

     *(Special Thanks to SkottyTV)

     * ------------------------------------------------------------------------
    Here is a Couple Screenshots.

    [​IMG]

    [​IMG]

    Script Here

    //==

    // Recipe Crafting MV Version 1.2 (DragonPC Edit)

    //==

     

    /*:

     * @plugindesc v1.1c (DragonPC Update) // Take some items.. and make them into other items! That's crafting~

     * @author Vlue

     *

     *@param ------Main Functions------

     *

     * @param Categories

     * @desc The various categories of crafting available

     * @default "Alchemy","Blacksmith","Tailor"

     *

     * @param User Definable Max Level

     * @desc Define the Maximum level the player can reach in the crafting Interface (default - 99)

     * @default 99

     *

     * @param Category Icons

     * @desc The icons (index) to use for the crafting categories

     * @default 219,223,225

     *

     * @param Player Level Icon

     * @desc Icon displayed by Player level (if applicable) in crafting menu

     * @default 82

     *

     * @param Crafting XP Formula

     * @desc The exp needed to determine current crafting level (lvl)

     * @default 100 * lvl

     *

     * @param Craft Multiple

     * @desc Allow crafting of multiple items at once

     * @default true

     *

     * @param Menu Craft Options

     * @desc Whether to allow crafting from menu (off, view, craft)

     * @default craft

     * 

     * @param Display Parameters

     * @desc Include/exclude various details from the recipe window

     * @default gold:true, chance:true, plevel:true, clevel:true

     *

     * @param ------Custom Text------

     *

     * @param Required Level Text

     * @desc Change Required Level text. (default - Required level:)

     * @default Required level:

     *

     * @param Required Material Text

     * @desc Change Required Materials text. (default - Required materials:)

     * @default Required materials:

     *

     * @param Success Rate Text

     * @desc Change Success Rate text. (default - Success rate:)

     * @default Success rate:

     *

     * @param Crafting Cost Text

     * @desc Change Crafting Cost text. (default - Crafting costs:)

     * @default Crafting costs:

     *

     * @param Crafting Text

     * @desc Change Crafting Text. (default - Craft)

     * @default Craft

     *

     * @param Crafted Text

     * @desc Change Crafted Text. (default - Crafted!)

     * @default Crafted!

     *

     * @param Crafting Failed

     * @desc Change Crafting Failed Text. (default - Crafting failed!)

     * @default Crafting failed! 

     *

     * @param Max Level Test

     * @desc Text Displayed when reaching max level in a profession.

     * @default MAX LEVEL

     *

     * @param ------Colors------

     * 

     * @param Success 0-20 Color

     * @desc Change Color of the Percentage (default - 18)

     * @default 18

     *

     * @param Success 20-40 Color

     * @desc Change Color of the Percentage (default - 20)

     * @default 20

     *

     * @param Success 40-60 Color

     * @desc Change Color of the Percentage (default - 21)

     * @default 21

     *

     * @param Success 60-80 Color

     * @desc Change Color of the Percentage (default - 17)

     * @default 17

     *

     * @param Success 80-100 Color

     * @desc Change Color of the Percentage (default - 29)

     * @default 29

     *

     * @param ------Custom Sounds------

     * 

     * @param Crafting Succeded Sound

     * @desc Change Crafting Succeeded Sound.(Case Sensitive) (default - Item3)

     * @default Item3

     *

     * @param Success Sound Volume

     * @desc Change Crafting Succeeded Sound Volume. (default - 90)

     * @default 90

     *

     * @param Crafting Failed Sound

     * @desc Change Crafting Failed Sound.(Case Sensitive) (default - Scream)

     * @default Scream

     *

     * @param Fail Sound Volume

     * @desc Change Crafting Failed Sound Volume. (default - 90)

     * @default 90

     *

     * @help

     *

     * ----------- DragonPC Update 1.2 (bug fixes + features) ----------------

     *

     * - Fixed Crafting popup to no longer be truncated.

     * - Fixed Gauge Overlap.

     * - Player EXP no-longer levels you excessively.

     * - Added custom text display for inputting your own terms.

     * - Added custom sound option to choose your own sounds for "Success" and "Failure".

     * - Added Volume control of Success And Failure Sounds.

     * - Removed Gauge when at max level and displayed MAX LEVEL (Customizable).

     * - Changed Colors of Numbers when not enough, and more than you need, to Red and Green Respecitvely.

     * - Gold Cost Turns red when you don't have enough Gold and green when you do.

     * - Custom Colors for Levels of Success chance %.

     * - Assorted Visual Upgrades.

     * 

     *(Special Thanks to SkottyTV)

     * ------------------------------------------------------------------------

     *

     *

     * Plugin Commands:

     *  crafting call categoryName            (Example: crafting call Alchemy)

     *

     * Recipe Setup

     *  Recipes (At the moment) are created in the note field of the

     *  item to be created and the format is as follows:

     * 

     *  <recipe>

     *   <materials>

     *   {type:"itemtype", id:itemId, amount:numberRequired, cons:consumed?}

     *   { + as many as you need }

     *   <materials>

     *   category:CategoryOfCraft                           (Name i.e. Blacksmith)

     *   goldCost:costInGold                                (Number)

     *   success:successRateBase                            (Number, 0 = 0%, 100 = 100%)

     *   successGain:successRateChangePerLevelDifference    (Number, %)

     *   level:levelRequired                                (Number)

     *   xp:craftingExpEarned                               (Number)

     *   xpDeprac:lossOfExpPerLevelDifference               (Number)

     *   craftLevel:craftingLevelRequired                   (Number)

     *   pxp:playerExpEarned                                (Number)

     *   craftMultiple:allowMultipleCrafts                  (Boolean i.e. true)

     *  <recipe>

     *

     *  Everything from goldCost to craftMultiple is optional (will be set to default 0-1 values)

     * 

     *  Simplest recipe (example):

     *   <recipe>

     *    <material>

     *     {type:"armor", id:3, amount:3, cons:false}

     *    <material>

     *    category:Blacksmith

     *   <recipe>

     *

     *  Full Recipe (example):

     *   <recipe>

     *    <materials>

     *    {type:"weapon", id:3, amount:3, cons:false}

     *    {type:"armor", id:2, amount:3, cons:false}

     *    <materials>

     *    goldCost:0

     *    success:80

     *    successGain:2

     *    level:1

     *    category:Alchemy

     *    xp:10

     *    xpDeprac:2

     *    craftLevel:1

     *    pxp:5

     *    craftMultiple:true

     *   <recipe>

     *

     */

     

    var $gameRecipes = null;

     

    (function() {

     

    var parameters = PluginManager.parameters('RecipeCrafting');

    var categoryNames = eval("[" + (parameters['Categories'] || '"Alchemy","Blacksmith","Tailor"') + "]");

    var categoryIcons = eval("[" + (parameters['Category Icons'] || "219,223,225") + "]");

    var xpFormula = parameters['Crafting XP Formula'] || "100 * lvl";

    var craftMultiple = (parameters['Craft Multiple'] || "true").toLowerCase() == "true";

    var craftFromMenu = parameters['Menu Craft Options'] || "craft";

    var tempdParam = "gold:true, chance:true, plevel:true, clevel:true"

    var displayParam = eval( "( { " + (parameters['Display Parameters'] || tempdParam) + " } )");

    var playerLevelIcon = parameters['Player Level Icon'] || 82;

    //Custom Text Inputs(DragonPC)

    var reqlevel = String(parameters['Required Level Text'] || 'Required level:');

    var reqmaterial = String(parameters['Required Material Text'] || 'Required material:');

    var sucRate = String(parameters['Success Rate Text'] || 'Success rate:');

    var craCost = String(parameters['Crafting Cost Text'] || 'Crafting costs:');

    var craText = String(parameters['Crafting Text'] || 'Craft');

    var craftedText = String(parameters['Crafted Text'] || 'Crafted!');

    var craFailed = String(parameters['Crafting Failed'] || 'Crafting failed!');

    var MLT = String(parameters['Max Level Test'] || 'MAX LEVEL');

    //End Custom Text(DragonPC)

    //Custom Sound(DragonPC)

    var success = String(parameters['Crafting Succeded Sound'] || 'Item3');

    var failure = String(parameters['Crafting Failed Sound'] || 'Scream');

    var failureVol = Number(parameters['Fail Sound Volume']);

    var successVol = Number(parameters['Success Sound Volume']);

    //End Custom Sound(DragonPC)

    //User Definable Max Level(DragonPC)

    var UDML = Number(parameters['User Definable Max Level']);

    //End User Definable Max Level

    //User Definable Colors(DragonPC)

    var colorCPV1 = Number(parameters['Success 0-20 Color']);

    var colorCPV2 = Number(parameters['Success 20-40 Color']);

    var colorCPV3 = Number(parameters['Success 40-60 Color']);

    var colorCPV4 = Number(parameters['Success 60-80 Color']);

    var colorCPV5 = Number(parameters['Success 80-100 Color']);

    //END User Definable Colors

    var categoryEventName = "";

     

    function Recipe() {

    this.initialize.apply(this, arguments);

    }

    Recipe.prototype.initialize = function(id, type, recipe) {

    this._id = id;

    this._type = type;

    this._result = new Material(recipe.result);

    this._materials = [];

    for(var i = 0;i < recipe.materials.length;i++) {

    this._materials.push(new Material(recipe.materials));

    }

    this._goldCost = recipe.goldCost ? Number(recipe.goldCost[1]) : 0;

    this._success = recipe.success ? Number(recipe.success[1]) : 100;

    this._successGain = recipe.successGain ? Number(recipe.successGain[1]) : 0;

    this._level = recipe.level ? Number(recipe.level[1]) : 0;

    this._category = recipe.category ? recipe.category[1] : categoryNames[0];

    this._xp = recipe.xp ? Number(recipe.xp[1]) : 100;

    this._xpDeprac = Number(recipe.xpDeprac) ? recipe.xpDeprac[1] : 0;

    //Changed EXP Gain To NON-EXESSIVE levels I.E. 0 (DragonPC) Changes!

    this._craftLevel = recipe.craftLevel ? Number(recipe.craftLevel[1]) : 0; //Number(recipe.craftLevel) ? recipe.craftLevel[1] : 1;

    this._pxp = recipe.playerXp ? Number(recipe.playerXp[1]) : 0; //Number(recipe.playerXp) ? recipe.playerXp[1] : 1;

    //End exp Changes End Change!

    this._craftMultiple = (recipe.multiple ? recipe.multiple[1] : "true").toLowerCase() == "true";

    }

    Recipe.prototype.name = function() { return this._result.name(); }

    Recipe.prototype.hasMaterials = function() {

    for(var i = 0;i < this._materials.length;i++) { 

    var material = this._materials;

    if($gameParty.numItemsCrafting(material._item) < material._amount) {return false;}

    }

    return true;

    }

    Recipe.prototype.hasGold = function() { return $gameParty.gold() >= this._goldCost;}

    Recipe.prototype.hasCraftLevel = function() { return this._craftLevel <= $gameParty.craftLevel(this.categoryId());}

    Recipe.prototype.hasLevel = function() { return this._level <= $gameParty.highestLevel() && this.hasCraftLevel();}

    Recipe.prototype.craftable = function() { return this.hasGold() && this.hasMaterials() && this.hasLevel();}

    Recipe.prototype.amountCraftable = function() { 

    var amount = 0;

    for(var i = 0;i < this._materials.length;i++) {

    var material = this._materials;

    var amountNext = $gameParty.numItemsCrafting(material._item) / material._amount

    if(amountNext > amount) {amount = amountNext;}

    }

    var amountGold = this._goldCost > 0 ? $gameParty.gold() / this._goldCost : 99;

    if(amountGold < amount) {amount = amountGold;}

    return Math.floor(amount);

    }

    Recipe.prototype.craft = function(failRate) {

    failRate = failRate || 0;

    this.removeMaterials();

    if(failRate < this.successRate()) {

    return this.addResult();

    }

    return null;

     }

     

    Recipe.prototype.removeMaterials = function() {

    for(var i = 0;i < this._materials.length;i++) {

    var material = this._materials;

    if(material._consumed) {

    $gameParty.gainItem(material._item, -material._amount);

    }

    }

    $gameParty.gainGold(-this._goldCost);

    }

    Recipe.prototype.addResult = function() {

    var newItem = this._result;

    $gameParty.gainItem(newItem._item,newItem._amount);

    $gameParty.gainCraftExp(this.categoryId(), this.xpGain());

    for(var i = 0;i < $gameParty.members().length;i++) {

    $gameParty.members().gainExp(this._pxp);

    }

    return newItem._item;

    }

    Recipe.prototype.categoryId = function() { return categoryNames.indexOf(this._category);}

    Recipe.prototype.xpGain = function() {

    //User Definable Max Level(DragoncPC) Changes!

    if ($gameParty.craftLevel(this.categoryId()) < UDML) {

                var levelDiff = $gameParty.craftLevel(this.categoryId()) - this._craftLevel;

    return Math.max(this._xp - this._xpDeprac * levelDiff,0);

            }

    else {

    return Math.max (0, 0);

    }

    //User Definable Max Level end End Change

     

    }

    Recipe.prototype.successRate = function() {

    var levelDiff = $gameParty.craftLevel(this.categoryId()) - this._craftLevel;

    return Math.min(this._success + this._successGain * levelDiff,100);

    }

     

    function Material() { 

    this.initialize.apply(this, arguments);

    }

    Material.prototype.initialize = function(material) {

    if(material.type == "item") {this._item = $dataItems[material.id];}

    if(material.type == "weapon") {this._item = $dataWeapons[material.id];}

    if(material.type == "armor") {this._item = $dataArmors[material.id];}

    this._amount = material.amount;

    this._consumed = material.consumed || true;

    }

    Material.prototype.name = function() {

    return this._item.name;

    }

     

    var crafting_game_party_initialize = Game_Party.prototype.initialize;

    Game_Party.prototype.initialize = function() {

    crafting_game_party_initialize.call(this);

    this._craftingLevel = new Array(categoryNames.length);

    this._craftingExp = new Array(categoryNames.length);

    for(var i = 0;i < categoryNames.length;i++) {

    this._craftingLevel = 1;

    this._craftingExp = 0;

    }

    }

    Game_Party.prototype.craftLevel = function(id) { return this._craftingLevel[id]; }

    Game_Party.prototype.craftExp = function(id) { return this._craftingExp[id]; }

    Game_Party.prototype.craftExpNext = function(id) {

    var string = xpFormula.replace(/\lvl/g, this.craftLevel(id));

    return eval(string);



    Game_Party.prototype.gainCraftExp = function(id, value) {

    this._craftingExp[id] += value;

    while(this.craftExp(id) >= this.craftExpNext(id)) {

    this._craftingExp[id] -= this.craftExpNext(id);

    this._craftingLevel[id]++;

    }

    }

    Game_Party.prototype.numItemsCrafting = function(item) {

    if(Object.keys(PluginManager.parameters('YEP_ItemCore')).length > 0) {

    return this.numIndependentItems(item);

    } else {

    return this.numItems(item);

    }

    }

     

    var crafting_DataManager_createGameObjects = DataManager.createGameObjects;

    DataManager.createGameObjects = function() {

    crafting_DataManager_createGameObjects.call(this);

    $gameRecipes = this.createRecipes();

    }

    DataManager.createRecipes = function() {

    var recipes = [];

    for(var i = 1;i < $dataItems.length;i++) {

    if(!$dataItems) {continue;}

    var recipeData = $dataItems.note.match(/<recipe>([^.]+)<recipe>/);

    if(recipeData) {

    recipes.push(new Recipe(i, "item", this.createRecipeStruct(i, "item", recipeData)));

    }

    }

    for(var i = 1;i < $dataWeapons.length;i++) {

    if(!$dataWeapons) {continue;}

    var recipeData = $dataWeapons.note.match(/<recipe>([^.]+)<recipe>/);

    if(recipeData) {

    recipes.push(new Recipe(i, "weapon", this.createRecipeStruct(i, "weapon", recipeData)));

    }

    }

    for(var i = 1;i < $dataArmors.length;i++) {

    if(!$dataArmors) {continue;}

    var recipeData = $dataArmors.note.match(/<recipe>([^.]+)<recipe>/);

    if(recipeData) {

    recipes.push(new Recipe(i, "armor", this.createRecipeStruct(i, "armor", recipeData)));

    }

    }

    return recipes;

    }

    DataManager.createRecipeStruct = function(id, type, recipeData) {

    var recipeStruct = {};

    recipeStruct.result = {type:type, id:id, amount:1}

    var materialData = recipeData[1].match(/<materials>([^.]+)<materials>/);

    materialData = eval( "[" + materialData[1].split("}").join("},") + "]" );

    recipeStruct.materials = materialData;

    recipeStruct.goldCost = recipeData[1].match(/goldCost:(.+)/);

    recipeStruct.success = recipeData[1].match(/success:(.+)/);

    recipeStruct.successGain = recipeData[1].match(/successGain:(.+)/);

    recipeStruct.level = recipeData[1].match(/level:(.+)/);

    recipeStruct.category = recipeData[1].match(/category:(.+)/);

    recipeStruct.xp = recipeData[1].match(/xp:(.+)/);

    recipeStruct.xpDeprac = recipeData[1].match(/xpDeprac:(.+)/);

    recipeStruct.craftLevel = recipeData[1].match(/craftLevel:(.+)/);

    recipeStruct.playerXp = recipeData[1].match(/pxp:(.+)/);

    recipeStruct.multiple = recipeData[1].match(/craftMultiple:(.+)/);

    return recipeStruct;

    }

     

    function Window_RecipeList() {

    this.initialize.apply(this, arguments);

    }

    Window_RecipeList.prototype = Object.create(Window_Selectable.prototype);

    Window_RecipeList.prototype.constructor = Window_RecipeList;

    Window_RecipeList.prototype.initialize = function(x, y, w, h) {

    Window_Selectable.prototype.initialize.call(this, x, y, w, h);

    this.resetRecipes();

    }

    Window_RecipeList.prototype.maxItems = function() {

    return this._data ? this._data.length : 1;

    }

    Window_RecipeList.prototype.item = function() {

    return this._data && this._index >= 0 ? this._data[this._index] : null;

    }

    Window_RecipeList.prototype.currentItemEnabled = function() {

    return this.enable(this._data[this._index]);

    }

    Window_RecipeList.prototype.include = function(item) {

    if(!item.hasCraftLevel()) { return false; }

    //if(!$gameParty.recipeKnown(item)) {return false;}

    if(this._category == "all") {return true;}

    return this._category == item._category;

    }

    Window_RecipeList.prototype.setCategory = function(category) {

    if(category == this._category) { return; }

    this._category = category;

    this.resetRecipes();

    }

    Window_RecipeList.prototype.resetRecipes = function() {

    this._data = [];

    for(var i = 0;i < $gameRecipes.length;i++) {

    var recipe = $gameRecipes;

    if(this.include(recipe)) {this._data.push(recipe);}

    }

    this.refresh();

    }

    Window_RecipeList.prototype.isEnabled = function(item) {

    if(item) { return item.craftable(); }

    return false;

    }

    Window_RecipeList.prototype.drawItem = function(index) {

    var item = this._data[index];

    if(item) {

    rect = this.itemRect(index);

    rect.width -= 4;

    this.changePaintOpacity(this.isEnabled(item));

    this.drawItemName(item._result._item, rect.x, rect.y);

    if(item.amountCraftable() > 0) {

    this.drawText("x"+String(item.amountCraftable(),rect.x,rect.y,this.contents.width,"right"));

    }

    }

    }

    Window_RecipeList.prototype.currentItem = function() {

    return this._index >= 0 ? this._data[this._index] : null;

    }

    Window_RecipeList.prototype.processOk = function() {

    if (this.isCurrentItemEnabled()) {

    this.playOkSound();

    this.updateInputData();

    this.callOkHandler();

    } else {

    this.playBuzzerSound();

    }

    }

    Window_RecipeList.prototype.refresh = function() {

    this.createContents();

    Window_Selectable.prototype.refresh.call(this);

    }

    Window_RecipeList.prototype.contentsHeight = function() {

    return this.maxItems() * this.lineHeight();

    }

    Window_RecipeList.prototype.isCurrentItemEnabled = function() {

    return this.isEnabled(this.currentItem());

    }

     

    function Window_RecipeDetail() {

    this.initialize.apply(this, arguments);

    }

    Window_RecipeDetail.prototype = Object.create(Window_Base.prototype);

    Window_RecipeDetail.prototype.constructor = Window_RecipeDetail;

    Window_RecipeDetail.prototype.initialize = function(x, y, w, h) {

    Window_Base.prototype.initialize.call(this, x, y, w, h);

    this._recipe = null;

    }

    Window_RecipeDetail.prototype.setRecipe = function(recipe) {

    if(recipe == this._recipe) {return;}

    this._recipe = recipe;

    this.refresh();

    }

    Window_RecipeDetail.prototype.refresh = function() {

    this.contents.clear();

    if(this._recipe) {

    if(displayParam.clevel || displayParam.plevel) {this.drawCraftLevel();}

    this.drawMaterials();

    if(displayParam.chance) { this.drawSuccessRate(); }

    if(displayParam.gold) {this.drawGoldCost();}

    }

    }

    Window_RecipeDetail.prototype.drawCraftLevel = function() {

    this.changePaintOpacity(this._recipe.hasLevel());

    this.changeTextColor(this.systemColor());

    //Custom Text Variable(DragonPC) Changes!

    this.drawText(reqlevel,0,0,this.contents.width);

    //End Custom Text End Change!

    this.changeTextColor(this.normalColor());

    var xx = 0;

    var text = "";

    if(displayParam.plevel) {

    this.drawText(String(this._recipe._level),0,0,this.contents.width,"right");

    this.drawIcon(playerLevelIcon,this.contents.width - 24 - Window_Base._iconWidth,0);

    xx += 68; //HERE

    // ADDED A SPACE! RIGHT HERE             --V Changes!

    text = String(this._recipe._craftLevel);

    text2 = " |";

    } else {

    text = String(this._recipe._craftLevel);

    }

    if(displayParam.clevel) {

    this.drawText(text,-15,0,this.contents.width - xx,"right");

    this.changeTextColor(this.systemColor());

    this.drawText(text2,0,0,this.contents.width - xx,"right");

    this.changeTextColor(this.normalColor());

    //End Changes End Changes

    this.drawIcon(categoryIcons[this._recipe.categoryId()],this.contents.width - 75 - xx,0); //HERE

    }

    }

    Window_RecipeDetail.prototype.drawMaterials = function() {

    // Changed From 0 to 20 (DragonPC) Changes!

    var yy = 20;

    if(displayParam.clevel || displayParam.plevel) {yy = this.contents.fontSize + 20;}

    //Change END. End Change

    this.changePaintOpacity(this._recipe.craftable());

    this.changeTextColor(this.systemColor());

    //Custom Text Variable(DragonPC) Changes!

    this.drawText(reqmaterial,0,yy,this.width);

    //end Custom End Change

    yy += this.contents.fontSize + this.textPadding();

    for(var i = 0;i < this._recipe._materials.length;i++) {

    var item = this._recipe._materials;

    this.changePaintOpacity($gameParty.numItemsCrafting(item._item) >= item._amount);

    this.changeTextColor(this.normalColor());

    this.drawIcon(item._item.iconIndex,0,yy);

    this.drawText(item._item.name,Window_Base._iconWidth,yy,this.width);

    //Changed Text Color to show green for more than and red for not enough.(DragonPC) Changes!

    var ItemAmount = $gameParty.numItemsCrafting(item._item);

    var AmtNeeded = item._amount;

     

    if (ItemAmount >= AmtNeeded) {

                    this.changeTextColor(this.textColor(3));

    this.drawText(String(ItemAmount),-50,yy,this.contents.width,"right");

                }

    else {

    this.changeTextColor(this.textColor(18));

    this.drawText(String(ItemAmount),-50,yy,this.contents.width,"right");

    }

    this.changeTextColor(this.normalColor());

    var string = " / " + String(AmtNeeded);

    this.drawText(string,0,yy,this.contents.width,"right");

    //End Changes End Changes

    yy += this.contents.fontSize  + this.textPadding();

    }

    }

    Window_RecipeDetail.prototype.drawSuccessRate = function() {

    //Custom Variable(DragonPC)

    var CPV = this._recipe.successRate()

    //End Custom Variable

    this.changePaintOpacity(this._recipe.craftable());

    this.changeTextColor(this.systemColor());

    //Changed yy Variable to -5 to prevent Clipping(DragonPC) Changes!

    var yy = this.contents.height - this.contents.fontSize - this.textPadding() - 5;

    //End Change End Change

    //Custom Text Variable(DragonPC) Changes!

    this.drawText(sucRate,0,yy,this.contents.width);

    //End Custom Text Entry End Change

     

    //User Definable Colors(DragonPC) Changes!

    if (CPV > 0) {

    this.changeTextColor(this.textColor(colorCPV1));//code

    }

    if (CPV > 20) {

    this.changeTextColor(this.textColor(colorCPV2));//code

    }

    if (CPV > 40) {

    this.changeTextColor(this.textColor(colorCPV3));//code

    }

    if (CPV > 60) {

    this.changeTextColor(this.textColor(colorCPV4));//code

    }

    if (CPV > 80) {

    this.changeTextColor(this.textColor(colorCPV5));//code

    }

     

    this.drawText(CPV + "%",0,yy,this.contents.width,"right");

    this.changeTextColor(this.normalColor());

    //END User Definable Colors(DragonPC) End Change

    }

     

    Window_RecipeDetail.prototype.drawGoldCost = function() {

    if(this._recipe._goldCost > 0) {

    this.changePaintOpacity(this._recipe.hasGold());

    this.changeTextColor(this.systemColor());

    //Custom Text Variable (DragonPC) Changes!

    this.drawText(craCost,0,this.contents.height-this.contents.fontSize*2 - 15,this.contents.width);

    //Custom Text End Change End

     

    if (this._recipe._goldCost > $gameParty.gold()) {

    this.changeTextColor(this.textColor(18));

                }

    else {

    this.changeTextColor(this.textColor(3))

    }

    this.drawText(this._recipe._goldCost, - 40,this.contents.height-this.contents.fontSize*2 - 15,this.contents.width, 'right')

    this.drawIcon(Yanfly.Icon.Gold,Graphics.boxWidth/2-68,this.contents.height-this.contents.fontSize*2 - 15)

    this.changeTextColor(this.normalColor());

    }

    }

    Window_RecipeDetail.prototype.drawCurrencyValue = function(value, unit, x, y, width) {

    var unitWidth = Math.min(80, this.textWidth(unit));

    this.resetTextColor();

    this.changePaintOpacity(this._recipe.hasGold());

    this.drawText(value, x, y, width - unitWidth - 6, 'right');

    this.changeTextColor(this.systemColor());

    this.drawText(unit, x + width - unitWidth, y, unitWidth, 'right');

    }

     

    function Window_RecipeConfirm() {

    this.initialize.apply(this, arguments);

    }

    Window_RecipeConfirm.prototype = Object.create(Window_Selectable.prototype);

    Window_RecipeConfirm.prototype.constructor = Window_RecipeConfirm;

    Window_RecipeConfirm.prototype.initialize = function(x, y, w, h) {

    Window_Selectable.prototype.initialize.call(this, x, y, w, h);

    this._amount = 1;

    this.refresh();

    }

    Window_RecipeConfirm.prototype.itemMax = function() {return 1;}

    Window_RecipeConfirm.prototype.enable = function() {return true;}

    Window_RecipeConfirm.prototype.refresh = function() {

    Window_Selectable.prototype.refresh.call(this);

    //Custom Text Variable(DragonPC) Changes!

    this.drawText(craText,0,0,this.contents.width,"center");

    //Custom Text End Change End

    if(this._recipe && this._recipe.craftable()) {

    this.drawText("x" + String(this._amount),0,0,this.contents.width,"right");

    }

    }

    Window_RecipeConfirm.prototype.activate = function() {

    Window_Selectable.prototype.activate.call(this);

    this.select(0);

    }

    Window_RecipeConfirm.prototype.deactivate = function() {

    Window_Selectable.prototype.deactivate.call(this);

    this.deselect();

    }

    Window_RecipeConfirm.prototype.setRecipe = function(recipe) {

    if(recipe == this._recipe) { return; }

    this._recipe = recipe;

    this._amount = 1;

    this.refresh();

    }

    Window_RecipeConfirm.prototype.isCursorMovable = function() {

    return this.isOpenAndActive() && craftMultiple && this._recipe._craftMultiple;

    }

    Window_RecipeConfirm.prototype.cursorDown = function(wrap) { this.changeAmount(-10);}

    Window_RecipeConfirm.prototype.cursorUp = function(wrap) { this.changeAmount(10);}

    Window_RecipeConfirm.prototype.cursorRight = function(wrap) { this.changeAmount(1);}

    Window_RecipeConfirm.prototype.cursorLeft = function(wrap) { this.changeAmount(-1);}

    Window_RecipeConfirm.prototype.changeAmount = function(value) {

    SoundManager.playCursor();

    this._amount += value;

    this._amount = Math.min(Math.max(this._amount,1),this._recipe.amountCraftable());

    this.refresh();

    }

     

    function Scene_Crafting() {

    this.initialize.apply(this, arguments);

    }

    Scene_Crafting.prototype = Object.create(Scene_MenuBase.prototype);

    Scene_Crafting.prototype.constructor = Scene_Crafting;

    Scene_Crafting.prototype.initialize = function() {

    Scene_MenuBase.prototype.initialize.call(this);

    }

    Scene_Crafting.prototype.create = function() {

    Scene_MenuBase.prototype.create.call(this);

    this._helpWindow = new Window_Help();

    var width = Graphics.width / 2;

    var height = Graphics.height - this._helpWindow.height; 

    this._listWindow = new Window_RecipeList(0,this._helpWindow.height+72,width,height-72*2);

    this._listWindow.setHandler('ok',this.listSuccess.bind(this));

    this._listWindow.setHandler('cancel',this.cancel.bind(this));

    if(!displayParam.clevel) { this._listWindow.height += this._listWindow.fittingHeight(1); }

    this._listWindow.createContents();

    this._detailWindow = new Window_RecipeDetail(width,this._listWindow.y,width,height-72*2);

    if(!displayParam.gold) { this._detailWindow.height += this._detailWindow.fittingHeight(1); }

    this._detailWindow.createContents();

    height = this._detailWindow.y + this._detailWindow.height;

    this._confirmWindow = new Window_RecipeConfirm(width,height,width,72);

    this._confirmWindow.setHandler('ok',this.craftSuccess.bind(this));

    this._confirmWindow.setHandler('cancel',this.confirmCancel.bind(this));

    if(displayParam.gold) {

    this._goldWindow = new Window_Gold();

    this._goldWindow.width = width;

    this._goldWindow.y = Graphics.height - 72; 

    this._goldWindow.x = width;

    }

    this._popupWindow = new Window_RecPopup();

    this._popupWindow.setHandler('ok',this.popupOk.bind(this));

    this._popupWindow.setHandler('cancel',this.popupOk.bind(this));

    this._commandWindow = new Window_RecCategory();

    this._commandWindow.setHandler('ok',this.commandOk.bind(this));

    this._commandWindow.setHandler('cancel',this.commandCancel.bind(this));

    if(displayParam.clevel) {this._gaugeWindow = new Window_RecGauge();}

    this.addWindow(this._helpWindow);

    this.addWindow(this._listWindow);

    this.addWindow(this._detailWindow);

    this.addWindow(this._confirmWindow);

    if(this._goldWindow) {this.addWindow(this._goldWindow);}

    this.addWindow(this._popupWindow);

    this.addWindow(this._commandWindow);

    if(this._gaugeWindow) {this.addWindow(this._gaugeWindow);}

    }

    Scene_Crafting.prototype.popupOk = function() {

    this._popupWindow.deactivate();

    this._popupWindow.close();

    this._listWindow.activate();

    }

    Scene_Crafting.prototype.update = function() {

    Scene_Base.prototype.update.call(this);

    if(this._listWindow.currentItem()) {this._helpWindow.setText(this._listWindow.currentItem()._result._item.description);}

    if(this._commandWindow.isOpenAndActive()) {

    this._helpWindow.setText("");

    }

    this._detailWindow.setRecipe(this._listWindow.currentItem());

    this._confirmWindow.setRecipe(this._listWindow.currentItem());

    this._listWindow.setCategory(categoryNames[this._commandWindow._index]);

    if(this._gaugeWindow) { this._gaugeWindow.setCategory(categoryNames[this._commandWindow._index]);}

    if(this._listWindow.currentItem()) {

    if(this._listWindow.currentItem().craftable()) {

    this._confirmWindow.opacity = 255;

    this._confirmWindow.contentsOpacity = 255;

    } else {

    this._confirmWindow.opacity = 75;

    this._confirmWindow.contentsOpacity = 75;

    }

    }

    }

    Scene_Crafting.prototype.listSuccess = function() {

    this._listWindow.deactivate();

    if(this._goldWindow) {this._goldWindow.close();}

    this._confirmWindow.activate();

    }

    Scene_Crafting.prototype.craftSuccess = function() {

    var amount = 0;

    var item = null;

    for(var i = 0;i < this._confirmWindow._amount;i++) {

    var item2 = this._listWindow.currentItem().craft(Math.random() * 100);

    if(item2) { amount++;item = item2;}

    }

    if(item) {

    this._popupWindow.setText(item, amount);

    } else {

    this._popupWindow.setTextFail();

    }

    this._confirmWindow.changeAmount(-1000);

    if(this._goldWindow) {this._goldWindow.refresh();}

    this._listWindow.refresh();

    if(this._gaugeWindow) {this._gaugeWindow.refresh();}

    this._popupWindow.activate();

    this._detailWindow.refresh();

    }

    Scene_Crafting.prototype.confirmCancel = function() {

    this._confirmWindow.deactivate();

    if(this._goldWindow) {this._goldWindow.open();}

    this._listWindow.activate();

    }

    Scene_Crafting.prototype.commandCancel = function() {

    this.popScene();

    }

    Scene_Crafting.prototype.cancel = function() {

    this._listWindow.select(-1);

    this._helpWindow.setText("");

    this._commandWindow.activate();

    }

    Scene_Crafting.prototype.commandOk = function() {

    this._listWindow.select(0);

    this._listWindow.activate();

    }

     

    function Scene_CraftingSpecific() {

    this.initialize.apply(this, arguments);

    }

    Scene_CraftingSpecific.prototype = Object.create(Scene_Crafting.prototype);

    Scene_CraftingSpecific.prototype.constructor = Scene_CraftingSpecific;

    Scene_CraftingSpecific.prototype.initialize = function() {

    Scene_Crafting.prototype.initialize.call(this);

    }

    Scene_CraftingSpecific.prototype.create = function() {

    Scene_Crafting.prototype.create.call(this);

    this._commandWindow._index = categoryNames.indexOf(categoryEventName);

    this._commandWindow.deactivate();

    this._commandWindow.visible = false;

    this._listWindow.height += this._listWindow.fittingHeight(1);

    this._listWindow.y -= this._listWindow.fittingHeight(1);

    this._detailWindow.height += this._listWindow.fittingHeight(1);

    this._detailWindow.y -= this._listWindow.fittingHeight(1);

    this._listWindow.createContents();

    this._detailWindow.createContents();

    this._listWindow.select(0);

    this._listWindow.activate();

    }

    Scene_CraftingSpecific.prototype.cancel = function() { this.popScene(); }

     

     

    function Window_RecCategory() {

    this.initialize.apply(this, arguments);

    }

    Window_RecCategory.prototype = Object.create(Window_HorzCommand.prototype);

    Window_RecCategory.prototype.constructor = Window_RecCategory;

    Window_RecCategory.prototype.initialize = function() {

    Window_HorzCommand.prototype.initialize.call(this, 0, this.fittingHeight(2));

    }

    Window_RecCategory.prototype.windowWidth = function() { return Graphics.width; }

    Window_RecCategory.prototype.windowHeight = function() { return this.fittingHeight(1); }

    Window_RecCategory.prototype.makeCommandList = function() {

    for(var i = 0;i < categoryNames.length;i++) {

    this.addCommand(categoryNames,categoryNames);

    }

    }

    Window_RecCategory.prototype.itemWidth = function() {return this.width / 5;}

    Window_RecCategory.prototype.drawItem = function(index) {

    this.changePaintOpacity(this.isCommandEnabled(index));

    var rect = this.itemRectForText(index);

    this.drawText(this.commandName(index),rect.x,rect.y,rect.width);

    this.drawIcon(categoryIcons[index],rect.x-Window_Base._iconWidth,rect.y+2);

    }

    Window_RecCategory.prototype.itemRectForText = function(index) {

    var rect = this.itemRect(index);

    rect.x += Window_Base._iconWidth;

    rect.width -= Window_Base._iconWidth;

    return rect;

    }

     

    function Window_RecPopup() {

    this.initialize.apply(this, arguments);

    }

    Window_RecPopup.prototype = Object.create(Window_Selectable.prototype);

    Window_RecPopup.prototype.constructor = Window_RecPopup;

    Window_RecPopup.prototype.initialize = function() {

    //Fixed Popup to not truncate text CHANGES

    Window_Selectable.prototype.initialize.call(this, Graphics.width/2-this.windowWidth()/2,Graphics.height/2-this.windowHeight()/2,300,this.fittingHeight(1)); 

    this.openness = 0;

    this.deactivate();

    }

    Window_RecPopup.prototype.windowWidth = function() {return 300;}

    //end changes end changes

    Window_RecPopup.prototype.windowHeight = function() {return this.fittingHeight(1);}

    Window_RecPopup.prototype.setText = function(item, amount) {

    this.contents.clear();

    // Added Sound on Success(DragonPC) CHANGES!!

    var SuccessSound = {

    name:   success,

    volume: successVol,

    pitch:  100,

    pan:    0,

      };

      

      AudioManager.playSe(SuccessSound);

    //Sound End Change end

    //Custom Text Variable(DragonPC) Changes!

    var text = String(amount) + "x " + item.name + " " + craftedText;

    //Custom Text Variable End Change End

    var width = this.textWidth(text) + Window_Base._iconWidth;

    console.log(width);

    this.width = width + this.standardPadding() * 2;

    console.log(this.width);

    this.x = (Graphics.width-width)/2

    this.createContents();

    this.drawText(text,Window_Base._iconWidth,0,this.contents.width);

    this.drawIcon(item.iconIndex,0,0);

    this.open();

    }

    Window_RecPopup.prototype.setTextFail = function() {

    this.contents.clear();

             //Added Failure Sound(DragonPC) Changes!!!

    var FailureSound = {

    name:   failure,

    volume: failureVol,

    pitch:  100,

    pan:    0,

    };

     

    AudioManager.playSe(FailureSound);

    //End Changes End Changes!!  

     

    //Custom Text Variable(DragoncPC) (Changed Popup Minimum Value to prevent Truncation of text) Changes!

    var text = craFailed;

    var width = this.textWidth(text) + 60;

    //Custome Text End End Change

    this.width = width + this.textPadding() * 2;

    this.x = (Graphics.width-width)/2;

    this.createContents();

    this.drawText(text,18,0,this.contents.width);

    this.open();

    }

    Window_RecPopup.prototype.processOk = function() {

    if (this.isCurrentItemEnabled()) {

    this.updateInputData();

    this.deactivate();

    this.callOkHandler();

    } else {

    this.playBuzzerSound();

    }

    }

     

    function Window_RecGauge() {

    this.initialize.apply(this, arguments);

    }

    Window_RecGauge.prototype = Object.create(Window_Base.prototype);

    Window_RecGauge.prototype.constructor = Window_RecGauge;

    Window_RecGauge.prototype.initialize = function() {

    Window_Selectable.prototype.initialize.call(this, 0,Graphics.height-this.fittingHeight(1),Graphics.width/2,this.fittingHeight(1));

    this._category = "all";

    }

    Window_RecGauge.prototype.refresh = function() {

    this.contents.clear();

    if(this._category == "all") {return;}

    this.drawIcon(categoryIcons[this.catIndex()],0,0);

    //Changed Guage Width so level 100+ will not Overlap(DragonPC) Changes!

    this.drawText($gameParty.craftLevel(this.catIndex()),Window_Base._iconWidth,0,this.contents.width);

    if ($gameParty.craftLevel(this.catIndex()) === UDML) {

    this.changeTextColor(this.textColor(20));

    this.drawText(MLT,0,0,this.contents.width,"right");

    this.changeTextColor(this.normalColor());

    }

    else{

    var rate = $gameParty.craftExp(this.catIndex()) / $gameParty.craftExpNext(this.catIndex());

    this.drawGauge(80,-3,this.contents.width-80,rate,this.tpGaugeColor1(),this.tpGaugeColor2());

    text = String($gameParty.craftExp(this.catIndex())) + "/" + String($gameParty.craftExpNext(this.catIndex()));

    this.drawText(text,0,0,this.contents.width,"right");

    }

     

    //End Change End Change

    }

    Window_RecGauge.prototype.setCategory = function(cat) {

    if(cat == this._category) {return;}

    this._category = cat;

    this.refresh();

    }

    Window_RecGauge.prototype.catIndex = function() {

    return categoryNames.indexOf(this._category);

    }

     

    var crafting_window_menucommand_addoriginalcommands = Window_MenuCommand.prototype.addOriginalCommands;

    Window_MenuCommand.prototype.addOriginalCommands = function() {

    crafting_window_menucommand_addoriginalcommands.call(this);

    if(craftFromMenu != "off") { this.addCommand("Crafting","crafting"); }

    }

     

    var crafting_scene_menu_createcommandwindow = Scene_Menu.prototype.createCommandWindow;

    Scene_Menu.prototype.createCommandWindow = function() {

    crafting_scene_menu_createcommandwindow.call(this);

    this._commandWindow.setHandler("crafting",this.commandRecipe.bind(this));

    }

    Scene_Menu.prototype.commandRecipe = function() {

    SceneManager.push(Scene_Crafting);

    }

     

    var RecipeCrafting_Game_Interpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand;

    Game_Interpreter.prototype.pluginCommand = function(command, args) {

    RecipeCrafting_Game_Interpreter_pluginCommand.call(this, command, args);

    if(command === 'crafting' && args[0] === 'call') {

    categoryEventName = args[1]

    SceneManager.push(Scene_CraftingSpecific);

    }

    }

     

    //YEP-ITEMCORE

    Game_Party.prototype.numIndependentItems = function(item) {

    if(!item) return null;

    if (DataManager.isIndependent(item)) {

    if (DataManager.isItem(item)) var group = this.items();

    if (DataManager.isWeapon(item)) var group = this.weapons();

    if (DataManager.isArmor(item)) var group = this.armors();

    var baseItemId = item.id;

    var amount = 0;

    for (var i = 0; i < group.length; ++i) {

    var item = group;

    if (!item) continue;

    if (!item.baseItemId) continue;

    if (item.baseItemId !== baseItemId) continue;

    if (this.checkItemIsEquipped(item)) continue;

    amount++;

    }

    return amount;

    } else {

    return this.numItems(item);

    }

    }

    })();
     
    #8
  9. Screech1989

    Screech1989 King Pin! Veteran

    Messages:
    107
    Likes Received:
    88
    Location:
    Pontypool, South Wales, UK
    First Language:
    English
    Yes there was nothing inside of the spoilers. They where empty o do apologise. It's all sorted now.

    Here is a Couple Screenshots.
    [​IMG][​IMG]//==// Recipe Crafting MV Version 1.2 (DragonPC Edit)//== /*: * @plugindesc v1.1c (DragonPC Update) // Take some items.. and make them into other items! That's crafting~ * @author Vlue * *@param ------Main Functions------ * * @param Categories * @desc The various categories of crafting available * @default "Alchemy","Blacksmith","Tailor" * * @param User Definable Max Level * @desc Define the Maximum level the player can reach in the crafting Interface (default - 99) * @default 99 * * @param Category Icons * @desc The icons (index) to use for the crafting categories * @default 219,223,225 * * @param Player Level Icon * @desc Icon displayed by Player level (if applicable) in crafting menu * @default 82 * * @param Crafting XP Formula * @desc The exp needed to determine current crafting level (lvl) * @default 100 * lvl * * @param Craft Multiple * @desc Allow crafting of multiple items at once * @default true * * @param Menu Craft Options * @desc Whether to allow crafting from menu (off, view, craft) * @default craft *  * @param Display Parameters * @desc Include/exclude various details from the recipe window * @default gold:true, chance:true, plevel:true, clevel:true * * @param ------Custom Text------ * * @param Required Level Text * @desc Change Required Level text. (default - Required level:) * @default Required level: * * @param Required Material Text * @desc Change Required Materials text. (default - Required materials:) * @default Required materials: * * @param Success Rate Text * @desc Change Success Rate text. (default - Success rate:) * @default Success rate: * * @param Crafting Cost Text * @desc Change Crafting Cost text. (default - Crafting costs:) * @default Crafting costs: * * @param Crafting Text * @desc Change Crafting Text. (default - Craft) * @default Craft * * @param Crafted Text * @desc Change Crafted Text. (default - Crafted!) * @default Crafted! * * @param Crafting Failed * @desc Change Crafting Failed Text. (default - Crafting failed!) * @default Crafting failed!  * * @param Max Level Test * @desc Text Displayed when reaching max level in a profession. * @default MAX LEVEL * * @param ------Colors------ *  * @param Success 0-20 Color * @desc Change Color of the Percentage (default - 18) * @default 18 * * @param Success 20-40 Color * @desc Change Color of the Percentage (default - 20) * @default 20 * * @param Success 40-60 Color * @desc Change Color of the Percentage (default - 21) * @default 21 * * @param Success 60-80 Color * @desc Change Color of the Percentage (default - 17) * @default 17 * * @param Success 80-100 Color * @desc Change Color of the Percentage (default - 29) * @default 29 * * @param ------Custom Sounds------ *  * @param Crafting Succeded Sound * @desc Change Crafting Succeeded Sound.(Case Sensitive) (default - Item3) * @default Item3 * * @param Success Sound Volume * @desc Change Crafting Succeeded Sound Volume. (default - 90) * @default 90 * * @param Crafting Failed Sound * @desc Change Crafting Failed Sound.(Case Sensitive) (default - Scream) * @default Scream * * @param Fail Sound Volume * @desc Change Crafting Failed Sound Volume. (default - 90) * @default 90 * * @help * * ----------- DragonPC Update 1.2 (bug fixes + features) ---------------- * * - Fixed Crafting popup to no longer be truncated. * - Fixed Gauge Overlap. * - Player EXP no-longer levels you excessively. * - Added custom text display for inputting your own terms. * - Added custom sound option to choose your own sounds for "Success" and "Failure". * - Added Volume control of Success And Failure Sounds. * - Removed Gauge when at max level and displayed MAX LEVEL (Customizable). * - Changed Colors of Numbers when not enough, and more than you need, to Red and Green Respecitvely. * - Gold Cost Turns red when you don't have enough Gold and green when you do. * - Custom Colors for Levels of Success chance %. * - Assorted Visual Upgrades. *  *(Special Thanks to SkottyTV) * ------------------------------------------------------------------------ * * * Plugin Commands: *  crafting call categoryName            (Example: crafting call Alchemy) * * Recipe Setup *  Recipes (At the moment) are created in the note field of the *  item to be created and the format is as follows: *  *  <recipe> *   <materials> *   {type:"itemtype", id:itemId, amount:numberRequired, cons:consumed?} *   { + as many as you need } *   <materials> *   category:CategoryOfCraft                           (Name i.e. Blacksmith) *   goldCost:costInGold                                (Number) *   success:successRateBase                            (Number, 0 = 0%, 100 = 100%) *   successGain:successRateChangePerLevelDifference    (Number, %) *   level:levelRequired                                (Number) *   xp:craftingExpEarned                               (Number) *   xpDeprac:lossOfExpPerLevelDifference               (Number) *   craftLevel:craftingLevelRequired                   (Number) *   pxp:playerExpEarned                                (Number) *   craftMultiple:allowMultipleCrafts                  (Boolean i.e. true) *  <recipe> * *  Everything from goldCost to craftMultiple is optional (will be set to default 0-1 values) *  *  Simplest recipe (example): *   <recipe> *    <material> *     {type:"armor", id:3, amount:3, cons:false} *    <material> *    category:Blacksmith *   <recipe> * *  Full Recipe (example): *   <recipe> *    <materials> *    {type:"weapon", id:3, amount:3, cons:false} *    {type:"armor", id:2, amount:3, cons:false} *    <materials> *    goldCost:0 *    success:80 *    successGain:2 *    level:1 *    category:Alchemy *    xp:10 *    xpDeprac:2 *    craftLevel:1 *    pxp:5 *    craftMultiple:true *   <recipe> * */ var $gameRecipes = null; (function() { var parameters = PluginManager.parameters('RecipeCrafting');var categoryNames = eval("[" + (parameters['Categories'] || '"Alchemy","Blacksmith","Tailor"') + "]");var categoryIcons = eval("[" + (parameters['Category Icons'] || "219,223,225") + "]");var xpFormula = parameters['Crafting XP Formula'] || "100 * lvl";var craftMultiple = (parameters['Craft Multiple'] || "true").toLowerCase() == "true";var craftFromMenu = parameters['Menu Craft Options'] || "craft";var tempdParam = "gold:true, chance:true, plevel:true, clevel:true"var displayParam = eval( "( { " + (parameters['Display Parameters'] || tempdParam) + " } )");var playerLevelIcon = parameters['Player Level Icon'] || 82;//Custom Text Inputs(DragonPC)var reqlevel = String(parameters['Required Level Text'] || 'Required level:');var reqmaterial = String(parameters['Required Material Text'] || 'Required material:');var sucRate = String(parameters['Success Rate Text'] || 'Success rate:');var craCost = String(parameters['Crafting Cost Text'] || 'Crafting costs:');var craText = String(parameters['Crafting Text'] || 'Craft');var craftedText = String(parameters['Crafted Text'] || 'Crafted!');var craFailed = String(parameters['Crafting Failed'] || 'Crafting failed!');var MLT = String(parameters['Max Level Test'] || 'MAX LEVEL');//End Custom Text(DragonPC)//Custom Sound(DragonPC)var success = String(parameters['Crafting Succeded Sound'] || 'Item3');var failure = String(parameters['Crafting Failed Sound'] || 'Scream');var failureVol = Number(parameters['Fail Sound Volume']);var successVol = Number(parameters['Success Sound Volume']);//End Custom Sound(DragonPC)//User Definable Max Level(DragonPC)var UDML = Number(parameters['User Definable Max Level']);//End User Definable Max Level//User Definable Colors(DragonPC)var colorCPV1 = Number(parameters['Success 0-20 Color']);var colorCPV2 = Number(parameters['Success 20-40 Color']);var colorCPV3 = Number(parameters['Success 40-60 Color']);var colorCPV4 = Number(parameters['Success 60-80 Color']);var colorCPV5 = Number(parameters['Success 80-100 Color']);//END User Definable Colorsvar categoryEventName = ""; function Recipe() {this.initialize.apply(this, arguments);}Recipe.prototype.initialize = function(id, type, recipe) {this._id = id;this._type = type;this._result = new Material(recipe.result);this._materials = [];for(var i = 0;i < recipe.materials.length;i++) {this._materials.push(new Material(recipe.materials));}this._goldCost = recipe.goldCost ? Number(recipe.goldCost[1]) : 0;this._success = recipe.success ? Number(recipe.success[1]) : 100;this._successGain = recipe.successGain ? Number(recipe.successGain[1]) : 0;this._level = recipe.level ? Number(recipe.level[1]) : 0;this._category = recipe.category ? recipe.category[1] : categoryNames[0];this._xp = recipe.xp ? Number(recipe.xp[1]) : 100;this._xpDeprac = Number(recipe.xpDeprac) ? recipe.xpDeprac[1] : 0;//Changed EXP Gain To NON-EXESSIVE levels I.E. 0 (DragonPC) Changes!this._craftLevel = recipe.craftLevel ? Number(recipe.craftLevel[1]) : 0; //Number(recipe.craftLevel) ? recipe.craftLevel[1] : 1;this._pxp = recipe.playerXp ? Number(recipe.playerXp[1]) : 0; //Number(recipe.playerXp) ? recipe.playerXp[1] : 1;//End exp Changes End Change!this._craftMultiple = (recipe.multiple ? recipe.multiple[1] : "true").toLowerCase() == "true";}Recipe.prototype.name = function() { return this._result.name(); }Recipe.prototype.hasMaterials = function() {for(var i = 0;i < this._materials.length;i++) { var material = this._materials;if($gameParty.numItemsCrafting(material._item) < material._amount) {return false;}}return true;}Recipe.prototype.hasGold = function() { return $gameParty.gold() >= this._goldCost;}Recipe.prototype.hasCraftLevel = function() { return this._craftLevel <= $gameParty.craftLevel(this.categoryId());}Recipe.prototype.hasLevel = function() { return this._level <= $gameParty.highestLevel() && this.hasCraftLevel();}Recipe.prototype.craftable = function() { return this.hasGold() && this.hasMaterials() && this.hasLevel();}Recipe.prototype.amountCraftable = function() { var amount = 0;for(var i = 0;i < this._materials.length;i++) {var material = this._materials;var amountNext = $gameParty.numItemsCrafting(material._item) / material._amountif(amountNext > amount) {amount = amountNext;}}var amountGold = this._goldCost > 0 ? $gameParty.gold() / this._goldCost : 99;if(amountGold < amount) {amount = amountGold;}return Math.floor(amount);}Recipe.prototype.craft = function(failRate) {failRate = failRate || 0;this.removeMaterials();if(failRate < this.successRate()) {return this.addResult();}return null; } Recipe.prototype.removeMaterials = function() {for(var i = 0;i < this._materials.length;i++) {var material = this._materials;if(material._consumed) {$gameParty.gainItem(material._item, -material._amount);}}$gameParty.gainGold(-this._goldCost);}Recipe.prototype.addResult = function() {var newItem = this._result;$gameParty.gainItem(newItem._item,newItem._amount);$gameParty.gainCraftExp(this.categoryId(), this.xpGain());for(var i = 0;i < $gameParty.members().length;i++) {$gameParty.members().gainExp(this._pxp);}return newItem._item;}Recipe.prototype.categoryId = function() { return categoryNames.indexOf(this._category);}Recipe.prototype.xpGain = function() {//User Definable Max Level(DragoncPC) Changes!if ($gameParty.craftLevel(this.categoryId()) < UDML) {            var levelDiff = $gameParty.craftLevel(this.categoryId()) - this._craftLevel;return Math.max(this._xp - this._xpDeprac * levelDiff,0);        }else {return Math.max (0, 0);}//User Definable Max Level end End Change }Recipe.prototype.successRate = function() {var levelDiff = $gameParty.craftLevel(this.categoryId()) - this._craftLevel;return Math.min(this._success + this._successGain * levelDiff,100);} function Material() { this.initialize.apply(this, arguments);}Material.prototype.initialize = function(material) {if(material.type == "item") {this._item = $dataItems[material.id];}if(material.type == "weapon") {this._item = $dataWeapons[material.id];}if(material.type == "armor") {this._item = $dataArmors[material.id];}this._amount = material.amount;this._consumed = material.consumed || true;}Material.prototype.name = function() {return this._item.name;} var crafting_game_party_initialize = Game_Party.prototype.initialize;Game_Party.prototype.initialize = function() {crafting_game_party_initialize.call(this);this._craftingLevel = new Array(categoryNames.length);this._craftingExp = new Array(categoryNames.length);for(var i = 0;i < categoryNames.length;i++) {this._craftingLevel = 1;this._craftingExp = 0;}}Game_Party.prototype.craftLevel = function(id) { return this._craftingLevel[id]; }Game_Party.prototype.craftExp = function(id) { return this._craftingExp[id]; }Game_Party.prototype.craftExpNext = function(id) {var string = xpFormula.replace(/\lvl/g, this.craftLevel(id));return eval(string);} Game_Party.prototype.gainCraftExp = function(id, value) {this._craftingExp[id] += value;while(this.craftExp(id) >= this.craftExpNext(id)) {this._craftingExp[id] -= this.craftExpNext(id);this._craftingLevel[id]++;}}Game_Party.prototype.numItemsCrafting = function(item) {if(Object.keys(PluginManager.parameters('YEP_ItemCore')).length > 0) {return this.numIndependentItems(item);} else {return this.numItems(item);}} var crafting_DataManager_createGameObjects = DataManager.createGameObjects;DataManager.createGameObjects = function() {crafting_DataManager_createGameObjects.call(this);$gameRecipes = this.createRecipes();}DataManager.createRecipes = function() {var recipes = [];for(var i = 1;i < $dataItems.length;i++) {if(!$dataItems) {continue;}var recipeData = $dataItems.note.match(/<recipe>([^.]+)<recipe>/);if(recipeData) {recipes.push(new Recipe(i, "item", this.createRecipeStruct(i, "item", recipeData)));}}for(var i = 1;i < $dataWeapons.length;i++) {if(!$dataWeapons) {continue;}var recipeData = $dataWeapons.note.match(/<recipe>([^.]+)<recipe>/);if(recipeData) {recipes.push(new Recipe(i, "weapon", this.createRecipeStruct(i, "weapon", recipeData)));}}for(var i = 1;i < $dataArmors.length;i++) {if(!$dataArmors) {continue;}var recipeData = $dataArmors.note.match(/<recipe>([^.]+)<recipe>/);if(recipeData) {recipes.push(new Recipe(i, "armor", this.createRecipeStruct(i, "armor", recipeData)));}}return recipes;}DataManager.createRecipeStruct = function(id, type, recipeData) {var recipeStruct = {};recipeStruct.result = {type:type, id:id, amount:1}var materialData = recipeData[1].match(/<materials>([^.]+)<materials>/);materialData = eval( "[" + materialData[1].split("}").join("},") + "]" );recipeStruct.materials = materialData;recipeStruct.goldCost = recipeData[1].match(/goldCost:(.+)/);recipeStruct.success = recipeData[1].match(/success:(.+)/);recipeStruct.successGain = recipeData[1].match(/successGain:(.+)/);recipeStruct.level = recipeData[1].match(/level:(.+)/);recipeStruct.category = recipeData[1].match(/category:(.+)/);recipeStruct.xp = recipeData[1].match(/xp:(.+)/);recipeStruct.xpDeprac = recipeData[1].match(/xpDeprac:(.+)/);recipeStruct.craftLevel = recipeData[1].match(/craftLevel:(.+)/);recipeStruct.playerXp = recipeData[1].match(/pxp:(.+)/);recipeStruct.multiple = recipeData[1].match(/craftMultiple:(.+)/);return recipeStruct;} function Window_RecipeList() {this.initialize.apply(this, arguments);}Window_RecipeList.prototype = Object.create(Window_Selectable.prototype);Window_RecipeList.prototype.constructor = Window_RecipeList;Window_RecipeList.prototype.initialize = function(x, y, w, h) {Window_Selectable.prototype.initialize.call(this, x, y, w, h);this.resetRecipes();}Window_RecipeList.prototype.maxItems = function() {return this._data ? this._data.length : 1;}Window_RecipeList.prototype.item = function() {return this._data && this._index >= 0 ? this._data[this._index] : null;}Window_RecipeList.prototype.currentItemEnabled = function() {return this.enable(this._data[this._index]);}Window_RecipeList.prototype.include = function(item) {if(!item.hasCraftLevel()) { return false; }//if(!$gameParty.recipeKnown(item)) {return false;}if(this._category == "all") {return true;}return this._category == item._category;}Window_RecipeList.prototype.setCategory = function(category) {if(category == this._category) { return; }this._category = category;this.resetRecipes();}Window_RecipeList.prototype.resetRecipes = function() {this._data = [];for(var i = 0;i < $gameRecipes.length;i++) {var recipe = $gameRecipes;if(this.include(recipe)) {this._data.push(recipe);}}this.refresh();}Window_RecipeList.prototype.isEnabled = function(item) {if(item) { return item.craftable(); }return false;}Window_RecipeList.prototype.drawItem = function(index) {var item = this._data[index];if(item) {rect = this.itemRect(index);rect.width -= 4;this.changePaintOpacity(this.isEnabled(item));this.drawItemName(item._result._item, rect.x, rect.y);if(item.amountCraftable() > 0) {this.drawText("x"+String(item.amountCraftable(),rect.x,rect.y,this.contents.width,"right"));}}}Window_RecipeList.prototype.currentItem = function() {return this._index >= 0 ? this._data[this._index] : null;}Window_RecipeList.prototype.processOk = function() {if (this.isCurrentItemEnabled()) {this.playOkSound();this.updateInputData();this.callOkHandler();} else {this.playBuzzerSound();}}Window_RecipeList.prototype.refresh = function() {this.createContents();Window_Selectable.prototype.refresh.call(this);}Window_RecipeList.prototype.contentsHeight = function() {return this.maxItems() * this.lineHeight();}Window_RecipeList.prototype.isCurrentItemEnabled = function() {return this.isEnabled(this.currentItem());} function Window_RecipeDetail() {this.initialize.apply(this, arguments);}Window_RecipeDetail.prototype = Object.create(Window_Base.prototype);Window_RecipeDetail.prototype.constructor = Window_RecipeDetail;Window_RecipeDetail.prototype.initialize = function(x, y, w, h) {Window_Base.prototype.initialize.call(this, x, y, w, h);this._recipe = null;}Window_RecipeDetail.prototype.setRecipe = function(recipe) {if(recipe == this._recipe) {return;}this._recipe = recipe;this.refresh();}Window_RecipeDetail.prototype.refresh = function() {this.contents.clear();if(this._recipe) {if(displayParam.clevel || displayParam.plevel) {this.drawCraftLevel();}this.drawMaterials();if(displayParam.chance) { this.drawSuccessRate(); }if(displayParam.gold) {this.drawGoldCost();}}}Window_RecipeDetail.prototype.drawCraftLevel = function() {this.changePaintOpacity(this._recipe.hasLevel());this.changeTextColor(this.systemColor());//Custom Text Variable(DragonPC) Changes!this.drawText(reqlevel,0,0,this.contents.width);//End Custom Text End Change!this.changeTextColor(this.normalColor());var xx = 0;var text = "";if(displayParam.plevel) {this.drawText(String(this._recipe._level),0,0,this.contents.width,"right");this.drawIcon(playerLevelIcon,this.contents.width - 24 - Window_Base._iconWidth,0);xx += 68; //HERE// ADDED A SPACE! RIGHT HERE             --V Changes!text = String(this._recipe._craftLevel);text2 = " |";} else {text = String(this._recipe._craftLevel);}if(displayParam.clevel) {this.drawText(text,-15,0,this.contents.width - xx,"right");this.changeTextColor(this.systemColor());this.drawText(text2,0,0,this.contents.width - xx,"right");this.changeTextColor(this.normalColor());//End Changes End Changesthis.drawIcon(categoryIcons[this._recipe.categoryId()],this.contents.width - 75 - xx,0); //HERE}}Window_RecipeDetail.prototype.drawMaterials = function() {// Changed From 0 to 20 (DragonPC) Changes!var yy = 20;if(displayParam.clevel || displayParam.plevel) {yy = this.contents.fontSize + 20;}//Change END. End Changethis.changePaintOpacity(this._recipe.craftable());this.changeTextColor(this.systemColor());//Custom Text Variable(DragonPC) Changes!this.drawText(reqmaterial,0,yy,this.width);//end Custom End Changeyy += this.contents.fontSize + this.textPadding();for(var i = 0;i < this._recipe._materials.length;i++) {var item = this._recipe._materials;this.changePaintOpacity($gameParty.numItemsCrafting(item._item) >= item._amount);this.changeTextColor(this.normalColor());this.drawIcon(item._item.iconIndex,0,yy);this.drawText(item._item.name,Window_Base._iconWidth,yy,this.width);//Changed Text Color to show green for more than and red for not enough.(DragonPC) Changes!var ItemAmount = $gameParty.numItemsCrafting(item._item);var AmtNeeded = item._amount; if (ItemAmount >= AmtNeeded) {                this.changeTextColor(this.textColor(3));this.drawText(String(ItemAmount),-50,yy,this.contents.width,"right");            }else {this.changeTextColor(this.textColor(18));this.drawText(String(ItemAmount),-50,yy,this.contents.width,"right");}this.changeTextColor(this.normalColor());var string = " / " + String(AmtNeeded);this.drawText(string,0,yy,this.contents.width,"right");//End Changes End Changesyy += this.contents.fontSize  + this.textPadding();}}Window_RecipeDetail.prototype.drawSuccessRate = function() {//Custom Variable(DragonPC)var CPV = this._recipe.successRate()//End Custom Variablethis.changePaintOpacity(this._recipe.craftable());this.changeTextColor(this.systemColor());//Changed yy Variable to -5 to prevent Clipping(DragonPC) Changes!var yy = this.contents.height - this.contents.fontSize - this.textPadding() - 5;//End Change End Change//Custom Text Variable(DragonPC) Changes!this.drawText(sucRate,0,yy,this.contents.width);//End Custom Text Entry End Change //User Definable Colors(DragonPC) Changes!if (CPV > 0) {this.changeTextColor(this.textColor(colorCPV1));//code}if (CPV > 20) {this.changeTextColor(this.textColor(colorCPV2));//code }if (CPV > 40) {this.changeTextColor(this.textColor(colorCPV3));//code}if (CPV > 60) {this.changeTextColor(this.textColor(colorCPV4));//code}if (CPV > 80) {this.changeTextColor(this.textColor(colorCPV5));//code} this.drawText(CPV + "%",0,yy,this.contents.width,"right");this.changeTextColor(this.normalColor());//END User Definable Colors(DragonPC) End Change} Window_RecipeDetail.prototype.drawGoldCost = function() {if(this._recipe._goldCost > 0) {this.changePaintOpacity(this._recipe.hasGold());this.changeTextColor(this.systemColor());//Custom Text Variable (DragonPC) Changes!this.drawText(craCost,0,this.contents.height-this.contents.fontSize*2 - 15,this.contents.width);//Custom Text End Change End if (this._recipe._goldCost > $gameParty.gold()) {this.changeTextColor(this.textColor(18));             }else {this.changeTextColor(this.textColor(3))}this.drawText(this._recipe._goldCost, - 40,this.contents.height-this.contents.fontSize*2 - 15,this.contents.width, 'right')this.drawIcon(Yanfly.Icon.Gold,Graphics.boxWidth/2-68,this.contents.height-this.contents.fontSize*2 - 15)this.changeTextColor(this.normalColor());}}Window_RecipeDetail.prototype.drawCurrencyValue = function(value, unit, x, y, width) {var unitWidth = Math.min(80, this.textWidth(unit));this.resetTextColor();this.changePaintOpacity(this._recipe.hasGold());this.drawText(value, x, y, width - unitWidth - 6, 'right');this.changeTextColor(this.systemColor());this.drawText(unit, x + width - unitWidth, y, unitWidth, 'right');} function Window_RecipeConfirm() {this.initialize.apply(this, arguments);}Window_RecipeConfirm.prototype = Object.create(Window_Selectable.prototype);Window_RecipeConfirm.prototype.constructor = Window_RecipeConfirm;Window_RecipeConfirm.prototype.initialize = function(x, y, w, h) {Window_Selectable.prototype.initialize.call(this, x, y, w, h);this._amount = 1;this.refresh();}Window_RecipeConfirm.prototype.itemMax = function() {return 1;}Window_RecipeConfirm.prototype.enable = function() {return true;}Window_RecipeConfirm.prototype.refresh = function() {Window_Selectable.prototype.refresh.call(this);//Custom Text Variable(DragonPC) Changes!this.drawText(craText,0,0,this.contents.width,"center");//Custom Text End Change Endif(this._recipe && this._recipe.craftable()) {this.drawText("x" + String(this._amount),0,0,this.contents.width,"right");}}Window_RecipeConfirm.prototype.activate = function() {Window_Selectable.prototype.activate.call(this);this.select(0);}Window_RecipeConfirm.prototype.deactivate = function() {Window_Selectable.prototype.deactivate.call(this);this.deselect();}Window_RecipeConfirm.prototype.setRecipe = function(recipe) {if(recipe == this._recipe) { return; }this._recipe = recipe;this._amount = 1;this.refresh();}Window_RecipeConfirm.prototype.isCursorMovable = function() {return this.isOpenAndActive() && craftMultiple && this._recipe._craftMultiple;}Window_RecipeConfirm.prototype.cursorDown = function(wrap) { this.changeAmount(-10);}Window_RecipeConfirm.prototype.cursorUp = function(wrap) { this.changeAmount(10);}Window_RecipeConfirm.prototype.cursorRight = function(wrap) { this.changeAmount(1);}Window_RecipeConfirm.prototype.cursorLeft = function(wrap) { this.changeAmount(-1);}Window_RecipeConfirm.prototype.changeAmount = function(value) {SoundManager.playCursor();this._amount += value;this._amount = Math.min(Math.max(this._amount,1),this._recipe.amountCraftable());this.refresh();} function Scene_Crafting() {this.initialize.apply(this, arguments);}Scene_Crafting.prototype = Object.create(Scene_MenuBase.prototype);Scene_Crafting.prototype.constructor = Scene_Crafting;Scene_Crafting.prototype.initialize = function() {Scene_MenuBase.prototype.initialize.call(this);}Scene_Crafting.prototype.create = function() {Scene_MenuBase.prototype.create.call(this);this._helpWindow = new Window_Help();var width = Graphics.width / 2;var height = Graphics.height - this._helpWindow.height; this._listWindow = new Window_RecipeList(0,this._helpWindow.height+72,width,height-72*2);this._listWindow.setHandler('ok',this.listSuccess.bind(this));this._listWindow.setHandler('cancel',this.cancel.bind(this));if(!displayParam.clevel) { this._listWindow.height += this._listWindow.fittingHeight(1); }this._listWindow.createContents();this._detailWindow = new Window_RecipeDetail(width,this._listWindow.y,width,height-72*2);if(!displayParam.gold) { this._detailWindow.height += this._detailWindow.fittingHeight(1); }this._detailWindow.createContents();height = this._detailWindow.y + this._detailWindow.height;this._confirmWindow = new Window_RecipeConfirm(width,height,width,72);this._confirmWindow.setHandler('ok',this.craftSuccess.bind(this));this._confirmWindow.setHandler('cancel',this.confirmCancel.bind(this));if(displayParam.gold) {this._goldWindow = new Window_Gold();this._goldWindow.width = width;this._goldWindow.y = Graphics.height - 72; this._goldWindow.x = width;}this._popupWindow = new Window_RecPopup();this._popupWindow.setHandler('ok',this.popupOk.bind(this));this._popupWindow.setHandler('cancel',this.popupOk.bind(this));this._commandWindow = new Window_RecCategory();this._commandWindow.setHandler('ok',this.commandOk.bind(this));this._commandWindow.setHandler('cancel',this.commandCancel.bind(this));if(displayParam.clevel) {this._gaugeWindow = new Window_RecGauge();}this.addWindow(this._helpWindow);this.addWindow(this._listWindow);this.addWindow(this._detailWindow);this.addWindow(this._confirmWindow);if(this._goldWindow) {this.addWindow(this._goldWindow);}this.addWindow(this._popupWindow);this.addWindow(this._commandWindow);if(this._gaugeWindow) {this.addWindow(this._gaugeWindow);}}Scene_Crafting.prototype.popupOk = function() {this._popupWindow.deactivate();this._popupWindow.close();this._listWindow.activate();}Scene_Crafting.prototype.update = function() {Scene_Base.prototype.update.call(this);if(this._listWindow.currentItem()) {this._helpWindow.setText(this._listWindow.currentItem()._result._item.description);}if(this._commandWindow.isOpenAndActive()) {this._helpWindow.setText("");}this._detailWindow.setRecipe(this._listWindow.currentItem());this._confirmWindow.setRecipe(this._listWindow.currentItem());this._listWindow.setCategory(categoryNames[this._commandWindow._index]);if(this._gaugeWindow) { this._gaugeWindow.setCategory(categoryNames[this._commandWindow._index]);}if(this._listWindow.currentItem()) {if(this._listWindow.currentItem().craftable()) {this._confirmWindow.opacity = 255;this._confirmWindow.contentsOpacity = 255;} else {this._confirmWindow.opacity = 75;this._confirmWindow.contentsOpacity = 75;}}}Scene_Crafting.prototype.listSuccess = function() {this._listWindow.deactivate();if(this._goldWindow) {this._goldWindow.close();}this._confirmWindow.activate();}Scene_Crafting.prototype.craftSuccess = function() {var amount = 0;var item = null;for(var i = 0;i < this._confirmWindow._amount;i++) {var item2 = this._listWindow.currentItem().craft(Math.random() * 100);if(item2) { amount++;item = item2;}}if(item) {this._popupWindow.setText(item, amount);} else {this._popupWindow.setTextFail();}this._confirmWindow.changeAmount(-1000);if(this._goldWindow) {this._goldWindow.refresh();}this._listWindow.refresh();if(this._gaugeWindow) {this._gaugeWindow.refresh();}this._popupWindow.activate();this._detailWindow.refresh();}Scene_Crafting.prototype.confirmCancel = function() {this._confirmWindow.deactivate();if(this._goldWindow) {this._goldWindow.open();}this._listWindow.activate();}Scene_Crafting.prototype.commandCancel = function() {this.popScene();}Scene_Crafting.prototype.cancel = function() {this._listWindow.select(-1);this._helpWindow.setText("");this._commandWindow.activate();}Scene_Crafting.prototype.commandOk = function() {this._listWindow.select(0);this._listWindow.activate();} function Scene_CraftingSpecific() {this.initialize.apply(this, arguments);}Scene_CraftingSpecific.prototype = Object.create(Scene_Crafting.prototype);Scene_CraftingSpecific.prototype.constructor = Scene_CraftingSpecific;Scene_CraftingSpecific.prototype.initialize = function() {Scene_Crafting.prototype.initialize.call(this);}Scene_CraftingSpecific.prototype.create = function() {Scene_Crafting.prototype.create.call(this);this._commandWindow._index = categoryNames.indexOf(categoryEventName);this._commandWindow.deactivate();this._commandWindow.visible = false;this._listWindow.height += this._listWindow.fittingHeight(1);this._listWindow.y -= this._listWindow.fittingHeight(1);this._detailWindow.height += this._listWindow.fittingHeight(1);this._detailWindow.y -= this._listWindow.fittingHeight(1);this._listWindow.createContents();this._detailWindow.createContents();this._listWindow.select(0);this._listWindow.activate();}Scene_CraftingSpecific.prototype.cancel = function() { this.popScene(); }  function Window_RecCategory() {this.initialize.apply(this, arguments);}Window_RecCategory.prototype = Object.create(Window_HorzCommand.prototype);Window_RecCategory.prototype.constructor = Window_RecCategory;Window_RecCategory.prototype.initialize = function() {Window_HorzCommand.prototype.initialize.call(this, 0, this.fittingHeight(2));}Window_RecCategory.prototype.windowWidth = function() { return Graphics.width; }Window_RecCategory.prototype.windowHeight = function() { return this.fittingHeight(1); }Window_RecCategory.prototype.makeCommandList = function() {for(var i = 0;i < categoryNames.length;i++) {this.addCommand(categoryNames,categoryNames);}}Window_RecCategory.prototype.itemWidth = function() {return this.width / 5;}Window_RecCategory.prototype.drawItem = function(index) {this.changePaintOpacity(this.isCommandEnabled(index));var rect = this.itemRectForText(index);this.drawText(this.commandName(index),rect.x,rect.y,rect.width);this.drawIcon(categoryIcons[index],rect.x-Window_Base._iconWidth,rect.y+2);}Window_RecCategory.prototype.itemRectForText = function(index) {var rect = this.itemRect(index);rect.x += Window_Base._iconWidth; rect.width -= Window_Base._iconWidth;return rect;} function Window_RecPopup() {this.initialize.apply(this, arguments);}Window_RecPopup.prototype = Object.create(Window_Selectable.prototype);Window_RecPopup.prototype.constructor = Window_RecPopup;Window_RecPopup.prototype.initialize = function() {//Fixed Popup to not truncate text CHANGESWindow_Selectable.prototype.initialize.call(this, Graphics.width/2-this.windowWidth()/2,Graphics.height/2-this.windowHeight()/2,300,this.fittingHeight(1)); this.openness = 0;this.deactivate();}Window_RecPopup.prototype.windowWidth = function() {return 300;}//end changes end changesWindow_RecPopup.prototype.windowHeight = function() {return this.fittingHeight(1);}Window_RecPopup.prototype.setText = function(item, amount) {this.contents.clear();// Added Sound on Success(DragonPC) CHANGES!!var SuccessSound = {name:   success,volume: successVol,pitch:  100,pan:    0,  };    AudioManager.playSe(SuccessSound);//Sound End Change end//Custom Text Variable(DragonPC) Changes!var text = String(amount) + "x " + item.name + " " + craftedText;//Custom Text Variable End Change Endvar width = this.textWidth(text) + Window_Base._iconWidth;console.log(width);this.width = width + this.standardPadding() * 2;console.log(this.width);this.x = (Graphics.width-width)/2this.createContents();this.drawText(text,Window_Base._iconWidth,0,this.contents.width);this.drawIcon(item.iconIndex,0,0);this.open();}Window_RecPopup.prototype.setTextFail = function() {this.contents.clear();         //Added Failure Sound(DragonPC) Changes!!!var FailureSound = {name:   failure,volume: failureVol,pitch:  100,pan:    0,}; AudioManager.playSe(FailureSound);//End Changes End Changes!!   //Custom Text Variable(DragoncPC) (Changed Popup Minimum Value to prevent Truncation of text) Changes!var text = craFailed;var width = this.textWidth(text) + 60;//Custome Text End End Changethis.width = width + this.textPadding() * 2;this.x = (Graphics.width-width)/2;this.createContents();this.drawText(text,18,0,this.contents.width);this.open();}Window_RecPopup.prototype.processOk = function() {if (this.isCurrentItemEnabled()) {this.updateInputData();this.deactivate();this.callOkHandler();} else {this.playBuzzerSound();}} function Window_RecGauge() {this.initialize.apply(this, arguments);}Window_RecGauge.prototype = Object.create(Window_Base.prototype);Window_RecGauge.prototype.constructor = Window_RecGauge;Window_RecGauge.prototype.initialize = function() {Window_Selectable.prototype.initialize.call(this, 0,Graphics.height-this.fittingHeight(1),Graphics.width/2,this.fittingHeight(1));this._category = "all";}Window_RecGauge.prototype.refresh = function() {this.contents.clear();if(this._category == "all") {return;}this.drawIcon(categoryIcons[this.catIndex()],0,0);//Changed Guage Width so level 100+ will not Overlap(DragonPC) Changes!this.drawText($gameParty.craftLevel(this.catIndex()),Window_Base._iconWidth,0,this.contents.width);if ($gameParty.craftLevel(this.catIndex()) === UDML) {this.changeTextColor(this.textColor(20));this.drawText(MLT,0,0,this.contents.width,"right");this.changeTextColor(this.normalColor());}else{var rate = $gameParty.craftExp(this.catIndex()) / $gameParty.craftExpNext(this.catIndex());this.drawGauge(80,-3,this.contents.width-80,rate,this.tpGaugeColor1(),this.tpGaugeColor2());text = String($gameParty.craftExp(this.catIndex())) + "/" + String($gameParty.craftExpNext(this.catIndex()));this.drawText(text,0,0,this.contents.width,"right");} //End Change End Change}Window_RecGauge.prototype.setCategory = function(cat) {if(cat == this._category) {return;}this._category = cat;this.refresh();}Window_RecGauge.prototype.catIndex = function() {return categoryNames.indexOf(this._category);} var crafting_window_menucommand_addoriginalcommands = Window_MenuCommand.prototype.addOriginalCommands;Window_MenuCommand.prototype.addOriginalCommands = function() {crafting_window_menucommand_addoriginalcommands.call(this);if(craftFromMenu != "off") { this.addCommand("Crafting","crafting"); }} var crafting_scene_menu_createcommandwindow = Scene_Menu.prototype.createCommandWindow;Scene_Menu.prototype.createCommandWindow = function() {crafting_scene_menu_createcommandwindow.call(this);this._commandWindow.setHandler("crafting",this.commandRecipe.bind(this));}Scene_Menu.prototype.commandRecipe = function() {SceneManager.push(Scene_Crafting);} var RecipeCrafting_Game_Interpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand;Game_Interpreter.prototype.pluginCommand = function(command, args) {RecipeCrafting_Game_Interpreter_pluginCommand.call(this, command, args);if(command === 'crafting' && args[0] === 'call') {categoryEventName = args[1]SceneManager.push(Scene_CraftingSpecific);}} //YEP-ITEMCOREGame_Party.prototype.numIndependentItems = function(item) {if(!item) return null;if (DataManager.isIndependent(item)) {if (DataManager.isItem(item)) var group = this.items();if (DataManager.isWeapon(item)) var group = this.weapons();if (DataManager.isArmor(item)) var group = this.armors();var baseItemId = item.id;var amount = 0;for (var i = 0; i < group.length; ++i) {var item = group;if (!item) continue;if (!item.baseItemId) continue;if (item.baseItemId !== baseItemId) continue;if (this.checkItemIsEquipped(item)) continue;amount++;}return amount;} else {return this.numItems(item);}}})();
    That's some good work you have done I am sure VLUE would be interested in seeing what you changed. I didn't realise this post had be made to the released section. Many of people are still commenting on this article in the development stage section so I have updated this thread to the latest details and I hae linked this page on the development thread.



      Script Here
     
    #9
  10. Farr

    Farr Veteran Veteran

    Messages:
    247
    Likes Received:
    91
    Location:
    C-bus, Ohio
    First Language:
    Portuguese
    Nice edit dragonpc!

    Somehow I cant call the craft window

    I have an scene called "Scribe"

    So I called crafting call Scribe  but the window doesnt open

    I pressed f8 to check if something was wrong and I get this error

    Uncaught SyntaxError: Unexpected identifier
     
    Last edited by a moderator: Nov 5, 2015
    #10
  11. dragonpc

    dragonpc Veteran Veteran

    Messages:
    109
    Likes Received:
    78
    First Language:
    English
    Could you link that thread here for us please? i would like to see what it is as well.

    Much appreciated comments, thanks guys, i just hope you enoy it as much as i did doing it  8)
     
    #11
  12. Screech1989

    Screech1989 King Pin! Veteran

    Messages:
    107
    Likes Received:
    88
    Location:
    Pontypool, South Wales, UK
    First Language:
    English
    Original Development thread: here
     
    #12
  13. dragonpc

    dragonpc Veteran Veteran

    Messages:
    109
    Likes Received:
    78
    First Language:
    English
    The Plugin has to have the Category "Scribe"

    then you set up the correct icon you wish to use.

    then click ok exit out of the plugin manager,

    then you create and event with the Plugin Command "crafting call Scribe"

    then you check all your recipes to make sure that they are all labeled under the correct category "Scribe" (all this is case sensitive)

    after that it should work fine.

    If this doesn't work Press F8 again and tell me the Location (line of error on the far right) as well as the file it says with it. manager.js for example
     
    #13
  14. Mathwe

    Mathwe Villager Member

    Messages:
    23
    Likes Received:
    4
    First Language:
    German
    The Crafting System is really great, but it has one big failure somewhere in the scipt. I had post it in the other Thread and post it here again, tested it with the new version but its still the same.

    I need only one item 100x and the other only 1x and i can do the crafting 100x, so this must be chanced^^

    Edit: On the Screenshots are the old Version, but i has the new Version and tested it with it, but i didnt see a reason to make the Screens with the new version again. ^^

    https://twitter.com/LPMathwe/status/662093778132574209
     
    Last edited by a moderator: Nov 5, 2015
    #14
  15. dragonpc

    dragonpc Veteran Veteran

    Messages:
    109
    Likes Received:
    78
    First Language:
    English
    you are not using the new version.
     
    #15
  16. Mathwe

    Mathwe Villager Member

    Messages:
    23
    Likes Received:
    4
    First Language:
    German
    Yeah in the Screenshots i use the old version, but the problem its the same, so i didnt see a reason to make the screens again. Sorry i didnt say that^^
     
    #16
  17. Mathwe

    Mathwe Villager Member

    Messages:
    23
    Likes Received:
    4
    First Language:
    German
    #17
  18. dragonpc

    dragonpc Veteran Veteran

    Messages:
    109
    Likes Received:
    78
    First Language:
    English
    Ok, i see what you mean, i will look at it either later today or tommorow. as this really isn't my plugin i can't promise anything other than that i will look at it and see if i can find out what is causing it.

    but i have been up for nearly 32 hours doing what i have already, its time for some much needed sleep. 8D
     
    Last edited by a moderator: Nov 6, 2015
    #18
  19. DarkSlayerEX

    DarkSlayerEX Veteran Veteran

    Messages:
    95
    Likes Received:
    9
    First Language:
    English
    When I load the Crafting plugin into my project, or a brand new one, it runs fine.. However as soon as I add in a recipe of any kind, even one of the examples, it crashes, giving me a

    Cannot read property '1' of null

    error

    This applies both to the VLUE and Dragon versions.. I don't understand...

    <recipe>

    <material>

    {type:"armor", id:3, amount:3, cons:false}

    {type:"armor", id:2, amount:1, cons:false}

    <material>

    category:Blacksmith

    <recipe>

    Edit: the help text gives the wrong tags...

    <material> is supposed to be <materials>.... That fixes it for me..
     
    Last edited by a moderator: Nov 6, 2015
    #19
  20. Mathwe

    Mathwe Villager Member

    Messages:
    23
    Likes Received:
    4
    First Language:
    German
    Has you try it with the complete recept?

    Hmm i think then it says property null it can be a conflict with another plugin...had it a few times with other plugins and i could resolve it with do some plugins off.

    I didnt has the failure message like you, because i use the full recept.

    You has in you Armor datebase a item in slot 3 and 2?
     
    #20

Share This Page