Open main menu

Difference between revisions of "SCUMM/Technical Reference/Script resources"

Put object code for V3/4 into separate part
(Added description of OC block for V3/4 games)
(Put object code for V3/4 into separate part)
Line 49: Line 49:




= Object Scripts (OBCD in V5+, OC in V3/4) =
= Object Scripts V5+ (OBCD) =


These are scripts that correspond to VERB actions. VERBs are predefined activities at the bottom of the screen, e.g. "Open", "Look", "Give" etc. For each named object in a room, the game designer could define responses to the players actions. Starting with version 5, the whole code can be found in an [[Object resources|Object Resource]].  
These are scripts that correspond to VERB actions. VERBs are predefined activities at the bottom of the screen, e.g. "Open", "Look", "Give" etc. For each named object in a room, the game designer could define responses to the players actions. Starting with version 5, the whole code can be found in an [[Object resources|Object Resource]].  
Line 72: Line 72:
       object code  variable
       object code  variable
   
   
= Object Scripts in V3/4 (OC) =


In Version 3 and 4 the code can be found in the '''OC''' block:
In Version 3 and 4 the code can be found in the '''OC''' block:
Line 81: Line 83:
   unknown          12 bytes
   unknown          12 bytes


Now starts a variable block similar to the VERB block in later games, which contains the verb identifier (1 byte) and the offset. The table end is marked with 0.  
Now starts a variable block similar to the VERB block in later games, which contains the verb identifier (1 byte) and the offset. The table end is marked with 0. Directly behind the object name is stored followed by the object code:


   verb              1 byte
   verb              1 byte
24

edits