Weapon Additions - Updated Feb. 15th 2014 (Discontinued)

The place to discuss all things Receiver.
Post Reply
User avatar
Josh707
Posts: 123
Joined: Sun Jan 22, 2012 3:09 pm
Location: Canada

Weapon Additions - Updated Feb. 15th 2014 (Discontinued)

Post by Josh707 » Mon Sep 23, 2013 12:51 am

[+] Original post
I've been working on adding the Remington 870 shotgun to Receiver, and it's all going surprisingly well. I figured I would share my progress so far with you guys, as this forum isn't very lively.
You can see the video below:



Right now I'm just working on getting it working, I would love to get some help from those who are familiar with firearms to explain how the Rem. 870 actually operates. I'm not sure if the slide needs to back/open when inserting the first round, and gets chambered when you push it forward, or if you can just fill the tube separately and cock it whenever.

Other than that, don't hesitate to make suggestions - I shoot left handed so the position and rotation the shotgun moves to while pulling the slide seem (somewhat) natural to me but probably not a right handed individual, I can easily change this position/rotation by moving an object so I'd love to hear any ideas of how it should move. How it is now you can't really see the handle move, I'm not too sure how it should be.
[+] Update 1
So I've gotten a lot more done today, it is pretty much working but I still need to get the rounds animated while being inserted, that should not be too difficult. I don't want to have to write everything twice, so if you want to follow the minor updates check out /r/Receiever, I will still update this post fairly frequently and also when a build is available for download. Here is an update video:

[+] Update 2
I re-textured the shotgun shell I made so it actually looks like the shell was fired afterwards (I know the end fold things should be open, but hey, I'm not a modeler):

Image

Round insertion has been animated, flashlight use has been disabled while holding the shotgun, a well as a few other minor pose tweaks so that it doesn't raise to loading when the safety is on & the slide is pulled. There have been a few minor pose tweaks for the other handguns, I reduced the amount they rotate when you pull the slide, the Colt almost goes completely sideways! I always wanted to change that. I also fixed a bug in which a bullet that has been fired raycasts from the inital fired position to the current, causing a drone that flies into the any part of the trajectory to be hit with the bullet.

I've contacted Wolfire to request permission to distribute it, so now we wait. In the time they take to respond I'll be polishing what I have already, you can expect the build to be available within the next day or so depending on how quickly they reply, and if they allow it.
[+] Update 3
Everything is done now. The shotgun pellets to lose velocity a lot faster than bullets like they do in real life, it makes the shotgun less over-powered although it is still really strong. To make up for how good it is I've made the player walk slower and inserting rounds pretty slow as well. I think I've fixed the issue with the stock clipping through your face so you can see inside the gun, but there may be the rare occasion where the recoil moves it into such a position.
[+] Update 4
I made a few performance improvements after finding this thread, the robots and lights shouldn't slow the game down as much as they were, each robot was checking the entire scene for the player every frame. The lights were updating every frame, too. Now they only check once when they're created and lights update only if they're shot or animated blinking, which is a good improvement.

I also slightly reduced the amount of lights on a few parts of the map, it's barely noticeable but it should also help with performance. The shotgun pellets are a little weaker now as well, and they also spawn on the map a lot less frequently than they used to. A download should be available pretty soon.
[+] Update 5
I've been reading around the forums and have been trying to add a few things that people seem to want. Magazines are now a rare drop in ammo piles, and I added a weapon selection part in the options menu for when you respawn:

Image

It saves what you pick so you will keep spawning with whatever you choose until you pick random again. I also put the Thompson model into the game, it's not operating properly yet as it fires from an open bolt but that will be much simpler to write than the pump action. I figured out how to change the slide movement speed so the fire rate is roughly the same as the actual Thompson, and I reduced the recoil so it's not crazily inaccurate like the Glock's full-auto mode. I figure since it's a two-handed weapon it would be easier to manage the recoil.

Image

The magazine model needs to be slightly changed but that will only take a few minutes whenever I'm not lazy, it holds 20 rounds and fires .45 acp like the 1911. Whenever I can share it I'll be sure to have a few versions excluding weapons because I know some people don't think it fits. I'll be adding more handguns after this, and possibly a shooting range so you can just play around with the guns. Wolfire still hasn't responded, I guess they're pretty busy.
[+] Update 6
Update 6:

I made another video update just to show how things are looking, I added the Tokarev TT-33 pistol to the game as well as the shooting range I was talking about before. I haven't done any prop placement or anything yet so it's just the terrain, but I plan on making it like a little outdoor shooting range like this.

I made the 870's recoil a little more realistic now, instead of rotating a lot like the handguns it kicks upwards and slightly to a side like you see with the handguns but increased a bit. It still needs to be increased but it's better than before, you can't really see it much in the video as I'm controlling it but it's there.



I tried adding a main menu button to the options for some reason the scene just doesn't feel like restarting even after resetting all of the fading variables, I'll get it working eventually so you don't have to restart the game to go from the range to the actual game or the other way around.
[+] Update 7
This is a small update, no new weapons or anything. I fixed up the TT-33 model a bit and changed the 870s reload pose toggling so that it doesn't wait until it's fully raised or lowered to toggle, you can now drop flashlights and the main menu button is working. I had to remove the menu fading for now to get it to work but it's not necessary to play the game. To drop a flashlight you just need to holster your gun and press E (if you change the controls the mag release button). I also worked on the shooting range a little bit and added some targets and also a trashed van that was free on the Unity asset store. I also tweaked the recoil for the R870 and Thompson, but the default pistols have not been touched.


Image

I tried experimenting with a camera and render texture, I plan on modeling a small TV and putting it in there so you can see the targets up close without having to walk there. There's also a fun physics glitch if you walk into the back of the camera test!
[+] Update 8
Update 8:

Since there's not enough room to write it out in detail (and I'm sure you don't want to read it), here's all the changes for this update:

Spoiler nesting does not work! :(

I changed around the options menu a little bit and added sliders for bullet hole and casing objects life time and robot sleep distance, I also put in a check box to show bullet trajectory.

Image

The life time is the casing and bullet hole time before they disappear, it's in seconds, the maximum being 300 (5 minutes) or infinite. The robot sleep distance is self-explanatory, if robots are further than this distance they will pause and their rigidbodies will sleep, which is what causes them to float in place. The minimum value (20) is what Wolfire originally had the distance set to.
These 3 values only affect the objects when they are created, for example if you set the life time to 300, shoot a bullet, then switch it back to 30, that casing will still stay for 5 minutes. Robots only change their sleep distance when created, so if a new room is generated or you respawn.

I've almost finished the Thompson's action type so now it operates as it should, except for the fire selector and the ability to slowly lower the bolt with your hand to not fire doesn't chamber a round as it should. To release the bolt with your hand, hold R, pull the trigger, and then release R while holding the trigger, although it moves very fast right now. The safety/fire selection is disabled right now too. Here's a .gif to show how it works:

Image

I scripted a bolt action weapon type so I figured I should include it even though it's a placeholder model, it was fun to play around with for a little bit. The sights aren't lined up perfectly though.

Image

I've changed the refill loose bullets cheat to refill the magazine in your gun as well, and added a new cheat for a bottomless magazine. It's toggled by typing the keys 'I-N-F-I-N-F' in rapid succession like the other cheats, but must be disabled automatically if you remove the magazine.
Update 9:

This update adds 2 more guns (Mauser C96 and H&K USP) and replaces the old Thompson model with a better one, among a few other changes
[+] changes
-R870 can press-check to inspect chamber (T+R as usual)
-Pile of loose rounds on the range for magazine-less guns
-Fixed TT-33 magazine collider size
-Possible level tile generation optimizations (either no improvement or little, I can't tell)
-Bullet penetration on robots now takes velocity, mass & angle into account
-Bullet impact force exerted now takes mass and velocity into account
A while ago I learned that Receiver actually has a form of bullet penetration it uses for lethal shots on robots so I messed around with it and made it a little more complex. It used to raycast 1 unit forward wherever you hit and if there was an internal part in the way it would be disabled, I changed it so the velocity, mass & angle of impact of the bullet affects the depth. The caliber info was scraped from wikipedia and I think some forum members here, there is still a small chance for lucky shots to disable them wherever you hit like before though. If you pay attention to the orientation of the robots and place your shots correctly you'll be disabling a lot of robots in one shot, here's some photos I posted a while back to give you an idea of where to place your shots:
[+] spoiler
Hitting the battery will completely disable a robot while the motor will only disable the rotors/turret rotation
Image
Image
The power cable seems almost impossible to hit though..
Image
Penetration decreases exponentially as the angle gets greater, this was just a test photo with random values

The C96 is not accurate to the real world one - As ArgenGuy has said the select fire knob indicates it's the M172 but I got lazy and decided to have the C96 use magazines rather than stripper clips, when I get to working on the bolt action rifle's code and get stripper clips working it will be changed. For now it operates similar to the 1911, though it does not have an external slide lock, it will still lock open with an empty magazine but tapping the slide forward will have it release like pulling the slide lock down (T).

The USP Compact is a DA/SA pistol so the hammer will automatically cock and release if it isn't when the trigger is fully pressed like the model 10 revolver. Thanks to Andrew1994 for the model! He never specified if it was the compact version or not, but without adjust the scale of the .45 round the magazine held 8 rounds like the compact does, it appears to be fairly small as well.

The bolt-action rifle has not been worked on at all, but the model will be replaced with a Mosin Nagant M91/30 or Kar98k eventually and then I will attempt to make stripper clips.

--------------------------------------------------------------------------------------------------
Windows Only
Download (Base files)

Download (Most recent update)

For those who are just finding this post and don't want to sift through the old stuff or learn by trial and error, here's the controls/info for everything I've added so far:
[+] Controls
Remington 870:
E=Toggle reload pose
R=Pull back slide
Z=Insert round when in reload pose
T+R=Press-check to inspect chamber
You can direct chamber load by inserting a round with the slide back

Bolt-action rifle:
E=Toggle bolt rotation
R=Toggle bolt movement(forward, back)
Z=Insert round when bolt is open

Drop flashlight:
Holster weapon and press E with flashlight in hand

Bottomless magazine cheat:
Toggled by pressing the keys 'I-N-F-I-N-F' in rapid succession - Currently only works with magazines. Disabled automatically if you remove the magazine.
Installation:
(This does not run by itself)
Copy the contents of the base files .rar archive into the Receiver directory, overwriting all the files. Then repeat with the most recent update archive. They must be done in that order or you will end up with the first mod release from a while ago.

If you have this mod installed from the first release or any update, then you do not need to use the base files archive anymore. It just contains all the files that needed to be updated due to me using a newer version of Unity, most files can be omitted for updates to slightly reduce the download size.

Steam Users:
If you are running on Steam, be sure to deactivate the automated update service.
(Thanks to Davidos for this info!)



If you find any bugs or have any suggestions feel free to reply to this thread or send a PM (though I cannot respond to PMs).

[+] Known bugs
End of game hanging:

If you collect all 11 tapes, the screen will fade to white and hang there without loading the win scene. It's not confirmed but I believe it's only happening with Steam users, it seems to load properly for me, at least in the editor.

---
Giant shotgun shell:

Image
If you shoot while unholstering the 870, the shell gets scaled larger relative to how close the gun is to the unholstered rest position. If you wait until it's almost in position it will only be slightly larger than it's supposed to be. Not sure what's causing it.
Last edited by Josh707 on Wed Apr 29, 2015 11:42 am, edited 53 times in total.

User avatar
AmorphousGamer
Posts: 832
Joined: Sat Jul 06, 2013 2:41 am
Location: Montgomery, Alabama

Re: I've been working on adding the Rem. 870

Post by AmorphousGamer » Mon Sep 23, 2013 2:26 am

Looks pretty awesome. I don't think it at all fits with the story of Receiver, but just using Receiver as a means to use a Remington 870, well, that's badass. :P

User avatar
Riverkiller
Posts: 55
Joined: Tue Apr 23, 2013 7:16 pm

Re: I've been working on adding the Rem. 870

Post by Riverkiller » Mon Sep 23, 2013 10:44 am

Holy...
I love this.
The way that 870 just decimates the puny turret...

User avatar
Josh707
Posts: 123
Joined: Sun Jan 22, 2012 3:09 pm
Location: Canada

Re: I've been working on adding the Rem. 870

Post by Josh707 » Mon Sep 23, 2013 11:43 am

Haha yeah I didn't think too much about the story, I just really wanted to have a wider selection of weapons in this game, something other than a handgun. And oh yes I love it too, it feels so powerful when you blast something up close! However the spread values are just randomly picked right now, I'm pretty sure with a choke involved the spread would be much less.

User avatar
Vespabros
Posts: 58
Joined: Mon May 06, 2013 9:35 pm

Re: I've been working on adding the Rem. 870

Post by Vespabros » Mon Sep 23, 2013 12:42 pm

Amazing. I like how this isn't just a new gun, but it will change the way people play. Rather than trying to long range the bots, it will be more up close run and gun. Really nice work.

iLag
Posts: 24
Joined: Tue May 11, 2010 9:45 pm

Re: I've been working on adding the Rem. 870

Post by iLag » Mon Sep 23, 2013 3:50 pm

Since you want some advice, I'll give you some. I don't necessarily have experience with the Remington 870, but I do know how pump-action firearms operate. I've done some research and found sources which explain far better than I can how devastating shotguns are.

LOADING THE SHOTGUN
HowStuffWorks does a good job of explaining how the loading process works with a flash-based step-by-step visual demonstration. It does a very good job.
http://science.howstuffworks.com/shotgun5.htm
One thing they didn't mention is if the shotgun can be loaded with the pump in the rear position. The one time I fired a pump-action shotgun, I could be wrong but I think this was possible. However, doing so would push the carrier into the upward position, meaning that when pushing forward the pump, the hammer would cock but no round would load. I do not remember what model the shotgun was, so the 870 may behave differently in this regard.

SPREAD
The Box O' Truth tested shotgun spread, using a Mossberg Maverick 12-gauge shotgun with no choke. The Remington 870 should have almost identical spread to their test data, which is about 0.6451" diameter/yard. In other words, much less spread than most media indicates.
http://www.theboxotruth.com/docs/bot20.htm

POWER
According to Wikipedia, "The most commonly produced buckshot shell is a 12 gauge, 00 buck shell that holds 9 pellets." 00 buck is an 8.4mm round lead ball, meaning that a single shotgun shell is just about the equivalent power of about 9 9mm rounds. Which means those turrets and killdrones are completely screwed.

User avatar
Josh707
Posts: 123
Joined: Sun Jan 22, 2012 3:09 pm
Location: Canada

Re: I've been working on adding the Rem. 870

Post by Josh707 » Mon Sep 23, 2013 5:32 pm

iLag wrote: -snip-

Very good information, thanks! For now I will try to make it operate how you have said and according to that little slideshow, it shouldn't be too difficult. The spread really surprised me though - I knew it was a lot less than you see in games and movies but that tight up close without a choke? Damn. As for the power, yeah this weapon seems a little too efficient for this game! :wink: However I will try my best to keep it as realistic as possible.

Here's a mini-update so far, I modeled some shotgun shells and got high quality shell bounce sounds:

Image

Image
Last edited by Josh707 on Tue Sep 24, 2013 10:15 pm, edited 2 times in total.

User avatar
Constance
Overgrowth Modder Deluxe
Posts: 2394
Joined: Sat Mar 17, 2012 2:05 pm
Contact:

Re: I've been working on adding the Rem. 870

Post by Constance » Mon Sep 23, 2013 10:39 pm

I wonder if you could do a version of the shotgun where it isn't constantly in ironsights, but instead kind of hip-firing?

User avatar
Josh707
Posts: 123
Joined: Sun Jan 22, 2012 3:09 pm
Location: Canada

Re: I've been working on adding the Rem. 870

Post by Josh707 » Tue Sep 24, 2013 2:18 pm

Timbles wrote:I wonder if you could do a version of the shotgun where it isn't constantly in ironsights, but instead kind of hip-firing?

Yeah that shouldn't be too difficult, I'd guess that you can just change the resting/aiming position but if not I'll try to figure it out!

User avatar
Brain center
Posts: 6
Joined: Fri Jun 07, 2013 4:47 am

Re: Rem. 870 - Updated Sept. 25

Post by Brain center » Thu Sep 26, 2013 5:17 am

Nice work , Josh Image! Did you add the shotgun to the other weapons in the game or you had to remove one of the handguns to add the shotgun ?

User avatar
Josh707
Posts: 123
Joined: Sun Jan 22, 2012 3:09 pm
Location: Canada

Re: Rem. 870 - Updated Sept. 25

Post by Josh707 » Thu Sep 26, 2013 2:43 pm

Brain center wrote:Nice work , Josh Image! Did you add the shotgun to the other weapons in the game or you had to remove one of the handguns to add the shotgun ?
Thanks! It was added so you will still be able to use the other 3, same random spawning as before but with the shotgun included

User avatar
Brain center
Posts: 6
Joined: Fri Jun 07, 2013 4:47 am

Re: Rem. 870 - Updated Sept. 25

Post by Brain center » Fri Sep 27, 2013 4:34 am

Josh707 wrote: Thanks! It was added so you will still be able to use the other 3, same random spawning as before but with the shotgun included
Nice Image! Josh , how about to create different types of ammo for the shotgun ? And I would like to know about controls : can you publish all of it here?

User avatar
AmorphousGamer
Posts: 832
Joined: Sat Jul 06, 2013 2:41 am
Location: Montgomery, Alabama

Re: Rem. 870 - Updated Sept. 25

Post by AmorphousGamer » Fri Sep 27, 2013 10:41 am

Brain center wrote:
Josh707 wrote: Thanks! It was added so you will still be able to use the other 3, same random spawning as before but with the shotgun included
Nice Image! Josh , how about to create different types of ammo for the shotgun ?
Dragon's Breath. Add it nao. :P

iLag
Posts: 24
Joined: Tue May 11, 2010 9:45 pm

Re: Rem. 870 - Updated Sept. 25

Post by iLag » Fri Sep 27, 2013 10:50 am

AmorphousGamer wrote:Dragon's Breath. Add it nao. :P
If it's added, then you need to make sure that if the shooter pumps before it's finished firing that a trail of flames continues to come out of the shell casing, likely killing the shooter.

Also, I can't imagine Dragon's Breath being as effective as buckshot against robots. Maybe the flames would cause overheating, but that'd take a second or several depending on how hot the flames are. Not to mention it's far more expensive and more likely to catch the whole building complex on fire, including the tapes you need. So no, Dragon's Breath is a stupid idea. But it's still an awesome idea.

User avatar
AmorphousGamer
Posts: 832
Joined: Sat Jul 06, 2013 2:41 am
Location: Montgomery, Alabama

Re: Rem. 870 - Updated Sept. 25

Post by AmorphousGamer » Fri Sep 27, 2013 11:10 am

iLag wrote:
AmorphousGamer wrote:Dragon's Breath. Add it nao. :P
If it's added, then you need to make sure that if the shooter pumps before it's finished firing that a trail of flames continues to come out of the shell casing, likely killing the shooter.

Also, I can't imagine Dragon's Breath being as effective as buckshot against robots. Maybe the flames would cause overheating, but that'd take a second or several depending on how hot the flames are. Not to mention it's far more expensive and more likely to catch the whole building complex on fire, including the tapes you need. So no, Dragon's Breath is a stupid idea. But it's still an awesome idea.
Oh, I know. Dragon's Breath is ridiculous and a completely terrible idea. But it would be badass. :P

Post Reply