Page 1 of 1

Shipped Common Animations

Posted: Sun Mar 22, 2009 2:30 pm
by MasterFang1
I have a few quick questions, if I edited or changed stuff in Shipped Common Animations found in BFBuilder, would all the sides I munged use these new animations. I need to know how I would actually reference new anims.

Re: Shipped Common Animations

Posted: Sun Mar 22, 2009 2:41 pm
by giftheck
No, they need to be munged, placed inside the _BUILD_PC folder and then they are used by munge.bat when making your mod's "common.lvl". Unless, you are making a mod for the main game, in which case, you need Battlebelk's "Interface Tool", replace the munged files in "munged". Copy over the "munge_animation.bat" from the DataTAT3/Common/Animations folder.

Re: Shipped Common Animations

Posted: Sun Mar 22, 2009 2:45 pm
by MasterFang1
I'm trying to change the basic human animations such as the roll, jump etc. I found them in Shipped Common Animations but I'm not sure what to do. Where are the common animations located in the compiled swbf?

Re: Shipped Common Animations

Posted: Sun Mar 22, 2009 2:53 pm
by giftheck
Animations (as the game recognises them) are stored in "Data\_LVL_PC\Common\ENG\Common.lvl" and are called as the game needs them. So to bring new anims into the game you have to recompile common.lvl. I have been experimenting and have been partially successful with it so far.

In any case there's no guarantee they will work. I imported the ATRT driver animation, and the only thing working about it is that the sitting is correct, even if the unit does not move with the ATRT.

Re: Shipped Common Animations

Posted: Sun Mar 22, 2009 2:59 pm
by MasterFang1
I was working on getting the BF2 forward roll into BF1 but im not sure where to start.

btw- ggctuk do you have xfire?

Re: Shipped Common Animations

Posted: Sun Mar 22, 2009 3:02 pm
by giftheck
Nope, no xfire.

As for the BF2 roll, which one? Forward, or side? I don't think BF1 supports the forward roll since rolling is mapped to Jump.

Re: Shipped Common Animations

Posted: Sun Mar 22, 2009 3:03 pm
by MasterFang1
The forward roll in BF2, I was trying to get that in BF1 and also could i somehow replace laying down with the BF2 sprint?

Re: Shipped Common Animations

Posted: Sun Mar 22, 2009 3:05 pm
by giftheck
I think the code for BF2 was actually changed to allow this. If not, it was certainly defined by shell.lvl, which we don't have source files for.

Re: Shipped Common Animations

Posted: Sun Mar 22, 2009 3:12 pm
by MasterFang1
New unit animations in BF1 would be a huge breakthrough. I'll keep working on it.

EDIT:hmm i found a file in C:\BF2_ModTools\data_MODNAME\_BUILD\Common called munge_sprites. Is that something to do with the .sprite files? I thought bf2 didn't use .sprite..?

Re: Shipped Common Animations

Posted: Sun Mar 22, 2009 3:19 pm
by giftheck
.sprite is, I believe, exactly what it says - a sprite (static 2D image). Sprites are used in BF1 for the HUD and targeter, I believe, and not for anims, like everyone thought. But BF2 uses 2D models, not sprites.

Re: Shipped Common Animations

Posted: Sun Mar 22, 2009 3:24 pm
by MasterFang1
Im sorta confused, but would it be possible SOMEHOW to use the Interface tool to munge a BF2 animation into common.lvl? I just wanna know if the tool is capable of it.

Re: Shipped Common Animations

Posted: Sun Mar 22, 2009 3:28 pm
by giftheck
Yes. You just need to find the correct Human Animation folder. Also, in "Shipped Common Animations", copy over the DataTAT3 "Commom/Animations/mungeanimation.bat", and you will also have to edit the batch file inside Human Animation folder itself (munge.bat) to save the file to Data/_BUILD_PC/Common/munged.

Here's what my munge.bat for human_bank1 has inside it (granted I placed all my assets inside the "Data" folder in the first place, you may need to edit the destination for it):

Code: Select all

@call ..\munge_animation.bat "/keepframe0 /dest human_animation_1.zaf /comp_debug 0 /debug" ..\..\..\_BUILD_PC\common

pause

Re: Shipped Common Animations

Posted: Sun Mar 22, 2009 3:32 pm
by MasterFang1
Bare with me here im a n00b.
Ok so I have a folder in \Interface_Tool\Data\Common named Animations, and I have the munge_animation.bat in that. Would this work?
Heres my bat file:

Code: Select all

@REM called from $\Animations\subfolder\
@REM   all params are passed to zenasset
@REM   if there are more than 9 parameters to pass, you can enclose all params in double quotes

@setlocal
@set PATH="%CD%"\..\..\..\..\ToolsFL\Bin;%PATH%

zenasset /multimsh %~1

binmunge -inputfile *.zaa -chunkid zaa_ -ext zaabin -outputdir %2\munged\
binmunge -inputfile *.zaf -chunkid zaf_ -ext zafbin -outputdir %2\munged\

del *.zaa
del *.zaf

@endlocal
Can i start putting ZAABIN and ZAFBIN files in and they will munge?

Re: Shipped Common Animations

Posted: Sun Mar 22, 2009 3:34 pm
by giftheck
If you've got the "Animations" folder, and then the "munge_animation.bat" in there, you just need to modify the "Munge.bat" inside the Animation folder to point to Interface_Tool's _BUILD_PC folder.

Re: Shipped Common Animations

Posted: Sun Mar 22, 2009 3:36 pm
by MasterFang1
but how would I do that exactly? I've never really edited .bat files before. Do i edit these lines?

Code: Select all

@REM called from $\Animations\subfolder\
@REM   all params are passed to zenasset
@REM   if there are more than 9 parameters to pass, you can enclose all params in double quotes

@setlocal
@set PATH="%CD%"\..\..\..\..\ToolsFL\Bin;%PATH%

zenasset /multimsh %~1

binmunge -inputfile *.zaa -chunkid zaa_ -ext zaabin -outputdir %2\munged\
binmunge -inputfile *.zaf -chunkid zaf_ -ext zafbin -outputdir %2\munged\[/color]

del *.zaa
del *.zaf

@endlocal

Re: Shipped Common Animations

Posted: Sun Mar 22, 2009 3:39 pm
by giftheck
No, you don't need to edit the "munge_animation.bat" file. Go inside the folders containing the .msh files and edit the file "munge.bat". It's just simple text editing, really.

/.. means go up a directory, if you're not sure (IE, if I were in Data/Common/Animations in Command Promt and entered /.. or ../ I would go to Data/Common)

Re: Shipped Common Animations

Posted: Sun Mar 22, 2009 3:41 pm
by MasterFang1
what .msh files? i thought we were dealing with zafbin and zaabin files here..?

Re: Shipped Common Animations

Posted: Sun Mar 22, 2009 3:45 pm
by giftheck
Raw animations are stored as .msh files inside the "Shipped Common Animations" folder. These are not yet munged, so can be edited. zaabin and zafbin are output when you munge them.

Re: Shipped Common Animations

Posted: Sun Mar 22, 2009 3:47 pm
by MasterFang1
I'm just trying to bring in BF2 files, i can't make my own. So what would be the best way to do that with the tool?

Re: Shipped Common Animations

Posted: Sun Mar 22, 2009 4:02 pm
by giftheck
Copy over the .msh files from BF2's animation banks, but you have to match them up. I don't know if that means putting them inside the equivalent folder in BF1 (IE human_1 => Human_Bank1) or whether you have to find the bank with similar states (standing, or in this case rolling). Then you hit "munge.bat" and it dumps the .zaabin and .zafbin files into the destination folder.

I've just noticed the diveroll is actually in BF1.