Results 1 to 13 of 13

Thread: anim_sound_event converter

  1. #1
    Artifex
    Patrician

    Join Date
    Oct 2008
    Location
    London, UK
    Posts
    1,332

    Default anim_sound_event converter

    Full anim_sound_event<->txt converter now available on etwng, by Primergy's request.

    Use it just like all my other converters:

    jruby ase_unpack file.anim_sound_event file.txt
    jruby ase_pack file.txt file.anim_sound_event

    It's a really simple format, here's conversion of men/sword_shield/sws_face_up_getups/sws_fu_get_up_fast.anim_sound_event

    [
    [
    [0.337, 24],
    [0.928000032901764, 24],
    [1.44800007343292, 28],
    [2.116, 24],
    [3.065, 29],
    [3.29, 22],
    [3.908, 22],
    [4.71, 22],
    [5.153, 22],
    [5.455, 29],
    [5.686, 22],
    ]
    ]

    Format uses double container, but top level array seems to always be just one element -
    simply ignore the fact that it's always double nested, unless you find some file which has multiple
    arrays in it.

    Floats are presumably seconds, integers refer to something in another file, but I have no idea what would that be.

  2. #2
    Primergy's Avatar Protector of the Union
    Join Date
    Mar 2009
    Location
    Augsburg
    Posts
    2,491

    Default Re: anim_sound_event converter

    Floats are presumably seconds, integers refer to something in another file, but I have no idea what would that be.
    Propably one of the entries in the sound xmls or the database or sound_event.

    But thank you very much .

  3. #3
    The Hedge Knight's Avatar Fierce When Cornered
    Artifex

    Join Date
    Oct 2009
    Location
    England
    Posts
    5,875

    Default Re: anim_sound_event converter

    Its certainly not the xml's or the tsv's (for napoleon at least)
    My bet is the sound bank and sound bank database files.

    First column = time?

    Second = sound id?

    Actually look

    Marker name: Footstep_Turn
    Position: 337 ms
    Type: Generic

    Marker name: Footstep_Turn
    Position: 928 ms
    Type: Generic

    Marker name: hand_grab
    Position: 1 s 448 ms
    Type: Generic

    Marker name: Footstep_Turn
    Position: 2 s 116 ms
    Type: Generic

    Marker name: Equipment_Rattle
    Position: 3 s 65 ms
    Type: Generic

    Marker name: Footstep_Walk
    Position: 3 s 290 ms
    Type: Generic

    Marker name: Footstep_Walk
    Position: 3 s 908 ms
    Type: Generic

    Marker name: Footstep_Walk
    Position: 4 s 710 ms
    Type: Generic

    Marker name: Footstep_Walk
    Position: 5 s 153 ms
    Type: Generic

    Marker name: equipment_rattle
    Position: 5 s 455 ms
    Type: Generic

    Marker name: footstep_walk
    Position: 5 s 686 ms
    Type: Generic


    Corresponds perfectly with that from ntw animations folder
    Last edited by The Hedge Knight; February 02, 2011 at 05:01 PM.

  4. #4

    Default Re: anim_sound_event converter

    taw, could you please update the code for S2TW?
    In ETW/NTW it works perfectly, but i can't convert it for S2TW. This is the error i get:
    RuntimeError: Format Error, trying to read past end of file
    get at ase_unpack:26
    get_u4 at ase_unpack:37
    block in parse at ase_unpack:46
    each at org/jruby/RubyRange.java:495
    map at org/jruby/RubyEnumerable.java:830
    block in parse at ase_unpack:46
    each at org/jruby/RubyRange.java:495
    map at org/jruby/RubyEnumerable.java:830
    parse at ase_unpack:45
    save_to_txt at ase_unpack:61
    <main> at ase_unpack:71

  5. #5
    Artifex
    Patrician

    Join Date
    Oct 2008
    Location
    London, UK
    Posts
    1,332

    Default Re: anim_sound_event converter

    It was a very simple format in ETW so I can take a quick look. It shouldn't be too bad.

  6. #6

    Default Re: anim_sound_event converter

    Quote Originally Posted by taw View Post
    It was a very simple format in ETW so I can take a quick look. It shouldn't be too bad.
    I will appreciate it a lot! Thanks. I am going to use it for looking at the sound database together with the animation sound events. All credit goes to you off course. Thanks a lot!

  7. #7
    Artifex
    Patrician

    Join Date
    Oct 2008
    Location
    London, UK
    Posts
    1,332

    Default Re: anim_sound_event converter

    I added converter.

    There seem to be two variants of the format in Shogun 2:

    Format v2 is:
    * int 2 - version number
    * int : count of what's below
    * count times (float, int, int) tuples


    Format v3 is:
    * int 3 - version number
    * int - it's fairly large and I have no idea what it is, some offset to some file? It's not float or date or anything else obvious
    * int : count of what's below
    * count times (float, int, int) tuples

    So I'm decoding this [3, A, 2, x0, y0, z0, x1, y1, z1] into text file like:

    [
    3,
    A,
    [x0, y0, z0],
    [x1, y1, z1],
    ]

    And v2 format [2, 2, x0, y0, z0, x1, y1, z1] into text file like:

    [
    2,
    [x0, y0, z0],
    [x1, y1, z1],
    ]


    That last number of each tuple can be big or small. Generally all values in file are same or a bunch of values in a run are same, then some other run of different numbers etc.

    Middle number is always small.

    I'll leave it to you to figure out what those numbers all mean.

  8. #8

    Default Re: anim_sound_event converter

    +rep. Do i have the download it at your github page (etw master)?
    EDIT: Yep, saw it at the etwng repository. Thanks.
    Last edited by izzi; September 30, 2018 at 08:29 PM.

  9. #9

    Default Re: anim_sound_event converter

    The script works, thanks. I still need to understand how sound events and the anim_sound_events are related.

  10. #10
    Artifex
    Patrician

    Join Date
    Oct 2008
    Location
    London, UK
    Posts
    1,332

    Default Re: anim_sound_event converter

    I just write converters, you'll have to do the research how it all fits together ��

  11. #11

    Default Re: anim_sound_event converter

    Don't worry much about it. I was actually talking to myself...One other question: I have been using crux3D symphony tool to extract an repack the sounds_packed file in the sound folder. It does work, but in S2TW, many fields are unknown. Not like in ETW/NTW where you can clearly see all data. Do you have any idea why that is?

  12. #12
    Artifex
    Patrician

    Join Date
    Oct 2008
    Location
    London, UK
    Posts
    1,332

    Default Re: anim_sound_event converter

    You'll have to ask crux3D, I know nothing about that.

  13. #13

    Default Re: anim_sound_event converter

    Quote Originally Posted by taw View Post
    You'll have to ask crux3D, I know nothing about that.
    Sadly, he isn't there around anymore. But no prob. I already have decoded some of the info.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •