[SOLVED]Screenshot plugin that includes the mapID & mapName in its output.

Status
Not open for further replies.

cedr777

Veteran
Veteran
Joined
Feb 22, 2018
Messages
265
Reaction score
60
First Language
Not English
Primarily Uses
RMMV
Hi, I would like to request a plugin that can take in-game screenshots. Specifically, I want the file name of the PNGs/JPGs to include the current map where the player is at.

I will be using this mostly as a reporting system for testers/people who find typos in our game (currently in development). They simply need to take screenshots of whichever dialogues that contain typos (or visual evidence of a glitch of bug), then send me the files so I can apply fixes.

I am currently using Triacontane's MakeScreenCapture.js plugin(Japanese plugin). It performs the basic functions that I need for a simple in game screenshots. However, it does not include a way to show player map location in the output filename when outputting a PNG or JPEG file.

It would really be helpful to be able find which map those dialoges with typos (or bugs) happen. so if anyone could modify that plugin to have it include mapID with name in the filename, much appreciated.

Make Screen Capture by トリアコンタン
 

Magnus0808

Software Developer
Veteran
Joined
Feb 2, 2019
Messages
147
Reaction score
164
First Language
Danish
Primarily Uses
RMMV
Here you go. If you encounter any issues just message me.

Code:
//=============================================================================
// MSC Map Name
// MRP_MSCMapName.js
// By Magnus0808 || Magnus Rubin Peterson
//=============================================================================
/*:
 * @plugindesc Extension to MakeScreenCapture.
 * @author Magnus0808
 *
 * @help Put this after MakeScreenCapture. This plugin ignores the filename
 * parameter of MakeScreenCapture and instead uses the ID and name of the current Map.
*/

(function(){
    var paramFileFormat = PluginManager.parameters('MakeScreenCapture')['FileFormat'];
    var paramTimeStamp = (String(PluginManager.parameters('MakeScreenCapture')['TimeStamp']) == 'true');
    var paramNumberDigit = Number(PluginManager.parameters('MakeScreenCapture')['NumberDigit']);
    
    SceneManager.takeCapture = function(format) {
        if (!format) {
            format = paramFileFormat;
        }
        this.makeCapture();
        this.saveCapture($dataMapInfos[$gameMap.mapId()].name + "_ID" + $gameMap.mapId(), format);
    };
    
    StorageManager.getLocalImgFileName = function(fileName) {
        if (paramTimeStamp) {
            var date = new Date();
            return fileName + '_' + date.getFullYear() + (date.getMonth() + 1).padZero(2) + date.getDate().padZero(2) +
                '_' + date.getHours().padZero(2) + date.getMinutes().padZero(2) + date.getSeconds().padZero(2);
        } else {
            var number = SceneManager.captureNumber;
            if (number >= Math.pow(10, paramNumberDigit)) number = 0;
            SceneManager.captureNumber = number + 1;
            return fileName + "_" + (number > 0 ? number.padZero(paramNumberDigit) : '');
        }
    };
})();
 

Attachments

Last edited:

cedr777

Veteran
Veteran
Joined
Feb 22, 2018
Messages
265
Reaction score
60
First Language
Not English
Primarily Uses
RMMV
Yay it works! thanks again dude!
Just one slight aesthetic improvement that I would like to request,
Regarding the output filename, is it possible to add an underscore between the map id and the number digit? it kind of hard to tell the order of the file without spaces. Other than that, it works perfectly.

Edit: this happens when taking multiple screenshots in the same map.

here are some screenshots, I hope they might help.

ex.
Test Map_ID3----> (this is OK)
Test Map_ID301 ----> Test Map_ID3_01
Test Map_ID302 ----> Test Map_ID3_02

★Downtown Area 2★_ID100----> (this is OK)
★Downtown Area 2★_ID10001----> ★Downtown Area 2★_ID100_01
★Downtown Area 2★_ID10002----> ★Downtown Area 2★_ID100_01
★Downtown Area 2★_ID10003----> ★Downtown Area 2★_ID100_01
★Downtown Area 2★_ID10004----> ★Downtown Area 2★_ID100_01

Edit: sorry for my bad english btw.
Edit: Wait i've figured it out.

I modified LINE 21 in your code to this, I hope you don't mind:
this.saveCapture($dataMapInfos[$gameMap.mapId()].name + "_ID" + $gameMap.mapId() + "_", format);

now it adds an _ to the output filename.

Thanks again!

Edit: marking this topic as SOLVED.
 
Last edited:

Magnus0808

Software Developer
Veteran
Joined
Feb 2, 2019
Messages
147
Reaction score
164
First Language
Danish
Primarily Uses
RMMV
When I tested it originally I had timestamp on, so I did not encounter the issue. I have made a fix for it now.
The fix you made yourself obviously works, however if you decided to use timestamps instead you would have double "_".
Anyway I updated my original reply if you want the other fix. :)
 

cedr777

Veteran
Veteran
Joined
Feb 22, 2018
Messages
265
Reaction score
60
First Language
Not English
Primarily Uses
RMMV
Ahh, I see it makes sense since I didn't have timestamp enabled when I tried it. And yes it was double underscore lol. Now using your updated js, all is well.

And thanks again! now it'll be less of a hassle when I need to correct typos and bugs when finding out which maps they are.
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
7,619
Reaction score
5,157
First Language
Dutch
Primarily Uses
RMXP

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 

cedr777

Veteran
Veteran
Joined
Feb 22, 2018
Messages
265
Reaction score
60
First Language
Not English
Primarily Uses
RMMV
here is an update to this plugin requested by me:
-At gamestart, no longer crashes on pressing screenshot button at title screen.
-makes a Scene_(name) if taking screenshots of the item, status, option, main menu, etc.

All credit goes to Magnus0808.
 

Attachments

cedr777

Veteran
Veteran
Joined
Feb 22, 2018
Messages
265
Reaction score
60
First Language
Not English
Primarily Uses
RMMV
here is another update to this plugin requested by me:
-This plugin now enables Triacontane's MakeScreenCapture plugin to save screenshots with deployed games.
previously, Triacontane's plugin can only take screenshots during playtest but now MRP_MSCMapName.js can now enable it to take screenshots with deployed games.

So if you want to allow users to take screenshots of your deployed games (in my case for playtesting, bug, and typo reports related purpose.) you need to put this plugin below Triacontane's.

All credit goes to Magnus0808.

Edit: also, this is unofficial but I tried to google translate Triacontane's plugin in english.
 

Attachments

cedr777

Veteran
Veteran
Joined
Feb 22, 2018
Messages
265
Reaction score
60
First Language
Not English
Primarily Uses
RMMV
Update: can now include screenshots of the black screen fatal error, still including the map ID of where it occurred.

All credit goes to Magnus0808.
 

Attachments

darklugia1997

Villager
Member
Joined
Dec 3, 2018
Messages
16
Reaction score
1
First Language
portugues
Primarily Uses
RMMV
Does the MakeScreenCapture plugin not print the entire map?
 

rooge

Veteran
Veteran
Joined
May 6, 2016
Messages
86
Reaction score
59
First Language
czech
Primarily Uses
RMMV
Does the MakeScreenCapture plugin not print the entire map?
It's just a classic screenshot of the current game screen, not the entire map. The save function directly in the editor is used for the map.
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
7,619
Reaction score
5,157
First Language
Dutch
Primarily Uses
RMXP

darklugia1997, please refrain from necro-posting in a thread. Necro-posting is posting in a thread that has not had posting activity in over 30 days. You can review our forum rules here. Thank you.


If you have an issue, please start a new thread.

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Yesterday I made my first step towards eating more healthily.
I saw candy on discount and did not buy it.
"They yearn for what they fear for."
I always told my DA fans how much I hate slot machines. They're fine in games as a risk-and-reward system. But when you're spending REAL MONEY in a Vegas casino to try and hit the jackpot (which very, very few people will), it can really hurt your budget. Gambling is a bad habit, and I don't like wasting my money on a slim chance. Go to Vegas for the experience, not the jackpot.
Took the kids to a corn maze. They gave us a map and had lights at certain points in the maze. Not overwhelming... or underwhelming... just... whelming.

Forum statistics

Threads
104,400
Messages
1,006,111
Members
135,929
Latest member
uuu
Top