Jagged Alliance 2

From LANCommander
Revision as of 01:15, 1 August 2023 by DoctorDalek (talk | contribs) (Created page with "Category:Games {{Game.InfoBox |Cover = cover.jpg |Developers = {{Game.InfoBox.Developer|Sir-Tech Canada}} |Publishers = {{Game.InfoBox.Publisher|TalonSoft}} {{Game.InfoBox.Publisher|Titan Computer}} |Release Date = {{Game.InfoBox.ReleaseDate|Windows|July 23, 1999}} |Genres = {{Game.InfoBox.Genre|Adventure}} {{Game.InfoBox.Genre|Turn-based strategy (TBS)}} {{Game.InfoBox.Genre|Strategy}} {{Game.InfoBox.Genre|Role-playing (RPG)}} {{Game.InfoBox.Genre|Tactical}} | PCGam...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Developers
Sir-Tech Canada
Publishers
TalonSoft Titan Computer
Release Date
Windows: July 23, 1999
Genres
Adventure

Turn-based strategy (TBS) Strategy Role-playing (RPG) Tactical

View at PCGamingWiki

Actions

Name Path Arguments Working Directory Primary
Play ja2.exe True

Name Change Script

$NewName = $args[0]
$InstallDir = $PSScriptRoot

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

function Write-ReplaceContentInFile([string]$Regex, [string]$Replacement, [string]$FilePath)
{
    $content = (Get-Content $FilePath) -replace $Regex, $Replacement
    [IO.File]::WriteAllLines($FilePath, $content)
}

Write-ReplaceContentInFile -Regex '^PLAYER_NAME = (.+)' -Replacement "PLAYER_NAME = $NewName" -FilePath "$InstallDir\Profiles\UserProfile_JA2113\Ja2_mp.ini"