PAYDAY 2

PAYDAY 2

51 ratings
A complete guide to Big Bank's deposits and their RNG
By Javgarag
You might think the deposits in Big Bank's large vault are randomized. After some digging into the game files, I've found out they actually are not, and you can use this to your advantage for faster lockpicking or less saw ammo consumption.
3
   
Award
Favorite
Favorited
Unfavorite
The method in action
This is what you'll achieve by reading this guide (well, you don't need to read the technical explanation.)
https://clips.twitch.tv/ObliqueBreakableEchidnaOSfrog-yAecDVty7UYnWdB3
Thanks to RobThanatos for the clip!
Useful Resources
Practice map I created with controls over the randomization and pattern images: https://modworkshop.net/mod/41048#description

Guides to find the generated pattern:

Pattern Images:

Pattern Table:
Pattern
Deposit Boxes
1
4, 14, 20, 33, 6
2
32, 8, 40, 13, 21
3
19, 33, 38, 5, 17
4
7, 14, 21, 31, 37
5
6, 24, 36, 10, 3
6
10, 20, 35, 9, 22
How loot generates inside the deposits
On Big Bank and Big Bank only, deposits use one out of 6 possible loot combinations that specify in what deposits is it spawned. To check out the patterns, look above for the images and tables.

Furthermore, the deposits can have either money or gold inside them, although not both at the same time. They have an equal chance of spawning. Loot amount is also randomized; there can be 3, 4 or 5 bags. It is VERY important to mention that the spawns are ORDERED depending on the loot amount. Say you get pattern 1 and 3 bags of loot: there will be loot in 4, 14 and 20.

In every Big Bank run there are always 2 deposit "collections" inside 2 different cages.
How this can be used to open the deposits
As a result of the pattern spawns, there are deposit boxes which NEVER have bag loot in them, so you can completely skip them as a first step. After this, the most logical thing to do is try to figure out how to identify the pattern that spawned and open its corresponding deposit boxes. For the latter I created a simple reference image which can help you do this:


Note: The deposit boxes are numbered like this because of the game's files. Go to the "Technical Explanation" section to learn more.

The deposit boxes which are outlined with a color are the ones that need to be opened, and if loot spawns in, let's say, the red outlined box, you now know that the pattern is Pattern #1, which generates loot in 4, 14, 20, 33 and 6. Here is another reference image by cdawgg:

In-Depth Technical Explanation
WARNING: TECHNICAL MUMBO JUMBO BELOW.

The deposit wall's unit files can be found inside the game files in units/payday2/architecture/bnk/. If we go to this folder and look for its unit ID, "bnk_int_panel_wall4m_deposit_b1", we can find the .sequence_manager file and the .model file.

Mission element execution
After a deposit collection has been decided to spawn somewhere, Big Bank's element workflow will do the following:


It randomizes the loot type and amount one second before the loot is spawned, giving time to the .sequence_manager to process the change. To be exact, the sequence_manager changes the variables "var_type" and "var_amount".

.sequence_manager breakdown

The sequence manager for this unit is incredibly large and cumbersome, spanning over 2000 lines. The loot generation starts when the sequence "spawn" is run, and it does the following:

<sequence editable_state="true" name="'spawn'" once="true" triggable="true"> <run_sequence name=" 'set_order' "/> <run_sequence filter="'filter_type_1'" name=" 'spawn_gold' "/> <run_sequence filter="'filter_type_2'" name=" 'spawn_money' "/> <run_sequence filter="'filter_type_3'" name=" 'spawn_jewelry' "/> <run_sequence filter="'filter_type_4'" name=" 'spawn_nothing' "/> </sequence>

The first sequence that is run afterwards, "set_order", decides randomly what pattern to generate by running another sequence:

<sequence editable_state="false" name="'set_order'" triggable="false"> <run_sequence name=" 'set_order_'..pick('1','2','3','4','5','6')"/> </sequence>

For the sake of this explanation, let's say the pattern that was chosen is 1, so "set_order_1" is ran next.

<sequence editable_state="false" name="'set_order_1'" triggable="false"> <set_variables var_order="1"/> </sequence>

With this, the pattern has now been chosen and set. Let's continue where we left off in the "spawn" sequence. Now, it'll run "spawn_gold" ONLY if the filter "filter_type_1" returns true. The filter checks the following:

<filter name="'filter_type_1'"> <check value="vars.var_type == 1"/> </filter>

It checks if the previously selected var_type is equal to 1, which is gold. For the purposes of this explanation, let's say gold is the loot type, and so this returns true, running the "spawn_gold" sequence.

<sequence editable_state="false" name="'spawn_gold'" triggable="false"> <run_sequence filter="'filter_amount_1'" name=" 'spawn_loot_gold_1_order' "/> <run_sequence filter="'filter_amount_2'" name=" 'spawn_loot_gold_2_order' "/> <run_sequence filter="'filter_amount_3'" name=" 'spawn_loot_gold_3_order' "/> <run_sequence filter="'filter_amount_4'" name=" 'spawn_loot_gold_4_order' "/> <run_sequence filter="'filter_amount_5'" name=" 'spawn_loot_gold_5_order' "/> <run_sequence filter="'filter_amount_6'" name=" 'spawn_loot_gold_6_order' "/> <run_sequence filter="'filter_amount_7'" name=" 'spawn_loot_gold_7_order' "/> <run_sequence filter="'filter_amount_8'" name=" 'spawn_loot_gold_8_order' "/> <run_sequence filter="'filter_amount_9'" name=" 'spawn_loot_gold_9_order' "/> <run_sequence name=" 'spawn_nothing' "/> </sequence>

Note: as you might've noticed by now, there are loot types,loot amounts and patterns which are not even used by the game. Truly an OVK moment!

Again, I'll change some of the RNG for this explanation and set the amount of gold to 3. Because of this, only the first 3 sequences will be ran since the filters check for if the amount is higher than a number.

<filter name="'filter_amount_1'"> <check value="vars.var_amount > 0"/> </filter> <filter name="'filter_amount_2'"> <check value="vars.var_amount > 1"/> </filter> <filter name="'filter_amount_3'"> <check value="vars.var_amount > 2"/> </filter>

I'm going to explain the following part fast, since there's not much to figure out.

First sequence ran: "spawn_loot_gold_1_order"

<sequence editable_state="false" name="'spawn_loot_gold_1_order'" triggable="false"> <run_sequence filter="'filter_order_1'" name=" 'spawn_loot_gold_4' "/> <run_sequence filter="'filter_order_2'" name=" 'spawn_loot_gold_32' "/> <run_sequence filter="'filter_order_3'" name=" 'spawn_loot_gold_19' "/> <run_sequence filter="'filter_order_4'" name=" 'spawn_loot_gold_7' "/> <run_sequence filter="'filter_order_5'" name=" 'spawn_loot_gold_6' "/> <run_sequence filter="'filter_order_6'" name=" 'spawn_loot_gold_10' "/> </sequence>

Because our pattern is 1, "spawn_loot_gold_4" is ran. This sequence finally spawns our gold. It also sets "var_spawn_4" to 1, indicating that a deposit has already spawned in slot 4:

<sequence editable_state="false" name="'spawn_loot_gold_4'" triggable="false"> <spawn_unit name="'units/pd2_dlc1/vehicles/str_vehicle_truck_gensec_transport/spawn_deposit/spawn_gold'" position="object_pos('snap_04')" rotation="object_rot('snap_04')"/> <set_variables var_spawn_4="1"/> </sequence>

The last 2 sequences get ran as many times as the "var_amount". This is how I figured out the 6 patterns; by writing down every single loot that gets spawned in the slots for every pattern.

At the end of the "spawn_gold" sequence the "spawn_nothing" sequence gets ran, which basically checks if the slots are empty (a.k.a "var_spawn_[SLOT]" == 0) and spawns loose loot and trash in them.

.model clarification
The sequence_manager knows where to spawn the deposit units thanks to snap points inside the .model file:
This is also the reason why the deposit boxes in my screenshots are out of order: the model snappoints are numbered this way.
Closing Thoughts
All in all, I really doubt this will ever be “patched”, so it will serve for the game’s life from now on. If you enjoyed reading the guide, make sure to like and perhaps even favorite it to find it easily. Thank you!
4 Comments
shisha monster 31 Aug @ 4:12pm 
nice guide
Gravy 2 Jun, 2023 @ 12:01pm 
Just read this to my friends they loved it 10/10 would read again love your work release this on audible
walk 3 May, 2023 @ 4:12am 
Wow
Bjorger King 16 Apr, 2023 @ 8:04am 
You show true dedication to the craft. much appreciated.