NPC HACKING FAQ By S. P. Gardebiter Email: cacao@freenet.de Additions by Kapow & Runelancer 12.2007 NPC.TBL has data for 361 entities (0000-0360). That's 0x0169 in hex. The data is stored in sets, one for each entity parameter, with values 1, 2, or 4 bytes in length. Each set has 361 entries, one for each entity, then the next set begins back at entity 0000. So, each set is a multiple of 169h bytes, and so the starting address of each set will be a multiple of 169h. There are 11 sets: 0x0000 - Flags (DB - W) 0x02D2 - Health (DB - W) 0x05A4 - Tileset Number (B) 0x070D - Death Sound (B) 0x0876 - Hurt Sound (B) 0x09DF - Death Smoke (B) 0x0B48 - Experience (QB - DW) 0x10EC - Damage (QB - DW) 0x1690 - Collsion Bounding Box (seperate values) 0x1C34 - Display Bounding Box (seperate values) The bounding boxes are 4 byte objects. 0x00 Left 0x01 Top 0x02 Right 0x03 Bottom A sprite is always drawn using the top and left or right (depending on its direction) corner of the bounding box. This is offset from the center of the sprite, by the way: a 16x16 sprite with a bounding box of 8,8,8,8 is perfectly centered. 0,0,8,8 will offset it 8 pixels to the left/up. Special Values (flags): Byte 1: 0x01 - Solid 0x02 - No effect about Tile 44 0x04 - Invulnerable (Blink Sound) 0x08 - Ignore solid 0x10 - Bouncing at top 0x20 - Shootable 0x40 - Special Solid 0x80 - Rear and top attack power 0 Byte 2: 0x01 - Costum 0x02 - Call Event on Death 0x04 - Drop Hearts and EXP 0x08 - Is visible if FlagID is set 0x10 - Costum 0x20 - Call Event on Action 0x40 - Is invisible if FlagID is set 0x80 - Show Damage Numbers Tileset Value: 0x00 - 0x0F - Tilesets 0x10 - 0x1F - NPCsets 0x00 - Title 0x01 - ??? 0x02 - Map Tileset 0x03 - ??? 0x04 - ??? 0x05 - ??? 0x06 - Fade 0x07 - ??? 0x08 - ItemImage 0x09 - ??? 0x0A - ??? 0x0B - ??? 0x0C - ??? 0x0D - ??? 0x0E - ??? 0x0F - ??? 0x10 - MyChar 0x11 - Bullet 0x12 - ??? 0x13 - Caret 0x14 - Sym 0x15 - Map NPCset 1 0x16 - Map NPCset 2 0x17 - NPCRegu 0x18 - ??? 0x19 - ??? 0x1A - ??? 0x1B - ??? 0x1C - ??? 0x1D - ??? 0x1E - ??? 0x1F - ??? Smoke: 0x00 - None 0x01 - Small 0x02 - Medium 0x03 - Large For sound numbers look into Tsc.txt.