MV (MV) run a message window when deleting save, with choice option, and works with yanfly save core

basically what i wanna do, is:

delete save -> character message worrying that if you delete save, you won't be able to get it back -> choice option (if yes, then delete save, if no then cancel)

should be working with yanfly save core, it has the delete save option. thanks

(i know this looks hard to do, it's okay, i just like to add a fourth wall break from one of the characters instead of the boring "yes/no" choice)

sorry if ill take too long to respond too
if you want to change the save scene like a prompt like that.
TSR_Save can do that.

it can even change your look (I have a more improved version made)
which isn't on his side with extra saveguards.
if you want to change the save scene like a prompt like that.
TSR_Save can do that.

it can even change your look (I have a more improved version made)
which isn't on his side with extra saveguards.
ill try that soon, idk if it can work with yanfly save core though
ill try that soon, idk if it can work with yanfly save core though
it does not, as its an complete overhaul, so you can make it how you want too,
so you have full control over it, so it doesn't like default or the same 🙂
Does it have to be a message window? I think you can set the message in the plugin settings. Then just add a draw face. I made this just for "fun", copy-pasted the Yanfly code to add another window (wider) when it starts the delete confirmation to draw an actor face there. Change the face file name and face index. And if you need more lines for the text you need to alter some coordinates.

function Window_DeleteConfirm() {
this.initialize.apply(this, arguments);
}

Window_DeleteConfirm.prototype = Object.create(Window_SaveConfirm.prototype);
Window_DeleteConfirm.prototype.constructor = Window_DeleteConfirm;

Window_DeleteConfirm.prototype.windowWidth = function() {
return 240 + Window_Base._faceWidth;
};

Window_DeleteConfirm.prototype.setData = function(text) {
var bitmap = ImageManager.loadFace('Actor1');
var faceIndex = 0;
this._text = text;
var ww = this.textWidthEx(this._text) + this.standardPadding() * 2;
ww += this.textPadding() * 2;
this.width = ww + Window_Base._faceWidth;
this.refresh();
this.x = (Graphics.boxWidth - this.width) / 2;
this.y = (Graphics.boxHeight - this.height) / 2;
this.drawTextEx(this._text, this.textPadding() + Window_Base._faceWidth, 0);
if (bitmap.isReady()) {
this.drawFace('Actor1', faceIndex, 0, 0)
} else {
bitmap.addLoadListener(()=>this.refresh());
}
};

const _myEdit1_SceneFile_create = Scene_File.prototype.create;
Scene_File.prototype.create = function() {
_myEdit1_SceneFile_create.call(this);
this.createDeleteConfirmWindow();
};

Scene_File.prototype.createDeleteConfirmWindow = function() {
this._deleteConfirmWindow = new Window_DeleteConfirm();
var win = this._deleteConfirmWindow;
win.setHandler('confirm', this.onConfirmOk.bind(this));
win.setHandler('cancel', this.onDeleteConfirmCancel.bind(this));
this.addWindow(this._deleteConfirmWindow);
};

Scene_File.prototype.onActionDelete = function() {
if (Yanfly.Param.SaveConfirmDel) {
this.startDeleteConfirmWindow(Yanfly.Param.SaveConfirmDelTx);
} else {
this.performActionDelete();
}
};

Scene_File.prototype.startDeleteConfirmWindow = function(text) {
SoundManager.playOk();
this._deleteConfirmWindow.setData(text);
this._deleteConfirmWindow.open();
this._deleteConfirmWindow.activate();
this._deleteConfirmWindow.select(0);
};

Scene_File.prototype.onDeleteConfirmCancel = function() {
var index = this._actionWindow.index();
this._deleteConfirmWindow.deactivate();
this._deleteConfirmWindow.close();
this.onSavefileOk();
this._actionWindow.select(index);
};

const _myEdit1_SceneFile_onCorfirmOk = Scene_File.prototype.onConfirmOk;
Scene_File.prototype.onConfirmOk = function() {
this._deleteConfirmWindow.deactivate();
this._deleteConfirmWindow.close();
_myEdit1_SceneFile_onCorfirmOk.call(this);
};
Does it have to be a message window? I think you can set the message in the plugin settings. Then just add a draw face. I made this just for "fun", copy-pasted the Yanfly code to add another window (wider) when it starts the delete confirmation to draw an actor face there. Change the face file name and face index. And if you need more lines for the text you need to alter some coordinates.

function Window_DeleteConfirm() {
this.initialize.apply(this, arguments);
}

Window_DeleteConfirm.prototype = Object.create(Window_SaveConfirm.prototype);
Window_DeleteConfirm.prototype.constructor = Window_DeleteConfirm;

Window_DeleteConfirm.prototype.windowWidth = function() {
return 240 + Window_Base._faceWidth;
};

Window_DeleteConfirm.prototype.setData = function(text) {
var bitmap = ImageManager.loadFace('Actor1');
var faceIndex = 0;
this._text = text;
var ww = this.textWidthEx(this._text) + this.standardPadding() * 2;
ww += this.textPadding() * 2;
this.width = ww + Window_Base._faceWidth;
this.refresh();
this.x = (Graphics.boxWidth - this.width) / 2;
this.y = (Graphics.boxHeight - this.height) / 2;
this.drawTextEx(this._text, this.textPadding() + Window_Base._faceWidth, 0);
if (bitmap.isReady()) {
this.drawFace('Actor1', faceIndex, 0, 0)
} else {
bitmap.addLoadListener(()=>this.refresh());
}
};

const _myEdit1_SceneFile_create = Scene_File.prototype.create;
Scene_File.prototype.create = function() {
_myEdit1_SceneFile_create.call(this);
this.createDeleteConfirmWindow();
};

Scene_File.prototype.createDeleteConfirmWindow = function() {
this._deleteConfirmWindow = new Window_DeleteConfirm();
var win = this._deleteConfirmWindow;
win.setHandler('confirm', this.onConfirmOk.bind(this));
win.setHandler('cancel', this.onDeleteConfirmCancel.bind(this));
this.addWindow(this._deleteConfirmWindow);
};

Scene_File.prototype.onActionDelete = function() {
if (Yanfly.Param.SaveConfirmDel) {
this.startDeleteConfirmWindow(Yanfly.Param.SaveConfirmDelTx);
} else {
this.performActionDelete();
}
};

Scene_File.prototype.startDeleteConfirmWindow = function(text) {
SoundManager.playOk();
this._deleteConfirmWindow.setData(text);
this._deleteConfirmWindow.open();
this._deleteConfirmWindow.activate();
this._deleteConfirmWindow.select(0);
};

Scene_File.prototype.onDeleteConfirmCancel = function() {
var index = this._actionWindow.index();
this._deleteConfirmWindow.deactivate();
this._deleteConfirmWindow.close();
this.onSavefileOk();
this._actionWindow.select(index);
};

const _myEdit1_SceneFile_onCorfirmOk = Scene_File.prototype.onConfirmOk;
Scene_File.prototype.onConfirmOk = function() {
this._deleteConfirmWindow.deactivate();
this._deleteConfirmWindow.close();
_myEdit1_SceneFile_onCorfirmOk.call(this);
};
how to use it? anyways, I won't be able to show any results until monday because i don't have access to my pc in the weekends, but thanks. ill see what i can do.
Add it as a plugin. Copy paste to notepad, save as .js file and add as a plugin below Yanfly

Original thread: https://forums.rpgmakerweb.com/threads/mv-run-a-message-window-when-deleting-save-with-choice-option-and-works-with-yanfly-save-core.183353/