Use melee animations for non-melee sets? [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
commanderawesome
Field Commander
Field Commander
Posts: 971
Joined: Tue Aug 13, 2013 11:58 pm
Projects :: Skin Changer - Warfront - Other stuff
Games I'm Playing :: SWBF SWTOR KotOR EaW
xbox live or psn: AaTc_CmdrAwesome
Location: The Universe

Use melee animations for non-melee sets? [Solved]

Post by commanderawesome »

Is it possible to, say, replace the pistol firing animation with one of the saber slash animations? Because i'm trying to make a weapon based off the BFX knife (chargeable and cannot block things) but is two handed.
Last edited by commanderawesome on Thu Jul 03, 2014 3:58 pm, edited 1 time in total.
JimmyAngler
High General
High General
Posts: 837
Joined: Mon Nov 04, 2013 10:37 am
Projects :: Battlefront Halation
Games I'm Playing :: SWBF 1-2-2015
xbox live or psn: none
Location: Area 51

Re: Use melee animations for non-melee sets?

Post by JimmyAngler »

Why not just use a combo? Here is one that was used in the HaloFront v0.2 that might suit you.

The Combo:
Hidden/Spoiler:
OffhandAnimation("stand_throw", "FIRE")
{
Loop("FinalFrame");
AimType("Torso");
BlendInTime(0.15);
BlendOutTime(0.15);
}
OffhandAnimation("stand_useforce", "FIRE2");
OffhandAnimation("none", "CHARGE");

State("IDLE")
{
Duration(0.0); // infinite duration
EnergyRestoreRate(); // (0.0, "FromSoldier")
InputLock(0.15, "Sprint", "Jump", "Crouch");

Transition("BACK_ATTACK")
{
If()
{
Break(); // all transitions are breaking if Duration is 0
Posture("Stand", "Crouch");
Button("Fire", "Press");
Thrust(">", 0.25);
ThrustAngle(135, 225);
}
}
Transition("ATTACK1")
{
If()
{
Break(); // all transitions are breaking if Duration is 0
Posture("Stand", "Crouch");
Button("Fire", "Press");
}
}
}

State("BACK_ATTACK")
{
Posture("Stand");
Animation("stand_attack_backwards")
{
BlendInTime(0.15);
BlendOutTime(0.15);
}

Sound("com_weap_melee_swing", 4, "Frames");

Duration(35, "Frames");

InputLock("All", "!Thrust");
AlignedToThrust();
Attack()
{
DamageTime(6, 10, "Frames");
DamageLength(1.5);
DamageWidth(0.75);
Damage(5000);

Push(0.0);
}

Attack()
{
DamageTime(17, 22, "Frames");
DamageLength(1.5);
DamageWidth(0.75);
Damage(800);

Push(0.0);
}

Transition("IDLE");
}

//Forward declare animations to allow BlendTimeTo references:
Animation("stand_vaderdash");
Animation("stand_obiwan1b");
Animation("stand_obiwan1b_end");
Animation("stand_gam_guard");

// Vader's dash attack - NOT _full
State("ATTACK1")
{
Posture("Stand");
Animation("stand_vaderdash")
{
//SyncType("sidious1");
BlendInTime(0.15);
BlendOutTime(0.15);
BlendTimeTo("stand_obiwan1b", 0.15);
}

Sound("com_weap_melee_swing");

AlignedToThrust();

Attack()
{
DamageTime(2, 7, "Frames");
DamageLength(1.5);
DamageWidth(.75);
Damage(5000);

Push(0.0);
}

Transition("ATTACK2")
{
If()
{
Break(13, "Frames");
TimeStart(5, "Frames");
TimeEnd(20, "Frames"); //, "SyncIfOvertime");
Posture("Stand");
Button("Fire", "Press");
}
}
Transition("IDLE");
}

// Obiwan final attack - _full
State("ATTACK2")
{
Posture("Stand");
Animation("stand_obiwan1b")
{
//SyncType("sidious1");
AimType("None");
BlendInTime(0.06);
BlendOutTime(0.15);
BlendTimeTo("stand_gam_guard", 0.3);
BlendTimeTo("stand_obiwan1b_end", 0.0);
}
Sound("com_weap_melee_swing");

//set a duration
AlignedToThrust();

// StrafeFactor(0.5);
// TurnFactor(0.5);

Attack()
{
DamageTime(-3, 7, "Frames");
DamageLength(1.5);
DamageWidth(0.75);
Damage(5000);

Push(0.0);
}

Transition("RECOVER2_ATTACK")
{
If()
{
Break(16, "Frames");
TimeStart(6, "Frames");
TimeEnd(16, "Frames"); //, "SyncIfOvertime");
Posture("Stand");
Button("Fire", "Press");
}
}

Transition("RECOVER2");
}

State("RECOVER2")
{
Posture("Stand");
Animation("stand_obiwan1b_end")
{
// SyncType("attack1c", "ByTime");
AimType("None");
BlendInTime(0.15);
BlendOutTime(0.15);
BlendTimeTo("stand_gam_guard", 0.3);
}

AlignedToThrust();

Transition("IDLE");
}

State("RECOVER2_ATTACK")
{
Posture("Stand");
Animation("stand_obiwan1b_end")
{
// SyncType("attack1c", "ByTime");
AimType("None");
BlendInTime(0.15);
BlendOutTime(0.15);
BlendTimeTo("stand_gam_guard", 0.3);
}

AlignedToThrust();

Duration(7, "Frames");

Transition("ATTACK3");
}

State("ATTACK3")
{
Posture("Stand");
Animation("stand_gam_guard")
{
// SyncType("attack1c", "ByTime");
AimType("None");
BlendInTime(0.15);
BlendOutTime(0.3);
}
Sound("com_weap_melee_swing", 6, "Frames");

//set a duration
//Duration(30, "Frames");

AlignedToThrust();

TurnFactor(0.5);

Duration(45, "Frames");

InputLock("All", "!Thrust"); // lock all controls for duration of state
Attack()
{
DamageTime(14, 24, "Frames");
DamageLength(1.5);
DamageWidth(1.25);
Damage(10000);

Push(0.0);
}

Transition("IDLE");
}
Please change the damage accordingly.
I marked all damage instances in red.
There are basically three moves in this combo. you can keep all three, or just delete two and have one for the melee.
User avatar
commanderawesome
Field Commander
Field Commander
Posts: 971
Joined: Tue Aug 13, 2013 11:58 pm
Projects :: Skin Changer - Warfront - Other stuff
Games I'm Playing :: SWBF SWTOR KotOR EaW
xbox live or psn: AaTc_CmdrAwesome
Location: The Universe

Re: Use melee animations for non-melee sets?

Post by commanderawesome »

Basically, I want the weapon to be chargeable, with one attack animation, that can be used with guns without messing up the controls and cannot be used to block.
User avatar
Nedarb7
Lieutenant General
Lieutenant General
Posts: 676
Joined: Sat Sep 22, 2012 3:41 pm

Re: Use melee animations for non-melee sets?

Post by Nedarb7 »

Use the force push odfs as a base.
1. Make sure you remove OffHandWeapon = 1
2. Make a custom animation set that has a new kind of weapon bank, say "slash" (it would look like set_slash_stand_shoot)
3. Add this to the force push odf AnimationBank = "slash bazooka"
4. Make changes to the force push odf so that it turns out how you like
User avatar
commanderawesome
Field Commander
Field Commander
Posts: 971
Joined: Tue Aug 13, 2013 11:58 pm
Projects :: Skin Changer - Warfront - Other stuff
Games I'm Playing :: SWBF SWTOR KotOR EaW
xbox live or psn: AaTc_CmdrAwesome
Location: The Universe

Re: Use melee animations for non-melee sets?

Post by commanderawesome »

Ok, i'll try that.

And, just to avoid confusion, this is a different weapon than the one in the other thread I made today.

EDIT:It crashes as soon as I switch to the weapon.

Odf:
Hidden/Spoiler:
[code][WeaponClass]

ClassLabel = "cannon"

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

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

OrdnanceName = "geo_weap_pike_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"
InitialSalvoDelay = "0.5" // must have one or no animation - Mike Z

EnergyDrain = 50.0

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

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

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

//SOUND
FireSound = "force_push_fire"
//ReloadSound = ""
WeaponChangeSound = ""
ChangeModeSound = ""
FireEmptySound = ""
ChargeSound = ""
ChargeSoundPitch = "0.05"
OverheatSound = ""
OverheatSoundPitch = "0.5"
OverheatStopSound = ""
[/code]
The animation used (for both standing and crouching) is Luke's first swing.
Last edited by commanderawesome on Wed Jul 02, 2014 10:12 pm, edited 1 time in total.
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Use melee animations for non-melee sets?

Post by Maveritchell »

Nedarb7 wrote:Use the force push odfs as a base.
1. Make sure you remove OffHandWeapon = 1
2. Make a custom animation set that has a new kind of weapon bank, say "slash" (it would look like set_slash_stand_shoot)
3. Add this to the force push odf AnimationBank = "slash bazooka"
4. Make changes to the force push odf so that it turns out how you like
That's uh... a circuitous way of going about it. It's way easier to make a custom animation bank for the weapon and just name one of the animations as a charging animation. Just about all weapon types support charging.
User avatar
commanderawesome
Field Commander
Field Commander
Posts: 971
Joined: Tue Aug 13, 2013 11:58 pm
Projects :: Skin Changer - Warfront - Other stuff
Games I'm Playing :: SWBF SWTOR KotOR EaW
xbox live or psn: AaTc_CmdrAwesome
Location: The Universe

Re: Use melee animations for non-melee sets?

Post by commanderawesome »

What would the charging animation be called?
User avatar
TWINKEYRUNAWAY
Lieutenant General
Lieutenant General
Posts: 730
Joined: Fri Aug 17, 2012 3:13 pm
Projects :: Empire Rising
Games I'm Playing :: SWBF Doom FONV
xbox live or psn: No gamertag set
Location: 411Remnant
Contact:

Re: Use melee animations for non-melee sets?

Post by TWINKEYRUNAWAY »

It would be called whatever you want. You could name it in the custom animation set "charge" and add the line to the animation munge.

edit: Oh I see what you meant. Yeah I have no idea what the vanilla charge animation line would look like. Either way, nedarb7's way isnt as circuitous. Ive actually done something with his suggestion and got a really good result with it incase you wanted to give that a go. Its actually quite easy once you have the stand shoot and crouch shot lines with the custom animation bank name.
User avatar
Nedarb7
Lieutenant General
Lieutenant General
Posts: 676
Joined: Sat Sep 22, 2012 3:41 pm

Re: Use melee animations for non-melee sets?

Post by Nedarb7 »

Maveritchell wrote:That's uh... a circuitous way of going about it. It's way easier to make a custom animation bank for the weapon and just name one of the animations as a charging animation. Just about all weapon types support charging.
Isn't that almost exactly what I said? :o If not could you explain why? I'm curious to know this other method.

commanderawesome, change the animationbank = "pike" to CustomAnimationBank = "pike bazooka". The added "bazooka" bazooka can be any base weapon bank (rifle,tool, pistol, bazooka)
User avatar
commanderawesome
Field Commander
Field Commander
Posts: 971
Joined: Tue Aug 13, 2013 11:58 pm
Projects :: Skin Changer - Warfront - Other stuff
Games I'm Playing :: SWBF SWTOR KotOR EaW
xbox live or psn: AaTc_CmdrAwesome
Location: The Universe

Re: Use melee animations for non-melee sets?

Post by commanderawesome »

Added this:
AnimationBank = "pike rifle"

Still Crashes. :cpu:

I think it might be with the first person animations. How do you get a weapon to force 3rd perspective?
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: Use melee animations for non-melee sets?

Post by Marth8880 »

commanderawesome wrote:Added this:
AnimationBank = "pike rifle"
It needs to be CustomAnimationBank, not AnimationBank.
User avatar
commanderawesome
Field Commander
Field Commander
Posts: 971
Joined: Tue Aug 13, 2013 11:58 pm
Projects :: Skin Changer - Warfront - Other stuff
Games I'm Playing :: SWBF SWTOR KotOR EaW
xbox live or psn: AaTc_CmdrAwesome
Location: The Universe

Re: Use melee animations for non-melee sets?

Post by commanderawesome »

It works! Thanks! :)
Post Reply