PAYDAY 2

Category of PAYDAY 2 modding

BeardLib Editor

BeardLib Editor

Mission Elements (WIP)

Here this page will talk about the Mission Elements in Payday2. There are hundreds of elements to use for your levels so you can get very creative with some of these.

Here I will explain all the elements as they are listed in-game (Alphabetical Order).

AiArea

On Execution AiArea will connect selected Navigation Segments together to act as a single 'Room'.

Keep in mind Navigation Segments will still work like they normally do so this can be used to cut a room in half to forbid navigation with an AiGraph element in only a specific area.

AiAttention

On Execution AiAttention will apply the selected attention settings to the instigator unit(s).

AiForceAttention

(N/A)

AiForceAttentionOperator

(N/A)

AiGraph

On Executed AiGraph will operate on Navigation Graph.

AiRemove

On Executed AiRemove will remove (or kill if selected) instigating Ai.

AccessCamera

Does nothing on execution, Access will be available based on the Enabled state.

AccessCameraOperator

On Execution AccessCameraOperator will operate on selected AccessCamera elements.

AccessCameraTrigger

Will trigger from AccessCamera elements when a certain condition is met.

ActionMessage

Unused element.

ActivateScript

Unknown.

AiGlobalEvent

On Execution AiGlobalEvent will apply the selected rules to the match.

AlertTrigger

Will trigger from specified sound rules, Used on one occasion for gunshots calling the police on Big Oil Day1- But it not longer used. Use an Operator element to add and remove the trigger.

ApplyJobValue

On Execution a Key (and a Value) will applied to selected JobValue Elements.

AreaMinPoliceForce

When Operated on by an Operator element a selected amount of enemy groups will focus on being in the nearby Graph. Element Operator Required to use this element.

Operation:

AreaOperator

On Executed AreaOperator will operate on selected AreaTriggers.

AreaReportTrigger

An advanced version of the AreaTrigger, includes more trigger options. Use AreaTrigger for less complex requirements.

AreaTrigger

A simple trigger element for units entering/exiting/ect.

AssetTrigger

Executes when selected asset ID is unlocked.

AwardAchievment

On Executed awards selected steam achievement.

B...

BLCustomAchievement

Used for custom Beardlib achievements.

BainState

Used to toggle bain dialogue.

BlackscreenVariant

Used to change the 'outro_event' variant in the level tweak data.

BlurZone

Used to apply a visual blur effect in a shape.

C...

Carry

Used to typically operate on Lootbag units. Applies to all unit instigators.

ChangeVanSkin

Used to change the heister van skin.

CharacterDamage

Unknown

CharacterOutline

Unknown

CharacterSequence

Run a sequence from the selected character.

CharacterTeam

Change the team of the selected character.

CheckDLC

Filter based on DLC ownership.

Counter

Holds a number value and takes 1 every execution. Executes when it reaches 0.

CounterFilter

Filters execution based on counter values.

CounterOperator

Modify a Counter element value.

CounterReset

Unused. Use CounterOperator element.

CounterTrigger

Execute when a counter reaches the trigger number.

CustomSafehouseAwardTrophy

Award a trophy for the Safehouse.

CustomSafehouseFilter

Filter execution based on safehouse room tiers.

CustomSafehouseTrophyFilter

Filter executed based on trophy unlocks.

CustomSound

...

D...

DangerZone

DANGER ZOOOOOOOOOOOOOOOONE "Sets the level of danger. 1 is lease dangerous" Seems to do nothing though.

Debug

On execution Debug elements will show a debug string and some information if you choose. Will only show in editor playtesting.

Dialogue

Play dialogue on execution. Remember to load the required packages or dialogue will not play.

Difficulty

Set the current assault difficulty.

DifficultyLevelCheck

Simpler version of the Filter element. Will only check for 1 difficulty.

DisableShout

Disable or ReEnable shouting for Ai.

DisableUnit

Disable selected units. Bare in mind interactable units may need to be disabled with a sequence manager beforehand or else floating interactions may get in the way.

DropInState

Toggle if players can or cannot drop into the game. Often used for secrets or sections that will cause problems if a player spawns.

E...

EnableSoundEnvironment

ToDo

EnableUnit

Enable selected units that have previously been disabled.

EndScreenVariant

ToDo (Not working in editor)

EnemyDummyTrigger

Trigger on certain rules for Ai.

EnemyPreferedAdd

Add enemy groups to spawn during assaults.

EnemyPreferedRemove

Undo added Prefereds.

Environment

Change colorgrading and other camera filters. Not recomended to use in proper maps.

EnvironmentOperator

Change active environments with an optional blend time.

Equipment

Give instigators equipment.

ExecuteInOtherMission

Seems unused.

ExecuteWithCode

ToDo

Experience

Give a base amount of experience to the players for the current level. Applied at the end of the level.

Explosion

Explode with effects and sounds.

The Following Options afterwards are duplicates of the Feedback Element.

ExplosionDamage

Simple Area/Damage only 'explosion'

F...

FadeToBlack

Fade in or out, takes 3 seconds. Hardcore. Applies to ALL players.

FakeAssaultState

Set the fake assault state in GroupAi to fake an assault. (Music/Ui)

Feedback

Camera effects on players near the executed element.

Filter

Filter execution based on many rules.

Flashlight

Unused- Flashlight effect faces the wrong direction.

FleePoint

Used to designate points where Ai will despawn or drop lootbags.

G...

GameDirection

Unused.

GlobalEventTrigger

Executes on global events

H...

Heat

Unused.

HeistTimer

Make a countdown timer show on the players HUD. Identical to the regular Timer element, set a time and use a TimerOperator to start/stop/modify the time.

Hint

Force a Hint pop-up on instigators.

I...

InstanceInput

Used inside instances to receive inputs.

InstanceInputEvent

Used outside of instances to send inputs.

InstanceOutput

Used inside instances to send outputs.

InstanceOutputEvent

Used outside of instances to receive outputs.

InstanceParams

Instance parameter element for controlling certain values inside instances.

InstancePoint

Spawn a mission spawned instance here. Warning: Only spawn once!

InstanceSetParams

Set the parameters of an instance that uses InstanceParams Often used for 'obj_link' instances.

Instigator

Holds instigator information. Read InstigatorOperator and InstigatorTrigger elements for more details

InstigatorOperator

Operate on an Instigator element.

InstigatorTrigger

This element executes when certain conditions are met.

InstigatorRule

Set rules for applicable elements to filter.

Interaction

Floating element interaction with filtered execution. Requires an interaction unit to be loaded, If its not loaded the editor will ask you to load it.

Manage On Executed List:

InventoryDummy

Spawn prop versions of your inventory weapons. Used in the safehouse.

Invulnerable

Makes a unit invulnerable or immortal.

J...

JobStageAlternative

Used to apply bonus or escape heists to the level chain.

JobValue

Apply a temporary key and a value to the current match. Can be saved to the save file to be used on reload of the game.

JobValueFilter

Filter based on JobValues.

K...

KillZone

Hurt instigator with a selected damage type.

L...

LaserTrigger

Spawn and control tripwire laser beams in this element. Toggling LaserTrigger off with a Toggle element will disable the lasers.

LoadDelayed

Select units with the Delay Loading unit option to spawn them after a level starts up. On Executed all units in the list will be spawned into the level.

LogicChance

Set a percent chance for the element to execute elements in its On Executed List.

LogicChanceOperator

Operate on an existing LogicChance element.

LogicChanceOperator

An alternative way to execute something from a LogicChance element.

LookAtTrigger

A trigger for if a player is looking at the element.

LootBag

Spawns a lootbag unit.

LootBagTrigger

Trigger depending on what happens to a spawned lootbag.

LootPile

Activate a point where enemies will attempt to take bags from, Must be near Navigation. When a bag is taken the global event "loot_lost" will be called.

LootSecuredTrigger

Trigger once a specified cash amount of loot is secured.

MandatoryBags

Set the objective amount of mandatory loot bags when executed.

MissionEnd

Select how a mission should end when executed.

MissionFilter

Filter based on the stages mission filter (1-5).

MissionScript

Barebones element. Used for keeping things organised and synced.

Missions

Unknown

ModifyPlayer

Modifies the instigator player.

Money

Add/Remove money from Spending or Offshore. Can be set to instigator only for not-gambling mechanics.

MoveUnit

Move selected units using this element. Note, Some units may not move properly if they have certain Sync options enabled in the unit.

Music

Control the music in a level using this element.

NavObstacle

Used to block navigation in a level. Make sure you set this stuff up properly or else navigation issues and crashes can occur. Rebuild navigation frequently when using these.

Objective

Start/Complete/Fail objectives with this element. Objectives can have experience weights tied to them to make failing an objective cost XP.

Operator

A generic operating unit, typically used for Waypoints and SpecialObjectives to remove them. In the Lua this will execute 'operation_remove' and 'operation_add' functions inside the selected elements.

OverlayEffect

Complex version of FadeToBlack, Applies to all players.

OverrideInstigator

Unknown

PhysicsPush

Unknown

Pickup

Used to give and take items from npc instigators.

pickupCriminalDeployables

Unknown

PlayEffect

Play an effect.

PlaySound

Play a sound. Emmiter sounds can also be spawned from these if you need abient sounds to play from randomised positions.

PlayerCharacterTrigger

This element will trigger on a heister joining or leaving the level.

PlayerNumberCheck

This element will only execute if the set number of players is in the match.

PlayerSpawner

This element will become a spawnpoint for players and TeamAi who begin the level.

PlayerState

Sets players to the selected player state.

PlayerStateTrigger

Triggers execution when a player enters selected state.

PlayerStyle

Set the instigators suit style if one isnt already applied.

PointOfNoReturn

Start a PONR countdown based on difficulty.

PrePlanning

Preplanning asset location, Preplanning maps use the world space to determine the location of assets on the maps.

PrePlanningExecuteGroup

On Executed will activate all assets that need to be spawned by preplanning in a different group.

Pressure

Not used for Payday2.

ProfileFilter

Filter execution based on player stats like money, xp and achievements.

PushInstigator

Push instigator a direction depending on settings. Avoid using it on non-player units, often causes crashes.

Random

Randomly executes elements based on settings.

RotateUnit

Rotates a unit based on settings.

ScenarioEvent

This element goes unused in Payday2, but seems to still work in some way.

SecurityCamera

Control security cameras with this element.

SequenceCharacter

This element is used to force a sequence from a units sequence_manager.

SetOutline

Force a yellow contour around instigators.

Shape

A basic shape for AreaTriggers to use.

SideJobAward

Awards sidejobs to players.

SideJobFilter

Checks if you have certain side jobs done.

SlowMotion

Unknown (Incomplete)

SmokeGrenade (...Also Flashbang)

Spawn a Smoke or Flash at the elements location.

BeardLib Editor

Creating Custom Contractors

Creating Custom Contractors

Introduction

Hello! Ever wanted to make a custom contractor for your custom heist? Well, here's an easy-to-follow guide on how to make a (possibly good) custom contractor

Disclaimers This is all mostly unavailable using the visual project editor. This also mainly applies to Windows, since I haven't used any other operating systems.

First of all, open your Steam folder!

Mac - ~/Library/Application Support/Steam/steamapps/common/PAYDAY 2

Linux - ~/.local/share/Steam/steamapps/common/PAYDAY 2

Windows 64bit - C:\Program Files (x86)\Steam\steamapps\common\PAYDAY 2

Windows 32bit - C:\Program Files)\Steam\steamapps\common\PAYDAY 2

This might be different depending on where you installed PAYDAY 2. Make sure you actually have BeardLib & BeardLib Editor

Making The Contractor Exist

Go into the 'Maps' folder, and into the heist you created previously. If you didn't create a heist, follow this tutorial. Part 1 of map editing: Creating your first heist

Then with a text editor such as 'Notepad++', 'Atom', or 'Sublime Text', right click the file labeled 'main.xml'. Add a string underneath the 'Localization' tag.

The string is this:

<contact assets_gui="guis/mission_briefing/preload_contact_bain" desc_id="contact_placeholder_desc" id="placeholder" name_id="contact_placeholder_name" package="packages/contact_bain"/>
I'll explain what each of these parameters mean.

assets_gui - I'm heavily certain this is the video used when displaying heists made by the contact, just use the one by Bain.

desc_id - This is the ID for the string in localization for the description of your contractor located in the Crime.net Codex.

id - This is the ID that your contractor uses, self-explanatory, make sure it's not equal to another contractor or you might mess stuff up.

name_id - This is the ID for the string in localization for your contractor's name, highly important if you don't want error text!

package - I honestly don't know what this is, it's probably important for 'assets_gui'.

Customize these properly, don't just leave them all as placeholder. With the exception of assets_gui and package.

Localizing Your Strings

After you're done making your contractor in 'main.xml' go to the 'loc' folder in your heist folder, and then open 'english.txt'. This can be opened with ANY editor, including Windows Notepad.

This is where information like your contractor name & description, heist name and briefing, and map name and briefing goes. Copy the following stuff into the file. Make sure you only have one set of the curly brackets.

{
  "contact_placeholder_name" : "Placeholder"
  "contact_placeholder_desc" : "The placeholder description."	
}

You should absolutely edit all the information in here, if you set a different ID than contact_placeholder than change it to what you used in 'main.xml'. The right side text is what the text will look like in-game.

The Extra Polish

Without using hooks, you won't actually see the description of your contractor pop up. Using a specific hook you can make it appear in the Codex. This isn't necessary but it is a very nice touch.

Hooks:PostHook( GuiTweakData, "init", "maowcraftcontacttemplate", function(self) # Change maowcraftcontacttemplate
	local contact_data = {
		id = "placeholder", # Change placeholder
		name_id = "contact_placeholder_name", # Change contact_placeholder_name
		{
			desc_id = "contact_placeholder_desc", # Change contact_placeholder_desc
			video = "dragon1", # Not necessary to be changed
			post_event = nil
		}
	}

	table.insert(self.crime_net.codex[1], contact_data)
end)
  1. Copy this into a text editor, and save it as guitweakdata.lua.
  2. Change all the parameters to the information you put in your contractor.
  3. Create a new folder in your heist folder named 'Hooks'.
  4. Go back to 'main.xml'.
  5. Make a new tag at the top of 'main.xml'
<Hooks directory="Hooks">
		<hook file="guitweakdata.lua" source_file="lib/tweak_data/guitweakdata"/>  
</Hooks>

Make sure to test that everything works, if something goes wrong, check again, or send a message at the #help channel of the official ModWorkshop discord server. Link to modworkshop.net Discord Server - #help

Have a great day!

BeardLib Editor

Cubemaps, Cubelights and Lighting your level

Cubemaps

A cubemap is a six-sided texture used for reflective surfaces to reflect stuff. Here's an example:

This looks wrong! Why are there buildings in the reflection even though we are indoors?

That's because diesel does not support realtime reflections, so map makers have to create cubemaps manually

To do so you will need to spawn a cubemap_gizmo from the editors spawn menu. Position it however you want. Then head over to the env manager and press "Build Cubemaps" (this will fail if you dont have python3 and PIL module installed) If successful, the editor will tell you the path to the cubemap relative to your map's directory. Remember this path!

Reload the map, click on the env tab in the upper menu and find your cubemap texture in the cubemap dialog box. Once selected, the global cubemap will change:

Eh, not too good looking, but it will do!

The game will keep track of changes to the cubemap texture so you won't have to reload the map each time you build cubemaps for the gizmo you're working with. Keep in mind that you will have to reload the map every time a new gizmo is added to the map!

This cubemap is global, how can i make certain areas have different cubemaps?

For that you'd need to create a separate env area, tick the cubemap option and include an environment file with a different cubemap texture. You'd need to do this for every area

Why are reflections unchanged for some units?

That's because these units override the global cubemap. To fix that you need to extract the unit, change the global_texture parameter to the path of your cubemap in the seq_manager and load it from extract. That way you can have per-unit local cubemaps!

Cubelights

Cubelights are a six-sided texture used for projecting static shadows from lightsources onto the environment Here's an example:

You can do that too! All you have to do is to spawn a light_omni_shadow_projection in the spawnmenu. All lights with a shadow_projection prefix can build projection textures. Now just select the light, head over to the env manager and press "Build Projection Lights" (this will fail if you dont have python3 and PIL module installed)

Same as with cubemaps, the projection texture will only start working after a reload. Let's compare the two: Before: After: