Stronghold Crusader: Difference between revisions
DoctorDalek (talk | contribs) (Created page with "Category:Games {{Game.InfoBox |Cover = cover.jpg |Developers = {{Game.InfoBox.Developer|Firefly Studios}} |Publishers = {{Game.InfoBox.Publisher|Take-Two Interactive}} |Release Date = {{Game.InfoBox.ReleaseDate|Windows|July 31, 2002}} |Genres = {{Game.InfoBox.Genre|Simulator}} {{Game.InfoBox.Genre|Real Time Strategy (RTS)}} {{Game.InfoBox.Genre|Strategy}} | PCGamingWiki = Stronghold_Crusader }} {{Game.ActionBox |Actions = {{Game.ActionBox.Row|Name = Play Stronghold...") |
DoctorDalek (talk | contribs) No edit summary |
||
Line 9: | Line 9: | ||
{{Game.InfoBox.ReleaseDate|Windows|July 31, 2002}} | {{Game.InfoBox.ReleaseDate|Windows|July 31, 2002}} | ||
|Genres = | |Genres = | ||
{{Game.InfoBox.Genre|Simulator}} | {{Game.InfoBox.Genre|Simulator}}{{Game.InfoBox.Genre|Real Time Strategy (RTS)}}{{Game.InfoBox.Genre|Strategy}} | ||
{{Game.InfoBox.Genre|Real Time Strategy (RTS)}} | |PCGamingWiki = Stronghold_Crusader}} | ||
{{Game.InfoBox.Genre|Strategy}} | |||
| PCGamingWiki = Stronghold_Crusader | |||
}} | |||
{{Game.ActionBox | {{Game.ActionBox | ||
|Actions = | |Actions = | ||
{{Game.ActionBox.Row|Name = Play Stronghold: Crusader Extreme|Path = Stronghold_Crusader_Extreme.exe|Arguments = |WorkingDirectory = |Primary = True}} | {{Game.ActionBox.Row|Name = Play Stronghold: Crusader Extreme|Path = {InstallDir}\Stronghold_Crusader_Extreme.exe|Arguments = |WorkingDirectory = |Primary = True}} | ||
{{Game.ActionBox.Row|Name = Play Stronghold: Crusader|Path = Stronghold Crusader.exe|Arguments = |WorkingDirectory = |Primary = True}} | {{Game.ActionBox.Row|Name = Play Stronghold: Crusader|Path = {InstallDir}\Stronghold Crusader.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> | ||
$Documents = [Environment]::GetFolderPath("MyDocuments") | |||
$Display = Get-PrimaryDisplay | |||
$Resolution = Switch ("$($Display.Bounds.Width)x$($Display.Bounds.Height)") { | |||
"800x600" { 0x01; Break } | |||
"1024x768" { 0x02; Break } | |||
{ | "1280x720" { 0x03; Break } | ||
"1280x1024" { 0x04; Break } | |||
"1366x768" { 0x05; Break } | |||
"1440x900" { 0x06; Break } | |||
"1600x900" { 0x07; Break } | |||
# "FAIL" { 0x08; Break } | |||
} | "1680x1050" { 0x09; Break } | ||
"1920x1080" { 0x0A; Break } | |||
"1920x1200" { 0x0B; Break } | |||
{ | "2560x1440" { 0x0C; Break } | ||
} | |||
} | } | ||
New-Item -ItemType Directory -Force -Path "$Documents\Stronghold Crusader" | |||
Copy-Item -Path "$InstallDirectory\Default.cfg" -Destination "$Documents\Stronghold Crusader\crusader.cfg" | |||
Copy-Item -Path "$InstallDirectory\Default.cfg" -Destination "$Documents\Stronghold Crusader\crusaderExtreme.cfg" | |||
Edit-PatchBinary -FilePath "$Documents\Stronghold Crusader\crusader.cfg" -Offset 0x3B9 -Data ([byte[]]@( $Resolution ) | |||
} | Edit-PatchBinary -FilePath "$Documents\Stronghold Crusader\crusaderExtreme.cfg" -Offset 0x3B9 -Data ([byte[]]@( $Resolution ) | ||
</syntaxhighlight> | |||
}} | |||
{{Game.Scripts.Uninstall | |||
|Name = Uninstall Script | |||
|Description = | |||
|RequiresAdmin = False | |||
|Contents = | |||
<syntaxhighlight lang="powershell" line> | |||
$Documents = [Environment]::GetFolderPath("MyDocuments") | |||
$ | Remove-Item "$Documents\Stronghold Crusader" -Recurse -ErrorAction Ignore | ||
</syntaxhighlight> | |||
}} | |||
{{Game.Scripts.NameChange | |||
|Name = Name Change Script | |||
|Description = | |||
|RequiresAdmin = False | |||
|Contents = | |||
<syntaxhighlight lang="powershell" line> | |||
$Documents = [Environment]::GetFolderPath("MyDocuments") | |||
# Converts a string to a UTF16-encoded byte array. This looks like ASCII characters separated by 0x00 in most cases. | |||
$bytes = ConvertTo-StringBytes -Input $NewPlayerAlias -MaxLength 16 -MinLength 16 | |||
Edit-PatchBinary -FilePath "$Documents\Stronghold Crusader\crusader.cfg" -Offset 0x23 -Data $bytes | |||
Edit-PatchBinary -FilePath "$Documents\Stronghold Crusader\crusaderExtreme.cfg" -Offset 0x23 -Data $bytes | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | }} |
Latest revision as of 21:57, 8 January 2024
Developers | |
---|---|
Firefly Studios | |
Publishers | |
Take-Two Interactive | |
Release Date | |
Windows: July 31, 2002 | |
Genres | |
SimulatorReal Time Strategy (RTS)Strategy | |
View at PCGamingWiki |
Actions
Name | Path | Arguments | Working Directory | Primary |
---|---|---|---|---|
Play Stronghold: Crusader Extreme | {InstallDir}\Stronghold_Crusader_Extreme.exe | True | ||
Play Stronghold: Crusader | {InstallDir}\Stronghold Crusader.exe | True |
Install Script
$Documents = [Environment]::GetFolderPath("MyDocuments")
$Display = Get-PrimaryDisplay
$Resolution = Switch ("$($Display.Bounds.Width)x$($Display.Bounds.Height)") {
"800x600" { 0x01; Break }
"1024x768" { 0x02; Break }
"1280x720" { 0x03; Break }
"1280x1024" { 0x04; Break }
"1366x768" { 0x05; Break }
"1440x900" { 0x06; Break }
"1600x900" { 0x07; Break }
# "FAIL" { 0x08; Break }
"1680x1050" { 0x09; Break }
"1920x1080" { 0x0A; Break }
"1920x1200" { 0x0B; Break }
"2560x1440" { 0x0C; Break }
}
New-Item -ItemType Directory -Force -Path "$Documents\Stronghold Crusader"
Copy-Item -Path "$InstallDirectory\Default.cfg" -Destination "$Documents\Stronghold Crusader\crusader.cfg"
Copy-Item -Path "$InstallDirectory\Default.cfg" -Destination "$Documents\Stronghold Crusader\crusaderExtreme.cfg"
Edit-PatchBinary -FilePath "$Documents\Stronghold Crusader\crusader.cfg" -Offset 0x3B9 -Data ([byte[]]@( $Resolution )
Edit-PatchBinary -FilePath "$Documents\Stronghold Crusader\crusaderExtreme.cfg" -Offset 0x3B9 -Data ([byte[]]@( $Resolution )
Uninstall Script
$Documents = [Environment]::GetFolderPath("MyDocuments")
Remove-Item "$Documents\Stronghold Crusader" -Recurse -ErrorAction Ignore
Name Change Script
$Documents = [Environment]::GetFolderPath("MyDocuments")
# Converts a string to a UTF16-encoded byte array. This looks like ASCII characters separated by 0x00 in most cases.
$bytes = ConvertTo-StringBytes -Input $NewPlayerAlias -MaxLength 16 -MinLength 16
Edit-PatchBinary -FilePath "$Documents\Stronghold Crusader\crusader.cfg" -Offset 0x23 -Data $bytes
Edit-PatchBinary -FilePath "$Documents\Stronghold Crusader\crusaderExtreme.cfg" -Offset 0x23 -Data $bytes