N

From OHRRPGCE-Wiki
Revision as of 08:11, 17 July 2017 by Bob the Hamster (talk | contribs) (add a "NPC pathfinding obstruction rules" for map-wide default)
Jump to navigation Jump to search

NPC Definitions

This lump has a 7 byte header which contains garbage (but previously held a BSAVE Header).

  • In versions werewaffle and older, this lump is 36 records of 30 bytes (15 INTs) each, followed by 1920 unused bytes, 3007 bytes in total.
  • starting with version xocolatl, this lump is 100 records of 30 bytes (15 INTs) each, 3007 bytes in total.
  • starting with version zenzizenzic, the length of the records are stored in BINSIZE.BIN, and the number of records is variable (check the file length, subtract 7, and divide by record length), up to a maximum of 500 records.
  • starting with version dwimmercrafty, there is no maximum number of npc definitions

Formal Specs

About Formal Specs

Offset Data Meaning
0 INT Picture
1 INT Palette, or -1 for default
2 INT Move type
3 INT Speed setting (Not actual speed!)
4 INT Display textbox # (0 for none - you can't display box 0)
5 INT When activated action
6 INT Give item # + 1 (0 means none)
7 INT Pushability
8 INT Activation
9 INT Appear only if tag (-2 = tag 2 is off? ,2 = tag 2 is on?, 0=n/a)
10 INT Second appearance tag (see 9)
11 INT Usable.. 0 if repeatably or onetime bit number >= 1
12 INT Plotscript Trigger
13 INT Script argument
14 INT Vehicle # + 1 (0 means none)
15 INT (Default) Zone restriction. Zone ID 1-9999, 0 for the map default, -1 for none.
16 INT (Default) Avoidance zone. Zone ID 1-9999, 0 for the map default, -1 for none.
17 INT Ignore passmap. 0 or 1. (This is a WIP feature)
18 INT NPC pathfinding obstruction rules.

0=Use map default
1=Treat obstructing NPCs as walls
2=Treat obstructing NPCs as passable
3=Treat non-moving obstructing NPCs as high-cost terrain
(This is a WIP feature)

Move type

Value Meaning
0 Stand Still
1 Wander
2 Pace
3 Right Turns
4 Left Turns
5 Random Turns
6 Chase Player (Meandering)
7 Avoid Player (Meandering)
8 Walk in place
9 Chase Player (Direct) (This is a WIP feature)
10 Avoid Player (Direct) (This is a WIP feature)
11 Follow Walls (Right) (This is a WIP feature)
12 Follow Walls (Left) (This is a WIP feature)
13 Follow Walls (Right) Stop for others (This is a WIP feature)
14 Follow Walls (Left) Stop for others (This is a WIP feature)
15 Chase Player (Pathfinding) (This is a WIP feature)

Speed Setting

Value Real Speed
0 0
1 1
2 2
3 10
4 4
5 5

When activated

Value Meaning
0 Change direction
1 Face player
2 Don't face player (?)

Pushability

Value Meaning
0 Off
1 Full
2 Horiz.
3 Vert.
4 Up only
5 Right only
6 Down only
7 Left only

Activation

Value Meaning
0 Use
1 Touch
2 Step on

References to other lumps

Field Indicating record in lump:
Picture PT4
Palette PAL
Display textbox SAY
Script Trigger LOOKUP1.BIN
Vehicle # VEH