Medal of Honor: Allied Assault: Difference between revisions
DoctorDalek (talk | contribs) No edit summary |
DoctorDalek (talk | contribs) No edit summary |
||
Line 5: | Line 5: | ||
{{Game.InfoBox.Developer|2015}} | {{Game.InfoBox.Developer|2015}} | ||
|Publishers = | |Publishers = | ||
{{Game.InfoBox.Publisher|icculus.org}} | {{Game.InfoBox.Publisher|icculus.org}}{{Game.InfoBox.Publisher|Electronic Arts}}{{Game.InfoBox.Publisher|Aspyr Media}} | ||
{{Game.InfoBox.Publisher|Electronic Arts}} | |||
{{Game.InfoBox.Publisher|Aspyr Media}} | |||
|Release Date = | |Release Date = | ||
{{Game.InfoBox.ReleaseDate|Windows|January 22, 2002}} | {{Game.InfoBox.ReleaseDate|Windows|January 22, 2002}} | ||
|Genres = | |Genres = | ||
{{Game.InfoBox.Genre|Shooter}} | {{Game.InfoBox.Genre|Shooter}} | ||
| PCGamingWiki = Medal_of_Honor:_Allied_Assault | |PCGamingWiki = Medal_of_Honor:_Allied_Assault}} | ||
}} | |||
{{Game.ActionBox | {{Game.ActionBox | ||
|Actions = | |Actions = | ||
{{Game.ActionBox.Row|Name = Play Medal of Honor: Allied Assault|Path = MOHAA.exe|Arguments = |WorkingDirectory = |Primary = True}} | {{Game.ActionBox.Row|Name = Play Medal of Honor: Allied Assault|Path = {InstallDir}\MOHAA.exe|Arguments = |WorkingDirectory = |Primary = True}} | ||
{{Game.ActionBox.Row|Name = Play Medal of Honor: Allied Assault: Breakthrough|Path = moh_breakthrough.exe|Arguments = |WorkingDirectory = |Primary = True}} | {{Game.ActionBox.Row|Name = Play Medal of Honor: Allied Assault: Breakthrough|Path = {InstallDir}\moh_breakthrough.exe|Arguments = |WorkingDirectory = |Primary = True}} | ||
{{Game.ActionBox.Row|Name = Play Medal of Honor: Allied Assault: Spearhead|Path = moh_spearhead.exe|Arguments = |WorkingDirectory = |Primary = True}} | {{Game.ActionBox.Row|Name = Play Medal of Honor: Allied Assault: Spearhead|Path = {InstallDir}\moh_spearhead.exe|Arguments = |WorkingDirectory = |Primary = True}} | ||
}} | }} | ||
{{Game.Scripts. | |||
|Name = | {{Game.Scripts.Install | ||
|Name = Install Script | |||
|Description = | |Description = | ||
|RequiresAdmin = False | |RequiresAdmin = False | ||
|Contents = <syntaxhighlight lang="powershell" line> | |Contents = | ||
$ | <syntaxhighlight lang="powershell" line> | ||
$Display = Get-PrimaryDisplay | |||
Write-ReplaceContentInFile -Pattern '^seta r_customwidth "(.+)"' -Substitution "seta r_customwidth ""$($Display.Bounds.Width)""" -FilePath "$InstallDirectory\main\configs\unnamedsoldier.cfg" | |||
{ | Write-ReplaceContentInFile -Pattern '^seta r_customheight "(.+)"' -Substitution "seta r_customheight ""$($Display.Bounds.Height)""" -FilePath "$InstallDirectory\main\configs\unnamedsoldier.cfg" | ||
$ | Write-ReplaceContentInFile -Pattern '^seta r_mode "(.+)"' -Substitution "seta r_mode ""-1""" -FilePath "$InstallDirectory\main\configs\unnamedsoldier.cfg" | ||
Write-ReplaceContentInFile -Pattern '^seta r_customwidth "(.+)"' -Substitution "seta r_customwidth ""$($Display.Bounds.Width)""" -FilePath "$InstallDirectory\mainta\configs\unnamedsoldier.cfg" | |||
Write-ReplaceContentInFile -Pattern '^seta r_customheight "(.+)"' -Substitution "seta r_customheight ""$($Display.Bounds.Height)""" -FilePath "$InstallDirectory\mainta\configs\unnamedsoldier.cfg" | |||
Write-ReplaceContentInFile -Pattern '^seta r_mode "(.+)"' -Substitution "seta r_mode ""-1""" -FilePath "$InstallDirectory\mainta\configs\unnamedsoldier.cfg" | |||
Write-ReplaceContentInFile -Pattern '^seta r_customwidth "(.+)"' -Substitution "seta r_customwidth ""$($Display.Bounds.Width)""" -FilePath "$InstallDirectory\maintt\configs\unnamedsoldier.cfg" | |||
Write-ReplaceContentInFile -Pattern '^seta r_customheight "(.+)"' -Substitution "seta r_customheight ""$($Display.Bounds.Height)""" -FilePath "$InstallDirectory\maintt\configs\unnamedsoldier.cfg" | |||
Write-ReplaceContentInFile -Pattern '^seta r_mode "(.+)"' -Substitution "seta r_mode ""-1""" -FilePath "$InstallDirectory\maintt\configs\unnamedsoldier.cfg" | |||
# Determine the correct FOV | |||
$FOV = 0xA0 | |||
if (($Display.Bounds.Width / $Display.Bounds.Height) -eq (16 / 9)) { | |||
$FOV = 0xBE | |||
} elseif (($Display.Bounds.Width / $Display.Bounds.Height) -eq (16 / 10)) { | |||
$FOV = 0xB4 | |||
} elseif (($Display.Bounds.Width / $Display.Bounds.Height) -eq (21 / 9)) { | |||
$FOV = 0xF0 | |||
} elseif (($Display.Bounds.Width / $Display.Bounds.Height) -eq (32 / 9)) { | |||
$FOV = 0xF0 | |||
} | } | ||
Write-ReplaceContentInFile - | # Patch gamex86.dll to use correct FOV | ||
Write-ReplaceContentInFile - | Edit-PatchBinary -FilePath "$InstallDirectory\main\gamex86.dll" -Offset 0xA10A6 -Data ([byte[]]@( $FOV )) | ||
Write-ReplaceContentInFile - | Edit-PatchBinary -FilePath "$InstallDirectory\mainta\gamex86.dll" -Offset 0xE7836 -Data ([byte[]]@( $FOV )) | ||
Edit-PatchBinary -FilePath "$InstallDirectory\maintt\gamex86.dll" -Offset 0xEEB06 -Data ([byte[]]@( $FOV )) | |||
</syntaxhighlight> | |||
}} | |||
{{Game.Scripts.NameChange | |||
|Name = Name Change Script | |||
|Description = | |||
|RequiresAdmin = False | |||
|Contents = | |||
<syntaxhighlight lang="powershell" line> | |||
Write-ReplaceContentInFile -Pattern 'seta name (.+)' -Substitution "seta name ""$NewPlayerAlias""" -FilePath "$InstallDirectory\main\configs\unnamedsoldier.cfg" | |||
Write-ReplaceContentInFile -Pattern 'seta name (.+)' -Substitution "seta name ""$NewPlayerAlias""" -FilePath "$InstallDirectory\mainta\configs\unnamedsoldier.cfg" | |||
Write-ReplaceContentInFile -Pattern 'seta name (.+)' -Substitution "seta name ""$NewPlayerAlias""" -FilePath "$InstallDirectory\maintt\configs\unnamedsoldier.cfg" | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | }} |
Latest revision as of 03:29, 6 January 2024
Developers | |
---|---|
2015 | |
Publishers | |
icculus.orgElectronic ArtsAspyr 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 | {InstallDir}\MOHAA.exe | True | ||
Play Medal of Honor: Allied Assault: Breakthrough | {InstallDir}\moh_breakthrough.exe | True | ||
Play Medal of Honor: Allied Assault: Spearhead | {InstallDir}\moh_spearhead.exe | True |
Install Script
$Display = Get-PrimaryDisplay
Write-ReplaceContentInFile -Pattern '^seta r_customwidth "(.+)"' -Substitution "seta r_customwidth ""$($Display.Bounds.Width)""" -FilePath "$InstallDirectory\main\configs\unnamedsoldier.cfg"
Write-ReplaceContentInFile -Pattern '^seta r_customheight "(.+)"' -Substitution "seta r_customheight ""$($Display.Bounds.Height)""" -FilePath "$InstallDirectory\main\configs\unnamedsoldier.cfg"
Write-ReplaceContentInFile -Pattern '^seta r_mode "(.+)"' -Substitution "seta r_mode ""-1""" -FilePath "$InstallDirectory\main\configs\unnamedsoldier.cfg"
Write-ReplaceContentInFile -Pattern '^seta r_customwidth "(.+)"' -Substitution "seta r_customwidth ""$($Display.Bounds.Width)""" -FilePath "$InstallDirectory\mainta\configs\unnamedsoldier.cfg"
Write-ReplaceContentInFile -Pattern '^seta r_customheight "(.+)"' -Substitution "seta r_customheight ""$($Display.Bounds.Height)""" -FilePath "$InstallDirectory\mainta\configs\unnamedsoldier.cfg"
Write-ReplaceContentInFile -Pattern '^seta r_mode "(.+)"' -Substitution "seta r_mode ""-1""" -FilePath "$InstallDirectory\mainta\configs\unnamedsoldier.cfg"
Write-ReplaceContentInFile -Pattern '^seta r_customwidth "(.+)"' -Substitution "seta r_customwidth ""$($Display.Bounds.Width)""" -FilePath "$InstallDirectory\maintt\configs\unnamedsoldier.cfg"
Write-ReplaceContentInFile -Pattern '^seta r_customheight "(.+)"' -Substitution "seta r_customheight ""$($Display.Bounds.Height)""" -FilePath "$InstallDirectory\maintt\configs\unnamedsoldier.cfg"
Write-ReplaceContentInFile -Pattern '^seta r_mode "(.+)"' -Substitution "seta r_mode ""-1""" -FilePath "$InstallDirectory\maintt\configs\unnamedsoldier.cfg"
# Determine the correct FOV
$FOV = 0xA0
if (($Display.Bounds.Width / $Display.Bounds.Height) -eq (16 / 9)) {
$FOV = 0xBE
} elseif (($Display.Bounds.Width / $Display.Bounds.Height) -eq (16 / 10)) {
$FOV = 0xB4
} elseif (($Display.Bounds.Width / $Display.Bounds.Height) -eq (21 / 9)) {
$FOV = 0xF0
} elseif (($Display.Bounds.Width / $Display.Bounds.Height) -eq (32 / 9)) {
$FOV = 0xF0
}
# Patch gamex86.dll to use correct FOV
Edit-PatchBinary -FilePath "$InstallDirectory\main\gamex86.dll" -Offset 0xA10A6 -Data ([byte[]]@( $FOV ))
Edit-PatchBinary -FilePath "$InstallDirectory\mainta\gamex86.dll" -Offset 0xE7836 -Data ([byte[]]@( $FOV ))
Edit-PatchBinary -FilePath "$InstallDirectory\maintt\gamex86.dll" -Offset 0xEEB06 -Data ([byte[]]@( $FOV ))
Name Change Script
Write-ReplaceContentInFile -Pattern 'seta name (.+)' -Substitution "seta name ""$NewPlayerAlias""" -FilePath "$InstallDirectory\main\configs\unnamedsoldier.cfg"
Write-ReplaceContentInFile -Pattern 'seta name (.+)' -Substitution "seta name ""$NewPlayerAlias""" -FilePath "$InstallDirectory\mainta\configs\unnamedsoldier.cfg"
Write-ReplaceContentInFile -Pattern 'seta name (.+)' -Substitution "seta name ""$NewPlayerAlias""" -FilePath "$InstallDirectory\maintt\configs\unnamedsoldier.cfg"