Please help.
I've tried to look this up online, but to limited avail because I don't know JavaScript deeply enough. I know a lot about math, a good deal about being careful with logic, and just enough coding to sound like I know what I'm talking about, but otherwise I'm probably more a danger to myself than anything (just as an FYI). I'm pretty sure in RMMV I need a script that uses nodejs to function. I have a structure set up currently where the player clicks on an image from a menu to select their base character template, then they click an image for their costume, they click an image for their hairstyle, and then get one last redirect to select an image of said hairstyle in the color they desire. Ultimately there are three .png file format layers to combine into the final Face image and Walk sprite sheet for the MC. I'm not doing side-view battlers. I guess what I would like to do to start off is just find out, if possible, how to use scripting to set up the identities of image 1 face and image 1 walk for use in the merges as soon as the first selection is made, then do the same for the image 2's. then do the same for the image 3's at the end of the selection process so that one script can fire up node-canvas and merge each identified set of three images in the proper order: base, then outfit, then hair into .png files with the MC name as the filename and store the face one in img/faces and the walk one in img/characters so the game will reference the player created character's images for the rest of the game.
This site depicts a large part of what I'm trying to do over-simplistically: https://npm.runkit.com/merge-images
It says, "And that would update the img element to show this image:" at one point on that site, but I don't know how that translates to something usable in MV. I have the following script to merge the first two face images set up after the user makes the first two selections based on my understanding of what the site said, but don't know how to test it/see/use the result in MV (if I'm even up the right tree):
If you can help me pick up the pieces I'm missing to learn this bit of JavaScript functionality, I'd greatly appreciate it. Thank you for your time, attention, consideration, and any and all assistance.
Sincerely,
I've tried to look this up online, but to limited avail because I don't know JavaScript deeply enough. I know a lot about math, a good deal about being careful with logic, and just enough coding to sound like I know what I'm talking about, but otherwise I'm probably more a danger to myself than anything (just as an FYI). I'm pretty sure in RMMV I need a script that uses nodejs to function. I have a structure set up currently where the player clicks on an image from a menu to select their base character template, then they click an image for their costume, they click an image for their hairstyle, and then get one last redirect to select an image of said hairstyle in the color they desire. Ultimately there are three .png file format layers to combine into the final Face image and Walk sprite sheet for the MC. I'm not doing side-view battlers. I guess what I would like to do to start off is just find out, if possible, how to use scripting to set up the identities of image 1 face and image 1 walk for use in the merges as soon as the first selection is made, then do the same for the image 2's. then do the same for the image 3's at the end of the selection process so that one script can fire up node-canvas and merge each identified set of three images in the proper order: base, then outfit, then hair into .png files with the MC name as the filename and store the face one in img/faces and the walk one in img/characters so the game will reference the player created character's images for the rest of the game.This site depicts a large part of what I'm trying to do over-simplistically: https://npm.runkit.com/merge-images
It says, "And that would update the img element to show this image:" at one point on that site, but I don't know how that translates to something usable in MV. I have the following script to merge the first two face images set up after the user makes the first two selections based on my understanding of what the site said, but don't know how to test it/see/use the result in MV (if I'm even up the right tree):
const mergeImages = require('merge-images');
const Canvas = require('canvas');
mergeImages(['C:\Users\John\OneDrive\HDILTPV4\img\faces\MFFace1PV0.png',
'C:\Users\John\OneDrive\HDILTPV4\img\faces\Acrobat_Face.png'], {
Canvas: Canvas
})
.then(b64 => document.querySelector('img').src = b64);
// data:image/png;base64,iVBORw0KGgoAA...
const Canvas = require('canvas');
mergeImages(['C:\Users\John\OneDrive\HDILTPV4\img\faces\MFFace1PV0.png',
'C:\Users\John\OneDrive\HDILTPV4\img\faces\Acrobat_Face.png'], {
Canvas: Canvas
})
.then(b64 => document.querySelector('img').src = b64);
// data:image/png;base64,iVBORw0KGgoAA...
If you can help me pick up the pieces I'm missing to learn this bit of JavaScript functionality, I'd greatly appreciate it. Thank you for your time, attention, consideration, and any and all assistance.
Sincerely,
It is only the MC, and yes, my desire is for MC images of prior saves to return properly, not be overwritten.