I've tried every single plugin I could find and even tried to make my own modification, but nothing worked
Orange Screenshots won't save into the pictures folder and generates names based on the current time.
Orange Mapshots ignores my bitmaps
Cae PicSnapshot just doesn't work
YKNR_SnapshotExporter very similar to Orange Screenshots and hard to use
MakeScreenCapture gives me errors
Are there any other plugins or scripts for that?
Hudell's seems to be the simplest one, but I have to change its path, if (!Utils.isNwjs()) return condition and image's name generator to this:
(can I legally publish his plugin here?)
Orange Screenshots won't save into the pictures folder and generates names based on the current time.
Orange Mapshots ignores my bitmaps
Cae PicSnapshot just doesn't work
YKNR_SnapshotExporter very similar to Orange Screenshots and hard to use
MakeScreenCapture gives me errors
Are there any other plugins or scripts for that?
Hudell's seems to be the simplest one, but I have to change its path, if (!Utils.isNwjs()) return condition and image's name generator to this:
(can I legally publish his plugin here?)
JavaScript:
var mapName = ($gameMap._mapId).padZero(3);
if ($.Param.useMapName) {
mapName = $dataMapInfos[$gameMap._mapId].name + $gameVariables.value(700)
} else {
mapName = 'Map' + mapName;
}
JavaScript:
/*=============================================================================
* Orange - Screenshot Saver
* By Hudell - www.hudell.com
* OrangeScreenshotSaver.js
* Version: 1.0
* Free for commercial and non commercial use.
*=============================================================================*/
/*:
* @plugindesc This plugin will automatically save screenshots in a "Screenshots" folder inside the game
*
* @author Hudell
*/
var Imported = Imported || {};
var OrangeScreenshotSaver = OrangeScreenshotSaver || {};
(function($) {
"use strict";
$.generateFileName = function(){
var date = new Date();
return '' + date.getFullYear() + '_' + (date.getMonth() + 1) + '_' + date.getDate() + '_' + date.getHours() + '_' + date.getMinutes() + '_' + date.getSeconds() + '_' + date.getMilliseconds() + '_' + Math.floor(Math.random() * 5000) + '.png';
};
$.saveScreenshot = function(){
if (!Utils.isNwjs()) return;
var fs = require('fs');
var path = './Screenshots';
try {
fs.mkdir(path, function(){
var fileName = path + '/' + $.generateFileName();
var snap = SceneManager.snap();
var urlData = snap._canvas.toDataURL();
var base64Data = urlData.replace(/^data:image\/png;base64,/, "");
fs.writeFile(fileName, base64Data, 'base64', function(error){
if (error !== undefined && error !== null) {
console.error('An error occured while saving the screenshot', error);
}
});
});
} catch(error) {
if (error !== undefined && error !== null) {
console.error('An error occured while saving the screenshot:', error);
}
}
};
var oldInput_onKeyUp = Input._onKeyUp;
Input._onKeyUp = function(event) {
oldInput_onKeyUp.call(this, event);
if (event.keyCode == 44) {
$.saveScreenshot();
}
};
})(OrangeScreenshotSaver);
Imported["OrangeScreenshotSaver"] = true;