Payday 2 Maps

Point Of No Return

This will add a custom Point Of No Return to your level to use with PointOfNoReturn Elements.


Shortcut: 'tweakdatapd2.lua'


Adding the hook

Create a new folder in your map folder called "Hooks".

Inside the hooks folder, create a new file called "tweakdatapd2.lua".

Copy the following XML into your map's main.xml:

When inside main node (Will be loaded globally at all times.)

<Hooks directory="Hooks"> <hook file="tweakdatapd2.lua" source_file="lib/tweak_data/tweakdatapd2"/> </Hooks>

When inside <level> or <instance> node (Will only be loaded inside your custom level.)

<hooks directory="Hooks"> <hook file="tweakdatapd2.lua" source_file="lib/tweak_data/tweakdatapd2"/> </hooks>

Optimally you want the equipment to only be loaded in the level you need it in.

Lua

Copy the following code into your tweakdatapd2.lua you created earlier:

Hooks:PostHook( TweakData, "_setup_point_of_no_returns", "custom_ponr", function(self) self.point_of_no_returns.(your ponr id here) = { color = Color(1, 1, 0, 0), timer_flash_color = Color(1, 1, 0.8, 0.2), attention_color = Color(1, 1, 1, 1), scale_box = true, text_id = "hud_assault_point_no_(ponr id)" } end)

* Change "custom_ponr" to something unique.

color

The color of the text and HUD elements.

timer_flash_color

The color in which the timer flashes every second.

attention_color

The color in which the box background flashes.

scale_box

/

Set to true to have the box scale with the text. If false, the box will have a set size.

text_id

The string ID for the text of your PONR. Needs to be localized.
Overkill usually uses "hud_assault_point_no_ponr id".

* Your localized string can glitch the box if it's too long, even with scale_box = true.