Widescreen Gaming Forum
http://www.wsgf.org/phpBB3/

Alien Swarm Centered HUD fix
http://www.wsgf.org/phpBB3/viewtopic.php?f=68&t=20217
Page 1 of 2

Author:  GeneralAdmission [ 24 Jul 2010, 02:46 ]
Post subject:  Alien Swarm Centered HUD fix

***Update***- 2010/8/1
Great news! Hex-editing the pak01_dir.vpk is no longer necessary. Valve added the following command line option in the latest update:
Code:
-override_vpk

Simply extract/edit your hudlayout.res file as needed, then launch the game with this command line parameter (you can set this by right click->Properties->Set Launch Options on Alien Swarm in your Steam library).


Update- Game updated right after I posted this. Grab the new replacement vpk here: (link removed)

The HUD for Alien swarm can be fixed like other Source games. Here's how. First, download these files: (links removed)

1- Navigate to the game directory. It should look like this:
..Steamsteamappscommonalien swarmswarm
2- BACK UP the pak01_dir.vpk file to a different location! (outside of the Alien Swarm directory)
3- Extract the pak01_dir.vpk from the above archive into the game folder, replacing the original file.
4- Navigate down into the Scripts subdirectory and extract the hudlayout.res file from the .zip into this folder.
5- Now it's time for a little editing. Tools needed: text editor and calculator.

Open the hudlayout.res file in your text editor. Scroll down until you find the section titled ASW_Hud_Master. A few lines down you will see this:
"xpos" "0"
"ypos" "0"
"wide" "f0"
"tall" "480"

Thanks to Downtown1 we know how Source HUDs work. They are based on a resolution of 640x480, which is a 4:3 aspect ratio. What you need to do is calculate an "xpos" value based on your resolution. I'll use mine as an example:

Calculate AR of a single monitor: 1280 / 1024 = 1.25
Calculate new xpos value: 480 * 1.25 = 600 -->This is the value you will enter in the "xpos" line:
"xpos" "600"

For some reason the minimap isn't affected by the master setting so it needs to be edited as well. Scroll up to the top of the hudlayout.res file to the ASWHudMinimap section and find this line:
"xpos" "r171"
Now ADD your calculated value to the current value. Mine:
"xpos" "r771"
Result:


Save the edits you made to the res file and launch the game.

To be addressed:
-I haven't played much with the fix yet so things may be broken/unchanged.
-Bezel managed resolutions may need tweaking. Maybe take full Horiz resolution, divide by 3, then use that as the value for single-screen Horiz. Please report results here so we can confirm a method.
[Ed] Re-thinking this, what you may need to do is add the Horiz res of one screen to the number of compensated bezel pixels as your single-screen Horizontal value. Example: 1680+100pix (for one set of bezels) = 1780.
-The vpk is hex-edited to force the engine to recognize the extracted .res file. Official updates to this file will break the HUD mod as the new vpk file will need to be hex edited again.
-More as I think of it.

Author:  Delphium [ 24 Jul 2010, 02:56 ]
Post subject:  Re: Alien Swarm Centered HUD fix

+rep
Excellent intructions. :cheers
I shall look into adding Alien Spawn profiles to the HUD editor to make it easier with bezel compensation.

Nice work! :)

Author:  Jackal Frost [ 24 Jul 2010, 20:25 ]
Post subject:  Re: Alien Swarm Centered HUD fix

Thank ya sir, makes playing this game a lot easier when I can see the hud. :cheers

Author:  BtzX [ 25 Jul 2010, 20:23 ]
Post subject:  Re: Alien Swarm Centered HUD fix

I didn't get this to work on eyefinity...
(it should work on offline play just as well right?)
or is it the latest update that isnt supported yet?

I pasted the pak01_dir.vpk (replacing the old one) at:
C:Program Files (x86)SteamSteamAppscommonalien swarmswarm

and the hudlayout.res at:
C:Program Files (x86)SteamSteamAppscommonalien swarmswarmscripts

my each monitor's resolution is 1680x1050
so i changed xpos to 1.6x480+171 = "r939" and 1.6x480 = "768" respectively..

the hud was still the same just like before....
am i doing anythin wrong here....?

Thanks loads for any help!!

Author:  GeneralAdmission [ 27 Jul 2010, 01:06 ]
Post subject:  Re: Alien Swarm Centered HUD fix

If the HUD is totally unchanged then I suspect the engine is not "seeing" the extracted hudlayout.res file, which would mean it is still reading that file from inside the pak01_dir.vpk. Delete that vpk from the game folder and re-extract from the archive I posted. I just double-checked and the modded .vpk is functional (yes it should work offline).

Also, did you use the second, v02 archive I posted? Steam updated the game shortly after I started this thread so I had to re-mod the .vpk and upload a new version. Let me know how this goes.

Author:  BtzX [ 27 Jul 2010, 02:40 ]
Post subject:  Re: Alien Swarm Centered HUD fix

ah, you're right!
i guess backing up the original pak01_dir.vpk, ( copying to commonalien swarm ) somehow doesnt prevent the game from accessing it...

now it works like a charm! :D

thanks much!!

Author:  GeneralAdmission [ 27 Jul 2010, 04:22 ]
Post subject:  Re: Alien Swarm Centered HUD fix

ah, you're right!
i guess backing up the original pak01_dir.vpk, ( copying to commonalien swarm ) somehow doesnt prevent the game from accessing it...

now it works like a charm! :D

thanks much!!

You're welcome. :twothumb

I'll add a little note to the first post about the vpk backup.

Author:  WaveZtream [ 27 Jul 2010, 17:44 ]
Post subject:  Re: Alien Swarm Centered HUD fix

Yeah tried it as well with my 5760x1200 resolution perfect :)

ASWHudMinimap

"xpos" "r939"

ASW_Hud_Master

"xpos" "768"

Thank you :)

Author:  GeneralAdmission [ 01 Aug 2010, 20:38 ]
Post subject:  Re: Alien Swarm Centered HUD fix

Latest game patch abrogates the need to edit pak01_dir.vpk due to a new command line parameter:
Code:
-override_vpk

First post updated with instructions.

Author:  BRPunk [ 06 Aug 2010, 08:54 ]
Post subject:  Re: Alien Swarm Centered HUD fix

Delph is this being added to the HUD fixer? I'm lazy.

Page 1 of 2 All times are UTC [ DST ]
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/