MZ Opening Sasuke Kannazuki's ItemCombineScene in an event

I'd like to use Sasuke Kannazuki's ItemCombineScene plugin which is a part of official plugins available in RMMZ's DLC folder, modded by ST0RMTiger (LINK), in my project but there is one thing that I can't get to work: launching Scene_ItemCombine in an event. I thought using Script call SceneManager.push(Scene_ItemCombine); result in opening the scene but it doesn't appear to be build like that. This script call also doesn't work with Visustella as it will result in the following message:
ReferenceError
Scene_ItemCombine is not defined
Could someone please provide me with solution or perhaps explain how I should alter the code to fit my needs? Thanks in advance.
The ItemCombineScene plugin declares Scene_ItemCombine locally on its IIFE:
JavaScript:
(() => {
// ...stuff... //
  function Scene_ItemCombine() {
// ...stuff... //
})();
That means the scene prototype/class (and everything on it) is not directly accessible outside of the plugin's code.

However, if you just want to push the scene, you can try this in a Script command:
JavaScript:
Scene_Menu.prototype.commandCombine();
(Should be safe because by default that method doesn't reference a this value.)
Thanks! It worked like a charm!

Also, there's one or two more things I hope to have and having my requests all in one thread be more "economic":
  • Columns for materials and candidates for reforge. Basically, Each item on the list takes the whole line which in my opinion is not efficient and I would like for those lists to display in columns, two columns specifically, as it's more compact.
  • Price for combining. Currently you only need the material and reforge candidate, but there is no way to assign a reforge cost.
Columns for materials and candidates for reforge.
That's the default: those windows inherit from Window_ItemList, which is defined with 2 columns.

This might work to override whatever plugin you've used to change that (untested!):
Spoiler: plugin code (separate add-on plugin)
JavaScript:
/*:
 * @target MZ
 * @plugindesc Feature patch for launch plugin ItemCombineScene.
 * @author Caethyril
 * @url https://forums.rpgmakerweb.com/threads/164922/
 * @base ItemCombineScene
 * @help Free to use and/or modify for any project, no credit required.
 */
;void (() => {
'use strict';

  /** Patches to apply. */
  const PATCHES = Object.freeze([
    () => {  C._materialWindow.prototype.maxCols = function() { return 2; }; },
    () => { C._candidateWindow.prototype.maxCols = function() { return 2; }; }
  ]);

  /** Non-conflicting identifier for scene constructor. See {@linkcode C}. */
  const $ = Symbol();

  /**
   * Storage for extracted constructor references.
   * See {@linkcode fetchConstructors}.
   *
   * Could alternatively just promote them all to
   * global scope (tiny risk of conflict). E.g.
   * ```
   *   globalThis.Scene_ItemCombine = C[$];
   * ```
   */
  const C = {
    /** `Scene_ItemCombine` */
    [$]: null,
    /** `Window_Candidate` */
    _candidateWindow: null,
    /** `Window_MaterialItem` */
    _materialWindow: null
  };

  /** Populates and freezes {@linkcode C}. */
  const fetchConstructors = function() {
    Scene_Menu.prototype.commandCombine();
    const sc = SceneManager._scene;
    C[$] = sc.constructor;
    for (const k of Object.keys(C))
      C[k] = sc[k].constructor;
    Object.freeze(C);
    SceneManager.pop();
  };

  /** Applies all patch functions in {@linkcode PATCHES}. */
  const applyPatches = function() {
    for (const f of PATCHES) f();
  };

  // Set up plugin on game boot.
  void (alias => {
    Scene_Boot.prototype.start = function() {
      fetchConstructors();
      applyPatches();
      alias.apply(this, arguments);
    };
  })(Scene_Boot.prototype.start);

})();
[Edit: ah, no, I don't think this will work, since we need to wait for the scene to be created before we can access instance properties. Maybe by hooking into SceneManager.onSceneCreate. But it's a messy enough approach as it is. 😴]

Price for combining
This would require more work: I'm not promising to help with that. I suggest you provide a mock-up, e.g. fake/edited screenshot, of how the price should display. Maybe also clarify how you expect to specify the price for each recipe.


Alternatively, you could post in Plugin Requests and list everything you want your crafting system to be able to do. Maybe the perfect plugin for your game already exists and you just don't know it! Again, mock-ups can be very helpful.

Another option is to rework the design of your game system, e.g. assume the cost is covered by remains from excess materials, or make multi-stage recipes using high-value components.

Original thread: https://forums.rpgmakerweb.com/threads/opening-sasuke-kannazukis-itemcombinescene-in-an-event.164922/