I am new here so if this is against the rules, I apologize and will delete this thread.
I would like to enable my players to create the look of their characters, by choosing eye and hair color, sex, wings, eyeglasses etc. There was a plugin for RMMV that allowed to do just that, by sending parts in comment of the event and generating the images dynamically (you can find it here). I was unable to reach original creator of the plugin.
Anyway, thanks to the changes to PIXI library between RMMV and RMMZ, I was also unable to make it work on RMMZ.
Can someone more knowledgeable tell me what I am doing wrong? How did character generator process change from one version to another? As far as I was able to debug it, the plugin never reads any images in RMMZ so the resulting sprite ends up 0px height and width and breaks everything.
Basically, it was doing the same thing character generator does only dynamically in code. You can create your custom character, then export settings and sprites. If you imported settings, it would generate the same character as that in the exported settings. Picture from RMMZ character generator.
And generated code would be this:
Everything in that json file above could be fed to the generator plugin via comment and it would generate a character.
Now, the plugin doesn't work on RMMZ. I found and solved the errors, but there is one important one that I am unable to solve. And that one is ImageManager.LoadBitmap.
So I renamed it to ImageManager.LoadBitmap1, so everything doesn't break (but doesn't work either, of course).
So, anyway, to make it work on RMMV yourself. Put the img/generator folder directly into drive where the project is. (for me it is E:/img/). Then just start the project.
You can find my files and projects here: https://www.mediafire.com/folder/wxeqk7owwinz0/RPGMakerProjects
IMG.zip goes to drive, the others go in whatever folder you want. Again, I apologize if I did something wrong. I hope someone can help me, I've been trying to make this work on and off for two weekends.
I would like to enable my players to create the look of their characters, by choosing eye and hair color, sex, wings, eyeglasses etc. There was a plugin for RMMV that allowed to do just that, by sending parts in comment of the event and generating the images dynamically (you can find it here). I was unable to reach original creator of the plugin.
Anyway, thanks to the changes to PIXI library between RMMV and RMMZ, I was also unable to make it work on RMMZ.
Can someone more knowledgeable tell me what I am doing wrong? How did character generator process change from one version to another? As far as I was able to debug it, the plugin never reads any images in RMMZ so the resulting sprite ends up 0px height and width and breaks everything.
Basically, it was doing the same thing character generator does only dynamically in code. You can create your custom character, then export settings and sprites. If you imported settings, it would generate the same character as that in the exported settings. Picture from RMMZ character generator.
And generated code would be this:
JSON:
{"identity":"CharacterGeneratorSettings","version":"2.0.0","gender":"male","patterns":{"body":"p01","face":"p01","fronthair":"p01","rearhair":"p01","beard":"","ears":"p01","eyes":"p01","eyebrows":"p01","nose":"p01","mouth":"p01","facialmark":"p06","beastears":"p02","tail":"","wing":"","clothing":"p07","cloak":"","acca":"","accb":"p01","glasses":""},"colors":{"#F9C19D":0,"#2C80CB":0,"#FCCB0A":0,"#B892C5":0,"#009296":0,"#D3CEC7":0,"#AE8682":0,"#FE9D1E":0,"#1C76D0":0,"#D9A404":0,"#D8AC00":0,"#A30708":0,"#D3CEC2":0,"#DA346E":0,"#A4C911":0,"#C78407":0,"#C0D3D2":0,"#4155B6":0,"#BA3B45":0,"#999999":0,"#CCBAD2":0,"#607E4B":0,"#E6D6BD":0,"#A7D6D6":0},"offsets":{"face":{"x":0,"y":0},"fronthair":{"x":0,"y":0},"rearhair":{"x":0,"y":0},"beard":{"x":0,"y":0},"ears":{"x":0,"y":0},"eyes":{"x":0,"y":0},"eyebrows":{"x":0,"y":0},"nose":{"x":0,"y":0},"mouth":{"x":0,"y":0},"facialmark":{"x":0,"y":0},"beastears":{"x":0,"y":0},"tail":{"x":0,"y":0},"wing":{"x":0,"y":0},"clothing":{"x":0,"y":0},"cloak":{"x":0,"y":0},"acca":{"x":0,"y":0},"accb":{"x":0,"y":0},"glasses":{"x":0,"y":0}}}
Everything in that json file above could be fed to the generator plugin via comment and it would generate a character.
Now, the plugin doesn't work on RMMZ. I found and solved the errors, but there is one important one that I am unable to solve. And that one is ImageManager.LoadBitmap.
So I renamed it to ImageManager.LoadBitmap1, so everything doesn't break (but doesn't work either, of course).
JavaScript:
ImageManager.loadBitmap1 = function(folder, filename, hue, smooth) {
if (filename) {
var path = folder + encodeURIComponent(filename) + '.png';
var bitmap = this.loadBitmap(path, hue || 0);
bitmap._context.globalAlpha = 0;
bitmap.addLoadListener(function(){
bitmap._context.globalAlpha = 1;
});
bitmap.smooth = smooth;
return bitmap;
} else {
return this.loadEmptyBitmap();
}
};
So, anyway, to make it work on RMMV yourself. Put the img/generator folder directly into drive where the project is. (for me it is E:/img/). Then just start the project.
You can find my files and projects here: https://www.mediafire.com/folder/wxeqk7owwinz0/RPGMakerProjects
IMG.zip goes to drive, the others go in whatever folder you want. Again, I apologize if I did something wrong. I hope someone can help me, I've been trying to make this work on and off for two weekends.