Difference between playtest & deployment?

Assuming both the playtest and deployment are for Windows. Because it seems that my minimap-plugin does show a black minimap upon deployment. But it works just fine in playtest.
 There is no error shown in the game itself and I believe there is no console? So debugging is gonna be hard (probably have to create my own console plugin all over again...).


However, WHY does it work in playtest and not in deployment without changing anything. They should be EXACTLY the same. But they are not. Why? What's different between playtesting and deployment for plugins?
press F8 to bring up the console.
got a link to your plugin?


Could be something to do with canvas mode?


There IS a command that will force developer tools to open - if you add that, you might be able to get the console even after deployment.
This plugin (but it's too large too explain it + reproducing requires an older version with a specific setup). But the last posts in this topic are about this and I reproduced it myself:





I found the 'bug'. It seems that removing & re-adding the plugin to the list of plugins fixed the problem (for me). It was weird though that ONLY the deployment version bugged out by this and not the playtest version.


I asked the other guy with the same problem to also do this and see if this fixes the problem for him as well.


I mean, normally when I forget to re-add or double-click on the plugin after it's parameters changed, it should bug BOTH the playtest and the deployment version. But in this particular case it ONLY bugs the deployment version.


Maybe I did something wrong myself. But if the other guy also fixes the problem by re-adding the entire plugin to the plugin-manager, then we might be looking at the second RPG Maker MV bug related to the plugin-menu. I will await his response and update this topic if I find out more.

There IS a command that will force developer tools to open - if you add that, you might be able to get the console even after deployment.

What command? I can't find it on Google nor in the helpfile.
This is the part, that handles the console in local mode:


SceneManager.onKeyDown = function(event) {
if (!event.ctrlKey && !event.altKey) {
switch (event.keyCode) {
case 116: // F5
if (Utils.isNwjs()) {
location.reload();
}
break;
case 119: // F8
if (Utils.isNwjs() && Utils.isOptionValid('test')) {
require('nw.gui').Window.get().showDevTools();
}
break;
}
}
};


You can easily create a small plugin for yourself, to show the console even in normal play.
Thanks. By using the console during deployment I was able to locate the problem:


function minimapFolderPath()
{
var path = window.location.pathname.replace(/(\/www|)\/[^\/]*$/, "/img/minimap/"); // Problem is in this line
if (path.match(/^\/([A-Z]\🙂/)) { path = path.slice(1); }
path = decodeURIComponent(path);
return path;
}

function getFullMinimapPath(filename)
{
return minimapFolderPath() + filename;
}

// filename example: '002.png'
function minimapImageExists(filename)
{
var fs = require('fs');
return fs.existsSync(getFullMinimapPath(filename)); //// <<<<<<<<<<<<<<<<<< always returns false for a deployed project
}


It appears the minimap indeed can't locate it's mapshots for deployed projects. It works for playtests though.


During deployment the path: "/C:/Users/Anonymous/Documents/Output/ProjectOne/img/minimap/" is returned. But this path does not include the "www" folder. Because during deployment the default directories are moved one folder deeper into a www-folder but the custom-made directories (in the top level of the project directory) are not... I see.


This bug only took 2 minutes to fix with a console during deployment. Thanks for showing me how to enable it during deployment!


And yes there is a minor difference between the playtest and deployed version of the game. It's minor but it's enough to break some plugins. But now that I know this I can take this into account.

Original thread: https://forums.rpgmakerweb.com/threads/difference-between-playtest-deployment.56957/