ff3:ff3us:doc:asm:fmt:npc

NPC Data

When a map is loaded, all NPCs defined for the specified map are loaded.

Description Value
Pointers (16-bit) $C41A10
Nr of Pointers (bytes) $01A0 ($0340)
Data Address $C41D52
Block size $09

The structure is a sequence of two-byte pointers. The index of the pointer is relative to the map number.

The actual offset of the appointed data is the pointer value plus the base offset.

The game system checks the actual pointer and the next pointer to determinate the amount of data to read. It can include multiple data blocks.

Offset Description
$00 event address, low byte
$01 event address, middle byte
$02 $03 event address, high bits
$1C palette
$20 ?background scrolls
$C0 bit identifier (see NPC Flags)
$03 $01 bit identifier
$FE byte identifier
$04 $7F X position
$80 Show rider in vehicle
$05 $3F Y position
$C0 Speed
$06 Actor Sprite
$07 $0F movement type
$30 map layer
$C0 vehicle
$08 $03 start direction
$04 don't change graphic
$18 ?background layer
$20 ?
$40 ?mirror graphics
$80 ?

As set of bits located at $1EE0 control NPC visibility. “bit identifier” and “byte identifier” above index into these flags. If the flag is set, the NPC is visible/active.

  • ff3/ff3us/doc/asm/fmt/npc.txt
  • Last modified: 5 years ago
  • (external edit)