Using the Sprite Editor
To enter the Sprite Editor, press "2" while in the Level Editor.
The Sprite Editor is available assist in preparing a Sprite for use
with an in-game Object or Player Character. Because most sprites will require special offsets and Collision
Boxes to work properly, the Sprite Editor provides a visual way to set them up.
The sprite must already exist within the game so that it can be selected
for viewing, so its script must be created manually at first. It is, however,
not necesary to set up any of the Display Offsets, Collision Boxes, or Hotspots before working with them
in the Sprite Editor.
This editor also allows viewing of Animations that apply
to the selected Sprite type. It does not, however, know whether or not an Function that
is selectable with any certain Sprite belongs with that Sprite, or if it contains any Script Commands that perform any operations not directly related to single-Function Animation. Do not
attempt to play a non-Animation Function, or an Animation that does not belong to the currently-selected Sprite. Doing so will lead to program crashes. The same
applies to complex Animations that manipulate Object Variables, Player Variables, or any other property of an active Object or Player aside from their animation frames, because there
is no Object/Player to manipulate.
While editing Player Character Sprites, only that Player Character's
Scripted Functions will be available for viewing as Animations. Remember that this Function listing contains control Functions intermixed
with Animation Functions.
While editing Object Sprites, all Scripted Object Animation Functions will be available. Their ID will be relative to their position
in the overall listing of Object Animations that are currently loaded, meaning that while "Game" Animations will be referenced by
their "Game" ID, "Zone" Animations will be referenced by their "Zone" ID plus the total number of "Game" Animations, and "Act"
Animations will be referenced by their "Act" ID plus the total number of both "Game" and "Zone" Animations.
Any settings for any Sprite that are changed will affect the Sprite as it is used
in gameplay for the current session, but will be lost upon exiting the program,
loading a new Game, or even reloading the current Game.
To keep the changes, they must be "dumped", to output
files that will appear in the "Dump" folder, and manually copied into the Scripts
and folders in which they belong.
The Sprite Editor can't directly alter Sprite
scripts. The script output will be saved into a file called "Frames.txt", and the
graphical output will be saved in a file(s) called "sh??????.pcx", where ? is a
six-digit number value that increases as more images are needed to store all of
the art that is being "dumped". The generated Script file will reference these files, so
if the original image file(s) is/are still to be used by the actual Script, only the Draw Offset,
Collision Box, and Hotspot settings will be "valid", and only those settings should be copied.
The pointer, represented by an arrow, is moved by the mouse.
On the left side of the screen is the status display. On the right side is the currently-selected Sprite, and a crosshair, whose center represents "Object Position"/"Player Position".
There are two ways to interact with this editor:
Status and Options Display
Keyboard Options
Status and Options Display
The Status and Options Display shows the following elements:
Pos
This is the position of the crosshair (Player/Object Position) on the screen.
Frame
This is the ID number of the currently-selected Frame of the currently-selected Sprite.
Width
Height
These are the width and height of the currently-selected Frame.
Nrm Draw Off
Rev Draw Off
The "Nrm" section lists the X Drawing Offset of the currently-selected Frame when viewed unmirrored, and
the Y drawing offset of the currently-selected Frame when viewed unflipped.
The "Rev" section lists the X drawing offset of the currently-selected Frame when viewed mirrored, and
the Y drawing offset of the currently-selected Frame when viewed flipped.
Left-click this area to select "Drawing Offsets" for editing.
When "Drawing Offsets" are selected for editing, two more options become available:
Affect Boxes
When active, this option is highlighted, and causes Collision Boxes and Hotspots to "follow" the Sprite Frame image as the Draw Offsets are moved.
When inactive, Collision Boxes and Hotspots will remain where they are when the Draw Offsets are modified.
Left-click this option to toggle on or off.
Auto Center
When active, this option is highlighted, and causes the editing of "Normal" or "Reverse" Draw Offsets to affect each other such that when the Sprite is Mirrored/Flipped, the Mirroring/Flipping is centered on the Object/Player Position (the crosshair).
When inactive, "Normal" and "Reverse" Draw Offsets must be modified individually.
Left-click this option to toggle on or off.
Flip Mirror
These are the current Vertical Flip and Horizontal Mirror view settings. If either one is active, it will be highlighted.
Left-click either setting to toggle it on or off.
NAttack
NHurt
These values specify the number of "Attack" and "Hurt" Boxes that are currently defined for the currently-selected Frame.
Mn Atk Hrt S
In order, these options are "MainBounds Box", "Attack Box", "Hurt Box", and "Hotspot".
The highlighted abbreviation represents the Collision Box (or Hotspot) type that is currently-selected
for editing.
Left-click the abbreviation that corresponds with the desired type to select it for editing.
Selecting any of these types will cause different information to appear directly below:
Mn
From left-to-right, top-to-bottom, the currently-selected Frame's "MainBounds" X1, Y1, X2, and Y2 settings are displayed.
Atk
First, ID number of the currently-selected "Attack Box" from the currently-selected Frame is displayed
Below that, from left-to-right, top-to-bottom, That Box's X1, Y1, X2, and Y2 position settings are displayed.
To the right of those settings are the "INS" and "DEL" options. Left-click either option to insert
a new "Attack Box" into the list for the currently-selected Frame, or to delete the currently-selected "Attack Box" from
the currently-selected Frame.
Hrt
First, ID number of the currently-selected "Hurt Box" from the currently-selected Frame is displayed
Below that, from left-to-right, top-to-bottom, That Box's X1, Y1, X2, and Y2 position settings are displayed.
To the right of those settings are the "INS" and "DEL" options. Left-click either option to insert
a new "Hurt Box" into the list for the currently-selected Frame, or to delete the currently-selected "Hurt Box" from
the currently-selected Frame.
S
First, ID number of the currently-selected "Hotspot" from the currently-selected Frame is displayed
Below that, from top-to-bottom, That Spot's X and Y position settings are displayed.
To the right of those settings are the "INS" and "DEL" options. Left-click either option to insert
a new "Hotspot" into the list for the currently-selected Frame, or to delete the currently-selected "Hotspot" from
the currently-selected Frame.
Player/Object
This section will read "Player" when Player Sprites are selected for editing, and "Object" when Object Sprites are selected for editing.
By default, it reads "None Selected"
Left-click to change the selected Sprite type.
The value specifies which Player Character or Object Sprite Set is selected for editing.
Ani ID
This value specifies the Player/Object Function that is selected to view as Animation.
Left-click the word "Ani ID" to cause the selected Animation Function to play.
Remember that this is likely to cause a program crash if a non-Animation Function, or a complex Animation Function that attempts to modify Player Variables, Object Variables, or other Player/Object properties is selected.
Right-click the word "Ani ID" to cause Collision Boxes and Hotspots to be visible during the Animation.
This also causes Collision Boxes to display for Player Characters during gameplay.
Keyboard Options
Press "C" or "V" to select the Player/Object Sprite Set to edit.
Press "A" or "Z" to select the Sprite Frame of the selected Set to edit.
Press "S" or "X" to select the Collision Box or Hotspot of the selected type to edit.
The type is selected by left-clicking on any of the "Mn Atk Hrt S" Status/Option elements.
Press "B" or "N" to select the Player/Object Function to view as an Animation.
Click the "Ani ID" Status/Option element to toggle the Animation on or off.
Use "T", "G", "F", and "H" to move the X1 and Y1 positions for the selected Collision Box, or the X and Y "Normal" Drawing Offset settings up, down, left, or right, respectively.
To select whether a Collision Box or Drawing Offset is being edited, left-click any of the "Mn Atk Hrt S" or "??? Draw Off" Status/Option elements.
Use "I", "K", "J", and "L" to move the X2 and Y2 positions for the selected Collision Box, the X and Y "Reverse" Drawing Offset settings, or the X and Y positions of the currently-selected Hotspot up, down, left, or right, respectively.
To select whether a Collision Box, Hotspot, or Drawing Offset is being edited, left-click any of the "Mn Atk Hrt S" or "??? Draw Off" Status/Option elements.
Use the arrow keys to move all Frames of the currently-selected Sprite Set and all of their Collision Boxes up, down, left, or right all at once.
Press "Enter"/"Return" to "Dump" the current settings for the currently-selected Sprite Set (no other Sprite Set's settings are saved, and this overwrites any previously-saved "dump").