Streets of SimCity

From LANCommander
Revision as of 03:04, 2 August 2023 by DoctorDalek (talk | contribs) (Created page with "Category:Games {{Game.InfoBox |Cover = cover.jpg |Developers = {{Game.InfoBox.Developer|Maxis}} |Publishers = {{Game.InfoBox.Publisher|Maxis}} {{Game.InfoBox.Publisher|Electronic Arts}} |Release Date = {{Game.InfoBox.ReleaseDate|Windows|October 31, 1997}} |Genres = {{Game.InfoBox.Genre|Shooter}} {{Game.InfoBox.Genre|Racing}} | PCGamingWiki = Streets_of_SimCity }} {{Game.ActionBox |Actions = {{Game.ActionBox.Row|Name = Streets of SimCity Race Course Editor|Path = Ra...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Developers
Maxis
Publishers
Maxis Electronic Arts
Release Date
Windows: October 31, 1997
Genres
Shooter

Racing

View at PCGamingWiki

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