PAYDAY 2
[PSA] BLT Hook (& BLT: CSE) (& Troubleshooting)
Hi, I'm Kail, and I was one of the first people to be accepted to test the BLT Lua hook (Better Lua injecTor) in closed beta.

Scroll down to the bottom of this post for a troubleshooting guide.

Also, scroll down to the bottom for current news.

There's been a lot of commotion regarding the new Lua hook (anger, frustration, confusion, bewilderment, etc.) and while it's certainly called for (Four mod developers simultaneously switching only to this hook? It can't be used with HoxHud?! I have to convert every single one of my old scripts myself?!?!) I'm not sure if it's necessary.

Before I begin, I'll state what the BLT hook is for people who are still yet unaware. The PAYDAY 2 Better Lua injecTor (or BLT hook) is a new build of IPHLPAPI.dll that sets up a 'workspace' for modders and end users in PAYDAY 2, in the sense that mod creation and mod installation are both far easier with the BLT hook. Let me elaborate.

The workspace I mentioned is like a toolbox - everything is inside for you to use, all you need to do is take what you want. BLT hook does this by integrating a lot of new functionality and condition code straight out of the box, so mod developers have more convenient tools at their disposal when creating mods. Additionally, the BLT adds GUI elements into the base game - that is, there are added menus, prompts and options inside the game, a lot of things can be changed ingame. For mod developers as well, you are given easy-to-use networking functionality and a dynamic auto-updating system, so your userbase won't have to manually go and reinstall the new version of your mod - a window pops up when they first boot the game if their version is outdated, they click a button, update is downloaded, restart the game, you're up to date.

For end users (people who download and use mods) mod installation is a whole lot easier too. In the previous Lua hook, you had the .yml file, which was completely inefficient for people who weren't as knowledgeable in the area of editing in a code (you could have spacing errors before an entry, messing up the whole loading process, or you could have two outputmode/log/offset sections, for people who copy pasted another bit in). With BLT hook, however, it's been simplified to the point where if you want to install a mod, all you need to do is drag & drop the mod folder in. That's it. You're done!

Every mod requires a "mod.txt", which you can say is the "PD2Hook.yml" of this hook, except every mod has their own unique file, so the end user doesn't have to do any editing. This file is simple to edit, and there is thorough online documentation to guide new users through the process of creating a mod.txt.

"But Kail," you may be saying. "What about the lib/lua system? Isn't it the same thing as the BLT hook system? Why couldn't the mod creator just make it so that you can use both systems?"

I asked Wilko, the BLT hook's creator, for input.

"Making mods easy to install, manage, and uninstall is one of the top priorities with the BLT. The lib/lua system uses a naming convention which makes things difficult for less savvy users to install or uninstall mods. Having a straight mods folder tells the user exactly what is in the folder, where the mods need to be, and where to go if they want to remove their mods."

So, that's that. Even if the two systems aren't integrally different, its the accessibility of the end user that makes the cut in the end. For example, if my favourite mod decides to update to the lib/lua system from the .yml system, I have to 1. edit my YML, and remove anything that relates to that mod, 2. delete the currently existing Lua files in my lua/ folder or elsewhere so I don't get the two mixed up, and 3. place the mod.lua and the mod/ inside lib/lua.


I'm getting off track. I'll now explain some other things that might need explaining.

First, the BLT hook and subsequently any mods built off of it are incompatible with HoxHud. This is because the .dll that BLT uses to load code into the game - IPHLPAPI.dll - is named the same (reason being is that IPHLPAPI.dll is a Windows DLL that gets loaded into Payday automatically. We hijack the DLL name, and forward all functions to the real IPHLPAPI.dll while making use of the fact that we can now run our own code). So, because the BLT hook is an independent, rebuilt .dll file, and it can only be injected this way, that means HoxHud cannot be injected either, because HoxHud relies on the old Lua hook's built in functions that are not present in the BLT's IPHLPAPI.dll.

Second, the mod.txt really isn't that complicated to make, if you're concerned about having to convert all your mods. Really, if you dedicate some time to understanding it instead of brushing it off as complicated, you can realize it's fairly easy. There's detailed documentation on how to create the file here[payday-2-blt-docs.readthedocs.org] and in the end, it's really just replacing things with values from your PD2Hook.yml, except if you ever need to add something new, you won't have to worry about spacing errors or complicated file paths.

Third, perhaps the most important point is that you have a choice of using the BLT hook. Sure, some new mods can only be used with the hook, but that doesn't mean you should feel like you're losing something if you switch from the old hook. You don't need to feel pressure to switch your mod to this hook or feel forced to use BLT because of its "great new features". People will have opinions, and that's fine. People can be adverse to change, and that's fine. People will agree or disagree about their thoughts on the BLT hook, on the old hook, etc. But arguing over a concept that took a lot of time and effort to realize is a bit unfair to the person who made it, don't you think?

I think that's it. If you have any further questions or concerns, please raise them in the comments below. This thread for now will act as a hub for any technical issues or problems users may have regarding using the BLT hook. Feel free to ask for help, I'm sure someone will get back to you.

However, I don't want this thread to become filled with arguments. You are free to share your opinion, and other people are free to respond with their opinion. But if you can, keep the discussions civil.

In any case, I hope this has helped clear the air and help with any confusion regarding this matter.

Thanks for reading, and keep those helmets flying.

- Kail, Wilko, Waddles, Dougley, GREAT BIG BUSHY BEARD

---

/// TROUBLESHOOTING ///

Is your PAYDAY not starting up? Here's some things you can try:

Download the Visual C++ 2013 Redistributable from this microsoft site.[www.microsoft.com] Download the x86/32-bit version and install it.

Run PAYDAY in administrator mode.

Are you running Windows XP or Windows Vista? If so, it's possible that BLT will flat-out not work, due to compatibility issues with the sysytem.

If those don't work, please post your situation as a comment, or add one of the people above for further assistance.

/// CURRENT NEWS ///

Hook War[paydaymods.com]

Mod Issues[paydaymods.com]
Legutóbb szerkesztette: iris loves you; 2015. ápr. 6., 17:14
< >
4660/118 megjegyzés mutatása
Ahab eredeti hozzászólása:
"Step 4 - Publish
Once you've filled in your update information, simply click the Publish New Version button. Your archive will be uploaded, and once complete will start to automatically update all mod users."

Is http://manage.paydaymods.com access just being handed out to people who have been vetted? or can anyone get an account and push an update with no checks to a bunch of people.

The mod manager on paydaymods.com is maintained by the site owners (Wilko and Waddles), and they will only distribute accounts to the mod manager if they see you mod is fit, not hacking, and safe. So yes, access is only given to people who have been vetted.
B Dawg (Kitiltva) 2015. ápr. 5., 11:22 
S14y3d eredeti hozzászólása:
How do you get persist scripts to only run once? The MultiCustomiser scripts are making my game super laggy.
They wouldn't be persist scripts if they only ran once though. I'm guessing you'd have to turn them into hooks or keybinds but I have no idea if multicustomizer would work then.
Legutóbb szerkesztette: B Dawg; 2015. ápr. 5., 11:23
Ahab eredeti hozzászólása:
Updates aren't checked before being pushed out?
You mean, the updates themselves or the files?

The updates are automatically pushed for the time being, but that's because the mod manager right now is only given to people with reputations, clear motives, trustworthy etc. We're going to open up a little bit more as time goes on, but as with all auto-updating features safety is key.

S14y3d eredeti hozzászólása:
How do you get persist scripts to only run once? The MultiCustomiser scripts are making my game super laggy.
Open your car4customizer.lua or whatever you have, and check the first line at the top. It should be like, "if not car4customizer then". Insert whatever is at "car4customizer" as your global variable in your mod.txt.
Thanks, got it working properly now.
My game won't start at all after downloaded the BLT, before I even download goonmod or anything. I figured out I seem to be having some kind of trouble with the .dll that you add with it, and I have installed the C++ thing and run as admin, but no luck. If I delete the .dll or file or even just move it to a file instead of just leaving it in the directory then the game starts up fine, but goonmod isn't working then. Can someone please help me with this? Okay, so I just got this error when I tried to start the game from the .exe file in the payday 2 folder instead of from my desktop: The procedure entry point InitializeCriticalSectionEx could not be located in the dynamic link library KERNEL32.dll. I have no clue what that means.
Legutóbb szerkesztette: Pup; 2015. ápr. 6., 6:33
US Army Sniper eredeti hozzászólása:
Okay, so I just got this error when I tried to start the game from the .exe file in the payday 2 folder instead of from my desktop: The procedure entry point InitializeCriticalSectionEx could not be located in the dynamic link library KERNEL32.dll. I have no clue what that means.

Are you using Windows XP?
pez2k eredeti hozzászólása:
US Army Sniper eredeti hozzászólása:
Okay, so I just got this error when I tried to start the game from the .exe file in the payday 2 folder instead of from my desktop: The procedure entry point InitializeCriticalSectionEx could not be located in the dynamic link library KERNEL32.dll. I have no clue what that means.

Are you using Windows XP?
Yes
US Army Sniper eredeti hozzászólása:
pez2k eredeti hozzászólása:

Are you using Windows XP?
Yes
BLT does not work on Windows XP at this time. However, try the above methods anyway, to see if you can cheese it to work.
Legutóbb szerkesztette: iris loves you; 2015. ápr. 6., 9:00
Kail eredeti hozzászólása:
US Army Sniper eredeti hozzászólása:
Yes
BLT does not work on Windows XP at this time. However, try the above methods anyway, to see if you can cheese it to work.
I downloaded an older version, it's working now. Just have to wait until BLT work with XP I guess, until then I'll use the old version. Thanks for letting me know.
US Army Sniper eredeti hozzászólása:
Kail eredeti hozzászólása:
BLT does not work on Windows XP at this time. However, try the above methods anyway, to see if you can cheese it to work.
I downloaded an older version, it's working now. Just have to wait until BLT work with XP I guess, until then I'll use the old version. Thanks for letting me know.
Please don't take offense to this but I REALLY need to know. Why are you still using Windows XP?
Sandman®™, Eh?/Docholiday332 eredeti hozzászólása:
US Army Sniper eredeti hozzászólása:
I downloaded an older version, it's working now. Just have to wait until BLT work with XP I guess, until then I'll use the old version. Thanks for letting me know.
Please don't take offense to this but I REALLY need to know. Why are you still using Windows XP?
Because I'm broke as ♥♥♥♥!
Hook War[paydaymods.com]

Mod Issues[paydaymods.com]


These are two articles that Waddles posted on paydaymods.com. I'll periodically update this thread with his posts, to notify people of any news or information.

In particular, Hook War is worth a read, and it sums up a lot of the current situation around BLT and BLT: CSE.
Sorry but complaining about an officially Overkill approved mod (for which they have/had insight into the source code and still approve it) is Kindergarden at the highest Level. We all know there were and are several reasons why HoxHUD is a closed source (just imagine all the script kiddies going wild with really useful code examples, not having to RE them on their own and all the other drama that was involved over a year ago). Just accept the fork at let the users decide what they want to use or not.

This could develope to a wall of text but i'll stop here and simply repeat: It is my choice which mods i want to use and you are kinda complicating things instead of making it easier and the worst part: all in the name of Open Source Matters. Big No-No.

P.S.: I don't see anything wrong in having both "hook systems" running, esp. when "basically" nothing changes for classic BLT...
Legutóbb szerkesztette: []\/[] []_[] []-[]; 2015. ápr. 6., 23:17
\/ _ - eredeti hozzászólása:
Sorry but complaining about an officially Overkill approved mod (for which they have/had insight into the source code and still approve it) is Kindergarden at the highest Level. We all know there were and are several reasons why HoxHUD is a closed source (just imagine all the script kiddies going wild with really useful code examples, not having to RE them on their own and all the other drama that was involved over a year ago). Just accept the fork at let the users decide what they want to use or not.

This could develope to a wall of text but i'll stop here and simply repeat: It is my choice which mods i want to use and you are kinda complicating things instead of making it easier and the worst part: all in the name of Open Source Matters. Big No-No.

P.S.: I don't see anything wrong in having both "hook systems" running, esp. when "basically" nothing changes for classic BLT...
I'm sorry? Please specify who you're directing your comments to.
Kail eredeti hozzászólása:
In particular, Hook War is worth a read, and it sums up a lot of the current situation around BLT and BLT: CSE.
It's good that conflict seems to be avoided. While the BLT team want to stick with their way, giving the OK for someone to tweak it for more functionality is a great step. Each can focus on their work, and the rest of us can have more robust system if we want.
Legutóbb szerkesztette: The Loot; 2015. ápr. 6., 23:40
< >
4660/118 megjegyzés mutatása
Laponként: 1530 50

Közzétéve: 2015. márc. 31., 22:33
Hozzászólások: 117