Home » MODDING HQ 1.13 » Flugente's Magika Workshop » New (mini)-feature: Bayonets
New (mini)-feature: Bayonets[message #318752] Sun, 05 May 2013 23:18 Go to next message
Flugente

 
Messages:3158
Registered:April 2009
Location: Germany
Bayonets
As I feel we have way too much advanced stuff in many mods, I coded something for the oldtimers :professor: :

One can now attach knives to guns. Technically we already could do that, but there was no point - until know. I added a new firemode to guns - BAYONET - that allows to attack with the knife attached to a gun.

http://i39.tinypic.com/5vudj6.jpg
Raven goes WW1 on some poor conscript.

http://i40.tinypic.com/smpp2c.jpg
Bayonets can be used together with underbarrel guns or grenade launchers.

A few pros and cons of bayonets:
  • always loaded
  • no need to waste APs by switching to a knife or sidearm from your inventory
  • as rifles are long, stabbing a prone soldier with a fixed bayonet while standing does not require you to go prone, thereby saving APs again.
  • an attached knife makes for slightly worse aiming and weapon handling
  • I used the 'barrel' slot for bayonets, but a modder can use any slot he wants.
Simply cycle to the new firemode via 'b', you can then use the gun as you'd use any knife.

Obviously this will look a bit weird, as there are no bayonets animations ingame (there was no need until know)... I hope our animators feel motivated by this :venus:

This is in the trunk as of r6065, fitted attachment data in GameDir r1670 (I allowed the combat knife and KCB knife on most rifles an ARs).


Re: New feature: Bayonets[message #318754] Sun, 05 May 2013 23:21 Go to previous messageGo to next message
lockie

 
Messages:3968
Registered:February 2006
Location: Scotland
I seem to remember bayonet animation from a few years ago .... might just be the old brain wishfully imagining things but ... I'll hunt tomorrow and see if I can find anything .


Re: New feature: Bayonets[message #318759] Sun, 05 May 2013 23:28 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3772
Registered:July 2009
Tbh I'd use the underbarrel slot since bayonets either block it or use the same lugs as some GL mounting systems (or rather, GLs reuse the bayonet lugs).

And since we're at melee anyway, can we also get the good old emergency club aka buttstroke some day?


Re: New feature: Bayonets[message #318760] Sun, 05 May 2013 23:52 Go to previous messageGo to next message
Flugente

 
Messages:3158
Registered:April 2009
Location: Germany
DepressivesBrot
And since we're at melee anyway, can we also get the good old emergency club aka buttstroke some day?
Should be as easy as making a pie. Apart from the needed animations.


Re: New feature: Bayonets[message #318769] Mon, 06 May 2013 03:23 Go to previous messageGo to next message
pheloncab

 
Messages:270
Registered:August 2004
Location: So. Cal. or texas
maybe make the Bayonet feature work as Melee alt, if you have a bayonet attached you attack with it, if not you do a buttstroke or pistol whip?

Re: New feature: Bayonets[message #318828] Mon, 06 May 2013 22:35 Go to previous messageGo to next message
merc05

 
Messages:78
Registered:January 2013
I was using bayonets before with the underbarrel weapon function. Now I've added myself a new attachment slot for bayonets specifically. I'm using them now together with other underbarrel attachments. Don't know about bayonet+GL combo. I've found this pic http://img81.imageshack.us/img81/1027/ak74mnt0.jpg though it's strange. Won't the bayonet be an obstacle for the fired grenade?

Anyway, thanks for another cool feature Flugente. Maybe you could look into this: there is a crash situation with assertion error 1762 in UI Cursors.cpp popping out when a weapon is aimed in burst mode and then switched to bayonet mode. It has existed also before bayonets got their seperate attack mode (when underbarrel weapon was a knife).
Re: New feature: Bayonets[message #318832] Mon, 06 May 2013 22:49 Go to previous messageGo to next message
Flugente

 
Messages:3158
Registered:April 2009
Location: Germany
I have no idea wether such things are possible in RL, gun knowledge isn't my speciality. Same for the guns I declared 'bayonet-ready' - no idea wether they really are. Enough gun enthusiasts to deal with that here.


Re: New feature: Bayonets[message #318844] Tue, 07 May 2013 02:08 Go to previous messageGo to next message
Flugente

 
Messages:3158
Registered:April 2009
Location: Germany
The fix is in 6067 (but use 6068, it fixes a lighting issue).

One problem with pistol/stock whipping will be that we'd need a new firemode, that won't be used most of the time... a bayonet only shows up when the player has added a bayonet, while using the gun as a club would always be possible. Not sure how to solve that.


Re: New feature: Bayonets[message #318850] Tue, 07 May 2013 04:31 Go to previous messageGo to next message
pheloncab

 
Messages:270
Registered:August 2004
Location: So. Cal. or texas
I understand the issue at least in macro, I was thinking in old program terms..
if firearm = pistol then melee mode is pistolwhip animation,
else if attachment bayonet then use bayonet animation
else buttstroke.

then we would need a variable for the melee damage of the pistolwhip or buttstroke added into the xmls since a heavy stock would do more than say a weak folding one..

and yeah I admit it.. except for a odd bit of scripting i haven't done any 'real' programming since basic on a 286. you know.. stone age stuff.

Anyways, thx for considering my 2 cents and more so for all the goodies you have done to move the game along in so many fantastic ways.


Re: New feature: Bayonets[message #318856] Tue, 07 May 2013 10:01 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3772
Registered:July 2009
Stroking and stabbing are not mutually exclusive. You might go in with straight silver but then decide to just give the last guy a good whack to keep him for interrogation.


Re: New feature: Bayonets[message #319336] Sat, 11 May 2013 04:00 Go to previous messageGo to next message
Wil473

 
Messages:2815
Registered:September 2004
Location: Canada
Found that I could not cycle to the bayonet if the weapon does not have a 2ndary fire mode of its own. Replicable with stock Data-1.13 with the SKS and Combat Knife under SCI_Unstable_Revision_6068_on_GameDir_1670. The onscreen button remained greyed out, and had no effect.


Re: New feature: Bayonets[message #320358] Thu, 23 May 2013 22:02 Go to previous messageGo to next message
Flugente

 
Messages:3158
Registered:April 2009
Location: Germany
Hmm. Can't reproduce that, SKS + combat knife works fine for me (though the onscreen button is still greyed out).


Re: New feature: Bayonets[message #320361] Thu, 23 May 2013 22:10 Go to previous messageGo to next message
Maalstroom

 
Messages:343
Registered:December 2008
Location: en route to San Hermanos
Flug since you are now in the flashback team will you make more features for ja1.13?
PLEASE!
Re: New feature: Bayonets[message #320365] Thu, 23 May 2013 22:40 Go to previous messageGo to next message
Flugente

 
Messages:3158
Registered:April 2009
Location: Germany
Until I have full code access to another turnbased strategy game that is pareto-better to JA2 1.13, I do not plan to stop work on it.


Re: New feature: Bayonets[message #320971] Mon, 27 May 2013 10:18 Go to previous messageGo to next message
Maalstroom

 
Messages:343
Registered:December 2008
Location: en route to San Hermanos
Any chance for a fog o war? would be nice to have such a thing..
Re: New feature: Bayonets[message #320972] Mon, 27 May 2013 10:20 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3772
Registered:July 2009
What are you even talking about? I'm pretty sure it's not the feature at hand ...


Re: New feature: Bayonets[message #321333] Mon, 03 June 2013 20:59 Go to previous messageGo to next message
niculinux

 
Messages:86
Registered:January 2012
Location: Italy
that would be a nice feature, I'm on it!!!!
Re: New feature: Bayonets[message #321449] Fri, 07 June 2013 16:36 Go to previous messageGo to next message
vota dc

 
Messages:53
Registered:August 2006
Great idea. I had already a Penguin like character in my mod, but now with bayonet I finally can combine umbrella and fireweapons!
Re: New feature: Bayonets[message #321493] Sun, 09 June 2013 15:25 Go to previous messageGo to next message
Maalstroom

 
Messages:343
Registered:December 2008
Location: en route to San Hermanos
All quiet on the eastern front! no new minifeatures Sad(
Re: New feature: Bayonets[message #321625] Sun, 16 June 2013 09:42 Go to previous messageGo to next message
Vince7403

 
Messages:146
Registered:February 2012
Thank you very much for implementing this, I've been hoping for it for some time. If we can have door-opening from adjacent squares, I believe we would finally have a fully-featured infantry combat training simulator. I appreciate that that last feature is quite difficult though.

In terms of pure realism, last time I checked the AN-94 is the only service rifle capable of mounting bayonet and underbarrel grenade launcher simultaneously without modification. I believe there are flash hiders that have blades built into them, but I guess that's too esoteric for base 1.13. Perhaps the arsenal modders would like it.
Re: New feature: Bayonets[message #321744] Wed, 19 June 2013 23:12 Go to previous messageGo to next message
Shatara

 
Messages:23
Registered:March 2007
The G3 and its derivatives mount their bayonets over the barrel, so they should be able to use the launcher with as well.
Re: New feature: Bayonets[message #321746] Wed, 19 June 2013 23:32 Go to previous messageGo to next message
Flugente

 
Messages:3158
Registered:April 2009
Location: Germany
As you might know, I am no that familiar with firearms. I'll leave that to people with gun knowledge. Weird chance, we might have such people over here :geek:

Turns out, opening doors from adjacent squares is actually pretty easy... the door-handling part at least. Getting a proper animation will however be pretty annoying (use animations wrong, and weird stuff happens. Like a merc throwing his gun hundreds of meters away (I am not joking here)).

Besides, I refuse to even consider adjacent door-opening until proper shield animations are finished. Just to annoy the dutch. :blah:


Re: New feature: Bayonets[message #321752] Thu, 20 June 2013 02:36 Go to previous messageGo to next message
Wil473

 
Messages:2815
Registered:September 2004
Location: Canada
Shatara
The G3 and its derivatives mount their bayonets over the barrel, so they should be able to use the launcher with as well.


At first I was going to advise that logistically, attachment incompatibilities cannot be ignored for a certain gun or guns... then I realized that in my projects, the G3's only accept one launcher the old HK 79, therefore the KCB can be set to be incompatible with all launchers, except the HK 79 (which means the G3/G41 can have both KCB and HK79). However, this only works for the HK79/G3 combo. The M203/KCB combo cannot be allowed on some but not all guns, it is all or nothing.


Re: New feature: Bayonets[message #321757] Thu, 20 June 2013 08:38 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3772
Registered:July 2009
What about layouts? If there's only one slot to share on some guns...


Re: New feature: Bayonets[message #321762] Thu, 20 June 2013 12:55 Go to previous messageGo to next message
Wil473

 
Messages:2815
Registered:September 2004
Location: Canada
DepressivesBrot
What about layouts? If there's only one slot to share on some guns...
I can only speak for my projects where I did consider having the bayonet use the underslung position. The underslung position is also used by bipods and grips. Right now bayonets use the muzzle slot. The layouts would have to be redone to allow for a common launcher/bayonet slot on guns that cannot combine the two, and special layouts with separate bayonet and launcher slots. Other underside attachments would have to use a different slot.

[Updated on: Thu, 20 June 2013 12:56] by Moderator



Re: New (mini)-feature: Bayonets[message #344995 is a reply to message #318752] Mon, 11 April 2016 12:14 Go to previous messageGo to next message
Shrugger

Messages:4
Registered:March 2016
How do Bayonets interact with the Melee Trait? Do they benefit from the CTH and damage bonus? Do they grant the dodge bonus against knife attacks?
Re: New (mini)-feature: Bayonets[message #345202 is a reply to message #344995] Wed, 27 April 2016 08:00 Go to previous messageGo to next message
Torres

 
Messages:181
Registered:June 2010
Location: Canary Islands
Shrugger wrote on Mon, 11 April 2016 10:14
How do Bayonets interact with the Melee Trait? Do they benefit from the CTH and damage bonus? Do they grant the dodge bonus against knife attacks?


I'd like to know that too, is it better to just swap to your knife and stab the guy since you're more proficient with it in your hands or take advantage of the mounted bayonet?
Re: New (mini)-feature: Bayonets[message #351160 is a reply to message #345202] Mon, 02 October 2017 14:07 Go to previous messageGo to next message
Flugente

 
Messages:3158
Registered:April 2009
Location: Germany
Well, it only took us a bit over 4 years, but now we are finally getting proper bayonet animations. Taro has used his considerable Blender skills to make animations, so I've added them in r8489 & GameDir r2392. So far this is just for attacks from standing against standing/crouched targets, but I hope we will get more soon-ish.

https://i.imgur.com/l3be2Lv.png

Considering our trouble dealing with the... intricacies of creating totally new animations, this can be considered a team effort, since sevenfm, Shanga, Tais, DepressivesBrot and likely the rest of Discord too was involved in this at some point. I hadn't thought so initially, but Discord is actually good! The only downside being that now my rants about other people are now archived forever, which could get awkward at some point shy

Because hey, I can, I also added a small bonus that will make running straight to the enemy and stabbing them in the gut more rewarding: When initiating a bayonet attack immediately after running, we add another melee damage bonus (+20%). This is to simulate the significant force behing this initial attack.



Saren threw his head back and screamed in impotent fury, before falling to his throne, head in his claws, trembling in horrified disbelief.

Then he heard a faint chime as Sovereign subscribed to her ECHO channel.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.


Re: New (mini)-feature: Bayonets[message #351210 is a reply to message #351160] Fri, 06 October 2017 21:30 Go to previous message
Flugente

 
Messages:3158
Registered:April 2009
Location: Germany
Taro has also added animations for stabbing a prone target, so now having a bayonet removes the need to change stance to get crouched (as we are now able to hit any stance while standing).

https://i.imgur.com/sxQpmOh.png

This has been added in r8494 & GameDir r2393.



Saren threw his head back and screamed in impotent fury, before falling to his throne, head in his claws, trembling in horrified disbelief.

Then he heard a faint chime as Sovereign subscribed to her ECHO channel.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.


Previous Topic: Absurdly small code changes
Next Topic: New feature: individual militia
Goto Forum:
  


Current Time: Wed Oct 18 10:20:09 EEST 2017

Total time taken to generate the page: 0.01663 seconds