GameMaker Touhou Engine   Home   Downloads   Documentation


The object that records the data necessary for creating replays.


Name Value/Default Significance
_EVENT_INTEGER <integer(0-255)>/0 The number that stores the data about the inputs on the current frame. See the description of the file format below for more details.


Trigger # Actions
Create 1 Declare global._REPLAY_DATA. Set local variables to default values. Write the header of the replay into global._REPLAY_DATA. (see below)
Begin Step 1 Reset _EVENT_INTEGER to zero and then increment it according to the inputs being held down on the current frame.
End Step 1 Write _EVENT_INTEGER into global._REPLAY_DATA as an unsigned 8-bit number.

The GRPY File Format

GRPY files are binary files which GMTE uses to store data about replays. The header of the file consists of:

Offset Significance
00 The seed used for randomization in the play session that's been recorded (float).
08 An arbitrary number used to signify the player character.
09 The stage number that the player started on.
0A The difficulty that the game was being played on.

The rest of the file consists of individual bytes that tell GMTE which inputs were being held down on each frame through which bits are set to 1:

Bit Number (Right to Left) Significance
0 Indicates the state of the left arrow key.
1 Indicates the state of the right arrow key.
2 Indicates the state of the up arrow key.
3 Indicates the state of the down arrow key.
4 Indicates the state of the shift key.
5 Indicates the state of the Z key.
6 Indicates the state of the X key.
7 Unused, always 0.