Codename: Panzers - Phase One: Difference between revisions
DoctorDalek (talk | contribs) m (DoctorDalek moved page Games/Codename: Panzers - Phase One to Codename: Panzers - Phase One without leaving a redirect) |
DoctorDalek (talk | contribs) No edit summary |
||
Line 5: | Line 5: | ||
{{InfoBox.Game.ReleaseDate|Windows|September 30, 2004}} | {{InfoBox.Game.ReleaseDate|Windows|September 30, 2004}} | ||
| PCGamingWiki = Codename:_Panzers_-_Phase_One | | PCGamingWiki = Codename:_Panzers_-_Phase_One | ||
}} | |||
== Actions == | |||
{{ActionBox | |||
{{ActionBox.Row|Name = Play|Path = |Arguments = |Working Directory = |Primary = true}} | |||
}} | |||
== Saves == | |||
{{SaveBox | |||
{{SaveBox.Row|Type = File|Path = }} | |||
}} | }} | ||
Revision as of 00:35, 31 July 2023
Actions
{{ActionBox Template:ActionBox.Row }}
Saves
{{SaveBox Template:SaveBox.Row }}
Name Change Script
The player name is stored in the options.ini file located in the game's install directory.
$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 '^Player name = (.+)' -Replacement "Player name = $NewName" -FilePath "$InstallDir\options.ini"
Install Script
The resolution for the game can be set in the options.ini file in the root of the game's install directory.
$NewName = $args[0]
$InstallDir = $PSScriptRoot
Add-Type -AssemblyName System.Windows.Forms
$Display = [System.Windows.Forms.Screen]::AllScreens | Where-Object Primary | Select Bounds
function Write-ReplaceContentInFile([string]$Regex, [string]$Replacement, [string]$FilePath)
{
$content = (Get-Content $FilePath) -replace $Regex, $Replacement
[IO.File]::WriteAllLines($FilePath, $content)
}
$X = $Display.Width
$Y = $Display.Height
Write-ReplaceContentInFile -Regex 'FullScreenWidth = (.+)' -Replacement "FullScreenWidth = $X" -FilePath "$InstallDir\options.ini"
Write-ReplaceContentInFile -Regex 'FullScreenHeight = (.+)' -Replacement "FullScreenHeight = $Y" -FilePath "$InstallDir\options.ini"