Opcodes

From Spiral Framework
Revision as of 22:29, 23 March 2018 by 141.101.98.158 (talk)
Jump to navigation Jump to search

Opcodes are the commands used in LIN scripts to make things happen in the game. In the native LIN format of the game, opcodes are hexadecimal bytes. SPIRAL converts these to a more human readable format.

Restart Script

LIN Hex Opcode: 0x1C

This opcode will restart the current script file from the beginning.

Notes

  • SPIRAL currently does not support this opcode and it must be used via its hexadecimal.

Screen Flash

LIN Hex Opcode: 0x1F

This opcode is used to make the screen flash with a certain colour. It takes seven arguments.

Argument Purpose
1 Red Component (0-255)
2 Green Component (0-255)
3 Blue Component (0-255)
4 Fade in duration
5 Hold duration
6 Fade out duration
7 Opacity

Examples

0x1F|255, 0, 0, 4, 60, 10, 255

This code would make the screen completely fade to red over a period of 4 frames, stay that way for 60 frames, and then fade back to normal over a period of 10 frames.

0x1F|255, 255, 255, 4, 0, 30, 255

This code would cause the screen to very quickly flash white.

Notes

  • SPIRAL currently does not support this opcode and it must be used via its hexadecimal.

Set Title

LIN Hex Opcode: 0x0F

This opcode is used in scripts to change the Special Ability of a given character. The opcode itself has three arguments:

Argument Purpose
1 Character ID
2 Seemingly unused
3 Special Ability Variation

The used arguments are then placed into the equation arg1 + (arg3 * 15), and the code finds the file in 10_Special.pak with the corresponding number as its title.

Examples

Set Title|10, 0, 1

When this line is read, Toko's special ability would be changed to "Ultimate Writing Prodigy and Murderous Fiend," from file 25 in 10_Special.pak.

Notes

  • This opcode should be called for every character at trial preparation screens in order to ensure that all the characters have the correct ability set at the start of trials.
  • Near the end of Trial 6 in Danganronpa 1, Makoto (Character 0) is supposed to have their special set to "Ultimate Hope". The game reads from file 15, which mistakenly contains "Ultimate Despair" instead. So, be warned that in DR1 character 15 DOES NOT use the 10_Special PAK as they do not have a report card page and thus their Special should not be included.