Animation and scaling problems. [Solved]

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
User avatar
Dakota
Field Commander
Field Commander
Posts: 991
Joined: Mon Dec 06, 2010 8:21 pm
Projects :: making random weapon assets
Games I'm Playing :: SWBF2 and more
xbox live or psn: PS3 beats xbox
Location: at a computer desk floating around in space

Animation and scaling problems. [Solved]

Post by Dakota »

i've added an AT-TE to geonosis for my era mod, for some reason, it won't read the animations, it keeps saying that there are no animations for it in the error log.

i've also been trying to scale the dark trooper model by 1.5, i've set up the model itself and made custom animations for it, but again the animations have problems, for the unit has the same skeleton of a regular sized unit even with the odf line to make the skeleton 1.5 times bigger, the animation has only made the character float a bit while standing still and sink back when walking or firing.

i've been having animation problems since i started modding, if someone could tell me what i could be doing wrong, i'd apreciate it.

the reason i'm using the atte is because my MTT would explode randomly after getting a certain distance from where it spawned (like a circle, it could be the vehicle spawn that i made in zeroeditor). if i get that figured out before the atte problem i may just use the MTT instead of going through all of the animation problems.

heres the odf for the trooper
Hidden/Spoiler:
[GameObjectClass]
ClassParent = "imp_inf_default"

[Properties]
PointsToUnlock = 25

MaxHealth = 2500.0

MaxShield = 500
AddShield = 10

SkeletonName = "Big"
SkeletonLowRes = "Big"
AnimationName = "Big"

SkeletonRootScale = "1.5"
SkeletonRootScaleLowRes = "1.5"
CollisionRootScale = "1.5"

MaxSpeed = 5.0 // base forward speed
MaxStrafeSpeed = 4.0 // base right/left speed

JumpHeight = 0.5

EnergyBar = 100.0
EnergyRestore = 10.0
EnergyRestoreIdle = 10.0


WEAPONSECTION = 1
WeaponName = "rep_weap_inf_rifle"
WeaponAmmo = 0

WEAPONSECTION = 2
WeaponName = "imp_weap_inf_rocket_launcher"
WeaponAmmo = 0

WEAPONSECTION = 3
WeaponName = "imp_weap_inf_sticky_bomb"
WeaponAmmo = 10

WEAPONSECTION = 4
WeaponName = "imp_weap_inf_wrist_rocket"
WeaponAmmo = 20
WeaponChannel = 1

WEAPONSECTION = 5
WeaponName = "rep_weap_inf_wrist_rocket"
WeaponAmmo = 20
WeaponChannel = 1

WEAPONSECTION = 6
WeaponName = "gorbital"
WeaponAmmo = 1
WeaponChannel = 1

WEAPONSECTION = 7
WeaponName = "com_weap_inf_grav"
WeaponAmmo = 0

VOUnitType = 43
Last edited by Dakota on Fri Jun 08, 2012 5:21 pm, edited 1 time in total.
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: animation and scaling problems.

Post by Marth8880 »

You need to add "/scale 1.5" to your custom animations' munge.bat. For example:

Code: Select all

@call ..\munge_animation.bat "/keepframe0 /scale 1.5 /dest bdroid.zaf /comp_debug 0 /debug" Sides\gth
Also, this may seem like a stupid question, but are your AT-TE's .anims, .zafbin, and .zaabin files in its side's "munged" folder?
User avatar
Dakota
Field Commander
Field Commander
Posts: 991
Joined: Mon Dec 06, 2010 8:21 pm
Projects :: making random weapon assets
Games I'm Playing :: SWBF2 and more
xbox live or psn: PS3 beats xbox
Location: at a computer desk floating around in space

Re: animation and scaling problems.

Post by Dakota »

i already did the 1.5 scale for the animations, thats why the unit floats when idle, and yes the files for the animations are in the side folders. its also the stock atte odf with weapon changes and shielding.

with the trooper, i have a feeling it has something to do with the skeleton of the model, i'm not sure, but i just think it could be causing a problem.

edit: i just wanted to make note that the animation files for the atte are in the side's build folder, i am not sure why it still doesn't work, should i add the animations to the world itself?
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: animation and scaling problems.

Post by Fiodis »

No, you needn't add the animations to the world. Are you sure you have all the required memory pools filled out? EntityWalker, EntityCommandWalker (or something like that), and any others?
User avatar
Dakota
Field Commander
Field Commander
Posts: 991
Joined: Mon Dec 06, 2010 8:21 pm
Projects :: making random weapon assets
Games I'm Playing :: SWBF2 and more
xbox live or psn: PS3 beats xbox
Location: at a computer desk floating around in space

Re: animation and scaling problems.

Post by Dakota »

yes, they are set up correctly in the lua
FragMe!
Gametoast Staff
Gametoast Staff
Posts: 2244
Joined: Sat May 13, 2006 12:34 am
Projects :: Not sure keep changing my mind.
Games I'm Playing :: F1 and SWBF
xbox live or psn: No gamertag set
Location: Origin name GT_FragMe
Contact:

Re: animation and scaling problems.

Post by FragMe! »

Are you calling the ATTE from the Rep side or a custom side, you only need to call it from the Rep side even if you have a customized side on your map.

For the other animation problem, you said you made custom animations, what skeleton did you use? Did you scale the skeleton in xsi? If you did, did export a new scaled basepose? If you exported a new scaled basepose and are using a whole new animation set then you do not need the scale parameter in the munge.bat file. If you are using a set of custom scaled animations and stock animations then you will run into problems.

A good example of a scaled unit is the all_inf_marksperson, she uses all the base animations that all the other units use but she has her own scaled (via xsi) skeleton. There is no scale parameter in the animation munge.bat but has the scale lines in the odf. Wookiee is an example of a scaled up unit. Once again custom basepose but uses standard animations.
User avatar
Dakota
Field Commander
Field Commander
Posts: 991
Joined: Mon Dec 06, 2010 8:21 pm
Projects :: making random weapon assets
Games I'm Playing :: SWBF2 and more
xbox live or psn: PS3 beats xbox
Location: at a computer desk floating around in space

Re: animation and scaling problems.

Post by Dakota »

i called the atte from my imp side on geonosis. should i re-add a rep side and add the atte and associated files to it?

for the trooper i was following this tutorial:
http://www.gametoast.com/forums/viewtop ... 27&t=11546

i based my animations off of the human animations (i compiled almost all of them into one) and changed the part on all of them that said human into big and then set the scale lines up in the munge.exe and then munged, pasted the animations in both of the folders i needed them in, scaled up the model with the -scale line in the msh.option, then set up the odf like it is above.

the main reason i thought it could be the skeleton is because i'm not all that sure on what it does, it just looks to me that the unit needs a bigger skeleton for its body, as of now it just looks the height of a regular unit with a 1.5 times bigger body, which sometimes floats off the ground.

thing is i'm just really not sure if i did everything right, too.
User avatar
lucasfart
Sith
Sith
Posts: 1440
Joined: Tue Feb 24, 2009 5:32 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Australia

Re: animation and scaling problems.

Post by lucasfart »

Erm. The AT-TE is in the rep side...Just load the stock rep.lvl in your imperial lua and only add the AT-TE. A lot easier/more efficient then adding it to a custom side...unless you want to edit it as well. :P
FragMe!
Gametoast Staff
Gametoast Staff
Posts: 2244
Joined: Sat May 13, 2006 12:34 am
Projects :: Not sure keep changing my mind.
Games I'm Playing :: F1 and SWBF
xbox live or psn: No gamertag set
Location: Origin name GT_FragMe
Contact:

Re: animation and scaling problems.

Post by FragMe! »

lucasfart of course meant your maps mode lua :wink:

If you are just adding some custom animations but every thing else is stock you only need to include the customs in your animation munge, everything else is resolved automatically.
Like the Imp officer or the Magnaguard
Also have a look at this:
http://www.secretsociety.com/forum/down ... System.txt
It is a bit of a read but it explains a lot.
User avatar
lucasfart
Sith
Sith
Posts: 1440
Joined: Tue Feb 24, 2009 5:32 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Australia

Re: animation and scaling problems.

Post by lucasfart »

FragMe! wrote:lucasfart of course meant your maps mode lua :wink:
Heh. Of course! :)
FragMe! wrote: Also have a look at this:
http://www.secretsociety.com/forum/down ... System.txt
It is a bit of a read but it explains a lot.
That is quite a useful doc! I haven't looked at that one before.
User avatar
Dakota
Field Commander
Field Commander
Posts: 991
Joined: Mon Dec 06, 2010 8:21 pm
Projects :: making random weapon assets
Games I'm Playing :: SWBF2 and more
xbox live or psn: PS3 beats xbox
Location: at a computer desk floating around in space

Re: animation and scaling problems.

Post by Dakota »

lucasfart wrote:Erm. The AT-TE is in the rep side...Just load the stock rep.lvl in your imperial lua and only add the AT-TE. A lot easier/more efficient then adding it to a custom side...unless you want to edit it as well. :P

well, i was editing it, so i guess a custom rep.lvl it is.

@FragMe: i'm still confused on what i should do, i read the document, but i don't have a clue of what i'm exactly supposed to do. i wanted just the fett animations at 1.5 size, i can't use just the stock ones as other units i have are using it. i'll try redoing the animations but if it doesn't work i would have no idea what to do next.



EDIT: i found out now why nothing i did ever worked even when i did everything right. all i needed to do was put the scale lines in the imp_inf_heavy instead of imp_inf_default_heavy... i guess it needed to have the model name or something, anyway i have my scaled trooper working great, he doesn't even float off the ground randomly.

EDIT2: the atte works now too, thanks.

all i need to do now is get rid of the shine on the dark trooper's jet pack, i made the model transparent and even scaled it to 0 but the shine is still there.
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: animation and scaling problems.

Post by Fiodis »

If you go into the Dark Trooper msh file, you'll see that the 6th byte over after the second and third ATRBs both have a value of 04, which is render specular. Change one or both (I'm not sure which, experiment) to 00 and the shine should vanish.
Source
User avatar
Dakota
Field Commander
Field Commander
Posts: 991
Joined: Mon Dec 06, 2010 8:21 pm
Projects :: making random weapon assets
Games I'm Playing :: SWBF2 and more
xbox live or psn: PS3 beats xbox
Location: at a computer desk floating around in space

Re: animation and scaling problems.

Post by Dakota »

it worked for my one on the imperial side but on the alliance side it didn't. :?

i had previously hex edited the pack away on that one and set it to use the all tga instead of the imp tga (they are just 2 different skins, one for each team). also i only saw one 04 in both of them after the third ATRB and not after the second.

EDIT: never mind, i had the msh in both the msh and msh/pc folders and only edited the one in the msh folder, it works now, thanks.
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: Animation and scaling problems. [Solved]

Post by Fiodis »

I don't think there's any particular need to have two copies of the msh file, since you're only modding for PC anyway.
User avatar
Dakota
Field Commander
Field Commander
Posts: 991
Joined: Mon Dec 06, 2010 8:21 pm
Projects :: making random weapon assets
Games I'm Playing :: SWBF2 and more
xbox live or psn: PS3 beats xbox
Location: at a computer desk floating around in space

Re: Animation and scaling problems. [Solved]

Post by Dakota »

i know, i think i just added it in a few months ago trying anything i could think of to get things to work right.
Post Reply