Actions
Name |
Path |
Arguments |
Working Directory |
Primary |
Streets of SimCity Race Course Editor |
RaceEdit.exe |
|
|
False |
SimCity 2000 Urban Renewal Kit |
WINSCURK.EXE |
|
|
False |
Play |
SSXLauncher.exe |
|
|
True |
Save Paths
Type |
Path |
File |
{InstallDir}\Games\Careers |
Name Change Script
A template career file should be created in the Games\Careers folder. This script will rename the file and patch the name to a maximum of 7 characters.
$InstallDir = $PSScriptRoot
$NewName = $args[0]
function Patch-Binary([byte[]]$Data, [int]$Offset, [string]$FilePath)
{
$bytes = [System.IO.File]::ReadAllBytes($FilePath)
for ($i = 0; $i -lt $Data.Length; $i++)
{
$bytes[$Offset + $i] = $Data[$i]
}
[System.IO.File]::WriteAllBytes($FilePath, $bytes)
}
# Convert an input string to ASCII-encoded byte[]. Shorter strings will pad out to 12 bytes, longer strings will be trimmed.
$bytes = Get-AsciiBytes -InputString $NewName -MaxLength 7
Rename-Item -Path "$InstallDir\Games\Careers\DoctorD.str" -NewName "$InstallDir\Games\Careers\$NewName.str"
# Writes byte[] to a file at an offset
Patch-Binary -FilePath "$InstallDir\Games\Careers\$NewName.str" -Offset 0x24 -Data $bytes