Postal 2: Difference between revisions

From LANCommander
No edit summary
No edit summary
 
Line 14: Line 14:
{{Game.ActionBox
{{Game.ActionBox
|Actions =  
|Actions =  
{{Game.ActionBox.Row|Name = Play (Singleplayer)|Path = {InstallDir}\System/Postal2.exe|Arguments = |WorkingDirectory = |Primary = True}}
{{Game.ActionBox.Row|Name = Play Singleplayer|Path = {InstallDir}\System/Postal2.exe|Arguments = |WorkingDirectory = |Primary = True}}
{{Game.ActionBox.Row|Name = Play (Multiplayer)|Path = {InstallDir}\ShareThePain/System/Postal2MP.exe|Arguments = |WorkingDirectory = |Primary = True}}
{{Game.ActionBox.Row|Name = Play Multiplayer|Path = {InstallDir}\ShareThePain/System/Postal2MP.exe|Arguments = |WorkingDirectory = |Primary = True}}
}}
}}



Latest revision as of 00:47, 22 February 2024

Developers
Running with Scissors
Publishers
Whiptail Interactive
Release Date
Windows: April 13, 2003
Genres
AdventureIndieShooter
View at PCGamingWiki

Actions

Name Path Arguments Working Directory Primary
Play Singleplayer {InstallDir}\System/Postal2.exe True
Play Multiplayer {InstallDir}\ShareThePain/System/Postal2MP.exe True

Install Script

# Bounds are accessible by $Display.Bounds.Width and $Display.Bounds.Height
$Display = Get-PrimaryDisplay

$X = $Display.Bounds.Width
$Y = $Display.Bounds.Height

Write-ReplaceContentInFile -Pattern 'StartupFullscreen=(.+)' -Substitution "StartupFullscreen=True" -FilePath "$InstallDirectory\ShareThePain\System\Default.ini"
Write-ReplaceContentInFile -Pattern 'WindowedViewportX=(.+)' -Substitution "WindowedViewportX=$X" -FilePath "$InstallDirectory\ShareThePain\System\Default.ini"
Write-ReplaceContentInFile -Pattern 'WindowedViewportY=(.+)' -Substitution "WindowedViewportY=$Y" -FilePath "$InstallDirectory\ShareThePain\System\Default.ini"
Write-ReplaceContentInFile -Pattern 'FullscreenViewportX=(.+)' -Substitution "FullscreenViewportX=$X" -FilePath "$InstallDirectory\ShareThePain\System\Default.ini"
Write-ReplaceContentInFile -Pattern 'FullscreenViewportY=(.+)' -Substitution "FullscreenViewportY=$Y" -FilePath "$InstallDirectory\ShareThePain\System\Default.ini"
Write-ReplaceContentInFile -Pattern 'MenuViewportX=(.+)' -Substitution "MenuViewportX=$X" -FilePath "$InstallDirectory\ShareThePain\System\Default.ini"
Write-ReplaceContentInFile -Pattern 'MenuViewportY=(.+)' -Substitution "MenuViewportY=$Y" -FilePath "$InstallDirectory\ShareThePain\System\Default.ini"

Write-ReplaceContentInFile -Pattern 'StartupFullscreen=(.+)' -Substitution "StartupFullscreen=True" -FilePath "$InstallDirectory\ShareThePain\System\Postal2MP.ini"
Write-ReplaceContentInFile -Pattern 'WindowedViewportX=(.+)' -Substitution "WindowedViewportX=$X" -FilePath "$InstallDirectory\ShareThePain\System\Postal2MP.ini"
Write-ReplaceContentInFile -Pattern 'WindowedViewportY=(.+)' -Substitution "WindowedViewportY=$Y" -FilePath "$InstallDirectory\ShareThePain\System\Postal2MP.ini"
Write-ReplaceContentInFile -Pattern 'FullscreenViewportX=(.+)' -Substitution "FullscreenViewportX=$X" -FilePath "$InstallDirectory\ShareThePain\System\Postal2MP.ini"
Write-ReplaceContentInFile -Pattern 'FullscreenViewportY=(.+)' -Substitution "FullscreenViewportY=$Y" -FilePath "$InstallDirectory\ShareThePain\Postal2MP\Postal2MP.ini"
Write-ReplaceContentInFile -Pattern 'MenuViewportX=(.+)' -Substitution "MenuViewportX=$X" -FilePath "$InstallDirectory\ShareThePain\System\Postal2MP.ini"

Name Change Script

Write-ReplaceContentInFile -Pattern 'Name=(.+)' -Substitution "Name=$NewPlayerAlias" -FilePath "$InstallDirectory\ShareThePain\System\Default.ini"
Write-ReplaceContentInFile -Pattern 'Name=(.+)' -Substitution "Name=$NewPlayerAlias" -FilePath "$InstallDirectory\ShareThePain\System\User.ini"
Write-ReplaceContentInFile -Pattern 'Name=(.+)' -Substitution "Name=$NewPlayerAlias" -FilePath "$InstallDirectory\ShareThePain\System\Postal2MP.ini"