Anno 1701

From LANCommander
Revision as of 21:52, 15 January 2024 by DoctorDalek (talk | contribs) (Created new page for Anno 1701)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Developers
Related Designs
Publishers
SunflowersUbisoft EuropeDeep Silver
Release Date
Windows: October 30, 2006
Genres
SimulatorReal Time Strategy (RTS)Strategy
View at PCGamingWiki

Actions

Name Path Arguments Working Directory Primary
Play Anno 1701: The Sunken Dragon Anno1701AddOn.exe {InstallDir} True
Play Anno 1701 Anno1701.exe {InstallDir} True

Install Script

$Display = Get-PrimaryDisplay
$AspectRatio = [Math]::Round($Display.Bounds.Width / $Display.Bounds.Height, 6)

Write-ReplaceContentInFile -Pattern '^<ScreenXSize>(.+)</ScreenXSize>' -Substitution "<ScreenXSize>$($Display.Bounds.Width)</ScreenXSize>" -FilePath "$InstallDirectory\Engine.ini"
Write-ReplaceContentInFile -Pattern '^<ScreenYSize>(.+)</ScreenYSize>' -Substitution "<ScreenYSize>$($Display.Bounds.Height)</ScreenYSize>" -FilePath "$InstallDirectory\Engine.ini"
Write-ReplaceContentInFile -Pattern '^<AspectRatio>(.+)</AspectRatio>' -Substitution "<AspectRatio>$($AspectRatio)</AspectRatio>" -FilePath "$InstallDirectory\Engine.ini"

Name Change Script

if ($NewPlayerAlias.Length -gt 13) {
    $NewPlayerAlias = $NewPlayerAlias.Substring(0, 13);
}

$bytes = ConvertTo-StringBytes -Input $NewPlayerAlias -Utf16 1 -MaxLength 13 -MinLength 13

Edit-PatchBinary -FilePath "$InstallDirectory\Profiles\lastprofile.dat" -Offset 0x1C -Data $bytes

Copy-Item -Path "$InstallDirectory\ProfileTemplate\ABCDEFGHIJKLM.bindings" -Destination "$InstallDirectory\ProfileTemplate\$NewPlayerAlias.bindings" -Force
Copy-Item -Path "$InstallDirectory\ProfileTemplate\ABCDEFGHIJKLM.profile" -Destination "$InstallDirectory\ProfileTemplate\$NewPlayerAlias.profile" -Force