Page 4 of 17

Re: Centered HUD for Team Fortress 2

Posted: 25 Dec 2009, 23:17
by MaxDarklighter
I tried fixing it from a new copy of the file, but I cannot get #1 or #2 to work. Tried the old file as well and it still wouldn't work. The ammo worked for me with both files though, so I'm not sure what happened with your setup. Maybe someone else can look through and find out what needs to be changed.


Thx for reply and sorry for my mistakes. Allready fix it :cheers

Re: Centered HUD for Team Fortress 2

Posted: 26 Dec 2009, 11:49
by Downtown1
Yeah, I updated the HudLayout.res for the game too had pretty much the same problems as the poster above. Guess they moved some existing HUD elements into another one that was previously inert.

Re: Centered HUD for Team Fortress 2

Posted: 29 Dec 2009, 14:14
by Delphium
Yeah, I updated the HudLayout.res for the game too had pretty much the same problems as the poster above. Guess they moved some existing HUD elements into another one that was previously inert.


Mind sharing your latest hudlayout.res if it is wokring with the latest updates of TF2 please?
I currently have mine working in tri screen only recently and would like to get the HUD centered for it, like i was able to with L4D2.

Many thanks.

Re: Centered HUD for Team Fortress 2

Posted: 02 Jan 2010, 22:32
by CY:G
Same request here, cant find a hudlayout to work with the latest update...

Re: Centered HUD for Team Fortress 2

Posted: 06 Jan 2010, 01:06
by Delphium
I'm getting there...



Just strugling with the weapon selection on the far right.

Here is my hudlayout.res file, it is for 5760x1080 (48:9 aspect ratio).
The value that I increased the xpos by was 853 for this ratio.

Also set the following as 0

This moves the progress bar to the center.

Code: Select all

   HudObjectiveStatus

      {
         "fieldName" "HudObjectiveStatus"
         "visible" "1"
         "enabled" "1"
         "xpos"   "0"
         "ypos"   "0"
         "wide"   "f0"
         "tall"   "480"
      }


and

This moves the timer at the top center.

Code: Select all

   HudKothTimeStatus

      {
         "fieldName" "HudKothTimeStatus"
         "visible" "1"
         "enabled" "1"
         "xpos"   "0"
         "ypos"   "0"
         "wide"   "f0"
         "tall"   "160"
      }


I have tried editing the hudweaponselection xpos but it appears not to yield any results so the selection of weapons appears to be stuck on the right far side.

Code: Select all

   HudWeaponSelection

      {
         "fieldName" "HudWeaponSelection"
         "xpos"   "0"
         "wide"   "f0"
         "ypos"    "0"
         "tall"   "480"
         "RightMargin" "0"
         "RightMargin_hidef" "32"
         "RightMargin_lodef" "38"
         "visible" "1"
         "enabled" "1"
         "SmallBoxWide" "72"
         "SmallBoxTall" "54"
         "PlusStyleBoxWide" "90"
         "PlusStyleBoxTall" "63"
         "PlusStyleExpandSelected"   "0.3"
         "LargeBoxWide" "110"
         "LargeBoxTall" "77"
         "BoxGap" "4"   [$WIN32]
         "BoxGap" "4"   [$X360]
         "SelectionNumberXPos" "12"
         "SelectionNumberYPos" "4"
         "IconXPos" "8"
         "IconYPos" "0"
         "TextYPos" "70"      [$WIN32]
         "TextYPos" "65"      [$X360]
         "ErrorYPos" "48"
         "TextColor" "SelectionTextFg"
         "MaxSlots"   "6"
         "PlaySelectSounds"   "1"
         "Alpha" "220"
         "SelectionAlpha" "220"
         "BoxColor" "0 0 0 220"
         "SelectedBoxClor" "0 0 0 220"
         "SelectionNumberFg"   "200 187 161 255"
         "NumberFont" "HudSelectionText"
      }   

Re: Centered HUD for Team Fortress 2

Posted: 06 Jan 2010, 15:36
by CY:G
Thank you :cheers , i will try it later today

Re: Centered HUD for Team Fortress 2

Posted: 07 Jan 2010, 03:43
by Delphium
Getting closer still. :D





I was able to move weapon selection to the center screen by altering the "RightMargin" value to 853 under the "HuDWeaponSelection".

Code: Select all

   HudWeaponSelection

      {
         "fieldName" "HudWeaponSelection"
         "xpos"   "r965"
         "wide"   "f0"
         "ypos"    "0"
         "tall"   "480"
         "RightMargin" "853"
         "RightMargin_hidef" "32"
         "RightMargin_lodef" "38"
         "visible" "1"
         "enabled" "1"
         "SmallBoxWide" "72"
         "SmallBoxTall" "54"
         "PlusStyleBoxWide" "90"
         "PlusStyleBoxTall" "63"
         "PlusStyleExpandSelected"   "0.3"
         "LargeBoxWide" "110"
         "LargeBoxTall" "77"
         "BoxGap" "4"   [$WIN32]
         "BoxGap" "4"   [$X360]
         "SelectionNumberXPos" "12"
         "SelectionNumberYPos" "4"
         "IconXPos" "8"
         "IconYPos" "0"
         "TextYPos" "70"      [$WIN32]
         "TextYPos" "65"      [$X360]
         "ErrorYPos" "48"
         "TextColor" "SelectionTextFg"
         "MaxSlots"   "6"
         "PlaySelectSounds"   "1"
         "Alpha" "220"
         "SelectionAlpha" "220"
         "BoxColor" "0 0 0 220"
         "SelectedBoxClor" "0 0 0 220"
         "SelectionNumberFg"   "200 187 161 255"
         "NumberFont" "HudSelectionText"
      }   


3x1920x1080 / 5760x1080 / (48:9) - working 07/Jan/2010
hudlayout.res


I have also worked with a friend to develop a perl script that reads the hudlayout.res file and is able to increment a defined value to all the xpos values, this had made updating and testing a lot faster than manually searching for and calculating each value by hand.

Code: Select all



   #!/usr/bin/perl
   use strict;
   
   my $x = $ARGV[1];
   open(my $f, '<', $ARGV[0]);
   open(my $f2, '>', $ARGV[2]);
   my $text = '';
   $text .= $_ while(<$f>);
   $text =~ s/^(s*"xpos"s+"r?)(-?d+)(?=")/$1.($2+$x);/eim;
   my $hud_sections = join('|', [
     'HudWeaponSelection', 'HudKothTimeStatus',
     'HudObjectiveStatus', 'HudProgressBar']);
   $text =~ s/((?:$hud_sections)s+{[^}]*?
       "xpos"s+"r?)(-?d+)(?=")/$1.0/egisx;
   $text =~ s/(HudWeaponSelections+{[^}]*?
       "rightmargin"s+"r?)(-?d+)(?=")/$1.$x/eisx;
   print $fh2 $text;
   


Requires Perl

Run via command line by typing "perl hudlayout.pl hudlayout.res 853 hudlayout.fix.res"
I shall take a look at improving this script in the near future.

853 is the number used to increment each of the xpos values for 48:9 aspect ratio so change this value for other aspect ratios :).

Just remember to adjust the following values by hand afterwards.
HudWeaponSelection rightmargin = 853 (or what ever you increment the file by).
HudKothTimeStatus xpos = 0
HudObjectiveStatus xpos = 0
HudProgressBar xpos = 0
As such I have done the following other res packs, however none of these are tested but should in theory work ok.

hudlayout.res for 3x1680x1050 / 5040x1050 / (48:10)
hudlayout.res for 3x1280x1024 / 3840x1024 / (15:4)
hudlayout.res for 3x1024x768 / 3072x768 / (12:3)

hudlayout.res for 3x1920x1080 / 5760x1080 / (48:9) - working 07/Jan/2010

Note for a ratio of 48:9 the xpos values are incremented by 853.
480x16/9=853.
For a ratio of 48:10 I incremented the xpos values by 768.
480*16/10=768.
For a ratio of 15:4 I incremented the xpos values by 600.
480*5/4=600.
For a ratio of 12:3 I incremented the xpos values by 640.
480*4/3=640.

Re: Centered HUD for Team Fortress 2

Posted: 07 Jan 2010, 15:34
by CY:G
That is awesome!!!, thanks for your work

Re: Centered HUD for Team Fortress 2

Posted: 08 Jan 2010, 10:39
by A Small White Box
5040x1050 works, thanks for figuring it out,

Re: Centered HUD for Team Fortress 2

Posted: 08 Jan 2010, 15:36
by CY:G
On my computer running at 5760 * 1200, your fix shows the bullet counter/Medic's Uber all the way in the lower right corner of the 3rd monitor.

Every other element is correctly centered tho, getting pretty close

Re: Centered HUD for Team Fortress 2

Posted: 08 Jan 2010, 21:03
by Delphium
Hey yer I come to notice this the last time I was scout/snpier with the ball/jar recharge var, i've not had time to work on it since my last post, but I sure will this weekend. :D

As for medic, it all appears ok here on the 5760x1080, ill take a look at the 5760x1200 see if I mising anything.



Glad that the other untested HUDs seem to be wokring correctly, Its mostly playable, but of cause a couple of tweaks left :D
Thanks for providing feedback on this btw, appreciated.

Re: Centered HUD for Team Fortress 2

Posted: 10 Jan 2010, 18:50
by Delphium
Yet another fix :)








I had to also update the following file to move the jar/ball/cloak/sticky charge meter "Resource/UI/HudItemEffectMeter.res"

I shall post fixes for other aspect ratios later.

In the mean time here is the latest fix for 5760x1080 (48:9)...

Working as of 10/Jan/2010.
TF2_HUD_5760x1080_48-9.RTM0001.10_01_2010.rar for 3x1920x1080 / 5760x1080 / (48:9)

EDIT:-
TF2_HUD_5760x1080_48-10.RTM0001.10_01_2010.rar for 3x1680x1050 / 5040x1050 / (48:10)
TF2_HUD_3840x1024_15-4.RTM0001.10_01_2010.rar for 3x1280x1024 / 3840x1024 / (15:4)
TF2_HUD_3072x768 _12-3.RTM0001.10_01_2010.rar for 3x1024x768 / 3072x768 / (12:3)

Enjoy.

Re: Centered HUD for Team Fortress 2

Posted: 11 Jan 2010, 16:23
by CY:G
THAAAANKS again.

Hey BTW, how do you get those overlays with the Achievements requirements, is that something that needs to be turned on somewhere.

Re: Centered HUD for Team Fortress 2

Posted: 11 Jan 2010, 18:08
by Delphium
The achievments is a TF2 feature, goto the Achievments panel inside the game, and next to each achievment there is a tick box that allows it to be displayed on the HUD, any that you complete automaticly get removed, and any remaining that you selected are displayed :)

Re: Centered HUD for Team Fortress 2

Posted: 12 Jan 2010, 07:23
by A Small White Box
Working as of 10/Jan/2010.
TF2_HUD_5760x1080_48-9.RTM0001.10_01_2010.rar for 3x1920x1080 / 5760x1080 / (48:9)

EDIT:-
TF2_HUD_5760x1080_48-10.RTM0001.10_01_2010.rar for 3x1680x1050 / 5040x1050 / (48:10)
TF2_HUD_3840x1024_15-4.RTM0001.10_01_2010.rar for 3x1280x1024 / 3840x1024 / (15:4)
TF2_HUD_3072x768 _12-3.RTM0001.10_01_2010.rar for 3x1024x768 / 3072x768 / (12:3)

Enjoy.

The link for the 5040x1050 has an extra 's' at the end, making the link malfunction. I also noticed in your last version that the ammo for minmode was not on the center screen. Minimal problems, keep up the good work :D

Re: Centered HUD for Team Fortress 2

Posted: 12 Jan 2010, 10:38
by Delphium
The link for the 5040x1050 has an extra 's' at the end, making the link malfunction. I also noticed in your last version that the ammo for minmode was not on the center screen.


Ah, well spotted, thanks, now fixed :)
I had left minimode untouched for any of the layouts xpos values, however if that is a request then I can do another batch quick enough which contains minimode fix also.

Watch this space, for I shall post something later. :)

Minimal problems, keep up the good work :D

Thanks :) I'm glad they are of use to folks. :)

Re: Centered HUD for Team Fortress 2

Posted: 12 Jan 2010, 22:19
by A Small White Box
Weird, everything else is working in minmode without the changes. Intriguing.

Re: Centered HUD for Team Fortress 2

Posted: 13 Jan 2010, 20:48
by Delphium
Minimode fix :)



Working as of 13/Jan/2010.
TF2_HUD_5760x1080_48-9.RTM0002.13_01_2010.rar for 3x1920x1080 / 5760x1080 / (48:9)
TF2_HUD_5760x1080_48-10.RTM0002.13_01_2010.rar for 3x1680x1050 / 5040x1050 / (48:10)
TF2_HUD_3840x1024_15-4.RTM0002.13_01_2010.rar for 3x1280x1024 / 3840x1024 / (15:4)
TF2_HUD_3072x768 _12-3.RTM0002.13_01_2010.rar for 3x1024x768 / 3072x768 / (12:3)

Enjoy.

Re: Centered HUD for Team Fortress 2

Posted: 15 Jan 2010, 21:33
by Vaitek
This is great and exactly what I'm looking for. I'm a new Eyefinity setup owner. My res is 6144x1152. I'm guessing that the setups posted here won't help and I'd have to adjust one on my own?

Re: Centered HUD for Team Fortress 2

Posted: 16 Jan 2010, 20:21
by Delphium
This is great and exactly what I'm looking for. I'm a new Eyefinity setup owner. My res is 6144x1152. I'm guessing that the setups posted here won't help and I'd have to adjust one on my own?


Nope :D
6144x1152 (2048x1152) is a 48:9(16:9) ratio resolution.
As such you can use the
TF2_HUD_5760x1080_48-9.RTM0002.13_01_2010.rar for 3x1920x1080 / 5760x1080 / (48:9).
fix.

All the fixes scale on aspect ratio and are not fixed to a single resolution, just the aspect ratio needs to be the same :)