Page 1 of 1

Assistance with Melee animation Set [Solved]

Posted: Fri Jun 06, 2014 5:12 pm
by TWINKEYRUNAWAY
Hey guys, I was hoping someone could help me with this. My problem is that I munged a proper animation set for the unused rifle melee msh to my imp munged folder and yet the animation does not play for it. The only animation that plays is the grenade throw animation. It should perform a rifle butt animation similiar to dark times II's bothen spy or something you would see in sereja's maps. Im using a slightly modified version of the melee odf from BFX as a base for this. Ill go ahead and post what is relavent so that perhaps someone can assist me.

For starters we have the munge bat files, here is what mine look like:

Sample munge bat lines in animation folder (C:\BF2_ModTools\data_IC3\Animations\munge.bat):
Hidden/Spoiler:
@REM munge.bat
@REM Calls %1\munge.bat for all animation subdirectories

@REM soldier animation banks
@call munge_subdir.bat SoldierAnimationBank\spec
@call munge_subdir.bat SoldierAnimationBank\human_1
@call munge_subdir.bat SoldierAnimationBank\human_2
@call munge_subdir.bat SoldierAnimationBank\human_3
@call munge_subdir.bat SoldierAnimationBank\human_4
Sample munge.bat from the spec folder (C:\BF2_ModTools\data_IC3\Animations\SoldierAnimationBank\spec\munge.bat):
Hidden/Spoiler:
@call ..\munge_animation.bat "/keepframe0 /dest spec.zaf" Sides\imp
The only thing I have in my spec animations folder is the basepose.msh and the spec_melee_stand_attack1a (was known as human_melee_stand_attack1a before I changed the prefix to match the folder and munge.bat edited line). Now off to the sides folder itself (it should be mentioned that I did munge the animation to the appropriate place and the 3 spec animation files are in the sides munged folder.)

Here is the unit odf:
Hidden/Spoiler:
[GameObjectClass]
ClassParent = "imp_inf_default"

[Properties]
UnitType = "Scout"

AnimationName = "spec"

MaxHealth = 300.0
MaxSpeed = 8.0 // base forward speed
MaxStrafeSpeed = 6.0 // base right/left speed

WEAPONSECTION = 1
WeaponName = "imp_weap_inf_sniper_rifle"
WeaponAmmo = 7

WEAPONSECTION = 2
WeaponName = "ilp_weap_inf_commando_pistol"
WeaponAmmo = 0

WEAPONSECTION = 3
WeaponName = "imp_weap_inf_remotedroid"
WeaponAmmo = 1
WeaponChannel = 1

WEAPONSECTION = 4
WeaponName = "com_weap_Melee_Attack"
WeaponAmmo = 0
WeaponChannel = 1

VOUnitType = 44
and here is the modified melee odf's


com_weap_Melee_Attack:
Hidden/Spoiler:
[WeaponClass]
ClassLabel = "cannon"

[Properties]
GeometryName = "delta20"
HighResGeometry = ""

HUDTag = "hud_force_push"

RoundsPerClip = "0"
ReloadTime = "0.3"
HeatRecoverRate = "0.2"
HeatThreshold = "0.0"

FirePointName = "hp_fire"

TriggerSingle = "1"
ShotDelay = "0.3"
HeatPerShot = "0.0"
MaxPressedTime = "0.0"
AnimationName = "spec"

MinRange = 0
OptimalRange = 1
MaxRange = 2

LockOnRange = "2.0"
LockTime = "0.0"
AutoAimSize = "2.0"

SalvoCount = "1"
ShotsPerSalvo = "1"
SalvoDelay = "0.0"
SalvoTime = "0.0"
InitialSalvoDelay = "0.5" // must have one or no animation - Mike Z

FireAnim = "2"
InstantPlayFireAnim = "1"
OffhandWeapon = 1

TargetEnemy = "1"
TargetNeutral = "1"
TargetFriendly = "0"

TargetPerson = "1"
TargetAnimal = "1"
TargetDroid = "1"
TargetVehicle = "0"
TargetBuilding = "0"

AITargetPerson = "0"
AITargetAnimal = "0"
AITargetDroid = "0"
AITargetVehicle = "0"
AITargetBuilding = "0"

//SOUND
FireSound = "com_weap_throw"
//ReloadSound = ""
WeaponChangeSound = ""
ChangeModeSound = ""
FireEmptySound = ""
ChargeSound = ""
ChargeSoundPitch = "0.05"
OverheatSound = ""
OverheatSoundPitch = "0.5"
OverheatStopSound = ""

OrdnanceName = "com_weap_melee_ord"
EnergyDrain = 10.0

com_weap_melee_ord(The ordinance emitter):
Hidden/Spoiler:
[OrdnanceClass]

ClassLabel = "emitterordnance"

[Properties]

ConeLength = "3"
ConeAngle = "180"
FirstRadius = "0.0"
MaxTargets = "1" // Max number of targets to hit. Chaining is off so the damage will be split between the number of targets
NoChaining = "1" // No chaining - all bolts coming from the attacker

//OrdnanceSound = "com_weap_launcher_energy_dumbfire"

Damage = "350" // This is the min damage. Even if the initial damage is split between the number of targets, it will never go below this number for each target
MaxDamage = "350" // This is the max damage
JumpDeduction = "0" // No jump deduction. This is for chaining only
DamageThreshold = "0" // Always do damage (no threshold)
MaxJumpDistance = "0" // No max jump distance because the chaining is off

VehicleScale = "0.1"
ShieldScale = "1.0"
PersonScale = "1.0"
AnimalScale = "1.0"
DroidScale = "1.0"
BuildingScale = "0.1"

Push = "10.0"

PushDeadOnly = "0"

AffectFriends = "1"

//LightningEffect = ""
//LightningEffectScale = "0.25"
//NoTargetLightningEffectCount = "5" // The number of ligthning effects to display when the ordinance has no targets to hit
//NoTargetLightningEffectRandomSpread = "0.4" // The random rotation spread the ligthning effects does when the ordinance has no targets to hit

Re: Assistance with Melee animation Set

Posted: Fri Jun 06, 2014 5:32 pm
by Marth8880
TWINKEYRUNAWAY wrote:The only thing I have in my spec animations folder is the basepose.msh and the spec_melee_stand_attack1a (was known as human_melee_stand_attack1a before I changed the prefix to match the folder and munge.bat edited line).
Don't use the melee animation bank - those are really for combo animations only. Since your weapon is using OffhandWeapon = "1", you will need to append "_secondary2_upper" to the animation msh name (the 2 signifies the FireType = "2" line in the weapon's ODF, and "upper" tells the game to basically only use the keyframes for the bones on the upper-half of the body, or above the waistline in other words). You need to duplicate the msh for each stance for each common, primary animation bank (rifle, pistol, bazooka), or at least for the bank's your unit is using (rifle and pistol). Each bank should have a stand version and a crouch version.

In the end, your list of mshs should look like something along the lines of this:

evgethjuggernaut_bazooka_crouch_shoot_secondary2_upper.msh
evgethjuggernaut_bazooka_stand_shoot_secondary2_upper.msh
evgethjuggernaut_pistol_crouch_shoot_secondary2_upper.msh
evgethjuggernaut_pistol_stand_shoot_secondary2_upper.msh
evgethjuggernaut_rifle_crouch_shoot_secondary2_upper.msh
evgethjuggernaut_rifle_stand_shoot_secondary2_upper.msh

Re: Assistance with Melee animation Set

Posted: Fri Jun 06, 2014 5:44 pm
by TWINKEYRUNAWAY
Awesome, so all I need to do is bascially duplicate that single msh 6 times and rename them similair to what you just posted? Or will I need to get a different msh for the crouch mshs? I know that there is two unused melee mshs from the human4 folder, however I just got the human_melee_stand_attack1a from it. Will I need the second one for the crouch?

Re: Assistance with Melee animation Set

Posted: Fri Jun 06, 2014 5:47 pm
by Marth8880
TWINKEYRUNAWAY wrote:Awesome, so all I need to do is bascially duplicate that single msh 6 times and rename them similair to what you just posted?
Correct.

If you *really want*, you can create a separate 'crouch' version, but I don't think it's usually necessary.

Re: Assistance with Melee animation Set

Posted: Fri Jun 06, 2014 5:51 pm
by MileHighGuy
No, only name the mshs that are relevant to your weapon. If you used animationbank = "rifle" then you would use the ones with rifle in the name. I think you might be able to use the standing animation for crouch, just include the _upper.

EDIT: you don't need AnimationName = "spec" in your weapon odf. you use AnimationBank = "rifle" (or bazooka, pistol... whatever you need for your animation be used work).

also be sure to include the lines specifying the secondary anim in your weapon odf.

Re: Assistance with Melee animation Set

Posted: Fri Jun 06, 2014 5:56 pm
by Marth8880
MileHighGuy wrote:No, only name the mshs that are relevant to your weapon. If you used animationbank = "rifle" then you would use the ones with rifle in the name.
If the weapon uses OffhandWeapon = "1", the AnimationBank parameter is ignored. (Or the game crashes lol, pretty sure that can happen as well if you try to use both parameters.) He needs to duplicate the mshs for *at least* every single animation bank used by his unit's primary weapons, which is most likely rifle and pistol.

Re: Assistance with Melee animation Set

Posted: Fri Jun 06, 2014 6:02 pm
by MileHighGuy
Oh ok, I didn't know that. Listen to Marth. He's done it himself.

Re: Assistance with Melee animation Set

Posted: Fri Jun 06, 2014 6:07 pm
by Marth8880
MileHighGuy wrote:No, only name the mshs that are relevant to your weapon. If you used animationbank = "rifle" then you would use the ones with rifle in the name. I think you might be able to use the standing animation for crouch, just include the _upper.
Nevertheless, if this were a primary weapon, that would be definitely 100% correct. :thumbs:

Re: Assistance with Melee animation Set

Posted: Fri Jun 06, 2014 7:26 pm
by TWINKEYRUNAWAY
It works thank you two so much! One small problem I ran into is that this seems tp happen:

Image

He will have whatever weapon that is his primary appear on the other hand be it another rifle or pistol present during the swing animation. Is there a remedy for this? Do I need to edit something in the melee odf?

Re: Assistance with Melee animation Set

Posted: Fri Jun 06, 2014 7:29 pm
by Marth8880
Oh, just get rid of the GeometryName parameter's value in the weapon ODF. You'd change this:

Code: Select all

GeometryName = "delta20"
to this:

Code: Select all

GeometryName = ""

Re: Assistance with Melee animation Set

Posted: Fri Jun 06, 2014 7:39 pm
by TWINKEYRUNAWAY
Thank you marth. One more thing, will the ai be stupid and not use it the right way? From what I have gathered research wise is that there is a possibilite that they will hit thier own team mate for no reason and walk away. Love taps are cool and all but lol, maybe not during battles.

Re: Assistance with Melee animation Set

Posted: Fri Jun 06, 2014 7:49 pm
by Marth8880
My geth use their melee excellently. Make sure TargetFriendly is set to 0, and you might also consider setting AffectFriends to 0 in the emitter ordnance ODF.

Here are my geth melee ODFs if you wanna just use them.

gth_weap_inf_melee.odf
Hidden/Spoiler:
[code][WeaponClass]

ClassLabel = "cannon"
GeometryName = ""

[Properties]
GeometryName = ""
HighResGeometry = ""
HUDTag = "hud_power_melee"

RoundsPerClip = "0"
ReloadTime = "0.3"
HeatRecoverRate = "0.2"
HeatThreshold = "0.0"

FirePointName = "hp_fire"

TriggerSingle = "1"
ShotDelay = "0.4"
HeatPerShot = "0.0"
MaxPressedTime = "1.0"

MinRange = 0
OptimalRange = 1
MaxRange = 2

LockOnRange = "2.0"
LockTime = "0.0"
AutoAimSize = "2.0"

SalvoCount = "1"
ShotsPerSalvo = "1"
SalvoDelay = "0.0"
SalvoTime = "0.0"
InitialSalvoDelay = "0.2" // must have one or no animation - Mike Z

FireAnim = "2"
InstantPlayFireAnim = "1"
OffhandWeapon = 1

TargetEnemy = "1"
TargetNeutral = "1"
TargetFriendly = "0"

TargetPerson = "1"
TargetAnimal = "1"
TargetDroid = "1"
TargetVehicle = "0"
TargetBuilding = "0"

AITargetPerson = "1"
AITargetAnimal = "1"
AITargetDroid = "1"
AITargetVehicle = "0"
AITargetBuilding = "0"

//SOUND
FireSound = "melee_swing"
//ReloadSound = ""
ChargeSound = ""
ChargeSoundPitch = "0.05"
OverheatSound = ""
OverheatSoundPitch = "0.5"
OverheatStopSound = ""

OrdnanceName = "gth_weap_inf_melee_ord1"[/code]
gth_weap_inf_melee_ord1.odf
Hidden/Spoiler:
[code][OrdnanceClass]

ClassLabel = "emitterordnance"

[Properties]

Explosion = "gth_weap_inf_melee_exp"

ConeLength = "2.5"
ConeAngle = "180"
FirstRadius = "0.0"
MaxTargets = "1" // Max number of targets to hit. Chaining is off so the damage will be split between the number of targets
NoChaining = "1" // No chaining - all bolts coming from the attacker

Damage = "250" // This is the min damage. Even if the initial damage is split between the number of targets, it will never go below this number for each target
MaxDamage = "250" // This is the max damage
JumpDeduction = "0" // No jump deduction. This is for chaining only
DamageThreshold = "0" // Always do damage (no threshold)
MaxJumpDistance = "0" // No max jump distance because the chaining is off

VehicleScale = "0.1"
ShieldScale = "0.85"
PersonScale = "1.0"
AnimalScale = "0.7"
DroidScale = "1.0"
BuildingScale = "0.1"

Push = "0.5"
PushDeadOnly = "0"
AffectFriends = "1"

//LightningEffect = ""
//LightningEffectScale = "0.25"
//NoTargetLightningEffectCount = "5" // The number of ligthning effects to display when the ordinance has no targets to hit
//NoTargetLightningEffectRandomSpread = "0.4" // The random rotation spread the ligthning effects does when the ordinance has no targets to hit[/code]
gth_weap_inf_melee_exp.odf
Hidden/Spoiler:
[code][ExplosionClass]
ClassLabel = "explosion"

[Properties]
Damage = "0.0"

DamageRadius = "0.0"

Push = "0.0"
PushRadius = "0.0"

Shake = "1.2"
ShakeLength = "0.65"
ShakeRadius = "3.3"

Effect = "com_sfx_melee_impact"

VehicleScale = "0.0"
PersonScale = "0.0"
DroidScale = "0.0"
ShieldScale = "0.0"
AnimalScale = "0.0"
BuildingScale = "0.0"

SoundProperty = "geth_punch_md"
[/code]