List of Opcodes: Difference between revisions
swapped around some incorrect opcode params |
Added explanation of what an opcode is, to make it more beginner friendly (I'll be honest, when I started learning scripting, I had no idea what an opcode was!) Also added explanations for the different types of parameters. |
||
| Line 2: | Line 2: | ||
This article documents the different opcodes, their purpose and parameters. The purpose of unkX parameters is unknown. | This article documents the different opcodes, their purpose and parameters. The purpose of unkX parameters is unknown. | ||
== What is an opcode? == | |||
An opcode is an instruction to the machine (it tells the machine to 'do' something). In modern programming, it would be most similar to a [https://en.wikipedia.org/wiki/Function_(computer_programming) function]. For a more technical description, see [https://en.wikipedia.org/wiki/Opcode here]. | |||
== Types of parameters == | |||
* uint: An unsigned integer (a number without decimals). It cannot be negative. It is possible that in the game's code, there are only signed integers and no unsigned integers, but not enough research has been done on the matter. For the most part, it shouldn't matter. | |||
* sint: A signed integer (a number without decimals). It can be either positive or negative. | |||
* String: Text (i.e dialogue). There should always be a quotation mark (") at the beginning and end. | |||
* ConstString: Same as String. | |||
* Routine: Any of the 701 coroutines from [[Unionall]]. Always begins with "CORO_" | |||
* Entity: An actor, performer. (not an object!) | |||
* Object: An object in a scene. (not an actor or perfomer!) | |||
* Level: Any level from the [[Script Engine|Level List]]. Will always begin with "LEVEL_". | |||
* Bgm: Any music in the game. Will always begin with "BGM_". (example: BGM_CRAGGY_COAST) | |||
* PositionMark: A position. Will be written as "Position<'MarkName', x, y>". Once a position mark is written in a script, SkyTemple will show an option to place it visually in the scene. | |||
* Face: A portrait expression. Will always begin with "FACE_". (examples: FACE_NORMAL, FACE_HAPPY, FACE_PAIN) | |||
* FaceMode: A portrait position. Will always begin with "FACE_MODE_". | |||
* Direction: A direction for an entity to move in or turn to. Will always begin with "DIR_". (examples: DIR_UP, DIR_RIGHT) | |||
* ProcessSpecial: One of the games special processes. Can be referred to by its number, or name. | |||
* Effect: A graphical effect. | |||
* GameVar: Any of the game's [[List of Script Variables|Script Variables]]. Will always begin with "$". | |||
== Relevant Opcodes == | == Relevant Opcodes == | ||