Everyone is familiar with Resolution Changer (Internet Archive) and that it has an annoying crash when you move cursor to the bottom of the screen. It happens when your vertical resolution is higher than the original limit (that is 1024 from 1280x1024).
Copy&paste:
Requirements: Revolutions 2.01. Put it into the game folder. Use the following command line, your resolution as the arguments:
powershell -executionpolicy bypass -file .\vickyresfix.ps1 <horizontal resolution> <vertical resolution>
for example:
powershell -executionpolicy bypass -file .\vickyresfix.ps1 2560 1440
It will make a backup of victoria.exe, but be sure to make your own if you need the original file. Also, you have to create load_user.bmp in "gfx" folder with the resolution you chose above.
Copy&paste:
Code:
Param(
[Parameter(Mandatory=$true,
Position=0,
HelpMessage='Enter your horizontal resolution.')]
[ValidateRange(1024, 65534)]
[Int]$hres,
[Parameter(Mandatory=$true,
Position=1,
HelpMessage='Enter your vertical resolution.')]
[ValidateRange(720, 8190)]
[Int]$vres
)
$vicky = 'victoria.exe'
try {
$bytes = [IO.File]::ReadAllBytes("$pwd\$vicky")
}
catch {
throw "$vicky not found."
}
$offset1 = 0x27fc7
$offset2 = 0x27ff2
$offset3 = 0x27ffb
$offset4 = 0x284c6
$offset5 = 0x209f84
$offset6 = 0x209f9a
$offset7 = 0x29cfe8
$offset8 = 0x29cfec
$offset9 = 0x29dc49
$offset10 = 0x29dc5d
$offset11 = 0x8924d
$origBytes1 = 0x2004
$origBytes2 = 0x400
$origBytes3 = 0x400
$origBytes4 = 0x2000
[byte[]]$origBytes5 =
0xc7, 0x05, 0xe8, 0xcf, 0x69, 0x00, 0x00, 0x05,
0x00, 0x00, 0xc7, 0x05, 0xec, 0xcf, 0x69, 0x00,
0x00, 0x04, 0x00, 0x00
[byte[]]$origBytes6 =
0xc7, 0x05, 0xe8, 0xcf, 0x69, 0x00, 0x00, 0x04,
0x00, 0x00, 0xc7, 0x05, 0xec, 0xcf, 0x69, 0x00,
0x00, 0x03, 0x00, 0x00
$origBytes7 = 0x400
$origBytes8 = 0x300
[string]$origBytes9 = '1280'
[string]$origBytes10 = '1024'
[byte[]]$origBytes11 =
0x8b, 0x54, 0x24, 0x18, 0x8b, 0x44, 0x24, 0x14,
0x8d, 0x7a, 0x01, 0x8d, 0x48, 0x01, 0x57, 0x51,
0x8b, 0x0d, 0xfc, 0x40, 0x9d, 0x01, 0x52, 0x50,
0xe8, 0x56, 0x80, 0xf7, 0xff
$offset5End = $offset5 + $origBytes5.Length - 1
$offset6End = $offset6 + $origBytes6.Length - 1
$offset9End = $offset9 + $origBytes9.Length - 1
$offset10End = $offset10 + $origBytes10.Length - 1
$offset11End = $offset11 + $origBytes11.Length - 1
[byte[]]$hresBytes = [BitConverter]::GetBytes([int16]$hres)
[byte[]]$vresBytes = [BitConverter]::GetBytes([int16]$vres)
[byte[]]$vresBytes8 = [BitConverter]::GetBytes([int16]$vres * 8)
[byte[]]$vresBytes84 = [BitConverter]::GetBytes([int16]$vres * 8 + 4)
[byte[]]$offset5Bytes = @(0x90) * $origBytes5.Length
[byte[]]$offset6Bytes = @(0x90) * $origBytes6.Length
[byte[]]$offset9Bytes = [Text.Encoding]::ASCII.GetBytes('user')
[byte[]]$offset10Bytes = [Text.Encoding]::ASCII.GetBytes('user')
[byte[]]$mapInfraWrkaroundBytes = @(0x90) * $origBytes11.Length
if ([BitConverter]::ToInt16($bytes, $offset1) -ne $origBytes1 -or
[BitConverter]::ToInt16($bytes, $offset2) -ne $origBytes2 -or
[BitConverter]::ToInt16($bytes, $offset3) -ne $origBytes3 -or
[BitConverter]::ToInt16($bytes, $offset4) -ne $origBytes4 -or
(Compare-Object $bytes[$offset5..$offset5End] $origBytes5 -SyncWindow 0) -or
(Compare-Object $bytes[$offset6..$offset6End] $origBytes6 -SyncWindow 0) -or
[BitConverter]::ToInt16($bytes, $offset7) -ne $origBytes7 -or
[BitConverter]::ToInt16($bytes, $offset8) -ne $origBytes8 -or
[Text.Encoding]::ASCII.GetString($bytes[$offset9..$offset9End]) -ne $origBytes9 -or
[Text.Encoding]::ASCII.GetString($bytes[$offset10..$offset10End]) -ne $origBytes10 -or
(Compare-Object $bytes[$offset11..$offset11End] $origBytes11 -SyncWindow 0)
) {
throw "$vicky not matching (already patched?)."
}
if ($vres -gt 1024) {
$vresBytes84.CopyTo($bytes, $offset1)
$vresBytes.CopyTo($bytes, $offset2)
$vresBytes.CopyTo($bytes, $offset3)
$vresBytes8.CopyTo($bytes, $offset4)
$mapInfraWrkaroundBytes.CopyTo($bytes, $offset11)
}
$offset5Bytes.CopyTo($bytes, $offset5)
$offset6Bytes.CopyTo($bytes, $offset6)
$hresBytes.CopyTo($bytes, $offset7)
$vresBytes.CopyTo($bytes, $offset8)
$offset9Bytes.CopyTo($bytes, $offset9)
$offset10Bytes.CopyTo($bytes, $offset10)
Move-Item $vicky "$vicky.bak" -Force -ErrorAction Stop
[IO.File]::WriteAllBytes("$pwd\$vicky", $bytes)
"Done. Please create load_user.bmp with ${hres}x$vres resolution in `"gfx`" folder."
Requirements: Revolutions 2.01. Put it into the game folder. Use the following command line, your resolution as the arguments:
powershell -executionpolicy bypass -file .\vickyresfix.ps1 <horizontal resolution> <vertical resolution>
for example:
powershell -executionpolicy bypass -file .\vickyresfix.ps1 2560 1440
It will make a backup of victoria.exe, but be sure to make your own if you need the original file. Also, you have to create load_user.bmp in "gfx" folder with the resolution you chose above.
First, use the resolution changer. After that, you have to prepare some numbers. Say, you have resolution of 2560x1440:
000027FC7: 0420 042D (i.e. you should have bytes "0420" here, change them to your number 3)
000027FF2: 0004 A005 (number 1)
000027FFB: 0004 A005 (number 1)
0000284C6: 0020 002D (number 2)
- convert 1440 to hexadecimal system -> 5A0
- multiply by 8 -> 5A0*8=2D00
- add 4 -> 2D00+4=2D04
- 5A0 -> A005
- 2D00 -> 002D
- 2D04 -> 042D
000027FC7: 0420 042D (i.e. you should have bytes "0420" here, change them to your number 3)
000027FF2: 0004 A005 (number 1)
000027FFB: 0004 A005 (number 1)
0000284C6: 0020 002D (number 2)
Last edited:
- 1