Orange Mapshot

● ARCHIVED · READ-ONLY
Started by Hudell 255 posts Page 13 of 13 View original ↗
  1. update... Using the OrangeMapshot plugin, I'm having two main issues.

    The first is trying to find where to add PICTURES as another layer to add to the canvas... So that I can add this syntax to the plugin
    const imageData = context.getImageData(0, 0, canvas.width, canvas.height);

    const pictures = $gameScreen.pictures(); for (let i = 0; i < pictures.length; i++) { const picture = pictures; if (picture && picture.name() !== '') { const bitmap = ImageManager.loadPicture(picture.name()); context.globalAlpha = picture.opacity() / 255; context.drawImage(bitmap._canvas, picture.x(), picture.y()); } }

    Then I need to know where the CANVAS is so that I can enter THIS code.

    const canvas = document.createElement('canvas');
    canvas.width = width;
    canvas.height = height;

    const context = canvas.getContext('2d');
    context.clearRect(0, 0, canvas.width, canvas.height);

    Let me know if there's some way to actually do this? Basically, I'd like my picture layers to show up on a MapShot (OR screenshot) with a transparent background. Any solutions would be appreciated.
  2. update - > this doesn't work, but I've been told the best AI in the world was responsible lol....

    (function() { const filename = "Mapshot.png"; function saveMapshot() { if (!hasLoaded()) { console.log("Map data has not finished loading."); return; } const map = SceneManager._scene._spriteset._tilemap; const pictures = SceneManager._scene._spriteset._pictureContainer.children; const canvas = document.createElement("canvas"); const context = canvas.getContext("2d"); const baseTexture = map._baseTexture; const texture = new PIXI.Texture(baseTexture); const width = texture.width; const height = texture.height; canvas.width = width; canvas.height = height; context.clearRect(0, 0, width, height); context.drawImage(texture.baseTexture.source, 0, 0); for (let i = 0; i < pictures.length; i++) { const picture = pictures; const bitmap = picture.bitmap; if (bitmap) { context.save(); context.globalCompositeOperation = "destination-over"; context.translate(picture.x, picture.y); context.drawImage(bitmap.canvas, 0, 0); context.restore(); } } canvas.toBlob(function(blob) { SaveAs(blob, filename); }, "image/png"); } function hasLoaded() { const map = SceneManager._scene._map; const tilemap = SceneManager._scene._spriteset._tilemap; if (!map || !tilemap) { return false; } if (!map.isReady() || !tilemap.isReady()) { return false; } return true; } function SaveAs(blob, fileName) { const link = document.createElement("a"); link.href = URL.createObjectURL(blob); link.download = fileName; link.click(); } document.addEventListener("keydown", function(event) { if (event.shiftKey && event.keyCode === 113) { // Shift + F2 saveMapshot(); } }); })();


    Here's what I'm TRYING to do.. I want to create a mapshot that saves everything in a map, including picture layers to a canvas, a canvas that is transparent, so basically as a .png file with transparency.

    In context, imagine a dollmaker with picture layers that spits out a transparent PNG file with the picture layers as the layers of the composited image.
  3. Is there any way to include yanfly's doodads when taking the screenshot?
  4. I wish... and even then, stuck with a black canvas background.
  5. Hello, I have tried to use the plugin but it doesn't seem to work :( Nothing shows up.
  6. @fentanyl_angel it does work still, read the document how to use it,
    you need to playtest the game and than screenshot it so it opens the
    folder where it is taken.

    make sure you set the parameter (to show events, overlays etc or not).
    also make sure the plugin is active in your plugin database.
  7. thank you for pointing that out i didn't read very carefully. tysm :kaojoy:
  8. Dude, this is great for quickly compiling new tilesets. Thank you so much.
  9. oh no, the link doesnt work. i need this so much :(
  10. I'm having an issue. I press the printscreen button, the plugin freezes for a few seconds, then opens a folder. I'm guessing this is where the mapshot is meant to go, but there's nothing there
  11. The link for this plugin is not working... Does anyone have a copy of this they can share? Or is @Hudell still around?
  12. firestalker said:
    The link for this plugin is not working... Does anyone have a copy of this they can share? Or is @Hudell still around?
    its still on his github though, but everyone using that plugin should make sure
    the PLUGIN = OFF before deployment as its damn annoying when making a screenshot
    for a bug/glitch, it contantly open the window of the location.

    there should be a better a security line added for only "test play" so it wont
    run in deployment games.
  13. ShadowDragon said:
    its still on his github though
    I went to his github... It's not there. The link for it is there, but it's not there when you click the link.
    Github.png
  14. click on orange_mapshot and it should load.
    as it works on my end.
  15. ShadowDragon said:
    click on orange_mapshot and it should load.
    as it works on my end.
    That did it... Thanks