Yanfly's Item Synth.- Ingredients Window Display

I need help about Yanfly's Item Synthesis plugin.

In this plugin's window, the ingredients window only show up to the 5th ingredient. The 6th ingredient onwards didn't show correctly.
Spoiler: Ingredients Window
synth.png
My game is in default 816*624 Px resolution. It's intended to be played on windowed mode side-by-side with study material.

In the game, each synthesized item need 4 to the maximum of 9 ingredient materials. I want the Ingredients Window to show the ingredients in 3*3 grids, displaying only the ingredient items icon and amount like this:
Spoiler: Ingredients Window that I want
synth2.png

It's obviously photoshoped

I'm not well versed with JS and only use the plugins in plug-and-play way with minimum edits.
Thank you in advance for the help.
You could give SRD's super tools plugin a shot. It allows you to modify window sizes and lines.
Johnboy Unfortunately SRD's Super Tools Plugin can only modify the Opacity, Widht, and Height of the Ingredients Window.
@Djajapena Do you still need help with this or did you solve it? I can take a look if you still need help.
@SeaPhoenix Yea I still need help with this. ^^
Here's the plugin and some screenshots. Just copy-and-paste the plugin code into a new file, save it (I use the name SPX_ItemSynthesisMod.js but anything is fine) and place the plugin somewhere below YEP_ItemSynthesis.js.

Spoiler: Screenshots
synthesis1.png

synthesis2.png

Spoiler: Plugin code
Code:
// Modifications to YEP_ItemSynthesis.js by SeaPhoenix
// Place in plug-in list anywhere BELOW YEP_ItemSynthesis.js

// Can change the number 20 in the two functions below to a bigger number (e.g., 24) for more white space between ingredient columns,
// or to a smaller number (e.g., 16) for less white space between ingredient columns
// (may be needed if you have a synthesis cost of more than 9,999 money units so that the text doesn't get shrunk)

Window_SynthesisIngredients.prototype.ingredientSpacing = function() {
  return this.textPadding() * 20; 
};

Window_SynthesisNumber.prototype.ingredientSpacing = function() {
  return this.textPadding() * 20; 
};

////////////////////////////////////////////////////////////////////////

// Window_SynthesisIngredients

Window_SynthesisIngredients.prototype.drawItemIngredients = function(item, wy) {
    var ww = this.contents.width;
    this.changeTextColor(this.systemColor());
    this.drawText(Yanfly.Param.ISIngredientsList, 0, 0, ww, 'center');
    this.changeTextColor(this.normalColor());
    var cell = 0;
    for (var i = 0; i < item.synthIngredients.length; ++i) {
      cell = this.drawItemDetails(i, cell, wy);
      if (cell > 0 && cell % 3 === 0) wy += this.lineHeight()
      if (wy + this.lineheight > this.contents.height) break;
    }
    this.drawItemSynthCost(item, cell, wy);
};

Window_SynthesisIngredients.prototype.drawItemDetails = function(index, cell, wy) {
    var ingredient = DataManager.getSynthesisIngredient(this._item, index);
    var quantity = DataManager.getSynthesisQuantity(this._item, index);
    var ww = (this.contents.width - this.ingredientSpacing()) / 3;
    var wx = (ww + (this.ingredientSpacing() / 2)) * (cell % 3);
    if (!ingredient) return cell;
    this.resetFontSettings();
    this.drawIcon(ingredient.iconIndex, wx + 2, wy + 2);
    if (Yanfly.Param.ISAmountFmt) {
      this.drawItemQuantity(index, wx, wy, ww);
    } else {
      this.drawItemQuantity2(index, wx, wy, ww);
    }
    return cell + 1;
};

Window_SynthesisIngredients.prototype.drawItemQuantity = function(index, wx, wy, ww) {
    var ingredient = DataManager.getSynthesisIngredient(this._item, index);
    var quantity = DataManager.getSynthesisQuantity(this._item, index);
    this.contents.fontSize = Yanfly.Param.ISQuantitySize;
    this.changeTextColor(this.normalColor());
    var num = '/' + Yanfly.Util.toGroup($gameParty.numItems(ingredient));
    this.drawText(num, wx, wy, ww, 'right');
    ww -= this.textWidth(num);
    if ($gameParty.numItems(ingredient) >= quantity) {
      this.changeTextColor(this.powerUpColor());
    } else {
      this.changeTextColor(this.powerDownColor());
    }
    var text = String(Yanfly.Util.toGroup(quantity));
    this.drawText(text, wx, wy, ww, 'right');
}

Window_SynthesisIngredients.prototype.drawItemQuantity2 = function(index, wx, wy, ww) {
    var ingredient = DataManager.getSynthesisIngredient(this._item, index);
    var quantity = DataManager.getSynthesisQuantity(this._item, index);
    var owned = $gameParty.numItems(ingredient);
    this.contents.fontSize = Yanfly.Param.ISQuantitySize;
    this.changeTextColor(this.normalColor());
    var num = '/' + Yanfly.Util.toGroup(quantity);
    this.drawText(num, wx, wy, ww, 'right');
    ww -= this.textWidth(num);
    if ($gameParty.numItems(ingredient) >= quantity) {
      this.changeTextColor(this.powerUpColor());
    } else {
      this.changeTextColor(this.powerDownColor());
    }
    var text = String(Yanfly.Util.toGroup(owned));
    this.drawText(text, wx, wy, ww, 'right');
}

Window_SynthesisIngredients.prototype.drawItemSynthCost = function(item, cell, wy) {
    if (item.synthCost <= 0) return;
    this.resetFontSettings();
    var value = item.synthCost;
    var ww = (this.contents.width - this.ingredientSpacing()) / 3;
    var wx = (ww + (this.ingredientSpacing() / 2)) * (cell % 3);
    this.drawCurrencyValue(value, TextManager.currencyUnit, wx, wy, ww)
};

// Window_SynthesisNumber

Window_SynthesisNumber.prototype.drawIngredients = function() {
    var wy = this.lineHeight();
    var cell = 0;
    for (var i = 0; i < this._item.synthIngredients.length; ++i) {
      cell = this.drawItemDetails(i, cell, wy);
      if (cell > 0 && cell % 3 === 0) wy += this.lineHeight()
      if (wy + this.lineHeight() > this.contents.height) break;
    }
    this.drawItemSynthCost(this._item, cell, wy);
};

Window_SynthesisNumber.prototype.drawItemDetails = function(index, cell, wy) {
    var ingredient = DataManager.getSynthesisIngredient(this._item, index);
    var quantity = DataManager.getSynthesisQuantity(this._item, index);
    var ww = (this.contents.width - this.ingredientSpacing()) / 3;
    var wx = (ww + (this.ingredientSpacing() / 2)) * (cell % 3);
    if (!ingredient) return wy;
    this.resetFontSettings();
    this.drawIcon(ingredient.iconIndex, wx + 2, wy + 2);
    this.drawItemQuantity(index, wx, wy, ww);
    return cell + 1;
};

Window_SynthesisNumber.prototype.drawItemQuantity = function(index, wx, wy, ww) {
    var ingredient = DataManager.getSynthesisIngredient(this._item, index);
    var quantity = DataManager.getSynthesisQuantity(this._item, index);
    quantity *= this.number();
    this.contents.fontSize = Yanfly.Param.ISQuantitySize;
    this.changeTextColor(this.normalColor());
    var num = '/' + Yanfly.Util.toGroup($gameParty.numItems(ingredient));
    this.drawText(num, wx, wy, ww, 'right');
    ww -= this.textWidth(num);
    if ($gameParty.numItems(ingredient) >= quantity) {
      this.changeTextColor(this.powerUpColor());
    } else {
      this.changeTextColor(this.powerDownColor());
    }
    var text = String(Yanfly.Util.toGroup(quantity));
    this.drawText(text, wx, wy, ww, 'right');
}

Window_SynthesisNumber.prototype.drawItemSynthCost = function(item, cell, wy) {
    if (item.synthCost <= 0) return;
    this.resetFontSettings();
    var value = item.synthCost * this.number();
    var ww = (this.contents.width - this.ingredientSpacing()) / 3;
    var wx = (ww + (this.ingredientSpacing() / 2)) * (cell % 3);
    this.drawCurrencyValue(value, TextManager.currencyUnit, wx, wy, ww)
};

Window_SynthesisNumber.prototype.buttonY = function() {
    return Math.round(this.priceY() + this.lineHeight() * 2);
};
@SeaPhoenix This work perfectly! Thank you. What are the terms of use and credit?
Feel free to use for commercial or non-commercial, no credit necessary (except to Yanfly, but I assume that's already going to happen 🙂) since it's a minor change.

Original thread: https://forums.rpgmakerweb.com/threads/yanflys-item-synth-ingredients-window-display.86348/