# Bounds are accessible by $Display.Bounds.Width and $Display.Bounds.Height
$Display = Get-PrimaryDisplay
# Use regex to replace text within a file. Quotes are escaped by double quoting ("")
Write-ReplaceContentInFile -Pattern '^screenwidth=(.+)' -Substitution "screenwidth=$($Display.Bounds.Width)" -FilePath "$InstallDirectory\local.ini"
Write-ReplaceContentInFile -Pattern '^screenheight=(.+)' -Substitution "screenheight=$($Display.Bounds.Height)" -FilePath "$InstallDirectory\local.ini"
Rename-Item -Path "$InstallDirectory\Movies\Nordic_Games.bik" -NewName "$InstallDirectory\Movies\Nordic_Games.bik.bak"
Rename-Item -Path "$InstallDirectory\Movies\relicintro.bik" -NewName "$InstallDirectory\Movies\relicintro.bik.bak"
# Converts a string to a UTF16-encoded byte array. This looks like ASCII characters separated by 0x00 in most cases.
$bytes = ConvertTo-StringBytes -Input $NewPlayerAlias -Utf16 1 -MaxLength 10 -MinLength 10
#Edit-PatchBinary -FilePath "$InstallDirectory\Profiles\Profile2\name.dat" -Offset 0x02 -Data $bytes