Last week I started poking around at the RBA files again, which are the animation files which control movement of accessories in levels, such as doors, lifts, the crusher on Sumo, monorail on Outskirts, dock loader, bridge and robot arm on Reprocessor, etc. It turned out Errol had already figured out most of the file format, so working together we finished it off and then figured out what all the variables were used for. There's a few oddities left to figure out but it's 99% there and I've been adding import & export support for it in my MaxScript tools. Unfortunately it seems I'm having some issues with the exported rotation and position data not being exactly as it is in 3DSMax but as the files actually worked and gave an amusing result, I figured I would post about the progress.
I used the Robot Arm as a test because it's one of the more complicated animations in the game, here it with the RBA imported into 3DSMax:
Notice at one point the hand rotates backwards through the arm? Yeah, I thought that was an error in my importing code too but it just so happens to be how the thing was animated in the first place. Gee, aren't there any competent animators working on this game? FIX IT SCi! ;P Anyway, re-exporting the same animation crashes the game so I figured there's some issue with the way the animations are put together by my code and knocked up this simpler animation to test it out:
Which led to this unfortunate series of events when I was testing it (I changed the robot arm to trigger the animation when it's touched):
Fun times. Anyway, I'm going to try and get the code fixed up and working properly, after that it means it will be possible to do such things as porting C2 levels like the Airport and Funfair which have planes, rollercosters, etc. Possibly also drone cars too. Also it would open the doors to creating dynamic levels which change based on events, such as fissures opening in the ground, buildings collapsing, giant robots attacking cities, catapults which launch cars across the map, etc. A world of possibilities come from being able to animate accessories!