Painkiller: Black Edition

Painkiller: Black Edition

Not enough ratings
Painkiller Ultra High Resolution Menu Fix
By Peppins
For who want play painkiller at very high resolution like 4k or above, there is a little issue on the menu. If you in game have high fps on 4k, when you open the menu and also go in the sub menu, you will notice a very high lag, your fps will drop close to 1fps, but if you go back in game everything is fine.

So I've thinked for a workaround: automatically change the resolution when you go in the menu or exit from it and return in game.

You need this little file that you can put in the "Data\LScripts\Main" folder of the game (game.lua): click here[drive.google.com]

If you already have the file maybe is because you have some other mods installed, but don't worry and read below:

Open the "Game.lua" file (with notepad, notepad++, wordpad for example) and search for this line:

function Game:ApplySettings()

Now before the "end" of this function, put this (all):

if R3D.IsFullscreen() and PMENU.Active() and Cfg["Resolution"] ~= "1920X1080" then Cfg["Resolution"] = "1920X1080" R3D.ApplyVideoSettings( Cfg.Resolution, Cfg.Fullscreen, Cfg.Gamma, Cfg.Brightness, Cfg.Contrast, Cfg.Shadows, Cfg.TextureQuality, Cfg.WeatherEffects, Cfg.ViewWeaponModel, Cfg.TextureFiltering, Cfg.DynamicLights, Cfg.Projectors, Cfg.Coronas, Cfg.Decals, Cfg.DecalsStay ) end

Instead of the "1920X1080" put the resolution that you want in the menu, if different.

Now search for:

function Game:Update()

And put this before the last "end" (all):

if R3D.IsFullscreen() and Player and Cfg["Resolution"] ~= "3840X2160" and not PMENU.Active() then Cfg["Resolution"] = "3840X2160" R3D.ApplyVideoSettings( Cfg.Resolution, Cfg.Fullscreen, Cfg.Gamma, Cfg.Brightness, Cfg.Contrast, Cfg.Shadows, Cfg.TextureQuality, Cfg.WeatherEffects, Cfg.ViewWeaponModel, Cfg.TextureFiltering, Cfg.DynamicLights, Cfg.Projectors, Cfg.Coronas, Cfg.Decals, Cfg.DecalsStay ) end

Instead of "3840X2160" set the resolution that you want to use when you're in game.

Save the file and play.

If you use this "fix" you can't change the resolution from the game, because when you do it, later it will be overwrited by the code above.

When you enter/exit in game/menu you will see a black screen for a second, it's normal because the engine is changing the resolution (the same like you do it from the video option menu).

Hope that this will help who want play the game at high resolution without the lag of the menu. This will work in others painkiller games too, because same engine. Just use the manual method because the file above is for painkiller 1.64 only. The "Game.lua" file it's inside the "LScripts.pak", you need to extract it, for example with Painfull or other tools (remember su put the files in the correct folder and subfolders like above).

By Peppins
   
Award
Favorite
Favorited
Unfavorite
28 Comments
Binq 10 Mar @ 12:27am 
For those suffering from this issue, we have implemented a fix in the recent versions of Painkiller RTX Remix, which does not require manual editing of script files:

https://www.moddb.com/mods/painkiller-rtx-remix
The Slayer 31 Aug, 2024 @ 1:51pm 
hi Peppins can you help me i try it on my 4k monitor and this is not working for me. can you make the file for me and sent me?
Peppins  [author] 30 May, 2024 @ 11:59am 
@Χάρης Interesting, i'll investigate on it (but whe i've time i'll fix the fonts directly like suggested by another user). In any case you can try the "blur hit fix", search on my guides.
Χάρης 30 May, 2024 @ 8:50am 
By the way, when I am attacked by monsters the game lowers the resolution for 1 second and then it goes back to normal. Is there a way to prevent that?
Χάρης 29 May, 2024 @ 6:48am 
Thanks, this worked :GDEasy:
Peppins  [author] 24 Nov, 2023 @ 12:20pm 
@Viva Victoria It's not related to use this 'mod'.
Swap Commends 24 Nov, 2023 @ 7:30am 
Thanks a lot man. Used for 1.66 patch, works fine but i have lost my save files))
Icy 7 Jun, 2023 @ 5:53pm 
Didn't play with pk++ for a long time now, but yeah, Painkiller engine definitely doesn't have simple static hud, it's being modified dynamically based on res and stuff, and devs didn't test it for future proof enough
Peppins  [author] 7 Jun, 2023 @ 1:19pm 
@Icy Interesting, nice find!!

ps. pk++ had same issue by using different hud style, fps drop even on low res if i remember good
Icy 7 Jun, 2023 @ 10:36am 
I think I found even easier way to fix it, you just have to decrease size of all fonts involved in problematic menus. It can be done by editing all hud lua files one by one I guess, but instead I just reduced size of timesbd.ttf font itself through FontForge by 60%, seems to be working much better now in 4k.