This adds an auto injecting DXGI dll to Mafia 2 to inject Lua files.
Permissions and credits
Credits and distribution permission
Other user's assetsAll the assets in this file belong to the author, or are from free-to-use modder's resources
Upload permissionYou are not allowed to upload this file to other sites under any circumstances
Modification permissionYou must get permission from me before you are allowed to modify my files to improve it
Conversion permissionYou are not allowed to convert this file to work on other games under any circumstances
Asset use permissionYou must get permission from me before you are allowed to use any of the assets in this file
Asset use permission in mods/files that are being soldYou are not allowed to use assets from this file in any mods/files that are being sold, for money, on Steam Workshop or other platforms
Asset use permission in mods/files that earn donation pointsYou are not allowed to earn Donation Points for your mods if they use my assets
Author notes
This author has not provided any additional notes regarding file permissions
Please log in to find out whether this mod is receiving Donation Points
Changelogs
Version 1.21
Optimized keybind logic.
This mod utilizes a feature in Windows, that Windows will always load core libraries from the local folder first before system32. This way, we can intercept a binary (I've chosen DXGI) to ride the PEB list superhighway into the program without having to invoke LoadLibraryA via a loader like previously required. So, simply starting Mafia II will auto load the Script Hook for you. No more ALT+TABing required.
I noticed that for some reason when I first get into the game, the scripts "execute" but the keybinds can't find the function. It takes a few minutes for something the game is doing to finish loading its Lua and then finally callback the Script Hook proper and then the scripts work. IDK, it's weird...