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:
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:
#!/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.