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.

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:

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):

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.

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.

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.

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:

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.

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.

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.

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.

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!

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.

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:

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.

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

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:

Hitting the battery will completely disable a robot while the motor will only disable the rotors/turret rotation
The power cable seems almost impossible to hit though..
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.

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).

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:

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.

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.

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.

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! 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:

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

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.

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