Making Custom Elevators for R&C1 Multiplayer
For the multiplayer mod I've made for Ratchet & Clank (2002), I wanted to recreate the behavior that the vanilla in-game elevators have. Basically, I wanted to have a platform the player can stand on they move with. The game doesn't move the player with mobys (Insomniac's name for "game objects") without extra work and configuration. It took me far too long to figure out how to properly configure mobys as elevators.
All mobys use the same 0x100-byte struct that the game engine reads to place and give behavior to mobys. This struct has info about which model type it is, flags, color, state, collision data, and much more. Importantly, it also has a pointer to the moby's update function, which is called every game tick to allow it to control its behavior.
Setting the right mode bit
The moby instance struct also has a field for flags, or mode_bits as Insomniac calls it. mode_bits decides a bunch of different properties for mobys like
