Star Wars: Republic Commando
Developers | |
---|---|
LucasArts | |
Publishers | |
ActivisionElectronic ArtsLucasArtsAspyr Media | |
Release Date | |
Windows: February 17, 2005 | |
Genres | |
AdventureShooterTactical | |
View at PCGamingWiki |
Actions
Name | Path | Arguments | Working Directory | Primary |
---|---|---|---|---|
Play | {InstallDir}\System/CT.exe | True |
Install Script
Sets the user's video settings to fit the display's current resolution. The script also fixes mouse sensitivity at higher refresh rates if you have the SWRCFix installed.
# Bounds are accessible by $Display.Bounds.Width and $Display.Bounds.Height
$Display = Get-PrimaryDisplay
# Use regex to replace text within a file. Quotes are escaped by double quoting ("")
Write-ReplaceContentInFile -Pattern '^WindowedViewportX=(.+)' -Substitution "WindowedViewportX=$($Display.Bounds.Width)" -FilePath "$InstallDirectory\Save\System.ini"
Write-ReplaceContentInFile -Pattern '^WindowedViewportY=(.+)' -Substitution "WindowedViewportY=$($Display.Bounds.Height)" -FilePath "$InstallDirectory\Save\System.ini"
Write-ReplaceContentInFile -Pattern '^FullscreenViewportX=(.+)' -Substitution "FullscreenViewportX=$($Display.Bounds.Width)" -FilePath "$InstallDirectory\Save\System.ini"
Write-ReplaceContentInFile -Pattern '^FullscreenViewportY=(.+)' -Substitution "FullscreenViewportY=$($Display.Bounds.Height)" -FilePath "$InstallDirectory\Save\System.ini"
# Fixes mouse sensitivity at higher refresh rates
Write-ReplaceContentInFile -Pattern '^FpsLimit=(.+)' -Substitution "FpsLimit=60" -FilePath "$InstallDirectory\Save\System.ini"
Name Change Script
The name is set in the Save/Profile_<Name>/User.ini. To get this script to work properly, you will first need to create a profile in the game called "Template". Quit the game and move the Save/Profile_Template folder to the game's install directory. This script will ensure that the old named profile is either changed or that a new profile is scaffolded.
$OldPlayerAlias = $OldPlayerAlias.Split([IO.Path]::GetInvalidFileNameChars()) -join '_'
$NewPlayerAlias = $NewPlayerAlias.Split([IO.Path]::GetInvalidFileNameChars()) -join '_'
Rename-Item -Path "$InstallDirectory\Profile_$OldPlayerAlias" -NewName "$InstallDirectory\Profile_$NewPlayerAlias"
# Copy the template profile if no profile currently exists
If (!(Test-Path -PathType container "$InstallDirectory\Save\Profile_$NewPlayerAlias"))
{
Copy-Item -Path "$InstallDirectory\Profile_Template" -Destination "$InstallDirectory\Save\Profile_$NewPlayerAlias" -Recurse
}
# Use regex to replace text within a file. Quotes are escaped by double quoting ("")
Write-ReplaceContentInFile -Pattern '^Name=(.+)' -Substitution "Name=$NewPlayerAlias" -FilePath "$InstallDirectory\Save\Profile_$NewPlayerAlias\User.ini"