Sly 2:Circle Button Interacts

From SlyMods
Jump to navigation Jump to search

Circle button interacts, such as those on pipes and door triggers, have their own structs. Unlike normal map objects, they only pool in specific circumstances, so the ones that don't pool have static map-specific addresses. Changes to these objects' structs take effect immediately and without a map reload.

Unless otherwise specified, they can be found by using a pointer of 0x3E1B10 with an offset of 0x0 (NTSC-U PS2 release), which will point you to the struct of the interact you're physically closest to.

Climb

Climb Interact
Data Structure
GameSly 2: Band of Thieves

Poles, or any object that acts like them (Sly climbs while holding his cane in his mouth) are objects independent of the actual pole model. They contain an invisible spline with varying amounts of points depending on the size and shape of the pole. Note that climb interacts attached to pool-able poles do pool along with them, and stop working and/or despawn if moved too far away from their assigned pole object:

Green: Start of the struct, which contains important information such as the object's ID as well as various pointers to relevant data, including the actual pole object, likely to borrow some properties from it. The specifics of the various pointers have not been thoroughly researched.

Dark Blue: Mostly unknown, however 0x487A00 is a pointer to the entity list, this being required at +0x3C from the start of any struct to work directly with entities.

Orange: The transform component for the entire spline, containing coordinates and rotation matrix. These don't need a map reload for changes to them to take effect. Note that some poles contain an extra transformation matrix above the normal one. If you want to make position changes to these, you'll need to change the first two set of coordinates. The first one controls the location Sly gravitates towards, the normal transform coordinates only control its position visually.

Magenta: Controls character-specific interactions when nearby. The "FFFFFFFF" can be changed to a text string ID, which causes it to display that string in the infobox GUI element, just like doors that warn you about abandoning jobs. If you climb the pole then jump off, an icon for that character will appear and follow you just like the sparkles do. The "00000001" dictates which character can use the pole. Setting it to 00000002 makes the makes it stop emitting blue sparkles and start emitting green sparkles, letting Bentley climb it with his unused climbing ability. Setting it to 00000004 does the same thing but purple particles and Murray. Setting it to 00000000 essentially disables the pole. Setting it to 000000FF makes the interact work with all characters, removing the need to use conditionals to let different characters use the interact. This is very likely a bitfield.

Cyan: Contains data related to the spline points, but not the actual positions themselves, including Sly's position on the pole. Needs more research.

Yellow: Contains the coordinates of each spline point relative to the center of the spline.

Red: Has not been researched.

Rail

Rail Interact
Data Structure
GameSly 2: Band of Thieves

Rails, ropes, or any object that acts like them (Sly runs/slides along them) are objects independent of the actual rope model. They contain an invisible spline with varying amounts of points depending on the size or shape of the rail.

The struct is slightly shorter than climb structs, however they contain more unknown data:

Green: Start of the struct, which contains important information such as the object's ID as well as various pointers to relevant data, including the actual rail object, likely to borrow some properties from it. The specifics of the various pointers have not been thoroughly researched.

Dark Blue: Mostly unknown, however 0x487A00 is a pointer to the entity list, this being required at +0x3C from the start of any struct to work directly with entities.

Orange: The transform component for the entire spline, containing coordinates and rotation matrix.

Cyan: Contains data related to the spline points, but not the actual positions themselves. More data exists here that does not exist in climb structs, some of which resist change while Sly is interacting with the rail. This element needs more research. The "FFFFFFFF" can be changed to a text string ID, which causes it to display that string in the infobox GUI element, just like doors that warn you about abandoning jobs. If you walk along the rail then jump off, a Sly icon will appear and follow you just like the sparkles do. The "00000007" behaves just like the "00000001" in climb structs, however since only Sly can use them, it doesn't appear to serve much of a purpose. The values that emit blue sparkles for climbs also do the same thing here. The "00000000" directly below this dictates whether Sly slides on the rail. Changing this to 00000001 or higher will turn a normal rope into a slidy one, and vice versa.

Yellow: Contains the coordinates of each spline point relative to the center of the spline, however this is jumbled up with many other seemingly unrelated sets of coordinates which also resist change when Sly is interacting with the rope. Additionally, changes made to the points' relative coordinates don't act the same compared to climbs, being adjusted in unusual and inconsistent amounts, and often in random directions despite modifying one axis. More research needed.

Spire

Spire Interact
Data Structure
GameSly 2: Band of Thieves

Spire points, or any objects that act like them (Sly lands on them and can rotate) are objects independent of the actual spire model:

Red: Start of the struct, which contains important information such as the object's ID as well as various pointers to relevant data. The specifics of the various pointers have not been thoroughly researched, however 0x487A00 is a pointer to the entity list, this being required at +0x3C from the start of any struct to work directly with entities.

Yellow: Transform component. Usually you only have to modify the top set of coordinates and size floats, the bottom set immediately changing to match.

Cyan: The "FFFFFFFF" can be changed to a text string ID, which causes it to display that string in the infobox GUI element, just like doors that warn you about abandoning jobs. If you land on the spire point then jump off, a Sly icon will appear and hover over it. The "00000007" behaves just like the "00000001" in climb structs, however since only Sly can use them, it doesn't appear to serve much of a purpose. The values that emit blue sparkles for climbs also do the same thing here.

Green: Has not been researched.

Hang

Hang Interact
Data Structure
GameSly 2: Band of Thieves

Hangs, as in the interact Sly latches onto to swing on a round hook, have the smallest interact structs in the game. While they are independent of the actual hook model, they don't work unless placed near them. Note that this type of interact is actually the same as the Hook type, just using a different mode. The Mode byte can be found 0x124 from the start of its struct. 0 lets you swing from any direction, 1 lets you swing only from the front, 2 lets you swing only from the back, and 4 makes it act like a wall hook.

Red: Start of the struct, which contains important information such as the object's ID as well as various pointers to relevant data. The specifics of the various pointers have not been thoroughly researched, however 0x487A00 is a pointer to the entity list, this being required at +0x3C from the start of any struct to work directly with entities.

Yellow: Transform component as well as some unique floats. There's only one set of coordinates here.

Cyan: The "FFFFFFFF" can be changed to a text string ID, which causes it to display that string in the infobox GUI element, just like doors that warn you about abandoning jobs. The "00000007" behaves just like the "00000001" in climb structs, however since only Sly can use them, it doesn't appear to serve much of a purpose. The values that emit blue sparkles for climbs also do the same thing here.

Hook

Wall Hook Interact
Data Structure
GameSly 2: Band of Thieves

Hooks, as in the interact Sly latches onto to pull backwards and launch upwards, are differ only slightly from Hang interacts. While they are independent of the actual hook model, they don't work unless placed near them. Note that this type of interact is actually the same as the Hang type, just using a different mode. The Mode byte can be found 0x124 from the start of its struct. 0 lets you swing from any direction, 1 lets you swing only from the front, 2 lets you swing only from the back, and 4 makes it act like a wall hook.

Red: Start of the struct, which contains important information such as the object's ID as well as various pointers to relevant data. The specifics of the various pointers have not been thoroughly researched, however 0x487A00 is a pointer to the entity list, this being required at +0x3C from the start of any struct to work directly with entities.

Yellow: Transform component. Usually you only have to modify the top set of coordinates and size floats, the bottom set immediately changing to match.

Cyan: The second "FFFFFFFF" can be changed to a text string ID, which causes it to display that string in the infobox GUI element, just like doors that warn you about abandoning jobs. The "00000007" behaves just like the "00000001" in climb structs, however since only Sly can use them, it doesn't appear to serve much of a purpose. The values that emit blue sparkles for climbs also do the same thing here.

Crawl

Crawlspace Interact
Data Structure
GameSly 2: Band of Thieves

Crawlspaces, as in low-to-the-ground first person camera mode areas, only work if placed next to their intended crawlspace geometry, or perhaps any overhead geometry, potentially detected via raycast.[check]

Red: Start of the struct, which contains important information such as the object's ID as well as various pointers to relevant data. The specifics of the various pointers have not been thoroughly researched.

Yellow: Transform component as well as some unique floats. There's only one set of coordinates here.

Cyan: The "FFFFFFFF" can be changed to a text string ID, which causes it to display that string in the infobox GUI element, just like doors that warn you about abandoning jobs. The "00000007" behaves just like the "00000001" in climb structs. The values that emit blue sparkles for cilmbs also do the same thing here.

Green: An extremely large undocumented region containing many floats, likely controlling a raycast upwards or other unknown information.

Logo Triggers

Logo Interact
Data Structure
GameSly 2: Band of Thieves

Logo Interact Triggers, as in a sparkly icon representing the current character rendered in the game world, is a simple standalone object. Note that any logo placed above an object for the sole purpose of marking a mission objective (i.e. Sly logo above the engine in Episode 8's TNT Run job) is not an interact.

Red: Start of the struct, which contains important information such as the object's ID as well as various pointers to relevant data. The specifics of the various pointers have not been thoroughly researched, however 0x487A00 is a pointer to the entity list, this being required at +0x3C from the start of any struct to work directly with entities.

Yellow: Transform component. Usually you only have to modify the top set of coordinates and size floats, the bottom set immediately changing to match.

Cyan: The "FFFFFFFF" can be changed to a text string ID, which causes it to display that string in the infobox GUI element, just like doors that warn you about abandoning jobs. The "00000007" behaves just like the "00000001" in climb structs. The values that emit blue sparkles for climbs also do the same thing here. The pointer +0x114 from the start of the struct points to the script to run when using the interact. The address directly above it contains either nothing or a pointer to another interact. Nulling the pointer makes the interact disappear.

Sneak

Sneak Interact
Data Structure
GameSly 2: Band of Thieves

Sneak points, as in segments of sparkles that the Cooper Gang can shimmy along, are individual objects not attached to the ledge, however they do rely on the collision directly underneath them to function.

Red: Start of the struct, which contains important information such as the object's ID as well as various pointers to relevant data. The specifics of the various pointers have not been thoroughly researched, however 0x487A00 is a pointer to the entity list, this being required at +0x3C from the start of any struct to work directly with entities.

Yellow: Transform component. Usually you only have to modify the top set of coordinates and size floats, the bottom set immediately changing to match. Some extra data appears to be present as well.

Cyan: An region that appears to track what's on top of it. It constantly changes while not being interacted with, however responds to characters sneaking on it by only updating when they sneak along it.

Green: The "FFFFFFFF" can be changed to a text string ID, which causes it to display that string in the infobox GUI element, just like doors that warn you about abandoning jobs. If you land on the spire point then jump off, a Sly icon will appear and hover over it. The "00000007" behaves just like the "00000001" in climb structs. The values that emit blue sparkles for climbs also do the same thing here.

Magenta: An unbelievably long undocumented region that follows a semi-regular pattern of unknown purpose. In fact, this region is so long that it extends onwards past the second screenshot for about 100 more lines, which is where the struct ends.

Statue

Statue Interact
Data Structure
GameSly 2: Band of Thieves

Exclusive to a single job in Episode 4, these make Sly freeze in place (and slightly darken him, possibly as part of a cut mission element involving gray paint) to make him undetectable. Their initial animation is that of a wall sneak trigger, meaning they're likely the same thing, but with data for only one point. This allows Bentley and Murray to use them, but without the darkening or special stance.

Red: Start of the struct, which contains important information such as the object's ID as well as various pointers to relevant data. The specifics of the various pointers have not been thoroughly researched, however 0x487A00 is a pointer to the entity list, this being required at +0x3C from the start of any struct to work directly with entities.

Yellow: Transform component. Usually you only have to modify the top set of coordinates and size floats, the bottom set immediately changing to match. Some extra data appears to be present as well.

Cyan: The "FFFFFFFF" can be changed to a text string ID, which causes it to display that string in the infobox GUI element, just like doors that warn you about abandoning jobs. If you interact with the sneak point then stop, a Sly icon will appear and hover over it. The "00000007" behaves just like the "00000001" in climb structs. The values that emit blue sparkles for climbs also do the same thing here.

Ice Wall

Ice Wall Interact
Data Structure
GameSly 2: Band of Thieves

Exclusive to Episode 7, the interactable part of ice walls are a separate object, and can be found with a special pointer that exists specifically for them, which is at an offset of 0x1F18 from Sly's struct.

Red: Start of the struct, which contains important information such as the object's ID as well as various pointers to relevant data. The specifics of the various pointers have not been thoroughly researched, however 0x487A00 is a pointer to the entity list, this being required at +0x3C from the start of any struct to work directly with entities.

Yellow: Transform component. Usually you only have to modify the top set of coordinates and size floats, the bottom set immediately changing to match. Some extra data appears to be present as well.

Cyan: An undocumented region of considerable length, which seems to contain a similar pattern to an undocumented region in Wall Sneak structs, but with some differences.

Magenta: Yet another undocumented region, possibly a complement to the previous one.

Murray Pickup

Murray Pickup Interact
Data Structure
GameSly 2: Band of Thieves

On top of every object that Murray can pick up (as well as knocked-out guards) is a circle button interact with its sparkles and character icon disabled. This interact is its own entity not connected to the object itself, just like the rest of the circle button interacts. They've been made visible in the screenshots for this article for documentation purposes. The act of picking up objects involves a "glue object" that attaches the object to Murray's hands, the struct for this can be found at 0x2F7900 + 0x13EC + 0x0. This "glue object" also contains a pointer to the object currently being held, which can be found at 0x2F7900 + 0x13EC + 0x64 + 0x0.

Red: Start of the struct, which contains important information such as the object's ID as well as various pointers to relevant data. The specifics of the various pointers have not been thoroughly researched.

Yellow: Transform component.

Cyan: The controlling region for the interact. The 0x1 at the start enabled the character icon when you get close, but this is 0xFFFFFFFF when unmodified - it was modified to make them appear in screenshots. The 0xFFFFFFFF is can be set to any String ID to make the infobox appear when you get close, and it'll display that string. The 0x4 is the character usage value, likely a bitfield. 1 means only Sly can interact with it, 4 means only Murray, 6 means only Bentley or Murray, 7 or higher means everyone can interact with it. The 4-byte value below the character usage address will fill with the struct of the character that interacted with it. The rest of the struct has not yet been researched.

Magenta: A small region containing information that relates to what object should be picked up. The first pointer points the object itself. The second pointer points to a sort of "grab point" entity which dictates what to grab onto, this entity being spawned alongside the intended object. An example of one of these is pictured below.

Located at +0x50 from the start of these "grab point" entities is a pointer to the Transform3 Component (+0x5C +0x0) of the object to pick up. The value between the two pointers is the OID of the "grab point" entitiy. If you properly replace these pointers with that of another object, even objects that normally can't be picked up, it'll actually work.