STEAM GROUP
Payday 2 Mechanics PD2mech
STEAM GROUP
Payday 2 Mechanics PD2mech
22
IN-GAME
74
ONLINE
Founded
September 27, 2015
Frankelstner May 14, 2016 @ 9:13am
XP tracking script
This shows the diff and XP in the top left corner.

-- Show total XP in the top left corner, as well as recently awarded XP. Red: Infinite assault. Green: Weapons hot. Light blue: Stealth. GameSetup.oldUpdate = GameSetup.oldUpdate or GameSetup.update PlayerManager.xpTexts = {} function round2(num, idp) return string.format("%." .. (idp or 0) .. "f", num) end function GameSetup:update(t, dt) GameSetup.oldUpdate(self, t, dt) if PlayerManager.posPanel then local text = "" if managers.groupai and managers.groupai:state() then text = round2(managers.groupai:state()._difficulty_value or 0,2) PlayerManager.posText:set_color(managers.groupai:state()._hunt_mode and Color(1,0,0) or managers.groupai:state()._enemy_weapons_hot and Color(0,1,0) or Color(0,1,1)) else text = round2(0,2) PlayerManager.posText:set_color(Color(0,1,1)) end if managers.experience and managers.experience._global and managers.experience._global.mission_xp_current then text = text .. " " .. tostring(Application:digest_value(managers.experience._global.mission_xp_current, false)) or "None" for xpTime, xpText in pairs(PlayerManager.xpTexts) do if t < xpTime + 20 then text = text .. ", " .. xpText else table.remove(PlayerManager.xpTexts, xpTime) end end else text = text .. " 0" end PlayerManager.posText:set_text(text) else if managers.hud then local hud = managers.hud:script(PlayerBase.PLAYER_INFO_HUD_FULLSCREEN_PD2) PlayerManager.posPanel = hud.panel:panel({name = "positionpanel"}) PlayerManager.posText = PlayerManager.posPanel:text({ name = "textname", text = "texttext", font = tweak_data.hud.medium_font, font_size = tweak_data.hud.name_label_font_size, color = Color.green, align = "left", vertical = "top", layer = 1, w = 2000, h = 24 }) end end end core:import("CoreMissionScriptElement") function ElementExperience:on_executed(instigator) if not self._values.enabled then return end local text = self._editor_name .. ": " .. self._values.amount local curTime = TimerManager:game():time() if PlayerManager.xpTexts[curTime] then PlayerManager.xpTexts[curTime] = PlayerManager.xpTexts[curTime] .. ", " .. text else PlayerManager.xpTexts[curTime] = text end log("exp " .. text .. " " .. tostring(curTime)) managers.experience:mission_xp_award(self._values.amount) ElementExperience.super.on_executed(self, instigator) end

Add to hooks of some mod, using

{ "hook_id" : "lib/setups/gamesetup", "script_path" : "xptracker.lua" }
where the script has been named xptracker.lua.
Last edited by Frankelstner; Sep 10, 2016 @ 11:07am
< >
Showing 1-15 of 22 comments
Frankelstner May 14, 2016 @ 11:21am 
Apparently clients execute their XP nodes locally. But the disabled info is not synchronized if the client joins mid-game. So when XP is awarded behind something that is disabled by default, clients dropping in will not get that XP unless they were there when it was enabled.
blinya Aug 4, 2016 @ 9:28am 
How to install and use this script? What programs are needed for this?
Frankelstner Aug 5, 2016 @ 11:14am 
Download BLT, if you don't have it yet.
Make a new folder in the "mods" folder, name it e.g. "misc".
Make a new file named "mod.txt" with this content below.
Make a file named "xptracker.lua" in the misc folder, with the content of the large codebox from my other post.
The script should then automatically show XP in the top left corner.
{ "name" : "misc", "hooks" : [ { "hook_id" : "lib/setups/gamesetup", "script_path" : "xptracker.lua" } ] }
Last edited by Frankelstner; Aug 5, 2016 @ 11:19am
blinya Aug 5, 2016 @ 12:22pm 
Thanks. Works great!
Undercover: 24500
1000 on taxman t-shirting the server.
1000 on restarting the hack (can be triggered several times).

Murky station: 8000
1000 on finding equipment (can be triggered 4 times).
2000 on opening train with equipment (can be triggered 4 times).
1000 on securing additional bag (can be triggered 14 times).

Lab rats: 5000
2000 on adding tablet to mixer (can be triggered several times).
1000 on adding correct ingredient (can be triggered several times).
500 on bagging meth (can be triggered several times).
500 on securing meth bag (can be triggered several times).
15000 on surviving Necrocloacker event.

Counterfeit: 21000
2000 on disarming the trap.
4000 on printing money (can be triggered several times).
1000 on securing bag in helicopter's cage (can be triggered several times).

Biker heist

Day 1: 14500
500 on securing bag (can be triggered several times).
2000 on finding gas tank and pipes.
3000 on helping mechanic in garage.
1000 on taking Cola to mechanic.
8000 on finding skull.
6000 on finding seat.
3000 on finding engine.
2000 on finding tools.

Day 2: 10000
500 on securing bag (can be triggered several times).
Last edited by blinya; Aug 7, 2016 @ 11:27am
blinya Aug 8, 2016 @ 1:23pm 
Theres something wrong with xp marks? Need to write all xp events?
Frankelstner Aug 9, 2016 @ 12:37pm 
Certainly not. I check the files (except Biker) myself before adding, so it took a while. Thanks!
blinya Aug 18, 2016 @ 8:32am 
j.c. 30: Lab rats; Biker heist
j.c. 70: Biker heist Pro
blinya Aug 20, 2016 @ 6:26am 
j.c. 10: Santa's workshop

Santa's workshop: 4000

1000 on completing the present (can be tiggered several times)
1000 on securing the present (can be tiggered several times)
4000 on surviving helicopter's safe event
8000 on opening the safe
blinya Aug 22, 2016 @ 5:25am 
There is a bug in Rats day 3 with triggering additional 14000?
Maybe its possible to pass by securing in day 2 only meth bags?
Frankelstner Aug 23, 2016 @ 12:41pm 
Well yeah.

XP is not guaranteed. The less bags you secure on D2, the more likely it is to get XP. But even with 0 bags secured on D2, there is still the chance for 14 empty suitcases.

Realistically speaking, I don't think I've ever seen less than 10 bags in the suitcases though.

It's a matter of XP vs money.
blinya Sep 1, 2016 @ 5:50am 
Ok. It is not possible to get 100% chance, but when you secure on day 2 only meth bags, you gain 4000 xp, and it increase chances for day 3 to trigger 14000 xp.

Rats:

Day 3: 2000
(-escape line)

Watchdogs:

Day 1: 12000
2000 on securing all bags.
2000 on chopper escape.
(-escape line)

Day 2: 12000
1500 on securing a bag (can be triggered several times; no reward for the first three bags).
(-escape line)


Theres bug in First Wold Bank, with triggering loud escape xp?

First World Bank: 4000 (2000 for storage + 2000 for stealth escape)

1000 on securing money (can be triggered several times).

Stealth only:
1500 on rewiring box (can be triggered several times).
1000 on finding code.
2000 on inside man opening vault area.
2000 on opening vault with keypad.

Loud only:
6000 on opening the gate (2000 for seal + 4000 for drill and seal)
6000 on thermite done.
2000 on C4 on wall.
40000 on entering secret vault.
143 on securing gold (can be triggered several times).
2000 on loud escape.


There is a bug in GO Bank with triggering in stealth exp for assembling the cage?

GO Bank: 8000

1000 on securing bag (can be triggered several times).

Stealth only:
500 on phone answered (up to 4 times)

Loud only:
3000 on drill finished.
1000 on loud escape.
Last edited by blinya; Sep 2, 2016 @ 6:09am
blinya Sep 7, 2016 @ 8:47am 
This script is capable of tracking diff changes?
Frankelstner Sep 10, 2016 @ 6:30am 
It does now.
blinya Sep 10, 2016 @ 9:36am 
Diff visualisation appears only at the first triggering xp value.
https://youtu.be/942vEL9vO8g
And what about endless assault mode?
Frankelstner Sep 10, 2016 @ 11:08am 
Mode is encoded in color now: Cyan is stealth, green is assault, red is infinite.

And I hope the other thing is fixed too.
< >
Showing 1-15 of 22 comments
Per page: 1530 50