Version: 1.4.0
- Dependencies
- Installation
- Configuration
- Usage
- References
- How does the plugin work
- Changes to the core script
- Troubleshooting
- License
This plugin allows you to display and manage multi-layered graphics, such as character displays, scenes, animations etc. It supports plugin commands, scripting, and escape character commands in "Show Text" messages.
https://cloudd.zapto.org/examples/VsLayeredDisplay/\
output.mp4
- Plugin vsrpgdev/VsConvertEscapeCharacters v1.2+
- Plugin vsrpgdev/VsUtils v1.5+
- Plugin vsrpgdev/VsContainer v1.1+
- create a new rpg maker project or choose an existing one.
- copy everything from the demo directory into your rpg maker project directory
be mindfull of what you overwrite if you copy into an existing project
make sure you dont already have an jsonconfig.json in your project
- install and activate VsConvertEscapeCharacters from github
- install and activate VsUtils from github
- install and activate VsContainer from github
- Copy VsLayeredDisplay.js into your plugin directory
- Activate the Plugin in RPG Maker
- make your configuration for the plugin
- [Optional] if you want to use vscode IntelliSense also copy VsLayeredDisplay.d.ts and Vs.d.ts into your plugins directory
Additionally, if you don’t already have one, copy jsconfig.json into you js directory (not the plugin directory).
to fully use IntelliSense you also ned type files for the rpg maker core files. you can use your own or copy the types folder into your js directory. - [Optional] to get IntelliSense/Autocompletion for VsLayeredDisplayJson.json copy VsLayeredDisplayConfig.schema.json into your data directory
and .vscode/settings.json int your root/.vscode/settings.json if you already have a settings.json add these lines\
{ "fileMatch": ["VsLayeredDisplayJson.json"], "url": "./data/vsLayeredDisplayConfig.schema.json" }
-
Value Description false nearest neighbor (pixelated look) true linear (smooth but blurry look) default: false this sets the default scaling beheaviour for your displays (this value can be overwritten in a per display basis).
-
Value Description false bitmaps gets redrawn as soon as a value changes true bitmaps gets redrawn the next time update is called default: false this value controlles when bitmaps get redrawn. if you want the fastest response set to true. if you often change multiple values in one step set to false to prevent not needed redraws.
-
Value Description false escape characters cant be used to call plugin commands true its possible to call plugin commands in show text default: true enables the usage of show test escape commands
-
default: B
specifies the escape character used in show text
-
should a container automatically be created in every scene (in Scene_Base)Value Description false no autocreation true container gets created in every scene default: true
if set to false, no plugin commands can be used
-
should a container automatically be created Window_MessageValue Description false no autocreation true container gets in Window_Message default: true
if set to false, no plugin commands can be used
-
you can change your default message placement with this paramter. 0 means 0% and 1 100% of your game window size
-
here you can specifiy your display configurations (different characters, scene, etc).
you can also define them in an additional optional json file see Json Configuration
-
json file containing a list of VsLayeredDisplayConfig configurations
to use LayeredDisplays you ned have
- a VsMultiImageContainer from one or more of theses sources
- Plugin Configuration Autocreate in scene
- Plugin Configuration Autocreate in window
- (plugin developers) create your own container where you want it to be
- create a new display with an existing or new configuration
- load configuration from data/VsLayeredDisplayJson.json
- load configuration from Plugin Paramter display configuration
- create a new configuration from one of the plugin or script commands
- move the display to where you want it
- set images of the display
you can use the plugin via plugin commands, show text commands or via the script command
Description: Selects which container should be used for drawing.
- Arguments:
containerSource(number, default: 0, min: 0, max: 2) - Defines the container source (0: scene, 1: message background, 2: message foreground).
Description: Removes all displays.
Description: Creates a new display (overwrites existing one).
- Arguments:
displayId(number, default: 0) - Sprite ID (0 - infinity).config(struct<VsLayeredDisplayConfig>) - Display configuration.
Description: Creates a new display with a named config (overwrites existing one).
- Arguments:
displayId(number, default: 0) - Sprite ID (0 - infinity).configName(string) - Display config name.
Description: Changes the position and size of the message window.
- Arguments:
messagePlacement(struct<Rect>) - The new placement configuration.
- Example:
This changes only x and width.
ChangeMessagePlacement(0.2,-1,0,8,-1)
Description: Removes a display.
- Arguments:
displayId(number, default: 0) - Sprite ID (0 - infinity).
Description: Ensures the display is created with a named config if it does not exist. already existing display remain unchanged
- Arguments:
displayId(number, default: 0) - Sprite ID (0 - infinity).configName(string) - Config name.
Description: Sets an image for a display.
- Arguments:
displayId(number, default: 0) - Sprite ID (0 - infinity).imageId(number, default: 0) - ID of the subimage (0 is the main image used for scaling).bitmap(string) - Bitmap name.tileIndex(number, default: 0) - Index from the grid. use 0 for files with no grid/tile
Description: Sets multiple images for a display.
- Arguments:
displayId(number, default: 0) - Sprite ID (0 - infinity).images(struct<ShowDisplay>[]) - List of images to set.
Description: Sets multiple images with extended options.
- Arguments:
displayId(number, default: 0) - Sprite ID (0 - infinity).configName(string) - Image config name.images(struct<ShowDisplay>[], default: []) - List of images to set.flipped(boolean, default: false) - Whether to flip the image.opacity(number, default: 255, min: 0, max: 255) - Opacity level.colorTone(struct, default: {"r":0,"g":0,"b":0,"gray":0}) - Color tone configuration.
Description: redraws the bitmaps for a display
- Arguments:
displayId(number, default: 0) - Sprite ID (0 - infinity).
Description: Shows a display.
- Arguments:
displayId(number, default: 0) - Sprite ID (0 - infinity).
Description: Hides a display.
- Arguments:
displayId(number, default: 0) - Sprite ID (0 - infinity).
Description: Flips a display.
- Arguments:
displayId(number, default: 0) - Sprite ID (0 - infinity).flipped(boolean, default: false) - Whether to flip the display.
Description: Enables or disables smooth scaling for a display.
- Arguments:
displayId(number, default: 0) - Sprite ID (0 - infinity).SmoothScaling(boolean, default: false) - Enable or disable smooth scaling.
Description: Sets the opacity of a display.
- Arguments:
displayId(number, default: 0) - Sprite ID (0 - infinity).opacity(number, default: 255) - Opacity level.
Description: Sets the color tone for a display.
- Arguments:
displayId(number, default: 0) - Sprite ID (0 - infinity).colorTone(struct) - Color tone configuration.
Description: Moves a display to.
- Arguments:
displayId(number, default: 0) - Sprite ID.x(number, default: 0, min: 0, decimals: 6) - X coordinate.y(number, default: 0, min: 0, decimals: 6) - Y coordinate.
Description: Moves a display.
- Arguments:
displayId(number, default: 0) - Sprite ID.x(number, default: 0, min: 0, decimals: 6) - X coordinate.y(number, default: 0, min: 0, decimals: 6) - Y coordinate.
Description: moves a sub image to
imageId(number, default: 0) - sub image id- Arguments:
displayId(number, default: 0) - Sprite ID.x(number, default: 0, min: 0) - X coordinate.y(number, default: 0, min: 0) - Y coordinate.
Description: moves a display.
- Arguments:
displayId(number, default: 0) - Sprite ID.imageId(number, default: 0) - sub image idx(number, default: 0, min: 0) - X coordinate.y(number, default: 0, min: 0) - Y coordinate.
Description: Rotates a display.
- Arguments:
displayId(number, default: 0) - Sprite ID.degrees(number) - Rotation angle in degrees.
Description: Resizes a display.
- Arguments:
displayId(number, default: 0) - Sprite ID.w(number, default: 0, min: 0, decimals: 6) - Width.h(number, default: 0, min: 0, decimals: 6) - Height.
Description: resizes a sub image
imageId(number, default: 0) - sub image id- Arguments:
displayId(number, default: 0) - Sprite ID.width(number, default: 0, min: 0) - X coordinate.height(number, default: 0, min: 0) - Y coordinate.
Description: Sets the pivot point of a display.
- Arguments:
displayId(number, default: 0) - Sprite ID.x(number, default: 0, min: 0, max: 1, decimals: 6) - X pivot point.y(number, default: 0, min: 0, max: 1, decimals: 6) - Y pivot point.
you can also use layere displays in show text commands through escape characters if enabled the escaped character can be selection in the plugin configuration, default is B paramters ar marked with <>, [] arguments are optional
\B[<source-id>] - select container source
Description: selects which container is the target for your display commands.
- Arguments:
<source-id>(0: scene, 1: message background, 2: message foreground).
- examples:
\B[0]\B[1]\B[2]
\B[!<display-id>] - remove display
Description: removes a display
- Arguments:
<display-id>id of the display
- examples:
\B[!0]\B[!1]\B[!2]
\B[.<display-id>] - hide display
Description: hides a display
- Arguments:
<display-id>id of the display
- examples:
\B[.0]\B[.1]\B[.2]
\B[+<display-id>] - show display
Description: hides a display
- Arguments:
<display-id>id of the display
- examples:
\B[+0]\B[+1]\B[+2]
\B[D<display-id>] - remove display
Description: redraws the bitmaps for a display
- Arguments:
<display-id>id of the display
- examples:
\B[D0]\B[D1]\B[D2]
\B[<display-id>,<display-visible>] - hide display or show display
Description: sets visibility of a display
- Arguments:
<display-id>id of the display<display-visible>true/false (show/hide display)
- examples:
\B[0,true]\B[1,false]\B[2,true]
\B[<display-id>,<images>] - sets images
Description: sets images
- Arguments:
<display-id>id of the display<images>':' sperated list of image id and bitmap pairs (0:image1:1:image2:3:image3) you can leave bitmap empty to clear an image
- examples:
\B[0,0:body:1:face]\B[1,1:face:3:beard]\B[2,0::1:face]\B[2,1::2::3:clothing]
\B[M<display-id>,<x>,<y>] - move display
Description: move display by
- Arguments:
<display-id>id of the display<x>':' x alter x coordinate by x<y>':' y alter y coordinate by x
- examples:
\B[M0,0.2,0]\B[M1,0.3,0.5]``\B[M1,0.0,0.25]
\B[T<display-id>,<x>,<y>] - move to display
Description: move display to
- Arguments:
<display-id>id of the display<x>':' new x coordinate by x<y>':' new y coordinate by x
- examples:
\B[T0,0.2,0]\B[T1,0.3,0.5]``\B[T1,0.0,0.25]
\B[R<display-id>,<w>,<h>] - resize display
Description: resize display
- Arguments:
<display-id>id of the display<w>':' new width<h>':' new height
- examples:
\B[R0,0.2,0]\B[R1,0.3,0.5]``\B[R1,0.0,0.25]
\B[<display-id>,<display-config>,<images>,[flip],[opacity],[color-tone]] - set images ex
Description: ensures the display is created with config sets iamages, flip,opacity and color tone
- Arguments:
<display-id>id of the display<display-config>configuration name<images>see\B[R<display-id>,<w>,<h>]<flip>true/false should display be flipped<opacity>0-255 opacity of the display<color-tone>red:green:blue:grey color tone of the display
- examples:
\B[0,my-config,0,0:body:1:face]select display 0, ensure my-config, set image 0 to body and 1 to face\B[0,my-config,0,0:body:2:beard,true]select display 0, ensure my-config, set image 0 to body and 2 to beard, set flip to true\B[1,my-config,0,2:beard,,120]select display 1, ensure my-config, set image 2 to beard, set opacity to 120\B[1,my-config,0,2:beard,false,210,10:0:0:0]select display 1, ensure my-config, set image 2 to beard,set flip to false set opacity to 210 , set color tone\B[0,,,,,10:0:0:0]select display 0, set color tone\B[3,,,,155]select display 3, set opacity to 155
for developer infos look at the typescript files (.d.ts) or the included custom-layered-display plugin
-
x position of the rectangle
y position of the rectangle
width of the rectangle
height of the rectangle
-
Name of the configuration.
imageFrame VsDisplayImageConfig
Image position and size (0-1).
Image pivot position (0-1).
subImageCoordinates VsDisplayImageConfig[]
Position and size of subimages (in pixels).
Defines how the image scales to fit the containing box:
- fill: Stretches to fill the width and height of the box.
- contain: Maintains aspect ratio, scales to the smaller dimension.
- cover: Maintains aspect ratio, scales to the larger dimension.
- x: Scales to 100% width of the box.
- y: Scales to 100% height of the box.
- none: No scaling applied.
Specifies vertical alignment of the image inside the box.
Specifies horizontal alignment of the image inside the box.
X position of the image (0-1 for main image, pixel coordinates for subimages).
Y position of the image (0-1 for main image, pixel coordinates for subimages).
Width of the image (0-1 for main image, pixel coordinates for subimages). If set to 0, bitmap width is used.
Height of the image (0-1 for main image, pixel coordinates for subimages). If set to 0, bitmap height is used.
Number of subimage columns in the picture file.
Number of subimage rows in the picture file.
the id of the image (links to the display configuration). id 0 is the main images
Index from the grid. use 0 for files with no grid/tile
Width of the image (0-1 for main image, pixel coordinates for subimages). If set to 0, bitmap width is used.
the plugin creates two new DisplayObject (VsMultiImageContainer and VsLayeredDisplayContainer) which handle all the image operations. depending of your configuration these Objects gets inserted into every Scene or Message Window. For every new Display a new bitmap gets created (the same size as the main image) on which the main image and all sub images gets drawn to. These bitmap can now with the help of the plugin commands be changed, sized, moved etc on the scene.
here you can look for possible conflicts with other plugins which change the same files
-
-
-
method override, orignal gets called
method gets overidden to update the VsMultiImageContainer position and size to fit the message window -
method override, orignal gets called
add an instance of VsMultiImageContainer to the window -
method override, orignal gets called
add an instance of VsMultiImageContainer to the window
-
-
-
-
-
entry added to the list
VsLayeredDisplayJson.json get added to the loading list of the DataManager - method override, orignal gets called VsLayeredDisplayJson.json missing file error gets ignored
-
method override, orignal gets called
update the VsLayeredDisplayConfig from the json file
-
entry added to the list
-
-
-
- createPictures
method override, orignal gets called
add an instance of VsMultiImageContainer to the scene
- createPictures
method override, orignal gets called
-
VsLayeredDisplay by vsrpgdev is marked with CC0 1.0 Universal. To view a copy of this license, visit https://creativecommons.org/publicdomain/zero/1.0/