Sanny Builder supports writing raw content into an output file. Within this construct, all values are directly written in an output file without undergoing any checks.
Use this feature only if you know what you're doing. Any mistakes will corrupt the script file making it unreadable by the game or a script editor.
04 00 02 08 00 04 01
This sequence of bytes is the compiled version of the opcode
0004: $2 = 1, so the game will correctly read it and set the value of the variable
Each byte consists of two digits. The compiler ignores any spaces, effectively treating a pair of two digits separated by a space as one value. Additionally, when there's an unpaired digit, it is automatically prefixed with a leading
For example, a sequence of three letters
A B Cwill be compiled as the number
04 00 02 $PLAYER_CHAR 01 @get_offset
This is the exact copy of the opcode
0004: $PLAYER_CHAR = @get_offset
A string literal enclosed in double quotes is compiled as a sequence of characters.
"This is a string"
The following escape sequences are supported within a string literal:
It produces the following sequence of bytes:
00 08 09 0A 0D DD.
Currently multiple spaces in a string literal are converted into a single one. Thus a line
"This is a string"is converted into
"This is a string". Use the backward slash character
\to add multiple spaces in a string literal:
"This \ \ \ is \ a \ \ \ \ string".
For convenience, large numbers can be prefixed with an
&symbol. The number following the
&symbol can be positive or negative, and it can be represented in either decimal or hexadecimal format.
This example produces the following sequence of bytes:
E8 03 00 CB 5C FF.
In cases where it is necessary to repeat a specific byte multiple times, such as when creating a zero-filled buffer, indicate the count by appending
(n)after the byte, where
nis a positive integer number:
This syntax is equivalent to:
00 00 00 00 00 00 00 00 00 00
Byte repetitions can be used multiple times within the same block, and they can also be set with a constant value.
const n = 25
00(n) 01(3) 02(4)
hex..endallows usage of the
$INCLUDEdirective to embed the contents of a binary file directly into the script's body. The syntax is as follows: