Page 1 of 10

L4D2 Center HUD fix

Posted: 28 Nov 2009, 19:04
by GeneralAdmission
2010-8-11
Delphium has created a thorough wiki page HERE for the new HUD modifications, complete with instructions on how to create custom mods for uncommon resolutions. Official downloads are linked on the wiki page for the following resolutions: 3072x768, 3840x1024, 5040x1050, 5760x1080.

Many thanks to Delphium for his hard work!

2010-8-1
VPK addons for common resolutions have been created and are going through testing/refinement. If you wish to try out the current versions there are download links on pages 11 and 12 of this thread. So far Official Dedicated servers don't seem to recognize the addons, while Local Server and Single Player work correctly. Results have been mixed for Best Available Dedicated.

**Update** 2010-7-28
The most recent L4D2 update has enabled hud mods in .vpk addons. The HUD project will now be redesigned based on this change and new mods posted for multi-monitor users. Though this will require some work, long-term there are great benefits. Consider the old mods obsolete, and in fact it would be be best for all users to discontinue use of modded pak01_dir.vpk files for HUD mods, as Valve has openly stated that such files *might* have issues with VAC servers. (They are always ambiguous about VAC stuff)

It will take some time to rework & test the HUD mods. Please be patient. Any updates will be posted to this thread, and eventually all download links will be here in the first post.

**Update** 2010-7-20
On July 9 Valve updated L4D2 with this change:
Default consistency checks now include pak01_dir.vpk. Addon authors should not hack the pak01_dir.vpk directly but instead include content in a VPK
Initial tests indicate this has effectively nullified any HUD mods (see HERE). Investigation will continue. Please post any relevant information in this thread.

************************************
VVVVVV**DEPRECATED**VVVVVV
************************************
NOTE-
Forum member Delphium has created an Aspect Ratio Calculator/HUD Editor for Source Engine games. It can be used to calculate the necessary "xpos" (aka- horizontal positioning) values to put hud elements on the center monitor of your multi-monitor setup. Please be sure to leave feedback and comments in the development thread HERE.

Thanks Delphium!

------------------------
OK gentlemen. Here's my first attempt at centering the HUD for L4D2. It seems to work fine for me, though I might have missed something. From the readme:

Code: Select all

1) Navigate to your ..Steamsteamappscommonleft 4 dead 2left4dead2 folder.
   
   2) BACK UP the pak01_dir.vpk file to a different location!!!
   
   3) Extract this archive into the ..Steamsteamappscommonleft 4 dead 2left4dead2 folder. It will overwrite the pak01_dir.vpk file and add hudlayout.res to the scripts subfolder.
   
   
   --I have no idea if this will cause server incompatibility or ban issues. Use at your own risk!!!


CURRENT STATUS- 2009/12/30
-Problems reported by users. Updates in progress. Will take some time to complete.
-Still waiting on Valve for an official response regarding VAC.

DOWNLOADS (links removed)

-3840x1024 has been updated
-5040x1050 should also work for 5760x1200

Thanks to Delphium for posting a fix for 5760x1080 HERE.

Delphium has posted excellent instructions for calculating HUD values for non-standard aspect ratios/resolutions HERE. If one of the pre-built mods available in this thread doesn't work, try this.

L4D2 Center HUD fix

Posted: 28 Nov 2009, 20:10
by Mach1.9pants
I await a 5760x1200 with tremendous anticipation :)

L4D2 Center HUD fix

Posted: 28 Nov 2009, 22:48
by GeneralAdmission
I await a 5760x1200 with tremendous anticipation :)

Done. :)

Let me know if anything is broken/weird. If you see something and can snap a screenshot that would help.

L4D2 Center HUD fix

Posted: 28 Nov 2009, 23:13
by Robobandit
Doesn't work for 5760x1080.. the hud isn't quite on the center monitor and one of the health bars overlaps another one.


Some of the information is cut off..

http://img134.imageshack.us/img134/4209/left4dead2w.jpg

L4D2 Center HUD fix

Posted: 28 Nov 2009, 23:28
by Mach1.9pants
[quote]I await a 5760x1200 with tremendous anticipation :)

Done. :)

Let me know if anything is broken/weird. If you see something and can snap a screenshot that would help.Will try tonight, cheers.

L4D2 Center HUD fix

Posted: 29 Nov 2009, 10:36
by GeneralAdmission
5760x1080 is a different aspect ratio and will need unique settings. I'll put it on the list but don't know how soon it will be ready.

The cut off/overlapped info is likely something I borked. Will investigate...

L4D2 Center HUD fix

Posted: 29 Nov 2009, 11:21
by Mach1.9pants
It didn't work for me, GA. When I started it defaulted back to 640x480 (or whatever) then would not let me select anything above 3840x1024 in the options. So you must have borked something, cheers anyway.

L4D2 Center HUD fix

Posted: 29 Nov 2009, 11:22
by Geige Engel
How'd you open that Source Add-On file, and what did ya have to edit? I'm curious cause I want to give it a crack for my resolution, 4080 x 768. :D

L4D2 Center HUD fix

Posted: 29 Nov 2009, 21:55
by GeneralAdmission
It didn't work for me, GA. When I started it defaulted back to 640x480 (or whatever) then would not let me select anything above 3840x1024 in the options. So you must have borked something, cheers anyway.

That's what I get for trying to edit 2 files at once while half asleep. :P

How'd you open that Source Add-On file, and what did ya have to edit? I'm curious cause I want to give it a crack for my resolution, 4080 x 768.

Considering the multiple resolutions needed that's a good idea. Here's what to do:

1) Download GCFScape. Use it to open pak01_dir.vpk and extract hudlayout.res to the scripts sub-folder.

2) Edit the "xpos" HUD variables found in the hudlayout.res file using a text editor following Downtown1's instructions HERE.

entries like "100" measure from the left side of the screen
entries like "r100" measure from the right side of the screen
entries like "c-100" measure from the center of the screen (none of these should need tweaking)

I also ignored all values within Split-screen subsections.

3) The game engine does not automatically see the extracted hudlayout.res file and use it instead of the one in the .vpk file. To correct this you need to HEX edit the .vpk:

Search for this text string:

Code: Select all

scripts.hudlayout

and change something in hudlayout to rename the .res file within the .vpk, causing the engine to "not see" it. I did this:

Code: Select all

scripts.mudlayout

This process might have to be repeated from scratch if a game update breaks the modded .res file. If this happens, the first thing to check is step 3--the pak01_dir.vpk file might have been updated. Try to hex-edit the filename again and see if the extracted hudlayout.res is recognized again. If not, start from scratch with Step 1.

L4D2 Center HUD fix

Posted: 30 Nov 2009, 08:48
by Robobandit
If you're willing to make one for 5760x1080, I would be very grateful. There's no rush, though.. as I am fine playing with the HUD on the side monitors.. it doesn't really bother me. However, I'm sure others will be looking for that resolution as well :)

L4D2 Center HUD fix

Posted: 01 Dec 2009, 18:28
by danielj
Hi,

First, thanks to everyone here at WSGF giving excellent information

Second, Super thanks for this fix.

One problem I had was that I could not see my own health

Solution to this was to edit xpos in CHudLocalPlayerDisplay to "xpos" "r1000"

Not perfect, but I can at least see it.

Running on 3x1680x1050 (5040*1050)

L4D2 Center HUD fix

Posted: 01 Dec 2009, 18:44
by GeneralAdmission
If you're willing to make one for 5760x1080, I would be very grateful. There's no rush, though.. as I am fine playing with the HUD on the side monitors.. it doesn't really bother me. However, I'm sure others will be looking for that resolution as well :)

Yeah I'm willing...just really short on time now that the holiday weekend is past and I have some contract work due next week.

When I started it defaulted back to 640x480 (or whatever) then would not let me select anything above 3840x1024 in the options.

That's odd. The game itself wouldn't let you select your resolution in the options menu? Have you tried launching with the -w -h switches?

@danielj

Happy to help. Care to post an in-game screenshot when you can? Would help as reference data.

L4D2 Center HUD fix

Posted: 01 Dec 2009, 19:09
by MaxDarklighter
Hmm... guys and what about bun? Is there real risk of be buned using this? :cry:

Re:

Posted: 01 Dec 2009, 22:57
by GeneralAdmission
Hmm... guys and what about bun? Is there real risk of be buned using this? :cry:

I will be submitting an inquiry to Valve concerning this mod/tweak. Hopefully it will get the all clear.

Re:

Posted: 02 Dec 2009, 03:28
by A Small White Box
3) The game engine does not automatically see the extracted hudlayout.res file and use it instead of the one in the .vpk file. To correct this you need to HEX edit the .vpk:

Search for this text string:

Code: Select all

scripts.hudlayout

and change something in hudlayout to rename the .res file within the .vpk, causing the engine to "not see" it. I did this:

Code: Select all

scripts.mudlayout

This process might have to be repeated from scratch if a game update breaks the modded .res file. If this happens, the first thing to check is step 3--the pak01_dir.vpk file might have been updated. Try to hex-edit the filename again and see if the extracted hudlayout.res is recognized again. If not, start from scratch with Step 1.

I tried using two different hex editors and searching for the key, but they couldn't find it. I am wondering if you could detail a little more on how to accomplish this.

Re: L4D2 Center HUD fix

Posted: 02 Dec 2009, 04:19
by GeneralAdmission
Here's what it looks like in HxD. Some editors display text with spaces so that could be the problem with a search.


Re: L4D2 Center HUD fix

Posted: 02 Dec 2009, 05:32
by A Small White Box
Works now, good stuff.

Re: L4D2 Center HUD fix

Posted: 02 Dec 2009, 07:38
by GeneralAdmission
Works now, good stuff.

Glad to hear it. Are you working on a particular res/AR?

General note: I've contacted Valve concerning VAC & this mod. Should hopefully have a response in a few days.

Re: L4D2 Center HUD fix

Posted: 02 Dec 2009, 14:18
by MaxDarklighter
General note: I've contacted Valve concerning VAC & this mod. Should hopefully have a response in a few days.


Thank you! I really hope on positive answer! And waiting for it with pation :cheers

Re: L4D2 Center HUD fix

Posted: 02 Dec 2009, 14:45
by DaFox
General note: I've contacted Valve concerning VAC & this mod. Should hopefully have a response in a few days.


I'm assuming that if you contacted support about it you will get a canned response that they cant tell you what VAC bans for. Skins require the same vpk edit that you are doing and they have never banned for skins.