Widescreen Gaming Forum

[-noun] Web community dedicated to ensuring PC games run properly on your tablet, netbook, personal computer, HDTV and multi-monitor gaming rig.
It is currently 27 Dec 2024, 13:48

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: 25 Dec 2013, 09:36 
Offline
User avatar

Joined: 25 Dec 2013, 08:42
Posts: 3
So I'll just start by saying I love Soldier of Fortune 2 :D , and recently I managed to run the game in my native Widescreen Resolution (16:9) of 1366x768 (singleplayer only)thanks to the thread on this website, however the one thing that bugs me is the fact that the Hud while playing the game is cropped, the Health Bar and part of the Weapon and Ammo hud is cropped off due to the wide screen resolution.

Now for awhile I just assumed I was boned as no one else came up with a solution as to how to fix it, until on the official thread for Soldier of Fortune 2 WideScreen report on page 3: http://www.wsgf.org/forums/viewtopic.ph ... a40#p29250

a user named Malakaius came up with a solution in the form of a Rar file named Main.rar in where he basically says to take the files in the rar and replace the main.hud file in the therest.pk3, which apparently fixes this solution as he produced an image that proves his claim: http://imageshack.us/photo/my-images/364/sofwv5.jpg/

however the file, which he posted in the thread last year (2012) is no longer available, so to try and find out how he could've found out to fix this, or in some fashion, try to fix it myself (Surprise! I didn't... :problem: ), I decided to extract therest.pk3 file to look at it's contents, and I managed to find the Main.hud file which was in the Hud directory, and opened the file in a hex editor, to which I found properties which pertained to the width and height of the hud, however I have no real Idea how to fix it myself, as I'm not an expert programmer.

So this is where you the widescreen community come into play. If anyone can manage to find a solution by editing the main.hud file, or if someone actually has this mystical Rar file that Malakaius produced, I would be very greatful, and I imagine many others will be as well.

cheers-TheAspergianGamer


Top
 Profile  
 


PostPosted: 26 Dec 2013, 18:12 
Offline

Joined: 06 Jan 2009, 03:33
Posts: 2
i wrote malakaius a pm since i was also interested in that fix.

here is the dl link: https://dl.dropboxusercontent.com/u/78134044/main.zip


Top
 Profile  
 
PostPosted: 27 Dec 2013, 00:25 
Offline
User avatar

Joined: 25 Dec 2013, 08:42
Posts: 3
Awesome! :D

I'll make sure to look at the file in a hex editor and report what I find. 8-)


Top
 Profile  
 
PostPosted: 27 Dec 2013, 02:19 
Offline
User avatar

Joined: 25 Dec 2013, 08:42
Posts: 3
So as I said I would I took a closer look at the modified Main.hud file posted by Malakakaius with a hex editor and compared the file to the original Main.hud file that's in therest.pk3 found in the base folder, and I discovered that only one number in a single line of code was changed:

(The original code)

<hud backfill hud_backfill clear>

<frame main 0 0 border 16 0 clear backfill clear>
<frame subtitle 0 44 cut main page stats>
<frame weapons 0 320 cut main page off>

<frame bottomleft 176 0 cut main page left>
<frame bottommiddle 258 0 cut main>
<frame bottomright 0 0 cut main page right>

<frame toolhealth 0 20 cut bottommiddle page toolboxhealth>
<frame middle 0 38 cut bottommiddle>
<frame middleleft 64 0 cut middle page toolbox>
<frame middlecenter 128 0 cut middle page off>
<frame middleright 0 0 cut middle cpage hud_alarm>
<frame health 0 0 cut bottommiddle cpage hud_healthpage>
</hud>


(which was Changed to)

<hud backfill hud_backfill clear>

<frame main 0 0 border 0 0 clear backfill clear> <---- only this line of code was changed.
<frame subtitle 0 44 cut main page stats>
<frame weapons 0 320 cut main page off>

<frame bottomleft 176 0 cut main page left>
<frame bottommiddle 258 0 cut main>
<frame bottomright 0 0 cut main page right>

<frame toolhealth 0 20 cut bottommiddle page toolboxhealth>
<frame middle 0 38 cut bottommiddle>
<frame middleleft 64 0 cut middle page toolbox>
<frame middlecenter 128 0 cut middle page off>
<frame middleright 0 0 cut middle cpage hud_alarm>
<frame health 0 0 cut bottommiddle cpage hud_healthpage>
</hud>

So basically in english, the way Malakaius fixed this problem was he took the Main.hud file in the Pk3 file and opened it up in a hex editor, and changed the line # 29, and changed the hexes 39-20-36 to 30-20-30 That's basically how he did it.

So then I decided to unzip the pk3 file, and replace the original Main.hud file, for the modified one, and then rezipped it into a pk3, and replaced the pk3 with the new one, ran the game...only to find the game wouldn't run.... :yawn:

SOOOOOOOOOOOOOOOOO, then I decided to take a different route and just open the pk3 up in 7zip, and just add the file through there...and well here's the results(also I apologise in advance for the ads on the video, I'm partnered with a network, and they don't allow me to turn it off...sorry):

http://www.youtube.com/watch?v=1JzEoXsA ... e=youtu.be

So yeah, it's crazy how one number in a single line of code can fix a game or break it huh?

Anyway I've taken the liberty to simplify the process by making a .zip of the modified Pk3 file and uploaded it for you guys at the Widescreen forums to alleviate the time it takes to fix the hud, you're welcome:

http://www.4shared.com/zip/FAkzZQqT/SOF2HudFix.html?

Anyway, if any moderator is smart enough to see this post, I would recommend posting these findings to the official Soldier of Fortune 2 Widescreen report, I bet many would appreciate it.

Anyway Cheers :cheers: -TheAspergianGamer


Top
 Profile  
 
PostPosted: 21 Nov 2014, 02:15 
Offline

Joined: 21 Nov 2014, 01:09
Posts: 1
I know this is an old post but, what version of the game you were using? The 1.03? I'm asking because I have that version and I don't know if the file you have uploaded to 4shared is different between versions.
Also the 1.04 unofficial patch didn't solve all this widescreen thing?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Tbot [Bot] and 12 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  




Powered by phpBB® Forum Software © phpBB Group