Payday 2 Maps

Custom Asset (Loadout screen)

This will add custom assets to your level using BeardLib. No Hooks required.
(Asset like the ones you see in the loadout screen, like Grenade Case or Expert Driver.)


Shortcut: 'assetstweakdata.lua'

Shortcut: 'upgradestweakdata.lua'

Shortcut: 'dlctweakdata'


XML structure

<YourNewAsset name_id="" texture="" no_mystery="true"> <stages> <value_node value=""/> </stages> </YourNewAsset>

Your custom asset goes into the <assets> tag inside your <level> tag. Like this:


<level> <assets> <YourNewAsset> </YourNewAsset> </assets> </level>

<YourNewAsset>

The tag itself is the ID for your new asset. For example, if your asset is named "extra_medic_bag", you write it like this:

<extra_medic_bag name_id="menu_asset_extra_medic_bag" texture="guis/textures/pd2/mission_briefing/assets/watch_dogs/day1/asset02" no_mystery="true"> <stages> <value_node value=""/> </stages> </extra_medic_bag>

name_id

The string ID for the name of your asset. Needs to be localized.
Overkill usually uses "menu_asset_asset id".

unlock_desc_id

The string ID for the description in the "Are You Sure?" pop-up when buying the asset. Needs to be localized.
Overkill usually uses "menu_asset_asset id_desc".
Not needed if your asset is unlocked by default.

texture

The path to your texture file. Needs to be added via AddFiles first.

<stages>

List with all the level IDs that should have your asset available. There isn't really a point to add any levels other than your own custom level.

<value_node value="your level id"/>

require_to_unlock

any / all

Set to "any" if you want your asset to be unlockable with any of the unlock methods. Defaults to having all the requirements be necessary.

visible_if_locked

/

Set to "true" if you want your asset to be visible even if you can't unlock it.

When testing, putting a dlc_lock while not having visible_if_locked will hide the asset completely if the dlc is not owned.

no_mystery

/

This is required to be set to "true". Without it your asset will show up as a unusable Mystery Asset, which seems to be a cut feature as it's missing a localized string.

no_mystery set to false Asset without no_mystery="true", or set to false.

money_lock

Can be any value.
Locks your asset so that players have to pay spending cash to unlock it.

The cost ingame is calculated as follows:
your value + (your value * pc_multiplier) + (your value * risk_multiplier) More details

value

In the assetstweakdata.lua, the value is being picked from a table that's being generated, with overkill just picking an item from the table.
Doctor bags for example use 3, as in the 3rd value generated in the table.
We however cannot use said table, and we don't need to as we can simply put in our own value.
A few example values are: 13000 for Spotter, 7000 for Body bags, 6000 for doctor bags.

pc_multiplier

The pc_multiplier is influenced by the "jc" value in your narrative. With a jc value of 70 or higher, the pc_multiplier will be 1. Everything below 70 will result in a pc_multiplier of 0.
BeardLib defaults the jc value to 50 on all custom heists, unless specified in your narrative, which means by default your heist has a pc_multiplier of 0.

risk-multiplier

The risk_multiplier are as follows:
Normal 0
Hard 0.5
Very hard 1
Overkill 2
Mayhem 4
Deathwish 6
Death Sentence 8

Example

Applying everything to an example, let's say we go with money_lock="5000", the end result would be this:

jc value below 70
  • Normal: 5000 + 5000 * 0 + 5000 * 0 = $5,000
  • Hard: 5000 + 5000 * 0 + 5000 * 0.5 = $7,500
  • Very Hard: 5000 + 5000 * 0 + 5000 * 1 = $10,000
  • Overkill: 5000 + 5000 * 0 + 5000 * 2 = $15,000
  • Mayhem: 5000 + 5000 * 0 + 5000 * 4 = $25,000
  • Deathwish: 5000 + 5000 * 0 + 5000 * 6 = $35,000
  • Death Sentence: 5000 + 5000 * 0 + 5000 * 8 = $45,000

jc value of 70
  • Normal: 5000 + 5000 * 1 + 5000 * 0 = $10,000
  • Hard: 5000 + 5000 * 1 + 5000 * 0.5 = $12,500
  • Very Hard: 5000 + 5000 * 1 + 5000 * 1 = $15,000
  • Overkill: 5000 + 5000 * 1 + 5000 * 2 = $20,000
  • Mayhem: 5000 + 5000 * 1 + 5000 * 4 = $30,000
  • Deathwish: 5000 + 5000 * 1 + 5000 * 6 = $40,000
  • Death Sentence: 5000 + 5000 * 1 + 5000 * 8 = $50,000

Note:
Some additional outside factors may affect the end result, for example skills or perks reducing costs.
Owners of the pre-order lootbag DLC will also see a decrease of 10% on the end result, so we recommend disabling that DLC while deciding your asset costs.

<upgrade_lock/>

Locks your asset so that only players who have the specified skill can buy it.
upgrade="" ID of the skill

<extra_medic_bag ...> <upgrade_lock upgrade="additional_assets" category="player"/> <stages> ... </stages> </extra_medic_bag>

Needs more testing.

dlc_lock

Locks your asset so that only players who own the specified DLC can buy it.
Theoretically every DLC found in the dlctweakdata could be used, however almost all of them need custom localization.
The 2 DLC used for this by Overkill are "gage_pack" for Grenade Cases and "gage_pack_snp" for vantage points.

Additional parameters

There are more parameters listed in the assetstweakdata.lua, but most of them are not really important.