Receiver 2

Receiver 2

144 ratings
Receiver Demystified [Updated]
By doku
A miscellaneous collection of tips/findings from looking through the game's code, things beyond the general tips covered by other guides. Note this is for 2.0.10, details could change with updates.
7
2
3
2
4
2
   
Award
Favorite
Favorited
Unfavorite
Never Lose Rounds!
Hold the pick up button (G by default) while racking a semi-auto's slide or extracting rounds on a revolver to instantly return unspent rounds to your inventory. No more hunting rounds on the floor or losing them off a catwalk!

Malfunctions
Revolvers cannot malfunction. Semi-autos roll a dice every time there is a chance for a particular type of malfunction. Certain guns have different probabilities. There's a lot of misconception about failure rates probably due to observer bias. Here I dig into the game's code to show you the real chances of various malfunctions.

Stovepipe:
Beretta: 0.5%
All others: 2.0%


This is rolled every time a round is fired. The Beretta wins here but 2% odds for other guns isn't too bad considering how easy it is to detect and clear this type of malfunction.

Out of Battery:
Hi Point: 4.0%
All others: 0.2%


This is rolled every time the slide is opened fully (manually or upon firing). A press check doesn't trigger this. The Hi Point has a significantly higher chance (1 in 25) to go out of battery, so make sure the slide is all the way forward before taking aim.

Mag Seated Wrong
Beretta: 10.0%
All others: 5.0%


This is rolled when you insert a mag. The malfunction does nothing on its own, but it will increase the probability of a failure to feed (see below). Apparently the Beretta has ♥♥♥♥♥♥ mags.

You can prevent this malfunction by tapping the insert mag key again after inserting a mag to smack it and ensure it is seated properly.

Make a habit of double-tapping the mag insert key and you should be pretty safe from this kind of malfunction.

Failure to Feed:
All semi-autos: 0.0% to 4.0% depending on magazine quality (see below)
Mag seated wrong: 90.0%


This is rolled every time the slide is opened fully (manually or upon firing).


FTF can be forced for other reasons, but a wrongly seated mag (see above) is 90% chance. If the mag is seated correctly, it checks the spring quality. A low-quality spring (spring_quality = 0) yields a FTF rate of (0.04 * (1-0) = 0.04 * 1 = 4.0%) whereas a high-quality spring never fails (0.04 * (1-1) = 0.04 * 0 = 0.0% chance).


The code controlling spring quality when a magazine is spawned. Pretty straightforward, just a random number between 0 and 1. The GetFailureToFeedProbability() code above rounds this to 1 decimal digit, so for example a quality of 0.96 would still yield 100% reliability

I haven't tested this, but since FTF is rolled even when you manually open the slide (I believe), it may be possible to figure out spring quality by repeatedly cycling the slide manually. If there is a FTF from doing that, you may have a low-quality mag.

Double Feed:
All semi-autos: 0.5%


This is rolled every time you fire.
Negligent Discharge (a.k.a Glock Leg)
Receiver 2 introduces a gun safety mechanic where holstering/unholstering too fast can cause a negligent discharge. The gun will also fire any time it's equipped, ready to fire, and you click the button. This includes running, climbing, or falling. The Colt SAA's lack of a firing pin block can also cause an ND if you take a fall.

Depending on certain conditions, an ND has a chance to hit you. You can actually survive one ND that hits, unless the cartridge is sufficiently powerful (only the Deagle currently).




>1000 Joules of energy and you're toast. That's like getting hit by a baseball flying at 260mph.

Holster Discharges
The game tries to accidentally pull the trigger if you hold the holster button less than 0.4 seconds. If the gun is ready to fire, it will do so. If you held the button for less than 0.2 seconds, you will hit yourself.


Logic controlling when to accidentally pull trigger


Logic controlling when a holster ND will hit you. (The variable "odds" is always 1, meaning the random probability check always passes)

Running, climbing, and falling
If you aren't aiming and are in the middle of doing these things when you ND, it will also hit you. There is a time delay in starting/stopping these actions though, so you might get lucky if you just started running, for example.


half_aim_visible of less than 0.5 and not aiming will hit you. This code interpolates over 1/3 of a second when changing state between running, etc.

Firing Pin Resting on Live Round
This kind of ND is specific to revolvers where the firing pin is integral to the hammer, which I believe is currently only the Colt SAA. If the gun is uncocked, the hammer is resting all the way forward on a live round, and you land hard enough, the firing pin will set off the round without you pressing the trigger! This can easily be prevented by having the gun cᴏcked or even half-cᴏcked.


A vertical falling speed of more than 2.5 m/s triggers this kind of ND. You'll be moving this fast if you fall for more than ~0.25 seconds, or in terms of distance, a meager 0.307 meters (1 foot).
Safe Rooms
When you spawn in a level, the room you spawn in is considered a "safe room". Safe rooms won't spawn tapes or enemies (caveats below). Safe rooms on lower difficulties also include the rooms connected to the spawn room, rooms connected to those (and so on, to a limit), so you have to traverse a few rooms before you are no longer in the safe zone.

A note for clarity: A "room" in this context is like what you might typically think of a room in a house or a building, i.e. a bedroom, hallway, or storage room. You have to walk through a doorway, or up/down a ladder/stairs to access another room.

Connected Safe Rooms
On lower difficulties, the room you spawn in and a certain number of rooms away from it are considered safe rooms. The following list provides this information by difficulty. The spawn room is included in this count.
  1. Beginner - 4 rooms away
  2. Sleeper - 3 rooms away
  3. Sleepwalker - 2 rooms away (the spawn room and adjacent rooms)
  4. Liminal - 2 rooms away
  5. Awake - 1 room (only the spawn room)

Difficulty configurations are stored in Receiver2_Data\StreamingAssets\WorldGenerationConfigurations. You can use Notepad to view them.

From what I mentioned earlier about rooms, this means that on Awake you could spawn in a bedroom, and only the bedroom would count as a safe room. Step outside to the kitchen and you're no longer safe.

Item Spawns
Safe rooms spawn items like most other rooms, with the exception of tapes and flashlights which will not spawn. You can still find ammo, magazines, and floppy disks in a safe room.







Enemy Spawns
Enemies have a chance to spawn in pre-set spawn points within a room. Safe rooms can spawn enemies if the spawn point is flagged "always_spawn". I don't have a way to check for "always_spawn" points in the main campaign, but I suspect there are none and this feature is reserved for debug/testing levels. I haven't observed any guaranteed spawn points during regular play, so I think it's safe to say that safe rooms don't usually spawn enemies.


Code that picks which spawns to try placing enemies at while generating rooms. Safe rooms skip the first GetEnemySpawnsInRoom call and use only the second, which fetches only the "always_spawn" points.

Although enemies can spawn near you outside the safe room, they won't spawn within 20m of you or within line of sight.
More about Spawn Rates
You may have noticed the difficulty increases not only with each rank, but also how far you progress in a level. That's because the game tracks the size of each room you've visited... cover enough ground and the level generator moves on to the next "segment".


Note the game is tracking "ground covered" in a very literal sense... each room you visit adds its floor area to a running counter.

A "segment" is really just a set of spawn rates for enemies and items. You might be able to guess that each subsequent segment can have tougher enemies, less ammo to defend yourself with, more blocked doors, etc.

The spawn rates for each rank and segment within each rank would be way too much to detail here, but if you're interested in finding that information, it's contained in the same files as the safe room configurations mentioned earlier: Receiver2_Data\StreamingAssets\WorldGenerationConfigurations
An editor capable of expanding/collapsing JSON objects can be useful to explore this information.


Here's an example of a small portion the first "segment" configuration in the "Awake" difficulty. We can see that the chance for a ceiling turret to be armored is 25%. The next object in this "segments" array is the next segment, with different rates, and so on.


Further down the file you can see that the "SegmentArea" for this difficulty and segment is 1000, meaning we have to visit a total of 1000 square meters to move to the next segment configuration.
Killdrone Aim
Killdrones remember what direction you were moving the last time they saw you. Flying drones will use this to try and find you if you break contact, and turrets will try to lead you for a bit even if you run behind cover/concealment.
Flashlights
The flashlight will drain batteries when turned on, getting dimmer and eventually going out after 1 to 5 hours. If you find another flashlight, pick it up and check how bright it is!
Special Events
This section is just here to tell you that Receiver 2 has special events! I won't spoil much about them by looking into their code because where's the fun in that? Go trigger the events and see for yourself!

Halloween
There's jack-o-lanterns scattered around the levels that you can shoot. You'll get a bullet back for shooting them... but shoot 3 or more and you'll have a chance to catch a glimpse of something truly spooky!
Data Mining for Dummies
Hey, you! Want to be a cool, 31337 H4XX0R like yours truly? Do you want to be able to look for this information on your own once this guide (inevitably) becomes outdated? It's actually really easy.

  1. Download a .NET debugger/decompiler. I use dnSpy[github.com], I've heard ILSpy[github.com] is also a good alternative.
  2. Open the Wolfire.Receiver2.dll assembly located in the Receiver2_Data\Managed directory
  3. ???
  4. Profit!

Some interesting classes to start exploring:
  • GunScript - Controls most aspects surrounding the operation of your gun.
  • LocalAimHandler - Controls the player's movement, aim, inventory, that kind of thing.
  • RuntimeTileLevelGenerator - The procedural map. Enemy/item spawns, rooms, etc.
  • ReceiverCoreScript - Menus, stats, achievements, housekeeping stuff
44 Comments
Col. A. Covolsky 29 Jan, 2023 @ 1:34am 
I noticed that with the Glock does have less accuracy in its opening shot I'm guessing because pulling down the trigger offsets the aim a little.
ThePissedPsychologist 29 Jan, 2023 @ 12:08am 
There's something I wanted to test but never got around to. Does holding the trigger down instead of tapping result in less spread/recoil?
DevNode 31 Jul, 2022 @ 2:25pm 
@Dr. Death The Desert Eagle is also single-action, and the SIG and Beretta are DA/SA.
Dr. Death 31 Jul, 2022 @ 12:13pm 
im pretty sure that's because the 1911 is a single action pistol, whereas all others are DA.
DevNode 31 Jul, 2022 @ 8:44am 
About a month ago Szikaka on the Discord was able to publish malfunction odds in the current version via Unity Explorer. All malfunction values in the guide are still accurate to the current game version. In addition, the 0.1% slamfire odds apply to all automatics (sorry Glock) and the 30% slide dislodgement odds apply to all automatics *except* the 1911, whose slide will never immediately dislodge when inserting a magazine.
Dr. Death 30 Jul, 2022 @ 8:34pm 
Can you make a section about the receiver mall?
Col. A. Covolsky 28 Jun, 2022 @ 8:09pm 
Oh, that's cool! Wait, is there a chance that guns could "jam" as soon as they are clean? Or do guns have a 5% to misfire if not clean?
DevNode 28 Jun, 2022 @ 6:44pm 
Clarification: the malfunction overrides were in GunScript up through version 2.0.13; these components were refactored in the Compound update, version 2.1.0, and now only the base malfunction values can be found there in discernible text.

Here's a secondary fun fact that I picked up while investigating this: as of 2.1.0's refactoring, the nominal value of magazine_insert_dislodge_slide_stop_probability is 0.3f, for a 30% chance for inserting a magazine to automatically dislodge an engaged slide stop. This might not necessarily reflect its practical probability in 2.2.x due to the previously-mentioned "mag insert pressure and speed" code, but it's nice to have the base value for this documented as well.
DevNode 11 Jun, 2022 @ 12:00am 
I was trying to find out if the gun-specific malfunction chance overrides had changed since 2.0.10 but they seemed to have moved it out of GunScript (or it was never in GunScript in the first place I'm not sure). I've actually tried to find them a few times over the past year and a half to no avail, but now I've realized all the base malfunction chances are still in GunScript, including the slamfire chances I was looking for back when the Compound update came out.

The base slamfire_probability value is 0.001f, or 0.1%, presumably rolled when the slide releases and successfully chambers a round (it's a little difficult for me to decipher the precise conditions leading up to the check in GunScript), though for the above reasons I don't know if this would be modified for something like the Glock, whose internal safeties would theoretically prevent a slamfire.
Privyet 10 Mar, 2022 @ 5:30pm 
I'm still learning new stuff about this game