SlyCooperReloadCoded

Joined 8 October 2023
no edit summary
No edit summary
No edit summary
Line 3:
== Multi-game stuff: ==
 
'''''Trigger Functionality Swap/Disable'''''
 
Some triggers that don't have to do with damage or death can be found by searching for the start of the struct of the character that just touched it. For example, Sly's struct in island_map in the September build is 0xCACA40, so search for a value of "CACA40". These triggers store this info near the top of their struct. It's a value of 00000000 when no character has touched it. If you find it and scroll up a bit, you'll see a visibility value that begins with 1 instead of 0. Go -0x2C from there and you'll end up at the start. If there's something other than 00000000 at the start of a trigger's struct, freezing that to 00000000 and doing a full reload should disable that trigger's functionality. If it doesn't, setting its visibility works too. Usage examples include disabling the tilt_hall trigger that crashes the game in freeroam, or disabling the cracking of the thin ice that surrounds Canada 1. Note that triggers such as job start beacons or the barrier preventing you from flying too far in ACES don't use this system.
 
Some map objects such as boats and bouncy pads have something here too. Sometimes they're related to job scripting, sometimes they're related to player interactivity, and sometimes something completely unknown. However, if you take note of two objects with differing values here, swapping can sometimes make them act like each other. For example, if you do this with a bouncy awning and a rowboat in A Black Chateau, the awning won't bounce but will make rowboat noises, and the rowboat will bounce you to the same location the awning used to. Lots of things crash with this method though.
 
'''''Potential Murray Slam/Throw Hardcoded Theory'''''
 
The damage types for Murray slamming and throwing guards is hardcoded in both Sly 2 and Sly 3, just like Sly 3's death barriers. Code controls the damage and its type, rather than it being stored in an entity struct. Diablo Fire Slam, the gadget that makes Murray slam a held guard into flames, is a duplicate of the ability, but isn't hardcoded, and stores its damage type and amount in an entity struct.
 
While not a theory that attempts to give a precise reason what about slamming and throwing requires hardcoding, it is important to note that many damage type values changed a lot over the course of both Sly 2's and Sly 3's development, yet the damage type values for Murray slamming and throwing guards never changed at any point. From Sly 2 July to Sly 3 retail, they've always been the same.
 
'''''Everything is a Damage Plane'''''
 
I really do mean everything, even the map itself! Every object has a collision byte (0001 = Non-solid, 0000 = Solid, 0008 = Automatically set when standing on it after making it solid), a default damage amount of -10, and a damage type of 00000000, which is the "None" type. This is why you'd never suspect it! If you give it a type, touching that object does that type. If you change the amount, that works. If you change the collision byte to 0001, that object no longer has collision.