ビッグ・スプライト – Dahlys_BigSprites.js

タイトル
Big Sprites
作者名
ヘルプ
==============================================================================
BIG SPRITES
==============================================================================

NOTE: I am following the map grid, so partially blocked tiles are not a thing.

A 'solid' tile is a tile where the character EXISTS. It inherits the priority
from the main character (below/same/above player) and will be passable the
same way. Only solid tiles are triggerable. The main character tile does not
have to be solid.

In this plugin, different kinds of big sprites are treated differently. These
are the categories:

A) Draws a rectangle around the base tile. No matter how sprite moves/turns,
the same tiles remain solid. e.g. A giant mecha
B) The middle of the big sprite image is solid and the rest is relative to it.
The sprite must be a square, but doesn't have to be all solid. This is to
facilitate shifting the center of the event to the center of the sprite.
e.g. A flying spaghetti monster, a large battleship
C) Complete customization of big sprite solidity based on direction faced.

When a character turns or moves around, its size will be adjusted accordingly.
A bigger character will also have a bigger action button/event touch/player
touch trigger.

------------------------------------------------------------------------------
PLUGIN PARAMETERS
------------------------------------------------------------------------------

Diagonal Movement: Tested with Galv's diagonal movement plugin. Fixes diagonal
movement for big player/vehicle sprites.

Diagonal Block: Diagonal movement not allowed when blocked by an impassable
tile. Player has to move NSEW. This prevents random image overlapping with
impassable tiles.

Auto Set Comment: The first bigSprite comment on an event page is executed
when a new map is loaded. Turn off if you're using notetags and don't want
them overwritten by another comment. Special events (e.g. Galv spawned events)
that don't exist on the current map data can only be upsized automatically
using the first comment.

Ev All Direction Trigger: Because big events cannot turn on a map with many
obstacles, you can now make the Event Touch trigger activate the moment the
player is adjacent to the event, instead of only when the front of the event
hits the player.

Pl All Direction Trigger: Same as above, but for the big player. Player Touch
and Action Button triggers will fire regardless of the direction the player is
facing.

Vehicle Size: Fill in parameters for each vehicle. Leave blank for normal
sized vehicles. Big vehicles can only be rectangles/circles/diamonds for now.

Parameters for big vehicle Type A: above left right
where above = no. of tiles extended upwards
left = no. of tiles to the left
right = no. of tiles to the right
e.g. 1 1 1 draws a solid rectangle 1 tile up, 1 tile left, and 1 tile right
and makes the vehicle always occupy a 3x2 rectangle.

Parameters for big vehicle Type B: spritesize front back left right
where spritesize = how many tiles is the length/width of the sprite?
front = no. of tiles to the front of new center
back = no. of tiles to the back of new center
left = no. of tiles to the left of new center
right = no. of tiles to the right of new center
e.g. 3 1 1 0 0 Vehicle is 3x3 tiles per sprite. 1 tile is added to the front
and 1 to the back (e.g. a ship). Whenever the vehicle turns, the solid tiles
will also be rotated accordingly. i.e. When horizontal, only the center
horizontal row is solid. When vertical, only the certer vertical row is solid.

Parameters for big vehicle Type C: [down] [left] [right] [up]
where [direction] = [above left right] and above/left/right are the same as
Type A.
e.g. [1 0 0] [0 1 1] [0 1 1] [1 0 0] creates a vehicle that is 1x2 tiles when
vertical and 3x1 tiles when horizontal.

Parameters for big Circle vehicle Type B: spritesize circle radius
where spritesize = how many tiles is the length/width of the sprite?
radius = radius of the circle.
e.g. 7 circle 3 makes the big vehicle a circle of radius 3 tiles around the
center of the big sprite image.

Parameters for big Diamond vehicle Type B: spritesize diamond radius
where spritesize = how many tiles is the length/width of the sprite?
radius = radius of the diamond.
e.g. 5 diamond 2 makes the big vehicle a diamond of radius 2 tiles around
the center of the big sprite image.

Enter Vehicle Side: Get on the vehicle only when the player is facing the
side of the vehicle.

Exit Vehicle Side: Get off the vehicle when the side is aligned with the
landing point and 'ok' is triggered. Looks nicer than crawling over the front
of the vehicle. Good for car parking and boat docking on the side.

Right Hand Drive: Only effective when Vehicle Side Get Off is true. Left Hand
Drive by default, which means player will prefer to get off the vehicle on the
right side as opposed to the left. Turning on RHD will flip this.

Touch Fix B: Fixes touch input pathfinding for Type B player and vehicles by
using the new center (sprite image center). Be careful as it overwrites the
default findDirectionTo command. Normal-sized player and vehicles should be
completely unaffected even if this is on.

------------------------------------------------------------------------------
FOR PLAYER
------------------------------------------------------------------------------

Player can only be upsized by running an event containing a bigPlayer comment.
It's the same as using a plugin command, except it's a comment :) When a new
bigPlayer comment is run, the previous one is overwritten.

The commments for each category are:

Type A: <bigPlayer: above left right>

Type B: <bigPlayer: spritesize front back left right>

Type B circle: <bigPlayer: spritesize circle radius>

Type B diamond: <bigPlayer: spritesize diamond radius>

Type C: <bigPlayer: [down] [left] [right] [up]>

Reset to normal size: <bigPlayer: reset>

See plugin parameters vehicle size section for what above, left, right,
spritesize, front, back, radius, and direction mean.

To go beyond the basic rectangle/circle/diamond shape, use the following
comments:

Type A: <bigPlayer: above left right> <bigPlayerSp: dx,dy dx,dy dx,dy>
where dx is the horizontal distance from the main tile, and dy is the vertical
distance. If you wish to use Ex without the basic rectangle, input:
<bigPlayer: 0 0 0> <bigPlayerSp: dx,dy dx,dy dx,dy>
e.g. <bigPlayer: 0 0 0> <bigPlayerSp: 0,-1 1,-1>
Only the tile right above the main tile and the tile to the top-right of the
main tile are solid.
You can add as many dx,dy pairs as you want.

Type B: <bigPlayerSp: dx,dy dx,dy dx,dy>
The basic type B bigPlayer command is optional. dx and dy are relative to the
new center for the sprite facing down. When the sprite turns around, the extra
solid tiles will rotate accordingly.

Type C: <bigPlayerSp: [down] [left] [right] [up]>
where [direction] = [dx,dy dx,dy dx,dy]
Type C can also be used without the bigPlayer command. Type C bigPlayerSp has
the highest level of customization as you determine which tiles are solid for
every single direction (Type C bigPlayer always has the main tile solid).
e.g. <bigPlayerSp: [0,1] [1,-1] [1,0] [0,-1]>

------------------------------------------------------------------------------
FOR EVENTS
------------------------------------------------------------------------------

Events can be upsized using either notetags or comments. Comments always
override notetags. The contents of the comments and notetags are identical.
When a new bigEvent comment is run, the previous one is overwritten.

Type A: <bigEvent: above left right>

Type B: <bigEvent: spritesize front back left right>

Type B circle: <bigEvent: spritesize circle radius>

Type B diamond: <bigEvent: spritesize diamond radius>

Type C: <bigEvent: [down] [left] [right] [up]>

Reset to normal size: <bigEvent: reset>

See plugin parameters vehicle size section for what above, left, right,
spritesize, front, back, radius, and direction mean.

And custom shapes as well:

Type A: <bigEvent: above left right> <bigPlayerSp: dx,dy dx,dy dx,dy>

Type B: <bigEventSp: dx,dy dx,dy dx,dy>

Type C: <bigEventSp: [down] [left] [right] [up]>
where [direction] = [dx,dy dx,dy dx,dy]

See Player section for what dx and dy mean.
パラメータ
param Diagonal Movement
desc Are you using a diagonal movement plugin?
default false

param Diagonal Block
desc Prevents random sprite overlapping from diagonal movement.
default true

param Auto Set Comment
desc Automatically set 1st bigSprite comment on event page.
default true

param Ev All Direction Trigger
desc Big event Event Touch trigger as long as player is next to it, regardless of direction faced.
default false

param Pl All Direction Trigger
desc Big player can trigger events regardless of direction faced. Applicable to Action Button and Player Touch.
default false

param Boat Size
desc Size of boat

param Ship Size
desc Size of ship

param Airship Size
desc Size of airship

param Enter Vehicle Side
desc Get on only when facing the side of big vehicle instead of from any direction.
default false

param Exit Vehicle Side
desc Get off the side of big vehicle instead of the front. More visually appealing.
default true

param Right Hand Drive
desc Because getting off the side of the vehicle is left hand drive by default.
default false

param Vehicle Reverse
desc Large Vehicle will reverse instead of flipping direction.
default true

param Touch Fix B
desc Fix touch input if using type B big player/vehicle. Will overwrite findDirectionTo!
default false

param Galv Diagonal Charset
desc Diagonal Character Sets from Galv's Diagonal Movement
default false

ライセンス表記

紹介ページ https://github.com/dahlys/rpgmaker/blob/master/Dahlys_BigSprites.js