User:SlyCooperReloadCoded: Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
No edit summary
No edit summary
Line 1: Line 1:
'''Personal scratchpad - the results of my experiments and findings can be found here. inb4 some of this leads to massive discoveries.'''
'''Personal scratchpad - the results of my experiments and findings can be found here. inb4 some of this leads to massive discoveries, heck some of it already is!'''


== Multi-game stuff: ==
== 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 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:


'''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.
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.
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.

This means that there's really not much of a difference between a normal map object and what we know of as a "damage plane". If the "current texture assigned to model" pointer is found, then it might be possible to give invisible damage planes a texture. Think about it, there's practically no difference between an invisible damage plane and a body of water:

Water:

- A defined shape
- Has toggle-able collision
- Has a standard damage plane struct
- Doesn't move or change state
- Always loaded, never pooled
- Has a water texture

Damage Plane:

- A defined shape
- Has toggle-able collision
- Has a standard damage plane struct
- Doesn't move or change state
- Always loaded, never pooled
- Doesn't have a texture assigned

I believe this course of action may be how damage planes are made visible. In fact, I've already found a probable candidate in memory for this, a region that hasn't been documented - offset 0x390 from the start of at least Episode 4 Hub's water. Lots of things in here cause seizure-inducing visual bugs and crashes when changed, however there's a float of 0.05 near the top which is the texture scroll speed, making me think one of these floats control the texture. It also links up to a complex section containing blocks that modify chunks of water? I haven't touched that area too much, but it seems promising.


== Sly 2 stuff: ==
== Sly 2 stuff: ==