Page 16 of 17
Re: Centered HUD for Team Fortress 2
Posted: 04 Aug 2013, 11:16
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)
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.

Re: Centered HUD for Team Fortress 2
Posted: 06 Aug 2013, 00:34
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.
Re: Centered HUD for Team Fortress 2
Posted: 30 Oct 2013, 19:58
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.
Re: Centered HUD for Team Fortress 2
Posted: 01 Nov 2013, 00:27
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 (10.76 KiB) Viewed 7446 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 (137.24 KiB) Viewed 7454 times
It appears to be looking for Team Fortress 2 in Steam\common\ instead of steam\steamapps\common\
Re: Centered HUD for Team Fortress 2
Posted: 06 Nov 2013, 01:55
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.
Re: Centered HUD for Team Fortress 2
Posted: 08 Dec 2013, 18:37
by GitDat
So there's no way to center the chat window yet?
Re: Centered HUD for Team Fortress 2
Posted: 09 Dec 2013, 10:46
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.
Re: Centered HUD for Team Fortress 2
Posted: 15 Dec 2013, 07:16
by Baldur
GitDat wrote:So there's no way to center the chat window yet?
That was fixed in SourceHudEditor 1.3.
Re: Centered HUD for Team Fortress 2
Posted: 15 Dec 2013, 09:41
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?
Re: Centered HUD for Team Fortress 2
Posted: 15 Dec 2013, 19:17
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.
Re: Centered HUD for Team Fortress 2
Posted: 10 Feb 2014, 18:35
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.
Re: Centered HUD for Team Fortress 2
Posted: 19 Feb 2014, 22:17
by dopefish
Thanks for keeping the XML updated.

Re: Centered HUD for Team Fortress 2
Posted: 27 Jun 2014, 08:42
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?
Re: Centered HUD for Team Fortress 2
Posted: 30 Jun 2014, 14:57
by dopefish
Download Version 1.4Fixed 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.
Re: Centered HUD for Team Fortress 2
Posted: 02 Jul 2014, 01:10
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?

Re: Centered HUD for Team Fortress 2
Posted: 07 Jul 2014, 02:45
by dopefish
I didn't even think of that. :/
I'll see what I can do.
Re: Centered HUD for Team Fortress 2
Posted: 03 Aug 2014, 13:27
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.
Re: Centered HUD for Team Fortress 2
Posted: 30 Oct 2014, 20:56
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.
Re: Centered HUD for Team Fortress 2
Posted: 31 Oct 2014, 17:59
by Delphium
Re: Centered HUD for Team Fortress 2
Posted: 08 Nov 2014, 15:55
by VodkaDK
Thank you so much for keeping this tool up to date. It works great and I really love playing Team Fortress 2
