Skip to content

Scenario Commands

jonko0493 edited this page Jul 20, 2024 · 1 revision

The SCENARIO.S file contains a section with a list of commands. Those commands have a simple structure: a short representing the command followed by a single short parameter.

The commands are as follows:

NEW_GAME (0x00)

Sets the location where selecting an episode from the new game menu will jump to.

Parameter: the episode number to jump to.

SAVE (0x01)

Prompts the user to save the game.

Parameter: not well understood. It seems to increment as the saves progress (2 is the first save after the episode starts, 3 is the second, 4 is the third, etc.).

LOAD_SCENE (0x02)

Loads a specified event file.

Parameter: the evt.bin index of the event file.

PUZZLE_PHASE (0x03)

Starts the puzzle phase with a specified puzzle.

Parameter: the dat.bin index of the puzzle file.

ROUTE_SELECT (0x04)

Opens a particular group selection.

Parameter: the SCENARIO.S index of the group selection.

STOP (0x05)

Stops executing the scenario (soft-locks the game). Unused (obviously).

Parameter: none.

SAVE2 (0x06)

Prompts the user to save the game. While the differences between this and SAVE are not fully understood, it seems like SAVE2 is used prior to NEW_GAME commands.

Parameter: none (always 0).

TOPICS (0x07)

Shows the collected topics screen.

Parameter: the same as the ROUTE_SELECT parameter (SCENARIO.S index to a particular group selection).

COMPANION_SELECT (0x08)

Prompts the user to select the character who will accompany Haruhi during a puzzle phase.

Parameter: none (always 0).

PLAY_VIDEO (0x09)

Streams a video from the filesystem.

Parameter: 0 is MOVIE00.MODS (the OP), 1 is MOVIE01.MODS (the ED).

NOP (0x0A)

Does nothing. Unused.

Parameter: none.

UNLOCK_ENDINGS (0x0B)

Triggers the function which checks if a character ending can be unlocked. Called at the end of episode 5.

Parameters: none (always 0).

UNLOCK (0x0C)

Unlocks the unlockables for completing a particular episode.

Parameters: the episode number (1-4).

END (0x0D)

Ends the game and returns to the title screen.

Parameters: none (always 0).