KC_CompositeBitmaps 1.1.1
by Kelly Chavez
Introduction
Hello. Today, I am releasing a plugin that I've been developing on-and-off since March or April of this year. The long and short of this plugin is that it lets the developer dynamically build graphics on the fly by layering them. I originally built this to use for a "paper doll" (character customization) system in a personal project, so the included demo is a simplified version of that system that I pulled from said project.
Features
Basically, this plugin allows the developer to replace top view character files, side view actor files, face files, and picture files with layered ones that are generated via plugin commands. These new images are built from existing ones in their respective directories.
This plugin works by substituting existing image files with composite bitmaps. These substituted files are known as proxies. So, if the proxy file's name is Actor1.png, for example, whenever the game tries to load Actor1.png, the composite bitmap will be returned instead.
For convenience, the developer can also set up composite bitmaps that are created upon a new game being started. This feature is used to set up the main character's sprite set in the demo.
Additionally, this plugin can be used to generate emote sets from faces without the need to have many duplicate art assets in your games folder. This is done by designating "static" face parts, and these static parts are copied to every slot in the resultant composite bitmap. So, it is possible to, for example, keep all of your clothes in a single file, which can make organizing your art assets easier if you choose to use this feature. Look at the demo to see this feature in action.
Example Media
Spoiler: Screenshots
[/quote]
https://www.youtube.com/embed/NFbJStf7AT4
How to Use
To use, download and place this plugin below PluginCommonBase and PluginBaseFunction in your plugin manager and enable it. From there, follow the instructions in the help section of the plugin and the descriptions of each command.
Plugin Commands
Spoiler: Plugin Commands[quote]
- Add Face Layers
- Replaces a face file with a composite bitmap or adds new layers onto an existing composite bitmap
- Remove All Face Layers
- Removes the composite bitmap and allow the proxy filename to be loaded normally
- Add Top View Character Layers
- Replaces the character at a particular index in a top view character image with a character built on a composite bitmap or adds layers onto an existing composite bitmap
- Remove All TV Character Layers
- Removes the composite bitmap currently replacing the proxy file and allows the proxy file to load normally
- Add SV Character Layers
- Replace a side view actor image with a composite bitmap or add onto an existing composite bitmap
- Remove all SV Layers
- Remove the composite bitmap replacing the proxy file and allow the proxied filename to be loaded normally
- Add Picture Layers
- Replace a picture with a composite bitmap or add onto an existing composite bitmap
- Remove All Picture Layers
- Remove the composite bitmap associated with the proxy filename and allow the proxied name to be loaded normally
- Save Graphic
- Debug feature that dumps bitmaps to local storage, also dumps composites
Demo
Current Version (1.1.1) - Google Drive
Old Version (1.1.0) - Google Drive
Old Version (1.0.0) - Google Drive
Download
GitHub (Right-click 'Raw' and select 'Save link as...')
Known Issues
- This plugin does not play well with custom save screens. This is due to the way RPG Maker MZ handles saving, loading, and displaying the actors' images on the save file screen. Your game will not crash, but any images using composite bitmaps will likely not be properly displayed without a manual compatibility patch for this plugin. My apologies.
- "Exclude Unused Files" on deployment does not take into account files called in the plugin commands. I cannot figure out why this occurs, but I will release an update if I find the cause.
Changelog
Spoiler: Changelog
- 2023/04/19 - v1.1.1
- Fixed bug where sprites would disappear when this plugin is used with Core Engine VisuStella MZ
- Plugin image cache is now cleared when ImageManager.clear is called
- Internal plugin structure updated to be more in-line with current coding practices (this also exposes a few functions that were previously inaccessible)
- 2022/08/13 - v1.1.0
- Added ability to clear layers with a new parameter in all add layer plugin commands
- Fixed picture composite bitmap plugin parameters
- Updated help section to include a small section explaining the use of game variables as plugin command arguments
- 2022/08/08 - v1.0.0
Terms and Credits
I've released this plugin under the
MIT license. So, you can include this plugin in any project as long as you include the license with your distribution. For most projects, this requirement is fulfilled as long as you keep the license text that is at the top of the plugin's js file intact.
Also, though not strictly required, I would appreciate being credited as K. Chavez or Kelly Chavez in your games' credits.
本贴来自国际rpgmaker官方论坛作者:Kelly-inactive处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:
https://forums.rpgmakerweb.com/threads/kc_compositebitmaps-layered-images-faces-sprites-pictures-etc.150258/