Page 1 of 1

Alien Swarm Centered HUD fix

Posted: 24 Jul 2010, 02:46
by GeneralAdmission
***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: Select all

-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.

Re: Alien Swarm Centered HUD fix

Posted: 24 Jul 2010, 02:56
by Delphium
+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! :)

Re: Alien Swarm Centered HUD fix

Posted: 24 Jul 2010, 20:25
by Jackal Frost
Thank ya sir, makes playing this game a lot easier when I can see the hud. :cheers

Re: Alien Swarm Centered HUD fix

Posted: 25 Jul 2010, 20:23
by BtzX
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!!

Re: Alien Swarm Centered HUD fix

Posted: 27 Jul 2010, 01:06
by GeneralAdmission
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.

Re: Alien Swarm Centered HUD fix

Posted: 27 Jul 2010, 02:40
by BtzX
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!!

Re: Alien Swarm Centered HUD fix

Posted: 27 Jul 2010, 04:22
by GeneralAdmission
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.

Re: Alien Swarm Centered HUD fix

Posted: 27 Jul 2010, 17:44
by WaveZtream
Yeah tried it as well with my 5760x1200 resolution perfect :)

ASWHudMinimap

"xpos" "r939"

ASW_Hud_Master

"xpos" "768"

Thank you :)

Re: Alien Swarm Centered HUD fix

Posted: 01 Aug 2010, 20:38
by GeneralAdmission
Latest game patch abrogates the need to edit pak01_dir.vpk due to a new command line parameter:

Code: Select all

-override_vpk

First post updated with instructions.

Re: Alien Swarm Centered HUD fix

Posted: 06 Aug 2010, 08:54
by BRPunk
Delph is this being added to the HUD fixer? I'm lazy.

Re: Alien Swarm Centered HUD fix

Posted: 06 Aug 2010, 11:39
by Delphium
Delph is this being added to the HUD fixer? I'm lazy.

Yes, already done as of yesterday morning :)
Just awaiting Ibrin to be free to update it :)
Then I will update my sig to refelect so.

EDIT:-
Done :D
I made also some changes to the calc, check the dev thread for info. :)

Re: Alien Swarm Centered HUD fix

Posted: 09 Aug 2010, 18:16
by Timobkg
Just to clarify for new people, since I was confused at first, right now you can fix the hud in 4 easy steps:

1) Use GCFScape to extract hudlayout.res from pak01_dir.vpk (the .vpk is in the commonalien swarmswarm folder, and hudlayout.res is under the scripts subfolder inside the .vpk)

2) Use Delph's calc to edit the hudlayout.res file

3) Put the edited hudlayout.res in the commonalien swarmswarmscripts folder

4) Add the "-override_vpk" launch option via right click Alien Swarm in steam -> Properties -> Set Launch Options


SoftTH files go in the commonalien swarmbin folder

Thanks all for making this work. :)

Re: Alien Swarm Centered HUD fix

Posted: 09 Aug 2010, 20:08
by Delphium
:cheers