Medal of Honor: Allied Assault

From LANCommander
Revision as of 01:16, 1 August 2023 by DoctorDalek (talk | contribs)
Developers
2015
Publishers
icculus.org

Electronic Arts

Aspyr Media
Release Date
Windows: January 22, 2002
Genres
Shooter
View at PCGamingWiki

Actions

Name Path Arguments Working Directory Primary
Play Medal of Honor: Allied Assault MOHAA.exe True
Play Medal of Honor: Allied Assault: Breakthrough moh_breakthrough.exe True
Play Medal of Honor: Allied Assault: Spearhead moh_spearhead.exe True

Name Change Script

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

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

Write-ReplaceContentInFile -Regex 'seta name (.+)' -Replacement "seta name ""$NewName""" -FilePath "$InstallDir\main\configs\unnamedsoldier.cfg"
Write-ReplaceContentInFile -Regex 'seta name (.+)' -Replacement "seta name ""$NewName""" -FilePath "$InstallDir\mainta\configs\unnamedsoldier.cfg"
Write-ReplaceContentInFile -Regex 'seta name (.+)' -Replacement "seta name ""$NewName""" -FilePath "$InstallDir\maintt\configs\unnamedsoldier.cfg"