Sly 2:GuardPocket

From SlyMods
Jump to navigation Jump to search
GuardPocket
Data Structure
Pickpocketing coins from a guard's pocket
GameSly 2: Band of Thieves
Size16
Official NameNo

GuardPocket is a struct used to keep track of what loot is in the guard's pockets when pickpocketing.

Fields

Offset Size Type Name Description
0x0 4
OID
oidLoot 0x2b3 for coins, 0x2b4 for HP, 0x2b5 for item
0x4 4
int
unknown Unknown
0x8 4
int
itemID If loot type is item (0x2b5), what type of item it is
0xc 4
int
nloot How many of the specified loot type are in the pocket

Implementation

There is space on the guard struct for up to 8 pockets. When spawning a guard, the game generates between 2-4 pockets containing either coins or an item. The item is always in the last pocket.

Notes

  • Setting the loot type to 0x2b4 will put HP pickups in the guard's pocket, but this is not used in normal gameplay.
  • You can set the loot type to an entity OID (for example, Murray) and the guard will have that entity in it's pocket.
    • So far only NPCs are confirmed to work
    • Making Sly pickpocket himself will cause the camera to get stuck and the guard to walk away with Sly in his pocket
  • You can't modify the current pocket, only one of the next ones

See also