Centered HUD for Team Fortress 2

Discussions about getting games to run in a Multi-Mon setup.
VodkaDK
Posts: 8
Joined: 27 Oct 2011, 03:28

Re: Centered HUD for Team Fortress 2

Post by VodkaDK »

Thank you for your reply. The DLL files were being blocked. I didn't even know Windows 8 had that feature (I just upgraded) :doh:

However now I have a new problem. This is the error I'm receiving now. This occurs if I run it normally or "Run as Administrator" from the contextual menu.

Image
Lian Li PC-X2000 | Asus Rampage IV Extreme X79 | Intel Core i7 3930K @ 4.37GHz | 32GB DDR3 1866MHz
2 x EVGA GTX 780's | Samsung 840 Pro 128GB | Corsair AX1200 | 3 x Dell U3008 WFP Surround @ 7680x1600
Razer Mamba | Logitech diNovo Edge | Windows 8 Pro 64-bit
User avatar
dopefish
Insiders
Insiders
Posts: 1514
Joined: 14 Apr 2007, 02:13

Re: Centered HUD for Team Fortress 2

Post by dopefish »

I wonder if the registry path has changed for Windows 8?

I'll try to add a fallback method if it can't detect the path.
Widescreen Fixer - https://www.widescreenfixer.org/

Widescreen Fixer Twitter - https://twitter.com/widescreenfixer
Personal Twitter - https://twitter.com/davidrudie
Baldur
Posts: 37
Joined: 03 Nov 2011, 15:01

Re: Centered HUD for Team Fortress 2

Post by Baldur »

Updated XML for SourceHudEditor 1.3

Should be up to date up to 2013.10.29 patch.
Moved the new HUD item for the Halloween event.

New entries:
HudLayout.res, HudSpellMenu, xpos and wide=f0

If you find some elements that need moving, poke it in here and I'll look into it.
Unfortunately there doesn't seem to be a way to move the voice command menu.
Attachments
Team Fortress 2 HUD.zip
2013.10.29
(1.4 KiB) Downloaded 384 times
frag85
Posts: 77
Joined: 01 Jul 2010, 20:01

Re: Centered HUD for Team Fortress 2

Post by frag85 »

I was looking at what was being called in the registry, and there was a missing / on one of the entries in the registry. Appears to be working now. Weird.

dopefish wrote:I wonder if the registry path has changed for Windows 8?

I'll try to add a fallback method if it can't detect the path.


Happens in Win7 as well, run-as admin.

Code: Select all

An error has occurred within this application.

Value cannot be null.
Parameter name: path

   at System.IO.Directory.GetParent(String path)
   at SourceHudEditor.SourceHudEditor..ctor()
   at SourceHudEditor.Program.Main()



EDIT:
Ok, Added ModInstallPath to the registry. Now it launches with this error:
Untitled.png
Untitled.png (10.76 KiB) Viewed 7445 times

Code: Select all

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
   at SourceHudEditor.SourceHudEditor.ComboBoxXmlSelection_SelectedIndexChanged(Object sender, EventArgs e)
   at System.Windows.Forms.ComboBox.OnSelectedIndexChanged(EventArgs e)
   at System.Windows.Forms.ComboBox.set_SelectedIndex(Int32 value)
   at SourceHudEditor.SourceHudEditor.LoadSettingsFromRegistry()
   at SourceHudEditor.SourceHudEditor.SourceHudEditor_Load(Object sender, EventArgs e)
   at System.Windows.Forms.Form.OnLoad(EventArgs e)
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.Form.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.18052 built by: FX45RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
SourceHudEditor
    Assembly Version: 1.3.0.0
    Win32 Version: 1.3.0.0
    CodeBase: file:///E:/dload/SourceHudEditor-v1.3/SourceHudEditor.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.18047 built by: FX45RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.18021 built by: FX45RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.18044 built by: FX45RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
Library.DetectDisplays
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///E:/dload/SourceHudEditor-v1.3/Libraries/Library.DetectDisplays.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.18060 built by: FX45RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.18060 built by: FX45RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.


I can hit Continue, and the program appears to work. I enter my res and screen number and hit start and get this:

Code: Select all

An error has occurred within this application.

Could not find a part of the path 'E:\Games\Steam\common\team fortress 2\tf\custom\SourceHudEditor\resource\ui\econ'.

   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileSystemEnumerableIterator`1.CommonInit()
   at System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost)
   at System.IO.DirectoryInfo.InternalGetFiles(String searchPattern, SearchOption searchOption)
   at SourceHudEditor.LogWindow.MakeChangesToHudFiles()This application will now exit.


The SourcHudEditor log window shows:
Untitled2.png
Untitled2.png (137.24 KiB) Viewed 7453 times


It appears to be looking for Team Fortress 2 in Steam\common\ instead of steam\steamapps\common\
User avatar
dopefish
Insiders
Insiders
Posts: 1514
Joined: 14 Apr 2007, 02:13

Re: Centered HUD for Team Fortress 2

Post by dopefish »

Could you let me know which path it was looking for, which path you had, and what you changed to correct it?

This way I can try to fix it. Thanks.
Widescreen Fixer - https://www.widescreenfixer.org/

Widescreen Fixer Twitter - https://twitter.com/widescreenfixer
Personal Twitter - https://twitter.com/davidrudie
GitDat
Posts: 131
Joined: 09 Feb 2010, 20:11

Re: Centered HUD for Team Fortress 2

Post by GitDat »

So there's no way to center the chat window yet?
Cooler Master Cosmos II | ASUS X99-Deluxe | Thermaltake Water 3.0 Extreme S | 5930k @ 4.5GHz | 32GB G.Skill Ripjaws V 3200MHz | SLI GTX 1080 Ti's | Samsung 960 Pro NVMe M.2 SSD | Corsair AX1500i | 3DMark Fire Strike Ultra - 13,780 | Windows 10 Pro 64-bit | Nvidia Surround® 3 x BenQ XL2735 | Samsung CHG90 Auxiliary Monitor
User avatar
Delphium
Administrators
Administrators
Posts: 1789
Joined: 27 Dec 2009, 14:27

Re: Centered HUD for Team Fortress 2

Post by Delphium »

GitDat wrote:So there's no way to center the chat window yet?

It has been a long while but i'm sure I used the base_chat.res file form the l4d2 hud mod and it worked.
| Gigabyte X79S-UP5-WiFi Skt2011 | i7 4820k @4.4GHz Watercooled (Ivy Bridge-E) | Corsair Vengence 32GB @2133MHz 11-11-11-27 2T Quad-Channel (8x4GB) | AMD R9-Fury-X 4GB @1140/505MHz + EKWB Watercooled | 256GB Crucial MX200 SSD | 8x 1TB Samsung F3 SATA-II | Corsair 850W TX PSU | 3x Dell S2209W 22"wide TFT's (5760x1080res) | Logitech Z-5400 5.1ch speakers | Win7 Ultimate x64 |
Baldur
Posts: 37
Joined: 03 Nov 2011, 15:01

Re: Centered HUD for Team Fortress 2

Post by Baldur »

GitDat wrote:So there's no way to center the chat window yet?

That was fixed in SourceHudEditor 1.3.
Amon Amarth
I Donated
I Donated
Posts: 513
Joined: 18 Jul 2007, 04:19

Re: Centered HUD for Team Fortress 2

Post by Amon Amarth »

I was wondering if someone could answer this. Isn't CS:GO a source engine game? I know it's pretty heavily modified compared to CS:S, however it seems relatively the same. If so, can one use the same technique to center/scale the HUD in CS:GO?
Baldur
Posts: 37
Joined: 03 Nov 2011, 15:01

Re: Centered HUD for Team Fortress 2

Post by Baldur »

Amon Amarth wrote:I was wondering if someone could answer this. Isn't CS:GO a source engine game? I know it's pretty heavily modified compared to CS:S, however it seems relatively the same. If so, can one use the same technique to center/scale the HUD in CS:GO?

AFAIK only needs a suitable XML file that tells the utility what files and entries to modify.
I don't own CS:GO so I cannot make and test such XML.
Baldur
Posts: 37
Joined: 03 Nov 2011, 15:01

Re: Centered HUD for Team Fortress 2

Post by Baldur »

Updated XML for SourceHudEditor 1.3

Should be up to date up to 2014.02.07 patch.
Finally moved the killstreak weapon HUD item from 2013.11.21 patch.

New entries:
HudItemEffectMeter_Killstreak.res, HudItemEffectMeter, xpos and xpos_minmode

If you find some elements that need moving, poke it in here and I'll look into it.
Unfortunately there doesn't seem to be a way to move the voice command menu.
Attachments
Team Fortress 2 HUD.zip
2014.02.07
(1.41 KiB) Downloaded 498 times
User avatar
dopefish
Insiders
Insiders
Posts: 1514
Joined: 14 Apr 2007, 02:13

Re: Centered HUD for Team Fortress 2

Post by dopefish »

Thanks for keeping the XML updated. :)
Widescreen Fixer - https://www.widescreenfixer.org/

Widescreen Fixer Twitter - https://twitter.com/widescreenfixer
Personal Twitter - https://twitter.com/davidrudie
Baldur
Posts: 37
Joined: 03 Nov 2011, 15:01

Re: Centered HUD for Team Fortress 2

Post by Baldur »

Some Steam update has broken SourceHudEditor.
On start it gives following error:

An error has occurred within this application.

Path cannot be the empty string or all whitespace.
Parameter name: path

at System.IO.Directory.GetParent(String path)
at SourceHudEditor.SourceHudEditor..ctor()
at SourceHudEditor.Program.Main()

So I would suspect that the registry entry you use to detect where the files are isn't there anymore.
Could something be done about this or can manual game location selection be added?
User avatar
dopefish
Insiders
Insiders
Posts: 1514
Joined: 14 Apr 2007, 02:13

Re: Centered HUD for Team Fortress 2

Post by dopefish »

Download Version 1.4

Fixed issue with registry key no longer existing.

Thanks to Baldur for all the work.


I'm going to get the code cleaned up soon and throw it up on GitHub.
Widescreen Fixer - https://www.widescreenfixer.org/

Widescreen Fixer Twitter - https://twitter.com/widescreenfixer
Personal Twitter - https://twitter.com/davidrudie
zjspeed
Posts: 1
Joined: 02 Jul 2014, 01:00

Re: Centered HUD for Team Fortress 2

Post by zjspeed »

Hi dopefish,

I just found your SourceHudEditor and would love to try it out.

It doesn't work for me because I've installed Team Fortress 2 to my D:\ drive instead of the default location on C:\ drive.

Can I configure the Game Path?

Image
User avatar
dopefish
Insiders
Insiders
Posts: 1514
Joined: 14 Apr 2007, 02:13

Re: Centered HUD for Team Fortress 2

Post by dopefish »

I didn't even think of that. :/

I'll see what I can do.
Widescreen Fixer - https://www.widescreenfixer.org/

Widescreen Fixer Twitter - https://twitter.com/widescreenfixer
Personal Twitter - https://twitter.com/davidrudie
Baldur
Posts: 37
Joined: 03 Nov 2011, 15:01

Re: Centered HUD for Team Fortress 2

Post by Baldur »

zjspeed wrote:Hi dopefish,

I just found your SourceHudEditor and would love to try it out.

It doesn't work for me because I've installed Team Fortress 2 to my D:\ drive instead of the default location on C:\ drive.

Can I configure the Game Path?

I have just created a symlink from the default Steam location to the right one.
Open a command prompt in \Steam\steamapps\common\ and use command:

Code: Select all

mklink /d "Team Fortress 2" "path_to_tf2"

So I made a symlink from "E:\Steam\steamapps\common\" to "C:\Steam\SteamApps\common\Team Fortress 2\".

With XP you need additional program to do the same.
With Vista don't delete the symlink in GUI, it will delete the pointed data too.
With 7 and 8 you can delete from GUI without problems.
Baldur
Posts: 37
Joined: 03 Nov 2011, 15:01

Re: Centered HUD for Team Fortress 2

Post by Baldur »

Updated XML and Schema for SourceHudEditor 1.4

Should be up to date up to 2014.10.29 patch.
Moved spell and kart HUD items.

You need to replace the current XML and Schema.xsd with included ones and put the steamapps in your Steam directory so that the included hudspellselection.res ends up in Steamsteamapps\common\Team Fortress 2\tf\resource\ui\

Current version of SourceHudEditor expects "fieldname" tag in each entry, but the Valve supplied one doesn't include those, so for now I had to include edited version of the base file.

New entries:
HudItemEffectMeter_Kartcharge.res: HudItemEffectMeter, xpos and xpos_minmode
HudSpellSelection.res: HudSpellMenu, xpos and if_killstreak_visible, xpos

If you find some elements that need moving, poke it in here and I'll look into it.
Unfortunately there doesn't seem to be a way to move the voice command menu.
Attachments
Team Fortress 2 HUD 2014-10-29.zip
2014-10-29
(4.2 KiB) Downloaded 416 times
User avatar
Delphium
Administrators
Administrators
Posts: 1789
Joined: 27 Dec 2009, 14:27

Re: Centered HUD for Team Fortress 2

Post by Delphium »

:cheers:
| Gigabyte X79S-UP5-WiFi Skt2011 | i7 4820k @4.4GHz Watercooled (Ivy Bridge-E) | Corsair Vengence 32GB @2133MHz 11-11-11-27 2T Quad-Channel (8x4GB) | AMD R9-Fury-X 4GB @1140/505MHz + EKWB Watercooled | 256GB Crucial MX200 SSD | 8x 1TB Samsung F3 SATA-II | Corsair 850W TX PSU | 3x Dell S2209W 22"wide TFT's (5760x1080res) | Logitech Z-5400 5.1ch speakers | Win7 Ultimate x64 |
VodkaDK
Posts: 8
Joined: 27 Oct 2011, 03:28

Re: Centered HUD for Team Fortress 2

Post by VodkaDK »

Thank you so much for keeping this tool up to date. It works great and I really love playing Team Fortress 2 :onethumb:
Lian Li PC-X2000 | Asus Rampage IV Extreme X79 | Intel Core i7 3930K @ 4.37GHz | 32GB DDR3 1866MHz
2 x EVGA GTX 780's | Samsung 840 Pro 128GB | Corsair AX1200 | 3 x Dell U3008 WFP Surround @ 7680x1600
Razer Mamba | Logitech diNovo Edge | Windows 8 Pro 64-bit
Post Reply

Who is online

Users browsing this forum: No registered users and 18 guests