OffhandAnimations and Odf weapons

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
MetalcoreRancor
Brigadier General
Brigadier General
Posts: 628
Joined: Thu Jun 07, 2007 11:13 am
Projects :: No Mod project currently.
Games I'm Playing :: swbf origin
xbox live or psn: No gamertag set

OffhandAnimations and Odf weapons

Post by MetalcoreRancor »

Ok, so I've come to make a post about this about 3 times now, but each time I thought "no, If I try this or that first, it may work.."

Well now that I have exhausted all routes I have come to make an actual post on this.

I have been trying to make more then 1 secondary weapon function with a melee unit, that uses a DIFFERENT animation, as there is FIRE, FIRE2 and CHARGE in the combo to be used.

After trying many many things I have come to the conclusion that the documentation was right.
// OffhandAnimation defines an animation that replaces weapon use
// animations. For example, replacing the FIRE, FIRE2 or CHARGE
// animations with our own animations when a character has
// this lightsaber equipped means that, for example,
// we can replace the FIRE animation with a force-using
// animation, that the weapon will then play instead of
// rifle firing. FIRE and FIRE2 are the 2 animations a weapon
// can use – look at com_weap_inf_force_pull or _push for
// an example (the “FireAnim =” line).

// If you are replacing FIRE and FIRE2 or CHARGE, they MUST
// be replaced IN ORDER or FIRE will override everything else.


OffhandAnimation("stand_useforce", "FIRE")
{
Loop("FinalFrame");
AimType("Torso");
BlendInTime(0.15);
BlendOutTime(0.15);
}
OffhandAnimation("stand_useforce", "FIRE2");
OffhandAnimation("stand_useforce", "CHARGE");
So what is the proper order, is it 0,1,2 or 1,2,3, or does he mean the combo OffhandAnimations in order? Because this is how mine look, and Thrust is overriding everything currently.


OffhandAnimation("stand_useforce", "FIRE");
OffhandAnimation("stand_thrust");
//OffhandAnimation("stand_useforce", "CHARGE");
//{
// Loop("FinalFrame");
// AimType("Torso");
// BlendInTime(0.15);
// BlendOutTime(0.15);
//}

Now, for the weapons I'm using this with, to describe them I shall.

I have currently a Speed based areaeffectweapon, And a Stab areaeffectweapon, with Stun settings. both of these use stand_thrust, and it works because Thrust is overriding everything right now. Here is my lines in either for how they get the anim working:

Stab
Hidden/Spoiler:
DisplayRefire = "0"
EnergyDrain = "10.0"
FireType = "Press"
InitialSalvoDelay = "0.5"
//ChargeMaxTime = "0.0"
//ChargeMinStrength = "0.0"
MaxTargets = "3"
AreaType = "Ray"
AreaRange = "2.5"
AreaRadius = "1.0" // -> 20 degree arc
AreaHeight = "4.0"
EffectDamage = "850.0"
EffectType = "Stun"
EffectStrength = "110.0"
EffectFalloff = "10.0" // when firing, move at half speed
OffhandWeapon = 1
InstantPlayFireAnim = 1
AnimationBank = "melee"
FireAnim = "stand_thrust"
//CustomAnimationBank = "stand_thrust"
TriggerSingle = "1" // if FireType = "Hold" this will work correctly now - Mike Z
Speed
Hidden/Spoiler:
MaxTargets = "1"
AreaType = "Sphere"
AreaRange = "1.0"
AreaRadius = "1.0" // -> 20 degree arc
AreaHeight = "1.0"
EffectDamage = "0.0"
EffectType = "Stun"
EffectStrength = "130.0"
EffectFalloff = "42.0"
ThrustFactor = "18.5" // when firing, move at half speed
TurnFactor = "9.0"
//FireAnim = ""
OffhandWeapon = 1
InstantPlayFireAnim = 1
TriggerSingle = "1" // if FireType = "Hold" this will work correctly now - Mike Z
My dilemma began when I tried to copy stab, but use a different animation. And it would use the thrust one instead. So I changed it from areaeffectweapon to cannon, in hopes of using the expanded animation options as Push has, to work with. But nomatter what I do it will either NOT play any animation, or use the same one that Stab uses. Any thoughts on what I'm doing wrong, or what I haven't done, or something? Anything would be helpful :)

The difference in the second attack, aside from being cannon stuff
Hidden/Spoiler:
OffhandWeapon = 1
InstantPlayFireAnim = 1
AnimationBank = "melee"
FireAnim = "1"
//ComboAnimationBank = "FIRE2"
TriggerSingle = "1" // if FireType = "Hold" this will work correctly now - Mike Z
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: OffhandAnimations and Odf weapons

Post by Maveritchell »

Use some different type of animation, like bazooka, rifle, etc.
MetalcoreRancor
Brigadier General
Brigadier General
Posts: 628
Joined: Thu Jun 07, 2007 11:13 am
Projects :: No Mod project currently.
Games I'm Playing :: swbf origin
xbox live or psn: No gamertag set

Re: OffhandAnimations and Odf weapons

Post by MetalcoreRancor »

I tried changing the AnimationBank to rifle and it didnt play any animation, but I'm continueing to play around with it.
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: OffhandAnimations and Odf weapons

Post by Maveritchell »

It can't be an offhand weapon and have a different animationbank at the same time. The OffhandWeapon = X line is used to determine whether the offhand animation (force, grenade, buff, whatever is assigned) is played.
MetalcoreRancor
Brigadier General
Brigadier General
Posts: 628
Joined: Thu Jun 07, 2007 11:13 am
Projects :: No Mod project currently.
Games I'm Playing :: swbf origin
xbox live or psn: No gamertag set

Re: OffhandAnimations and Odf weapons

Post by MetalcoreRancor »

This is my weapon, and it's just playing the anim of holding a rifle. I'd like to somehow pick another offhandanim from the combo. Thats what I was setting out to do here, at least.
Hidden/Spoiler:
[WeaponClass]

ClassLabel = "cannon"

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

//MuzzleFlash = "med_muzzle_flash"
FlashColor = "80 80 255 255"
FlashLength = 0.025
FlashLightColor = "220 220 255 175"
Discharge = "med_smoke_effect"

//RoundsPerClip = "32"
RoundsPerClip = "0"
ReloadTime = "0.0"

HeatPerShot = "0.0" // only allow player to fire every 5 seconds
HeatRecoverRate = "0.2"
HeatThreshold = "0.01"

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

DisplayRefire = "0"
EnergyDrain = "15.0"
//FireType = "Press"

OrdnanceName = "hnt_weap_swipe_ord"

TriggerSingle = "1"
ShotDelay = "0.5"
HeatPerShot = "0.0"
MaxPressedTime = "0.0"

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

SalvoCount = "1"
ShotsPerSalvo = "1"
SalvoDelay = "0.0"
SalvoTime = "0.0"

OffhandWeapon = 0
InstantPlayFireAnim = 1
AnimationBank = "rifle"
FireAnim = "1"
//ComboAnimationBank = "huntermelee"
TriggerSingle = "1" // if FireType = "Hold" this will work correctly now - Mike Z

TargetEnemy = "1"
TargetNeutral = "0"
TargetFriendly = "0"
TargetPerson = "1"
TargetAnimal = "1"
TargetDroid = "1"
TargetVehicle = "0"
TargetBuilding = "0"


RecoilLengthHeavy = "0.25"
RecoilStrengthHeavy = "2"
RecoilDecayHeavy = "0.0"

FireSound = "force_choke_fire"
//ReloadSound = ""
WeaponChangeSound = ""
ChangeModeSound = ""
FireEmptySound = ""
ChargeSound = ""
ChargeSoundPitch = "0.05"
OverheatSound = ""
OverheatSoundPitch = "0.5"
OverheatStopSound = ""
Post Reply