Picture Spritesheets (YEP)

From Yanfly.moe Wiki
Jump to navigation Jump to search


System

This is a plugin created for RPG Maker MV.

For help on how to install plugins, click here.

For help on how to update plugins, click here.

Got errors with your RPG Maker MV plugin? Click here.

Download

Yanfly Engine Plugins

This plugin is a part of the Yanfly Engine Plugins library.

Click here if you want to help support Team Yanfly on Patreon.

Introduction

In RPG Maker 2003, pictures had the ability to load spritesheets and display
certain frames from them at the issue of a command. Ever since then, later
iterations of RPG Maker lacked the feature. This plugin will bring back that
old feature and give you access to use spritesheets as pictures once more
with complete frame control.

Instructions

When putting a spritesheet into your project's /img/pictures/ folder, you
have to name them a certain way.

  filename[HxV]

Replace H in the filename with the number of horizontal cells it has.
Replace V in the filename with the number of vertical cells it has.

--- For example ---

"Actor1_1(9x6)" will have 9 horizontal cells and 6 vertical cells.

As long as the picture's filename is formatted in such a way, it will be
displayed in-game as a spritesheet.

--- Frames ---

Individual frames can be displayed using Plugin Commands or Script Calls
(look in the later help sections to figure out how). To identify which frame
ID a particular spritesheet cell is, start with 0 in the upper left. The
frame ID increases as you go left to right, then it loops back around at the
start of a new row. For example:

 0  1  2  3  4  5  6  7  8
 9 10 11 12 13 14 15 16 17
18 19 20 21 22 23 24 25 26
27 28 29 30 31 32 33 34 35
36 37 38 39 40 41 42 43 44
45 46 47 48 49 50 51 52 53

Plugin Commands

PluginCommandsMV.png

Plugin Commands are event commands that are used to call upon functions added by a plugin that aren't inherently a part of RPG Maker MV.

Here is a list of Plugin Command(s) that you may use:

Using the Plugin Command event, you can set a specific picture to change to
a different cell by using the Plugin Command below:

Plugin Commands:

  Picture x Frame y
  - Replace 'x' with the ID of the picture you wish to change the frame of.
  - Replace 'y' with the frame ID to change the picture to.

Script Calls

ScriptCallsMV.png

Script Calls are event commands that are used to run JavaScript code during an event to call upon unique functions, usually added by the related plugin.

Here is a list of Script Call(s) that you may use:

For those who wish to use JavaScript code instead of Plugin Commands, you
can use the Script Call event command to do so:

  var pictureId = 5;
  var frame = 10;
  $gameScreen.picture(pictureId).setSpritesheetFrame(frame);

The above code will adjust the designated picture to change to desired frame
setting you would like.

Changelog

Version 1.00:
- Finished Plugin!