TUTORIAL: Dunk.act file

Resources for NBA Live 2005.

TUTORIAL: Dunk.act file

Postby CarolusXCI on Sat Mar 16, 2024 12:53 pm

Dunk.act is a file from /ai/aiact.viv that contains dunk and layup animation entries, as well as parameters used to reproduce them during games. It can be exported from the aiact.viv file using EA Graphics Editor or BigGUI, edited using notepad and then imported back using the same tools.

It is comprised of three sections, as follows:

Code: Select all
DUNK
dunktable
72
8
18

(…)

15
32
12


This section stores the total amount of entries in the dunk.act file (see "72" after "dunktable"), as well as the number of entries for each dunk package. I will come back to it in a minute. Important thing is, if these numbers don't reflect the actual number of entries in the file, it will crash your game.

Code: Select all
3
22
10
SNRBLK1HDNKBHNDSTUFF
SNRBLK1HDNKFRNTSWAT
SNRBLK1HDNKSIDESTUFF
SNRBLK2HDNKBHNDSWAT
SNRBLK2HDNKFRNTSTUFF
SNRCOLAIR1HDNKFRNTBIG
SNRCOLAIR2HDNKFRNTBIG
SNRCOLAIRLAYBHNDBIG
BACKDOWNHI
BACKDOWNLO
5
SNRBLK1HDNKBHNDSTUFF
SNRBLK1HDNKFRNTSWAT
SNRBLK1HDNKSIDESTUFF
SNRBLK2HDNKBHNDSWAT
SNRBLK2HDNKFRNTSTUFF

4
BACKDOWNLO
BACKDOWNHI
SNRCOLAIRLAYBHNDBIG
SNRBLK2HDNKBHNDSWAT


I don't know what this is for, but those are mainly scenario (i.e. 2-man) animations for in-air collisions and blocks. If someone knows what this is for, let me know. I never noticed any difference when changing these.


And finally, by far the most important part:

Code: Select all
DNKBIG2F1HBASIC
70
9
DUNK_REG
-
-
-
-
x
-90
70
0
10.4
-
-
-
-
-
-
-
-
x
0.5
1.2
x
-
-
-
-
-
-
-
-
x
-
x
-
-
-
x
x
-
x
-
F
-
0

(...)



This section is where animation entries (with their respective parameters) are stored. Here I am only showing the first entry, but in the original dunk.act there are 72 of these (hence the number “72” at the beginning of the file).

For each entry, there are 47 lines in total. Each line represents a different parameter, which can be broken down as follows:

1) Animation name

These can be found on xmcpdnk.ord and xmcpdnk2.ord files stored within /anim/body/xanims.viv.
I will come back to this later.

2) Angle orientation of player with respect to the rim (in degrees)
3) Position orientation of player with respect to the rim (unit is arbitrary)

Change these only if you know what you are doing.

4) Animation type. This parameter can assume one of the following values:
DUNK_REG – Regular dunks
DUNK_ALLEYOOP – Alley-oop dunks
DUNK_TIPIN – Tip-in dunks (put backs)
LAY_REG – Regular lay-ups, off the glass
LAY_FINGER – Finger roll lay-ups, no glass
LAY_REVERSE – Lay-ups performed from one side of the rim to the other
LAY_ALLEYOOP – Alley-oop lay-ups

If you want to either change pre-existing entries, or add some more, make sure that all the DUNK_REG entries come first, then DUNK_ALLEYOOP ones, then DUNK_TIPIN, and so forth, following the order above. Otherwise the game won’t recognize the animations properly.

5) Does it change hands? (“x” = yes, “-” = no)

This determines whether the player will dunk/lay up with the left hand after having last dribbled with the right (and vice-versa)

6) Does it hang on the rim? (“x” = yes, “-” = no)

Self explanatory. Animations where the player hangs on the rim can have the their rim-hanging frames not played out, but the results are really weird. On the other hand, if you try to add a “hang on the rim” instruction to an animation that does not have rim-hanging frames, it will crash your game.

7) Does the animation weirdly warps towards the rim? (“x” = yes, “-” = no)

This is exactly what this does. It is useful for some standing dunks though.

8) Animation triggering when player is behind the basket? (“x” = yes, “-” = no)

9) Animation triggering when player is moving?
“x” = only moving, “n” = only standing still, “-” = indifferent

10) Angle to the basket: min
11) Angle to the basket: max

Both given in degrees. These parameters determine the area where the animations can be triggered (there will be more parameters for this later on). Without having to sketch anything, these two values determine the area and position of an arc (with the rim as the focal point) where the animation occurs.

A value of "0" represents a straight line from one rim to the other; positive values extend the arc to the right of this line, while negative values extend it to the left.

Example: if minimum is “-45” and maximum is “45”, this means that the animation will only be triggered in-between the elbows. Likewise, if the parameters are set as “-5” and “5” respectivelly, it means that the animation will be mostly triggered when the player is driving from the top of the key straight to the hoop. I hope this is clear enough...

Do not mistake these parameters with parameter on Line 2; those are different angles for different things.

12) Unknown. Always “0” anyway.

13) Rim height (in feet). Normally lay-ups have this below 10, and dunks somewhere between 10 and 10.6

14) Reverse/baseline dunk
15) 360 dunk
16) Power dunk
17) Tomahawk dunk
18) Windmill dunk
19) Two-handed dunk
20) Double clutch dunk


Those are Booleans used to determine how Marv Albert will react to the dunk.
“x” = yes, “-” = no
Parameter 16, “Power dunks” also dictates how much the backboard will shake after the dunk:
“x” = a lot, “-” = not much

21) Animation can be triggered when player has his back to the basket? (“x” = yes, “-” = no)

22) Animation can be triggered after player performs a pro-hop/drop step? (“x” = yes, “-” = no)

23) Distance to the basket: min
24) Distance to the basket: max


Initially I thought they were given in feet, but they are most likely given in an arbitrary unit varying from animation to animation. Similar to Lines 10 and 11, this determines how close and how far away from the basket the player has to be in order to trigger the animation. “0” is right at the basket. “2” is far away, but still at reasonable distance. Most animations have min and max values in-between.

25) Animation can be triggered if there is someone in front of the player? I.e., the “he serves up a facial!” situations. (“x” = yes, “-” = no)

Now, from Lines 26 to 43: those represent dunk packages. There are 18 in total. An “x” means that the dunk package contains the animation, and obviously “-” means that it doesn’t. Dunk packages for each player can be changed on PLAYERS.DBF; if you are interested on this, please check the available resources on the NLSC wiki.

In this case, dunk packages look like this:

26) Dunk package 0 - Nobody has it
27) Dunk package 1 - Nash, Arroyo
28) Dunk package 2 - Payton, Parker
29) Dunk package 3 - Divac, Kukoc
30) Dunk package 4 - Iverson, Marbury
31) Dunk package 5 - Diaw, Najera
32) Dunk package 6 - Nowitzki, A. Walker
33) Dunk package 7 - Pierce, Ginobili
34) Dunk package 8 - Gasol, Webber
35) Dunk package 9 - C. Anthony, Marion
36) Dunk package 10 - Garnett, Stoudemire
37) Dunk package 11 - Francis, B. Davis
38) Dunk package 12 - Bryant, Richardson
39) Dunk package 13 - LaFrentz, Okur
40) Dunk package 14 - Boozer, Dampier
41) Dunk package 15 - S. O'Neal, Mourning
42) Dunk package 16 - J. Erving
43) Dunk package 17 - Yao, Bradley

Now, do you remember the first section of the dunk.act file? After “dunktable”, there is the TOTAL number of animation entries in the file (“72” by default), then the number of entries for EACH one of the 18 dunk packages. Therefore, after you modify the dunk packages in the animation entries section, the values from the start of the file must also be changed accordingly. Pro-tip: Excel is your friend, use it.

44) Unknown

45) Directional button for triggering the animation (F = forward, B = back)

Originally, most of them are “F”. Animations with “B” are useful for when the player is behind the basket.

46) Does the animation cause a camera zoom? (“x” = yes, “-” = no)

47) Unknown. Always “0” anyway.

_________________________________________

Importing animations from other games

The NBA Live 2005 engine has been used for a number of EA Sports games, namely NBA Live 06 and March Madness 2005, 06 and 07 on the PS2. As such, dunk and lay-up animations from these games are compatible with Live 2005. Additionally, Live 2005 supports Live 2004 dunk/lay-up animations too.


How do you import those to your game?

It is important to mention that you CANNOT import individual animations. They only come bundled together, meaning that if you want only ONE dunk from MM07, you will need to have all of them.

As briefly mentioned before, these “bundles” are animation files that are found stored within other files, xanims.viv and xsyms.viv, located in the anim/body folders of any of the games I just mentioned. To access them, I recommend using BigGUI (you can find it in the download section).

So let’s suppose you have a copy of Live 2004 and you want to have its dunk animations in Live 2005. In this case, install Live 2004, then go to the /anim/body folder and grab both xanims.viv and xsyms.viv files.

Next, starting off with xanims.viv: open it with BigGUI; there you will find a bunch of different files that have different purposes; in this case we want to grab “xmcpdnk.ord” and “xmcpdnk2.ord”. Select both, then click on Edit -> Export. Save wherever you want. After that, do the same with xsyms.viv: open it with BigGUI and export “xmcpdnk.orl” and “xmcpdnk2.orl”.

Now we need to import these files to our 2005 installation. Still with BigGUI, open xanims.viv FROM LIVE 2005, then Edit -> Import both .ord files we exported earlier. After that, hit File -> Rebuild. Do the same for xsyms.viv, importing the .orl files and rebuilding afterwards. Be careful with the file extensions!

You now have 2004 dunks/layups loaded into your 2005 animation files. Now you need to edit dunk.act file to reflect these changes. Luckily, 2004’s dunk.act has the same structure as 2005’s, so you can use exactly the same file. The same goes for MM2005-07. This also means that the present tutorial is also applicable to those games.

On the other hand, Live 06’s dunk.act has a little more than 47 lines per entry; the extra lines are related to the freestyle superstar types, which must be removed before you import the dunk.act into your 2005 installation.

At this point you must be wondering: how the heck do I know animation names and what they look like?

You can always check the names of available animations names by opening .ord files we exported earlier with a hex editor. The names will be right at the beginning of the file. As for knowing which animation corresponds to which name… well, this involves a lot of research and documentation. Luckily, someone already did all this work (me):

phpBB [video]


Those are the default 2005 dunks/layups; the animation names you can find in the video description. If you reached this part of the tutorial and want to have animation names from 2004, 06 and some MM’s as well, let me know; I have also documented those.
_________________________________________


That is a basic overview of how dunks and layups work in the game. There are some additional details here and there, but the tutorial covers most of thing one needs to know in order to change these anims.
This topic was moved from NBA Live 2005 by Andrew on Sat Mar 16, 2024 2:50 pm.
User avatar
CarolusXCI
 
Posts: 370
Joined: Sat Nov 19, 2011 11:23 pm
Location: Austria, Brazil

Re: TUTORIAL: Dunk.act file

Postby Andrew on Sat Mar 16, 2024 2:52 pm

Great stuff, thanks for sharing! As I said in the Discord, it's awesome to have this info even all these years later, especially with the growing interest in updating old favourites as an alternative to modern titles.
User avatar
Andrew
Retro Basketball Gamer
Administrator
 
Posts: 113954
Joined: Thu Aug 22, 2002 8:51 pm
Location: Australia


Return to NBA Live 2005 Tutorials & FAQs

Who is online

Users browsing this forum: No registered users and 1 guest