0 of 0

File information

Last updated

Original upload

Created by

gir489

Uploaded by

gir489

Virus scan

Safe to use

Tags for this mod

About this mod

This is a self-injecting port of Mafia 3 Script Hook to the Definitive Edition.

Permissions and credits
Changelogs
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 III will auto load the Script Hook for you. No more ALT+TABing required.

I've also included SpecialK (d3d11.dll) it is entirely optional to use, however, I found without it, I get a black screen upon starting Mafia III. If you found another to fix that, use that instead. SpecialK can also force the game into Borderless Windowed mode, which is required for me, because I can't stand the stupid loading screens this game has. It also forces you to look at the DON'T CLOSE THE GAME WHILE SAVING PLEASE nonsense for 8 seconds every time the game starts. So, if you're like me and want to watch brainrot for 8 seconds while it does it every time, I suggest you use SpecialK. Make sure you tell it to continue rendering under Window Management -> Input/Output Behavior -> Background Behavior.

You can also disable that stupid ad you see at the beginning of the game. Simply sinkhole any connections from promotions.api.2kcoretech.online to a trusted IP (I use Google).

In your hosts file put:

2607:f8b0:4004:c17::71 promotions.api.2kcoretech.online
2607:f8b0:4004:c17::71 promotions-ew-assets.2kcoretech.online
2607:f8b0:4004:c17::71 telemetry.api.2kcoretech.online

You basically need to point it towards a HTTP server that will just respond with 404 with whatever you give it. You can sinkhole it to 127.0.0.1 (localhost) however, this forces the program to wait until the timeout happens which is usually like 5-10 seconds, so I don't feel like waiting anymore for this stupid game to load, so I sinkhole it to Google. If you are REALLY paranoid about the traffic getting to someone, you can spin up an HTTP server locally and then sinkhole it to 127.0.0.1 and then it should just respond with 404 to anything you give it. Telemetry I threw in there because fuck 2K. Promotions API downloads the JSON file used in the /promotions/ folder. The promotion assets URL is the CDN for all the PNGs for the ads. If you don't want it to try and sign into 2K each time, you can sinkhole sso.api.2kcoretech.online, but it'll complain it can't login each time and wait for you to click OK, very annoying. After you block the entries, make sure you delete the cache and promotions folder within Mafia III.

Included with the download are my test script (Khorne.lua) which is a combination of scripts from netspider4 and Kolyan2960 that I used for testing and the original developer's script (dev.lua).