[VS 4.2.5 OSX] Corrupt VED file (ghost animation frames)

  • #1, by F_KalFriday, 14. April 2017, 19:15 3 years ago
    Last night I was finalizing a series of cross-triggered animations, adding/shifting frames around, attaching actionparts and choosing sound effects when at some point I realized that there are some ghost frames and sounds that play even though they no longer appear in the timeline for me to manipulate! Opening the .ved file in sublime text indicates that there are still references of the ogg file in question... Here's a frame that definitely shouldn't exist:
    <AnimationFrame name="ahamoment - Property Frame" id="185" order="2" lastModified="-1" AnimationFrameIndex="6" AnimationFrameSound="audio/sfx/button_press.ogg" AnimationFrameSoundVolume="73" AnimationFrameSoundBalance="0"> <AnimationFrameAction parentLink="T" id="116" tableId="7" LinkAny="F"/> </AnimationFrame>
    Regarding this particular animation that is quite small and easy to debug here are a few possible culprits (I'm unsure what is the cause since I'm not familiar with the ved file format internals) 
    - In the Editor the timeline displays 6 frames, but in the file there are 7 <AnimationFrames> defined
    - Each <AnimationFrame> has a unique AnimationFrameIndex="0" to "6.  There are only 6 <sprites> defined though
    - each frame has an order property defined but no frame has oder="1" - They start from order="0" to order="7" skipping "1"
    - The frame sequence implied by the order of elements in <AnimationPropertyFrames>, is different to that of the order property and in turn different to the that defined by the AnimationFrameIndex...

    Any suggestion on how to move on from here? I was hoping not to have to delete all animations and recreate them anew, but I also need to know that there is longer anything that propagates the corruption...

    Forum Fan

    107 Posts


  • #2, by F_KalFriday, 14. April 2017, 19:28 3 years ago
    Here's a pastebin with all the related data - any help is appreciated!
    Mostly I'm more insterested in understanding how to fix this though by understanding a bit about the internals of VED files - and also prevent it from happening again...

    Forum Fan

    107 Posts

  • #3, by AlexFriday, 14. April 2017, 23:22 3 years ago
    there seems to be a bug when deleting an animation frame and a following frame contains frame properties. I'm currently working on a fix.

    The properties of an animation frame (AnimationFrame table) are linked to the animation by the AnimationFrameIndex. So in your case the entry with AnimationFrameIndex="6" should not be here anymore, because your animation only has frames from 0 to 5.

    Although I don't think this specific entry is the reason your sound file ("audio/sfx/button_press.ogg") is played because the animation frame containing this sound is never shown (frame with index 6).

    Great Poster

    378 Posts

  • #4, by F_KalSaturday, 15. April 2017, 00:10 3 years ago
    Thank you @Alex for looking into it!

    I use only a few instances of the button_press.ogg audio and all of them were far away from the problematic area. To test whether it was indeed the particular AnimationFrame that was being triggered or not, I renamed (in sublime text) the button_press.ogg into a different audio file that I use nowhere else. I did that only for the entry with AnimationFrameIndex="6" and now I'm affirmative that it is the particular AnimationFrame that is being triggered since I can hear the sound clearly (even though it doesn't appear in the editor). Perhaps, the editor ignores the frame as it should but the player doesn't...?

    Now back to your last message - 
    a) until you fix the bug, what you are suggesting is that I should avoid deleting frames that precede frames with Action Parts or Audiofiles. And this way, I should be okay - Am I correct?
    b) If I just delete (inside sublime), the whole <AnimationFrame> </AnimationFrame> with AnimationFrameIndex="6" will this be enough to restore balance in the force?
    ..or..
    c) Shouldn't I also delete the <Link> entry with id="185"from the following section too?

    [AnimationPropertyFrames]
        ....
        [Link parentLink="T" id="185" tableId="28" LinkAny="F"/]
        ....
    [/AnimationPropertyFrames]
       
    Again thank you for your help, it's much appreciated!!

    Forum Fan

    107 Posts

  • #5, by AlexSaturday, 15. April 2017, 01:31 3 years ago
    very strange, so far I could not reproduce this in the player (animation frame index for frame which does not exist). Anyway, the bug is now fixed, so this should not be a problem anymore with the next update.
    a) right. same problem also exists when moving animation frames.
    b + c) yes, you need to do both. but be very careful when editing the ved file and always make a backup

    Great Poster

    378 Posts

  • #6, by F_KalSaturday, 15. April 2017, 02:04 3 years ago
    Thank you Alex! I'll give it a go tomorrow and get back to you!

    For what it's worth, I'm using the 4.2.5 OSX free version (so the player is the one that run when you press Cmd+F9 from within the editor) - but now that you mention it, I just tested it on 5RC0 for OSX and it has the exact same behavior: The Editor doesn't show the frame, but when running it (Cmd+F9) you can hear it!

    Cheers!

    Forum Fan

    107 Posts

  • #7, by F_KalSaturday, 15. April 2017, 12:33 3 years ago
    Thank you Alex! 
    Tinkering with the .VED has worked; I'm back on track now :-)

    Forum Fan

    107 Posts

Write post