dstemmer
Knight at Arms

Hello,
I just wanted to start a discussion about the 3 "extra" fields in animation sequences of module_animations.py that are not listed in the docstring at the top. If you notice there are 3 fields that are sometimes but not always present.
The first of the 3 "extra" fields is either 0 or defined by a function, "pack2f". Because "pack2f" always occurs with the arf_make_custom_sound or arf_make_walk_sound sequence flags, it seems to be related to sound. The pack2f function, as defined in header_animations.py, pack2f(a, b) just takes a and b, which are both decimal numbers between 0.0 and 1.0, multiplies each by 255 to get a byte value, and generates a number that is 2 bytes long with 'b' as the first half and 'a' as the second.
For example, in the "fall_right_front" animation there is "pack2f(0.47, 0.82)".
a = 119 = binary 01110111 = int(0.47 * 255)
b = 209 = binary 11010001 = int(0.82 * 255)
pack2f = (b << 8 | a) = 53623 = binary 11010001 01110111
Any ideas on how to interpret this?
The second of the 3 "extra" fields is a 3-int tuple. I believe these numbers to be related to the acf_displace_position animation flag - specifically I think it might refer to x, y and z distances to be displaced.
EDIT: Success! Change the "jump" animation in to this for a Super Mario 64-style long jump:
I trust all of you will find much more creative ways to abuse this 
The third of the three "extra" fields is somewhat of a mystery to me. It seems to have to do with cyclic animations. Any info would be appreciated.
I just wanted to start a discussion about the 3 "extra" fields in animation sequences of module_animations.py that are not listed in the docstring at the top. If you notice there are 3 fields that are sometimes but not always present.
The first of the 3 "extra" fields is either 0 or defined by a function, "pack2f". Because "pack2f" always occurs with the arf_make_custom_sound or arf_make_walk_sound sequence flags, it seems to be related to sound. The pack2f function, as defined in header_animations.py, pack2f(a, b) just takes a and b, which are both decimal numbers between 0.0 and 1.0, multiplies each by 255 to get a byte value, and generates a number that is 2 bytes long with 'b' as the first half and 'a' as the second.
For example, in the "fall_right_front" animation there is "pack2f(0.47, 0.82)".
a = 119 = binary 01110111 = int(0.47 * 255)
b = 209 = binary 11010001 = int(0.82 * 255)
pack2f = (b << 8 | a) = 53623 = binary 11010001 01110111
Any ideas on how to interpret this?
The second of the 3 "extra" fields is a 3-int tuple. I believe these numbers to be related to the acf_displace_position animation flag - specifically I think it might refer to x, y and z distances to be displaced.
EDIT: Success! Change the "jump" animation in to this for a Super Mario 64-style long jump:
Code:
["jump", acf_enforce_lowerbody|acf_displace_position,
[1.09, "jump", 22, 48, arf_blend_in_1, 0, (0, 10, 0), 0],
],
The third of the three "extra" fields is somewhat of a mystery to me. It seems to have to do with cyclic animations. Any info would be appreciated.