Praetorians: Difference between revisions
DoctorDalek (talk | contribs) (Created page with "Category:Games {{Game.InfoBox |Cover = cover.jpg |Developers = {{Game.InfoBox.Developer|Pyro Studios}} |Publishers = {{Game.InfoBox.Publisher|Eidos Interactive}} {{Game.InfoBox.Publisher|Kalypso Media}} |Release Date = {{Game.InfoBox.ReleaseDate|Windows|February 28, 2003}} |Genres = {{Game.InfoBox.Genre|Real Time Strategy (RTS)}} {{Game.InfoBox.Genre|Strategy}} {{Game.InfoBox.Genre|Indie}} | PCGamingWiki = Praetorians }} {{Game.ActionBox |Actions = {{Game.ActionBox...") |
DoctorDalek (talk | contribs) No edit summary |
||
Line 3: | Line 3: | ||
|Cover = cover.jpg | |Cover = cover.jpg | ||
|Developers = | |Developers = | ||
|Publishers = | |Publishers = | ||
|Release Date = | |Release Date = | ||
{{Game.InfoBox.ReleaseDate|Windows|February 28, 2003}} | {{Game.InfoBox.ReleaseDate|Windows|February 28, 2003}} | ||
|Genres = | |Genres = | ||
|PCGamingWiki = Praetorians}} | |||
| PCGamingWiki = Praetorians | |||
}} | |||
{{Game.ActionBox | {{Game.ActionBox | ||
|Actions = | |Actions = | ||
{{Game.ActionBox.Row|Name = Play|Path = Praetorians.exe|Arguments = |WorkingDirectory = |Primary = True}} | {{Game.ActionBox.Row|Name = Play|Path = {InstallDir}\Praetorians.exe|Arguments = |WorkingDirectory = |Primary = True}} | ||
}} | }} | ||
{{Game.Scripts.Install | {{Game.Scripts.Install | ||
|Name = Install Script | |Name = Install Script | ||
|Description = The game requires some default files to be thrown in the | |Description = The game requires some default files to be thrown in the "Documents" folder. | ||
|RequiresAdmin = | |RequiresAdmin = False | ||
|Contents = <syntaxhighlight lang="powershell" line> | |Contents = | ||
$ | <syntaxhighlight lang="powershell" line> | ||
$ | $Documents = [Environment]::GetFolderPath("MyDocuments") | ||
$Display = Get-PrimaryDisplay | |||
$DefaultPlayerName = "68 101 102 97 117 108 116" | |||
Write-ReplaceContentInFile -Pattern '*NOMBRE_JUGADOR \d+ (.+)' -Substitution "*NOMBRE_JUGADOR $($DefaultPlayerName.Length) $DefaultPlayerName" -FilePath "$InstallDirectory\Default.usr" | |||
Write-ReplaceContentInFile -Pattern 'C:\\Games\\Praetorians' -Substitution "$InstallDirectory" -FilePath "$InstallDirectory\Default.usr" | |||
Write-ReplaceContentInFile -Pattern 'C:\\Users\\Pat\\Documents' -Substitution "$Documents" -FilePath "$InstallDirectory\Default.usr" | |||
$ | New-Item -ItemType Directory -Force -Path "$Documents\Praetorians\Profiles" | ||
Copy-Item -Path "$InstallDirectory\Default.usr" -Destination "$Documents\Praetorians\Profiles\Default.usr" | |||
$PatchDirectory = "$InstallDirectory\Patches\$($Display.Bounds.Width)x$($Display.Bounds.Height)" | |||
Copy-Item -Path "$ | if (Test-Path $PatchDirectory) { | ||
Copy-Item -Path "$PatchDirectory\*" -Destination "$InstallDirectory" -Recurse | |||
} | |||
New-Item -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Pyro Studios" | |||
New-Item -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Pyro Studios\Praetorians" | |||
New-Item -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Pyro Studios\Praetorians Game" | |||
New-Item -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Pyro Studios\Praetorians Game\Config" | |||
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Pyro Studios\Praetorians Game\Config" -Name "Perfil" -Value "Default" -Force | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | }} | ||
{{Game.Scripts.Uninstall | |||
|Name = Uninstall Script | |||
|Description = | |||
|RequiresAdmin = False | |||
|Contents = | |||
<syntaxhighlight lang="powershell" line> | |||
$Documents = [Environment]::GetFolderPath("MyDocuments") | |||
Remove-Item "$Documents\Praetorians" -Recurse -ErrorAction Ignore | |||
Remove-Item -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Pyro Studios\Praetorians" -Recurse -Force | |||
Remove-Item -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Pyro Studios\Praetorians Game" -Recurse -Force | |||
</syntaxhighlight> | |||
}} | |||
{{Game.Scripts.NameChange | {{Game.Scripts.NameChange | ||
|Name = Name Change Script | |Name = Name Change Script | ||
|Description = The player name is stored as an ASCII encoded string in a .usr profile file in the Documents folder. The first number of the ASCII string is the length of the string. | |Description = The player name is stored as an ASCII encoded string in a .usr profile file in the Documents folder. The first number of the ASCII string is the length of the string. | ||
|RequiresAdmin = False | |RequiresAdmin = False | ||
|Contents = <syntaxhighlight lang="powershell" line> | |Contents = | ||
$ | <syntaxhighlight lang="powershell" line> | ||
$Documents = [Environment]::GetFolderPath("MyDocuments") | |||
$bytes = ConvertTo-StringBytes -Input $NewPlayerAlias -MaxLength 18 | |||
$array = @() | |||
foreach ($byte in $bytes) { | |||
$array += [System.Convert]::ToUInt32($byte) | |||
} | } | ||
$ | $NewPlayerAlias = [System.String]::Join(' ', $array) | ||
New-Item -ItemType Directory -Force -Path "$ | New-Item -ItemType Directory -Force -Path "$Documents\Praetorians\Profiles" | ||
Copy-Item -Path "$InstallDirectory\Default.usr" -Destination "$Documents\Praetorians\Profiles\Default.usr" | |||
Write-ReplaceContentInFile -Pattern '\*NOMBRE_JUGADOR \d+ (.*)' -Substitution "*NOMBRE_JUGADOR $($array.Length) $NewPlayerAlias" -FilePath "$Documents\Praetorians\Profiles\Default.usr" | |||
Write-ReplaceContentInFile -Pattern '\*NOMBRE_SKIRMISH \d+ (.*)' -Substitution "*NOMBRE_SKIRMISH $($array.Length) $NewPlayerAlias" -FilePath "$Documents\Praetorians\Profiles\Default.usr" | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | }} |
Latest revision as of 03:30, 6 January 2024
Release Date | |
---|---|
Windows: February 28, 2003 | |
View at PCGamingWiki |
Actions
Name | Path | Arguments | Working Directory | Primary |
---|---|---|---|---|
Play | {InstallDir}\Praetorians.exe | True |
Install Script
The game requires some default files to be thrown in the "Documents" folder.
$Documents = [Environment]::GetFolderPath("MyDocuments")
$Display = Get-PrimaryDisplay
$DefaultPlayerName = "68 101 102 97 117 108 116"
Write-ReplaceContentInFile -Pattern '*NOMBRE_JUGADOR \d+ (.+)' -Substitution "*NOMBRE_JUGADOR $($DefaultPlayerName.Length) $DefaultPlayerName" -FilePath "$InstallDirectory\Default.usr"
Write-ReplaceContentInFile -Pattern 'C:\\Games\\Praetorians' -Substitution "$InstallDirectory" -FilePath "$InstallDirectory\Default.usr"
Write-ReplaceContentInFile -Pattern 'C:\\Users\\Pat\\Documents' -Substitution "$Documents" -FilePath "$InstallDirectory\Default.usr"
New-Item -ItemType Directory -Force -Path "$Documents\Praetorians\Profiles"
Copy-Item -Path "$InstallDirectory\Default.usr" -Destination "$Documents\Praetorians\Profiles\Default.usr"
$PatchDirectory = "$InstallDirectory\Patches\$($Display.Bounds.Width)x$($Display.Bounds.Height)"
if (Test-Path $PatchDirectory) {
Copy-Item -Path "$PatchDirectory\*" -Destination "$InstallDirectory" -Recurse
}
New-Item -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Pyro Studios"
New-Item -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Pyro Studios\Praetorians"
New-Item -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Pyro Studios\Praetorians Game"
New-Item -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Pyro Studios\Praetorians Game\Config"
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Pyro Studios\Praetorians Game\Config" -Name "Perfil" -Value "Default" -Force
Uninstall Script
$Documents = [Environment]::GetFolderPath("MyDocuments")
Remove-Item "$Documents\Praetorians" -Recurse -ErrorAction Ignore
Remove-Item -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Pyro Studios\Praetorians" -Recurse -Force
Remove-Item -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Pyro Studios\Praetorians Game" -Recurse -Force
Name Change Script
The player name is stored as an ASCII encoded string in a .usr profile file in the Documents folder. The first number of the ASCII string is the length of the string.
$Documents = [Environment]::GetFolderPath("MyDocuments")
$bytes = ConvertTo-StringBytes -Input $NewPlayerAlias -MaxLength 18
$array = @()
foreach ($byte in $bytes) {
$array += [System.Convert]::ToUInt32($byte)
}
$NewPlayerAlias = [System.String]::Join(' ', $array)
New-Item -ItemType Directory -Force -Path "$Documents\Praetorians\Profiles"
Copy-Item -Path "$InstallDirectory\Default.usr" -Destination "$Documents\Praetorians\Profiles\Default.usr"
Write-ReplaceContentInFile -Pattern '\*NOMBRE_JUGADOR \d+ (.*)' -Substitution "*NOMBRE_JUGADOR $($array.Length) $NewPlayerAlias" -FilePath "$Documents\Praetorians\Profiles\Default.usr"
Write-ReplaceContentInFile -Pattern '\*NOMBRE_SKIRMISH \d+ (.*)' -Substitution "*NOMBRE_SKIRMISH $($array.Length) $NewPlayerAlias" -FilePath "$Documents\Praetorians\Profiles\Default.usr"