Jagged Alliance 2

From LANCommander
Developers
Sir-Tech Canada
Publishers
TalonSoftTitan Computer
Release Date
Windows: July 23, 1999
Genres
AdventureTurn-based strategy (TBS)StrategyRole-playing (RPG)Tactical
View at PCGamingWiki

Actions

Name Path Arguments Working Directory Primary
Play {InstallDir}\ja2.exe True

Install Script

$Display = Get-PrimaryDisplay

Write-ReplaceContentInFile -Pattern '^SCREEN_RESOLUTION = .+' -Substitution "SCREEN_RESOLUTION = 24" -FilePath "$InstallDirectory\Ja2.ini"
Write-ReplaceContentInFile -Pattern '^EDITOR_SCREEN_RESOLUTION = .+' -Substitution "EDITOR_SCREEN_RESOLUTION = 24" -FilePath "$InstallDirectory\Ja2.ini"
Write-ReplaceContentInFile -Pattern '^CUSTOM_SCREEN_RESOLUTION_X = .+' -Substitution "CUSTOM_SCREEN_RESOLUTION_X = $($Display.Bounds.Width)" -FilePath "$InstallDirectory\Ja2.ini"
Write-ReplaceContentInFile -Pattern '^CUSTOM_SCREEN_RESOLUTION_Y = .+' -Substitution "CUSTOM_SCREEN_RESOLUTION_Y = $($Display.Bounds.Height)" -FilePath "$InstallDirectory\Ja2.ini"

Name Change Script

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

Write-ReplaceContentInFile -Pattern '^PLAYER_NAME = (.+)' -Substitution "PLAYER_NAME = $NewPlayerAlias" -FilePath "$InstallDirectory\Profiles\UserProfile_JA2113\Ja2_mp.ini"