Sly 2:GuardPocket
Jump to navigation
Jump to search
Data Structure | |
---|---|
Game | Sly 2: Band of Thieves |
Size | 16 |
Official Name | No |
GuardPocket is a struct used to keep track of what loot is in the guard's pockets when pickpocketing.
Fields
Offset | Size | Type | Name | Notes |
---|---|---|---|---|
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 |
This topic needs further investigation. |
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