Difference between revisions of "Chrono Cross Fieldscript Research"

From Chrono Compendium
Jump to: navigation, search
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
Currently identified commands :
 
Currently identified commands :
 +
 +
==Regular opcodes==
 
===00 - Return/Halt===
 
===00 - Return/Halt===
Self explantory
+
Self explanatory
  
 
===01 GoTo===
 
===01 GoTo===
Line 8: Line 10:
 
<td>0x01</td><td>N</td>
 
<td>0x01</td><td>N</td>
 
</table>
 
</table>
Arguments: N - 16 bit integer.
+
Arguments:<br>
 +
N - 16 bit integer.
  
 
Goes to offset N in the fieldscript.
 
Goes to offset N in the fieldscript.
 
===0F - Load NPC model===
 
===0F - Load NPC model===
 +
Memory Layout:<br>
 +
<table border = 1>
 +
<td>0x0F</td><td>N</td>
 +
</table>
 +
Arguments:<br>
 +
const/var N - 16-bit.<br>
 +
Loads NPC model N in the room's data for the current entity.
  
*0F xx 80* - Load NPC model xx
+
===5A - Mapjump===
 +
Memory Layout:<br>
 +
<table border = 1>
 +
<td>0x5A</td><td>M</td><td>P</td>
 +
</table>
 +
Arguments:<br>
 +
const/var M - 16-bit<br>
 +
const/var P - 16-bit<br>
 +
Mapjump to map M using map parameter P.
 +
 
 +
===7E - Set Movie===
 +
Memory Layout:<br>
 +
<table border = 1>
 +
<td>0x7E</td><td>N</td>
 +
</table>
 +
Arguments:
 +
const/var N - 16 bit<br>
 +
Sets movie to be played to N.
 +
 
 +
===88 - Play song===
 +
Memory layout:<br>
 +
<table border = 1>
 +
<td>0x88</td><td>N</td>
 +
</table>
 +
Arguments:
 +
const/var N - 16 bit<br>
 +
Play song N.
 +
 
 +
===9E Set Dialog Portrait===
 +
Memory layout:
 +
<table border = 1>
 +
<td>0x9E</td><td>N</td>
 +
</table>
 +
Arguments:
 +
const/var N - 16 bit<br>
 +
Sets entity's dialog portrait to N.
  
 
===BB - Item give/take===
 
===BB - Item give/take===
Line 20: Line 65:
 
<td>0xBB</td><td>A</td><td>N</td>
 
<td>0xBB</td><td>A</td><td>N</td>
 
</table>
 
</table>
Arguments:
+
Arguments:<br>
const A - If set to 0x01, takes away an item.
+
const byte A<br>
const/var N - 16-bit, determines item involved. 0x200 means Element, 0x400 means Key Item, and by default is regular item.
+
const/var N - 16-bit<br>
 +
 
 +
If A is not 0, then an item will be taken away. Otherwise, an item is added to your inventory.
 +
N determines what item is involved. By default, it's a normal item. If bit 0x200 is set, the item will be an Element. If 0x400 is set, the item will be a key item.
 +
 
 +
==Command FE Sub-opcodes==
 +
===10 - Battle===
 +
<table border = 1>
 +
<td>0xFE 10</td>
 +
</table>
 +
Arguments:<br>
 +
None.
 +
Initiates a battle set by opcode A3 or C9.
 +
 
 +
===4A - Naming screen===
 +
<table border = 1>
 +
<td>0xFE 4A</td><td>N</td>
 +
</table>
 +
Arguments:<br>
 +
const/var N - 16 bit<br>
 +
Brings up the naming screen for character N.
 +
 
 +
===5B - Character exchange===
 +
<table border = 1>
 +
<td>0xFE 5B</td>
 +
</table>
 +
Arguments:<BR>
 +
None<BR>
 +
Brings up the character exchange menu.
 +
 
 +
===5E - Element shop===
 +
<table border = 1>
 +
<td>0xFE 5E</td><td>N</td>
 +
</table>
 +
Arguments:<Br>
 +
const/var N - 16-bit
 +
 
 +
Brings up Element shop N.
 +
 
 +
===68 - Element shop===
 +
<table border = 1>
 +
<td>0xFE 68</td><td>N</td>
 +
</table>
 +
Arguments:<Br>
 +
const/var N - 16-bit
 +
 
 +
Brings up blacksmith N.
  
 
(In-progress)
 
(In-progress)
 +
 +
''From'': [[Chrono Cross File Structure]]

Latest revision as of 18:21, 18 January 2009

Currently identified commands :

Regular opcodes

00 - Return/Halt

Self explanatory

01 GoTo

Memory layout:

0x01N

Arguments:
N - 16 bit integer.

Goes to offset N in the fieldscript.

0F - Load NPC model

Memory Layout:

0x0FN

Arguments:
const/var N - 16-bit.
Loads NPC model N in the room's data for the current entity.

5A - Mapjump

Memory Layout:

0x5AMP

Arguments:
const/var M - 16-bit
const/var P - 16-bit
Mapjump to map M using map parameter P.

7E - Set Movie

Memory Layout:

0x7EN

Arguments: const/var N - 16 bit
Sets movie to be played to N.

88 - Play song

Memory layout:

0x88N

Arguments: const/var N - 16 bit
Play song N.

9E Set Dialog Portrait

Memory layout:

0x9EN

Arguments: const/var N - 16 bit
Sets entity's dialog portrait to N.

BB - Item give/take

Memory layout:

0xBBAN

Arguments:
const byte A
const/var N - 16-bit

If A is not 0, then an item will be taken away. Otherwise, an item is added to your inventory. N determines what item is involved. By default, it's a normal item. If bit 0x200 is set, the item will be an Element. If 0x400 is set, the item will be a key item.

Command FE Sub-opcodes

10 - Battle

0xFE 10

Arguments:
None. Initiates a battle set by opcode A3 or C9.

4A - Naming screen

0xFE 4AN

Arguments:
const/var N - 16 bit
Brings up the naming screen for character N.

5B - Character exchange

0xFE 5B

Arguments:
None
Brings up the character exchange menu.

5E - Element shop

0xFE 5EN

Arguments:
const/var N - 16-bit

Brings up Element shop N.

68 - Element shop

0xFE 68N

Arguments:
const/var N - 16-bit

Brings up blacksmith N.

(In-progress)

From: Chrono Cross File Structure