Northon on 1/7/2006 at 10:43
Hi all,
Turns out that the death animation bug is related to the InitialHavokState property under Physics. If it is changed on a particular AI to Havok_Falling, Havok_Flying, Havok_Ghost or Havok_HavokControlled instead of Havok_Walking that AI won't exhibit the save/load death animation bug.
My theory now is that when the AIs transition into the Havok_Walking state a flag (which isn't preserved between loads) gets set that allows them to play death animations. So by making the inital state something else, the transition will always occur immediately after the mission load when the AI scripts change the state to whatever it's supposed to be (most likely Havok_Walking).
So for now we have a simple fix which is to change the InitialHavokState property under Pawn->AIPawn->Physics to one of the states listed above (maybe Havok_Falling since it seems fairly harmless).
Note that death animations will still abort when the AI collides with its sword or the player (which happens a lot during back-stabbing), but at least they will start, and this aborting behavior isn't so much a bug as it is an intended feature of the animation/physics system.
Before this fix is unleashed on the public I think some additional investigation and testing is in order. Has anyone ever run those AI diagostics under AIPawn->DiagnosticsOn? I would be interested to see if they would shed any more light on this problem by possibly listing the state transitions made by the AI.
Vigil on 1/7/2006 at 10:57
Excellent detective work! :)
(Having never played around with the TDS editor and thus having no real idea what is involved in this), would it be possibly to binary-patch the original missions to set the initial physics state for all the AIs?
Crispy on 1/7/2006 at 13:50
Unless I miss my guess, it's merely a gamesys change and so it should be quite easy to distribute. People would just have to download the modified T3Gamesys.t3u (2MB unzipped, IIRC it compresses fairly well) and drop it into their Thief3\SYSTEM directory. The only complication is that many other mods (like Minimalist) change the gamesys too, but that's not a huge issue.
It occurs to me that it might be useful to know the format of the gamesys file; then we could write programs to make these simple changes without interfering with existing changes - it'd be superior to simple patch utilities because those utilities require the file you're patching to be identical to the source file of the patch. A program that actually knows how the gamesys format works would hae no such restriction. Maybe I'll play around with it if I have time.
Great work Northon! Your explanation makes a lot of sense.
New Horizon on 1/7/2006 at 14:40
Wow, that's a truly excellent find. :) Great work. I was positive that I tested that out myself, but perhaps I over looked it. I'll have to add it to minimalist, and give you the proper credit of course. :)
Northon on 3/7/2006 at 06:40
The fix doesn't seem to work with torch guards. I'm trying to find out why. If anyone could help me out here that'd be great. My inexperience with T3Ed is starting to show (I don't even know how to save changes to triggger scripts so they will appear in the game).
Ziemanskye on 3/7/2006 at 10:45
Could that just be the obvious that they're touching the torch all the time?
A new script - make the torches havok_physics none to start with then return it to normal when the dude get's killed/KOed/slips on oil/whatever?
(maybe with a slight pause, so he can do his death animation thing, then drop it)
Northon on 3/7/2006 at 21:58
Quote Posted by Ziemanskye
Could that just be the obvious that they're touching the torch all the time?
A new script - make the torches havok_physics none to start with then return it to normal when the dude get's killed/KOed/slips on oil/whatever?
(maybe with a slight pause, so he can do his death animation thing, then drop it)
The only problem with that theory is that the death animations on the torch guards will play properly until the game is loaded from a save.
Ziemanskye on 4/7/2006 at 18:43
Why will that change it?
The dude's HavokFalling or whatever you set it too, the torch is HavokNone so it's not interfering, so long as you do it on the gamesys version, right?
I'm probably not understanding the problem, the solutions or what you've already tried, so don't worry about it. Was just a suggestion - sometimes the easy answer gets overlooked because you expect it to be hard :D
Northon on 4/7/2006 at 19:58
I'm trying to completely understand why my fix works for everyone but the torch guards. If it were simply a matter of the torches interfering with the death animations by bumping into the guard then the question remains: why do they still play before the game gets loaded? There must be something happening, as a result of the game load, that lets my fix work for regular guards but not torch guards. Figuring out what this 'something' is will be in the key to fixing the death animation bug in greater generality.
Here are some experiments I've already done:
-if I remove the 'drop Torch and add to physics' action in the torch scripts, the AI holds onto the torch as he dies and *will* play his death animation properly
-if I instead remove the 'set AIPathBlocking to cylinder' action it does nothing
Obviously the first item is not a fix as it is a script change (and thus would be nearly impossible to distribute) and it alters the game in an undesirable way (the guard doesn't drop the torch)
Someone could really help me out by making the pagans in the Kurshok mission into torch carriers and have them drop off the staircase the way I described in one of my previous posts and see if they still exhibit the bug.
Shoshin on 28/7/2006 at 20:49
I'm very curious if any more progress has been made on this.
At the least, can a patch be made for TDS that fixes the death animation bug for all non-torch carrying AI?