No blocking

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
wishihadaname
Captain
Captain
Posts: 493
Joined: Fri Dec 28, 2007 2:10 pm
Projects :: The Corellian Resistance
Games I'm Playing :: Halo Reach and LOTRO
Location: Look to your left.... no, your other left....

No blocking

Post by wishihadaname »

I was wondering. can you make it so that when a unit switches to melee weapons its can't block blaster bolts or use jedi combo's cas i gave my scout and jettroopers vibroknives (basicly really short vibroswords) and it kinda helerius to see them use a four inch knife like it were a lightsaber as well as deflect blaster bolts with it. anyway is there any way to fix that?
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: No blocking

Post by MetalcoreRancor »

Open the .combo of whatever set of animations you chose for your melee weapon, (i assume aayla's)

Search for State("DEFLECT")
And you'll find this chunk:
Hidden/Spoiler:
State("DEFLECT")
{
Posture("Stand");
Sound("imp_weap_lightsabre_block");
Animation("stand_block_idle")
{
Loop();
AimType("None");
BlendInTime(0.15);
BlendOutTime(0.15);
LowResPose(0, "Frames");
}

Duration(0.0); // infinite duration, looping anim

InputLock(0.0, "All", "!Thrust"); // lock all but move controller for duration of state
EnergyRestoreRate(-10.0); // drain energy while ready to deflect
Deflect()
{
DeflectAngle(-110, 110); // deflect anything from forward arc
EnergyCost(0.0);

DeflectAnimation("stand_block_front1", "Forward")
{
// AimType("Torso");
BlendInTime(0.00);
BlendOutTime(0.05);
LowResPose(5, "Frames");
}
DeflectAnimation("stand_block_front2", "Forward")
{
// AimType("Torso");
BlendInTime(0.00);
BlendOutTime(0.05);
LowResPose(5, "Frames");
}
DeflectAnimation("stand_block_left1", "Left")
{
// AimType("Torso");
BlendInTime(0.00);
BlendOutTime(0.05);
LowResPose(5, "Frames");
}
DeflectAnimation("stand_block_left2", "Left")
{
// AimType("Torso");
BlendInTime(0.00);
BlendOutTime(0.05);
LowResPose(5, "Frames");
}
DeflectAnimation("stand_block_right1", "Right")
{
// AimType("Torso");
BlendInTime(0.00);
BlendOutTime(0.05);
LowResPose(5, "Frames");
}
DeflectAnimation("stand_block_right2", "Right")
{
// AimType("Torso");
BlendInTime(0.00);
BlendOutTime(0.05);
LowResPose(5, "Frames");
}
}
Transition("ATTACK1")
{
If()
{
Break(); // all transitions are breaking if Duration is 0
Button("Fire", "Press");
}
}
Transition("DEFLECT_ROLL") // same as the code checking for rolling
{
EnergyCost(25.0);
If()
{
Break(); // all transitions are breaking if Duration is 0
Button("Crouch", "Press");
Thrust(">", 0.9);
ThrustAngle(-120, 120);
}
}
Transition("DEFLECT_CROUCH")
{
If()
{
Break(); // all transitions are breaking if Duration is 0
Button("Crouch", "Press");
}
}
Transition("DEFLECT_JUMP")
{
If()
{
Break(); // all transitions are breaking if Duration is 0
Button("Jump", "Press");
}
}
Transition("DEFLECT_SPRINT")
{
If()
{
Break(); // all transitions are breaking if Duration is 0
Button("Sprint", "Down");
}
}
Transition("IDLE")
{
If()
{
Break();
Energy("<=", 0.0); // if no energy left
}
Or()
{
Break(20, "Frames"); // all transitions are breaking if Duration is 0
Button("FireSecondary", "Press");
}
Or()
{
Break(); // all transitions are breaking if Duration is 0
Button("Reload", "Press");
}
}
}

State("DEFLECT_JUMP")
{
Posture("Jump");

MustShowOneFrame();

Transition("IDLE")
{
If()
{
Break(1, "Frames");
}
}
}

State("DEFLECT_CROUCH")
{
Posture("Crouch");

MustShowOneFrame();

Transition("IDLE")
{
If()
{
Break(1, "Frames");
}
}
}

State("DEFLECT_ROLL")
{
Posture("Roll");

MustShowOneFrame();

Transition("IDLE")
{
If()
{
Break(1, "Frames");
}
}
}

State("DEFLECT_SPRINT")
{
Posture("Sprint");

MustShowOneFrame();

Transition("IDLE")
{
If()
{
Break(1, "Frames");
}
}
}
Delete all of it, and you have no block.
User avatar
wishihadaname
Captain
Captain
Posts: 493
Joined: Fri Dec 28, 2007 2:10 pm
Projects :: The Corellian Resistance
Games I'm Playing :: Halo Reach and LOTRO
Location: Look to your left.... no, your other left....

Re: No blocking

Post by wishihadaname »

what if i just get rid of the line in the weapons odf that says
ComboAnimationBank = "human_sabre melee rep_hero_ep3obiwan"

would that work or would i be unable to attack?
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: No blocking

Post by Maveritchell »

wishihadaname wrote:what if i just get rid of the line in the weapons odf that says
ComboAnimationBank = "human_sabre melee rep_hero_ep3obiwan"

would that work or would i be unable to attack?
That would just crash your game.

And @MetalcoreRancor:
It's a lot easier to just go to this part:

Code: Select all

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

    Transition("DEFLECT")
    {
        If()
        {
            Break();    // all transitions are breaking if Duration is 0
            Posture("Stand", "Crouch");
            Energy(">=", 2.5);  // at least half a second worth of deflect time 
            Button("FireSecondary", "Press");
        }
    }
And delete the "Transition("DEFLECT")" section. Stock combos only ever make the deflect transition from the idle state.
User avatar
wishihadaname
Captain
Captain
Posts: 493
Joined: Fri Dec 28, 2007 2:10 pm
Projects :: The Corellian Resistance
Games I'm Playing :: Halo Reach and LOTRO
Location: Look to your left.... no, your other left....

Re: No blocking

Post by wishihadaname »

ok thanks guys just one last thing, my jettrooper has one of the knives and when i try to land with him instead of stopping the jetjump he does and emperor like force jump. is there any way to stop that from happening or is it hard coded?
User avatar
DarthD.U.C.K.
Master of the Force
Master of the Force
Posts: 6027
Joined: Wed Sep 27, 2006 11:05 am
Location: Duckburg, Germany

Re: No blocking

Post by DarthD.U.C.K. »

you you mean the emperors jumpattack?
you can change every single animation, even the dieanim
User avatar
wishihadaname
Captain
Captain
Posts: 493
Joined: Fri Dec 28, 2007 2:10 pm
Projects :: The Corellian Resistance
Games I'm Playing :: Halo Reach and LOTRO
Location: Look to your left.... no, your other left....

Re: No blocking

Post by wishihadaname »

sorry i didn't really get that... do i have to change the anim file? and if so which one? cas the jettrooper is using allya's anims which did not include a hover jedi jump so im really confused, and also the unit behaves like half commando half jedi which was not my intention it will not use its secondary weapons as an npc and when i play it won't let me use secondaries. is there any way to set up the vibroblade so that it doesn't behave like a lightsaber?
User avatar
DarthD.U.C.K.
Master of the Force
Master of the Force
Posts: 6027
Joined: Wed Sep 27, 2006 11:05 am
Location: Duckburg, Germany

Re: No blocking

Post by DarthD.U.C.K. »

:runaway:
what do you need an vibroblade for if you cannot use it as a lightsaber(=meeleweapon)?

when does he play which anim you dont want?
User avatar
wishihadaname
Captain
Captain
Posts: 493
Joined: Fri Dec 28, 2007 2:10 pm
Projects :: The Corellian Resistance
Games I'm Playing :: Halo Reach and LOTRO
Location: Look to your left.... no, your other left....

Re: No blocking

Post by wishihadaname »

sorry i confused even myself with that last post. my problems with the jettrooper are these.
1) can't stop jetjump till it runs out of fuel, he just does a force jump instead of turning the jetpack off
2)can't use secondaries, idk why that is they are all formated correctly but instead of using his grenade he tries to block and now that i deleted the block he doesn't do anything, force powers button doesn't trigger secondaries either
3) uses jedi sprint instead of trooper sprint
4) how do i shrink the size of the weapon so its a dagger instead of a sword?
User avatar
DarthD.U.C.K.
Master of the Force
Master of the Force
Posts: 6027
Joined: Wed Sep 27, 2006 11:05 am
Location: Duckburg, Germany

Re: No blocking

Post by DarthD.U.C.K. »

hmmm, no secondarys work?
2.: thats strange usually the secondary button is remapped in all combos(usable for a secondary weapon and not involved in the combo)
wait, he blocks if you click the rightmousebutton(secondary weapon)??

1.: only if you switch to sword or the whole time?
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: No blocking

Post by Maveritchell »

DarthD.U.C.K. wrote:hmmm, no secondarys work?
2.: thats strange usually the secondary button is remapped in all combos(usable for a secondary weapon and not involved in the combo)
wait, he blocks if you click the rightmousebutton(secondary weapon)??

1.: only if you switch to sword or the whole time?
It's almost certainly because he added another weapon as a primary and then didn't bother to search the forum for one of the large number of topics on having multiple primary weapons when one is a melee weapon.
User avatar
wishihadaname
Captain
Captain
Posts: 493
Joined: Fri Dec 28, 2007 2:10 pm
Projects :: The Corellian Resistance
Games I'm Playing :: Halo Reach and LOTRO
Location: Look to your left.... no, your other left....

Re: No blocking

Post by wishihadaname »

there is a special way to do that? ohh i didn't know cas in my first map i had jedi with ranged weapons and secondaries and that worked fine. also the secondaries don't work period no matter what weapon i have selected and on both of the units that have vibrodaggers.
ps. can i shrink the vibroswords via the mapscale command in the msh.option?
Grev
Hoth Battle Chief
Hoth Battle Chief
Posts: 3132
Joined: Sun Dec 09, 2007 11:45 pm
Projects :: No Mod project currently.
Games I'm Playing :: Minecraft
Location: A Certain Box Canyon

Re: No blocking

Post by Grev »

Can this kind of be turned into a combo thread? Because I have some combo questions and making a new thread for the same thing didnt seem useful.

How would you replace the force run with a normal run for units with a hero combo. Its a problem I see very often in games, where characters who are giver sabers who aren't jedi have sprint, and this bothers me. Any way to remove this?
User avatar
DarthD.U.C.K.
Master of the Force
Master of the Force
Posts: 6027
Joined: Wed Sep 27, 2006 11:05 am
Location: Duckburg, Germany

Re: No blocking

Post by DarthD.U.C.K. »

i dont think this thread is ready to be "hig-jacket" but it doesnt hurt to answer some more questions

you have to munge a new animation and dump the saberanims you want to use in it
then copy the normal walk and sprint anims in it (replace anims if needed)
munge the anim to your side, change the anim of your solider to the new one and you are done
(look into the scaling-up-anims-thread for further information about munging nem mixed anims)
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: No blocking

Post by MetalcoreRancor »

I think I'll expand on what Mav was trying to say. Essentially, you can never have (that I personally have noted) a melee weapon and a gun hybrid character, and still have secondary weapons working. But you can have a character that first has a gun, and a 2nd primary weapon as the saber. This has been done before, multitudes of times.

.combo only references animations, and sets them up for functions of gameplay with characters. It is a library of do's and don'ts. You can set up the .combo to make it so your character can do all sorts of interesting tricks, or make the character utterly useless.

In this instance, with the topic creator, he is running into ODF issues, not .combo issues. The only thing that related to .combo here is the block issue.
User avatar
wishihadaname
Captain
Captain
Posts: 493
Joined: Fri Dec 28, 2007 2:10 pm
Projects :: The Corellian Resistance
Games I'm Playing :: Halo Reach and LOTRO
Location: Look to your left.... no, your other left....

Re: No blocking

Post by wishihadaname »

so if i have teh jettrooper have a carbine and the virbodagger (which i still don't know how to shrink) would his secondaries work. provided carbine is primery #1 and virbodagger is primary #2
User avatar
DarthD.U.C.K.
Master of the Force
Master of the Force
Posts: 6027
Joined: Wed Sep 27, 2006 11:05 am
Location: Duckburg, Germany

Re: No blocking

Post by DarthD.U.C.K. »

wishihadaname wrote:so if i have teh jettrooper have a carbine and the virbodagger (which i still don't know how to shrink) would his secondaries work. provided carbine is primery #1 and virbodagger is primary #2
4 threads below: click me!
sometimes its good to look in other thread or even to use the searchfunction or [whispers]to look into the "everything you need thread"[/whispers]
Hidden/Spoiler:
this may sound rude but its true, nearly nobody searches for a solution before posting a question :x
User avatar
wishihadaname
Captain
Captain
Posts: 493
Joined: Fri Dec 28, 2007 2:10 pm
Projects :: The Corellian Resistance
Games I'm Playing :: Halo Reach and LOTRO
Location: Look to your left.... no, your other left....

Re: No blocking

Post by wishihadaname »

thank you :bowdown: i finnaly have a knife instead of a sword! as for my secondaries i looked it up in one of my old maps and i figure its impossible to have multiple type primaries and have secondaries work so i switched the secondaries for all the units with knives to primaries so now their grenades are primary weapons
Last edited by wishihadaname on Sun Nov 09, 2008 4:06 pm, edited 1 time in total.
Grev
Hoth Battle Chief
Hoth Battle Chief
Posts: 3132
Joined: Sun Dec 09, 2007 11:45 pm
Projects :: No Mod project currently.
Games I'm Playing :: Minecraft
Location: A Certain Box Canyon

Re: No blocking

Post by Grev »

Could parts of an attack be removed? For instance, I want a really primitive, non force wielding attack, like vaders first saber slice. Could I remove the rest of his combo attack and just have the first attack repeat?
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: No blocking

Post by MetalcoreRancor »

Yes. That is very easy to do. Just remove the Transition("ATTACK2") from the State("ATTACK1").
Post Reply