DEFCON: Difference between revisions
DoctorDalek (talk | contribs) No edit summary |
DoctorDalek (talk | contribs) No edit summary |
||
Line 5: | Line 5: | ||
{{Game.InfoBox.Developer|Introversion Software}} | {{Game.InfoBox.Developer|Introversion Software}} | ||
|Publishers = | |Publishers = | ||
{{Game.InfoBox. | {{Game.InfoBox.Publisher|Introversion Software}} | ||
|Release Date = | |Release Date = | ||
{{Game.InfoBox.ReleaseDate|Windows|September 29, 2006}} | {{Game.InfoBox.ReleaseDate|Windows|September 29, 2006}} |
Latest revision as of 00:40, 22 February 2024
Developers | |
---|---|
Introversion Software | |
Publishers | |
Introversion Software | |
Release Date | |
Windows: September 29, 2006 | |
Genres | |
IndieReal Time Strategy (RTS)Strategy | |
View at PCGamingWiki |
Actions
Name | Path | Arguments | Working Directory | Primary |
---|---|---|---|---|
Play | {InstallDir}\defcon_offline.exe | True |
Install Script
# 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 '^ScreenWidth = "(.+)"' -Substitution "ScreenWidth $($Display.Bounds.Width)" -FilePath "$InstallDirectory\preferences.txt"
Write-ReplaceContentInFile -Pattern '^ScreenHeight = "(.+)"' -Substitution "ScreenHeight $($Display.Bounds.Height)" -FilePath "$InstallDirectory\preferences.txt"
Name Change Script
# Trim a string down to a specified amount of characters
if ($NewPlayerAlias.Length -gt 16) {
$NewPlayerAlias = $NewPlayerAlias.Substring(0, 16);
}
Write-ReplaceContentInFile -Pattern '^PlayerName = (.+)' -Substitution "PlayerName = $NewPlayerAlias" -FilePath "$InstallDirectory\preferences.txt"