Star Wars: X-Wing Alliance: Difference between revisions
DoctorDalek (talk | contribs) (Created new page for Star Wars: X-Wing Alliance) |
DoctorDalek (talk | contribs) No edit summary |
||
Line 14: | Line 14: | ||
{{Game.ActionBox | {{Game.ActionBox | ||
|Actions = | |Actions = | ||
{{Game.ActionBox.Row|Name = Play|Path = {InstallDir}\ | {{Game.ActionBox.Row|Name = Play|Path = {InstallDir}\XWINGALLIANCE.EXE|Arguments = |WorkingDirectory = |Primary = True}} | ||
}} | }} | ||
Latest revision as of 00:50, 22 February 2024
Developers | |
---|---|
Totally Games | |
Publishers | |
LucasArts | |
Release Date | |
Windows: February 28, 1999 | |
Genres | |
SimulatorShooter | |
View at PCGamingWiki |
Actions
Name | Path | Arguments | Working Directory | Primary |
---|---|---|---|---|
Play | {InstallDir}\XWINGALLIANCE.EXE | True |
Name Change Script
This script will patch the pilot file ($NewName0.plt) with the new name and rename it from the old name or copy a template pilot file in the install directory.
$NewPlayerAlias = $NewPlayerAlias.Split([IO.Path]::GetInvalidFileNameChars()) -join '_'
$OldPlayerAlias = $OldPlayerAlias.Split([IO.Path]::GetInvalidFileNameChars()) -join '_'
if ($OldPlayerAlias.Length -gt 12) {
$OldPlayerAlias = $OldPlayerAlias.Substring(0, 12);
}
if ($NewPlayerAlias.Length -gt 12) {
$NewPlayerAlias = $NewPlayerAlias.Substring(0, 12);
}
if (Test-Path "$InstallDirectory\$($OldPlayerAlias)0.PLT") {
Rename-Item -Path "$InstallDirectory\$($OldPlayerAlias)0.PLT" -NewName "$InstallDirectory\$($NewPlayerAlias)0.PLT"
} else {
Copy-Item -Path "$InstallDirectory\TemplatePilot.PLT.example" -Destination "$InstallDirectory\$($NewPlayerAlias)0.PLT"
}
# 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 12 -MinLength 12
Edit-PatchBinary -FilePath "$InstallDirectory\$($NewPlayerAlias)0" -Offset 0x00 -Data $bytes