![]() |
Data |
| Prev: CA84 | Up: Map | Next: CC00 |
|
Seventeen 7-byte slots, ending at $FF. Byte 0 is the character, or 0 for a slot not in use -- three are empty at the start, and a character that is killed gives its slot up (see KILL). Byte 1 is how many of its scripts SCRIPT_RANDOM may choose among. Bytes 2 and 3 are the instruction its script has got to; bytes 4 and 5 are its script table, a FIND_RECORD table whose entries keyed 0 are its ordinary scripts and whose others are its reactions (see REACT). Byte 6 is how many of the player's orders it will take at once (see DO_TALK): Thorin 6, Gandalf and Elrond 5, Gollum and Bard 3, the wood elf, the butler and the trolls 1, and the warg, the dragon and the goblins 0, never.
The scripts themselves are from NASTY_GOBLIN_SCRIPTS up to TIMERS, each table followed by its scripts, every step decoded and every address in them a label (generated by build_hobbit.py's script_blocks). An instruction's low four bits are its opcode: 0 to 3 as SCRIPT_DO, 4 as SCRIPT_BARE, $0C, $0E and $0F as CHARACTERS_ACT says, and anything else sends the character back to its first script. Bit 4 means a 2-byte fallback follows, bit 5 that the step is used up once it succeeds (SCRIPT_DO zeroes it), and bit 6 that an order cannot interrupt it.
|
||||
| CHARACTERS | CACB | DEFB $3E | Gandalf | |
| CACC | DEFB $07 | How many of its scripts it chooses among at random | ||
| CACD | DEFW GANDALF_F | Where its script has got to | ||
| CACF | DEFW GANDALF_SCRIPTS | Its script table | ||
| CAD1 | DEFB $05 | How many orders it takes at once | ||
| THORIN_SLOT | CAD2 | DEFB $3F | Thorin | |
| CAD3 | DEFB $02 | How many of its scripts it chooses among at random | ||
| CAD4 | DEFW THORIN_A | Where its script has got to | ||
| CAD6 | DEFW THORIN_SCRIPTS | Its script table | ||
| CAD8 | DEFB $06 | How many orders it takes at once | ||
| WOOD_ELF_SLOT | CAD9 | DEFB $40 | Wood elf | |
| CADA | DEFB $02 | How many of its scripts it chooses among at random | ||
| CADB | DEFW WOOD_ELF_A | Where its script has got to | ||
| CADD | DEFW WOOD_ELF_SCRIPTS | Its script table | ||
| CADF | DEFB $01 | How many orders it takes at once | ||
| VICIOUS_WARG_SLOT | CAE0 | DEFB $43 | Vicious warg | |
| CAE1 | DEFB $00 | How many of its scripts it chooses among at random | ||
| CAE2 | DEFW VICIOUS_WARG_A | Where its script has got to | ||
| CAE4 | DEFW VICIOUS_WARG_SCRIPTS | Its script table | ||
| CAE6 | DEFB $00 | How many orders it takes at once | ||
| BUTLER_SLOT | CAE7 | DEFB $00 | Empty at the start: butler's, once an arrival hook writes it in | |
| CAE8 | DEFB $02 | How many of its scripts it chooses among at random | ||
| CAE9 | DEFW BUTLER_A | Where its script has got to | ||
| CAEB | DEFW BUTLER_SCRIPTS | Its script table | ||
| CAED | DEFB $01 | How many orders it takes at once | ||
| ELROND_SLOT | CAEE | DEFB $41 | Elrond | |
| CAEF | DEFB $02 | How many of its scripts it chooses among at random | ||
| CAF0 | DEFW ELROND_B | Where its script has got to | ||
| CAF2 | DEFW ELROND_SCRIPTS | Its script table | ||
| CAF4 | DEFB $05 | How many orders it takes at once | ||
| GOLLUM_SLOT | CAF5 | DEFB $44 | Gollum | |
| CAF6 | DEFB $01 | How many of its scripts it chooses among at random | ||
| CAF7 | DEFW GOLLUM_A | Where its script has got to | ||
| CAF9 | DEFW GOLLUM_SCRIPTS | Its script table | ||
| CAFB | DEFB $03 | How many orders it takes at once | ||
| BARD_SLOT | CAFC | DEFB $00 | Empty at the start: bard's, once an arrival hook writes it in | |
| CAFD | DEFB $01 | How many of its scripts it chooses among at random | ||
| CAFE | DEFW BARD_A | Where its script has got to | ||
| CB00 | DEFW BARD_SCRIPTS | Its script table | ||
| CB02 | DEFB $03 | How many orders it takes at once | ||
| RED_GOLDEN_DRAGON_SLOT | CB03 | DEFB $00 | Empty at the start: red golden dragon's, once an arrival hook writes it in | |
| CB04 | DEFB $01 | How many of its scripts it chooses among at random | ||
| CB05 | DEFW RED_GOLDEN_DRAGON_A | Where its script has got to | ||
| CB07 | DEFW RED_GOLDEN_DRAGON_SCRIPTS | Its script table | ||
| CB09 | DEFB $00 | How many orders it takes at once | ||
| HIDEOUS_TROLL_SLOT | CB0A | DEFB $47 | Hideous troll | |
| CB0B | DEFB $01 | How many of its scripts it chooses among at random | ||
| CB0C | DEFW HIDEOUS_TROLL_B | Where its script has got to | ||
| CB0E | DEFW HIDEOUS_TROLL_SCRIPTS | Its script table | ||
| CB10 | DEFB $01 | How many orders it takes at once | ||
| VICIOUS_TROLL_SLOT | CB11 | DEFB $48 | Vicious troll | |
| CB12 | DEFB $01 | How many of its scripts it chooses among at random | ||
| CB13 | DEFW HIDEOUS_TROLL_B | Where its script has got to | ||
| CB15 | DEFW HIDEOUS_TROLL_SCRIPTS | Its script table | ||
| CB17 | DEFB $01 | How many orders it takes at once | ||
| NASTY_GOBLIN_SLOT | CB18 | DEFB $3D | Nasty goblin | |
| CB19 | DEFB $01 | How many of its scripts it chooses among at random | ||
| CB1A | DEFW NASTY_GOBLIN_A | Where its script has got to | ||
| CB1C | DEFW NASTY_GOBLIN_SCRIPTS | Its script table | ||
| CB1E | DEFB $00 | How many orders it takes at once | ||
| HIDEOUS_GOBLIN_SLOT | CB1F | DEFB $45 | Hideous goblin | |
| CB20 | DEFB $01 | How many of its scripts it chooses among at random | ||
| CB21 | DEFW NASTY_GOBLIN_A | Where its script has got to | ||
| CB23 | DEFW NASTY_GOBLIN_SCRIPTS | Its script table | ||
| CB25 | DEFB $00 | How many orders it takes at once | ||
| VICIOUS_GOBLIN_SLOT | CB26 | DEFB $4B | Vicious goblin | |
| CB27 | DEFB $01 | How many of its scripts it chooses among at random | ||
| CB28 | DEFW VICIOUS_GOBLIN_A | Where its script has got to | ||
| CB2A | DEFW VICIOUS_GOBLIN_SCRIPTS | Its script table | ||
| CB2C | DEFB $00 | How many orders it takes at once | ||
| HORRIBLE_GOBLIN_SLOT | CB2D | DEFB $49 | Horrible goblin | |
| CB2E | DEFB $01 | How many of its scripts it chooses among at random | ||
| CB2F | DEFW HORRIBLE_GOBLIN_A | Where its script has got to | ||
| CB31 | DEFW HORRIBLE_GOBLIN_SCRIPTS | Its script table | ||
| CB33 | DEFB $00 | How many orders it takes at once | ||
| MEAN_GOBLIN_SLOT | CB34 | DEFB $4A | Mean goblin | |
| CB35 | DEFB $01 | How many of its scripts it chooses among at random | ||
| CB36 | DEFW HORRIBLE_GOBLIN_A | Where its script has got to | ||
| CB38 | DEFW HORRIBLE_GOBLIN_SCRIPTS | Its script table | ||
| CB3A | DEFB $00 | How many orders it takes at once | ||
| DISGUSTING_GOBLIN_SLOT | CB3B | DEFB $4C | Disgusting goblin | |
| CB3C | DEFB $01 | How many of its scripts it chooses among at random | ||
| CB3D | DEFW HORRIBLE_GOBLIN_A | Where its script has got to | ||
| CB3F | DEFW HORRIBLE_GOBLIN_SCRIPTS | Its script table | ||
| CB41 | DEFB $00 | How many orders it takes at once | ||
| CB42 | DEFB $FF | End of the characters | ||
| CB43 | DEFB $00,$00,$00,$00,$00,$00,$00,$00 | |||
| CB4B | DEFB $00,$00,$00,$00,$00,$00,$00,$00 | |||
| CB53 | DEFB $00,$00,$00,$00,$00,$00,$00,$00 | |||
| CB5B | DEFB $00,$00,$00,$00,$00,$00,$00,$00 | |||
| CB63 | DEFB $00,$00,$00,$00,$00,$00,$00,$00 | |||
| CB6B | DEFB $00,$00,$00,$00,$00,$00,$00,$00 | |||
| CB73 | DEFB $00,$00,$00,$00,$00,$00,$00,$00 | |||
| CB7B | DEFB $00,$00,$00,$00,$00,$00,$00,$00 | |||
| CB83 | DEFB $00,$00,$00,$00,$00,$00,$00,$00 | |||
| CB8B | DEFB $00,$00,$00,$00,$00,$00,$00,$00 | |||
| CB93 | DEFB $00,$00,$00,$00,$00,$00,$00,$00 | |||
| CB9B | DEFB $00,$00,$00,$00,$00,$00,$00,$00 | |||
| CBA3 | DEFB $00,$00,$00,$00,$00,$00,$00,$00 | |||
| CBAB | DEFB $00,$00,$00,$00,$00,$00,$00,$00 | |||
| CBB3 | DEFB $00,$00,$00,$00,$00,$00,$00,$00 | |||
| CBBB | DEFB $00,$00,$00,$00,$00,$00,$00,$00 | |||
| CBC3 | DEFB $00,$00,$00,$00,$00,$00,$00,$00 | |||
| CBCB | DEFB $00,$00,$00,$00,$00,$00,$00,$00 | |||
| CBD3 | DEFB $00,$00,$00,$00,$00,$00,$00,$00 | |||
| CBDB | DEFB $00,$00,$00,$00,$00,$00,$00,$00 | |||
| CBE3 | DEFB $00,$00,$00,$00,$00,$00,$00,$00 | |||
| CBEB | DEFB $00,$00,$00,$00,$00,$00,$00,$00 | |||
| CBF3 | DEFB $00,$00,$00,$00,$00,$00,$00,$00 | |||
| CBFB | DEFB $00,$00,$00,$00,$00 | |||
| Prev: CA84 | Up: Map | Next: CC00 |