Homeworld

From LANCommander
Revision as of 00:45, 22 February 2024 by DoctorDalek (talk | contribs) (Created new page for Homeworld)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Developers
Relic Entertainment
Publishers
Sierra Entertainment
Release Date
Windows: September 28, 1999
Genres
AdventureReal Time Strategy (RTS)Strategy
View at PCGamingWiki

Actions

Name Path Arguments Working Directory Primary
Play Homeworld {InstallDir}\HomeworldRM\Bin\Release\HomeworldRM.exe True
Run Launcher {InstallDir}\HWLauncher\Launcher.exe False

Name Change Script

# Converts a string to a UTF16-encoded byte array. This looks like ASCII characters separated by 0x00 in most cases.
$nameBytes = ConvertTo-StringBytes -Input $NewPlayerAlias -Utf16 1

$output = ([byte[]]@( 0xFF, 0xFE ))

$output += $nameBytes

Set-Content -Out "$InstallDirectory\HomeWorldRM\Bin\Profiles\Profile1\name.dat" -Value $output -Encoding Byte
Set-Content -Out "$InstallDirectory\Homeworld2Classic\Bin\Profiles\Profile1\name.dat" -Value $output -Encoding Byte

#HomeworldRM\Bin\Profiles\Profile1\name.dat requires hexedit for name game truncates name automatically
#Homeworld2Classic\Bin\Profiles\Profile1\name.dat requires hexedit for name game truncates name automatically

Write-ReplaceContentInFile -Pattern '^  chatname = (.+)' -Substitution "  chatname = ""$NewPlayerAlias""," -FilePath "$InstallDirectory\HomeworldRM\Bin\Profiles\Profile1\PLAYERCFG.LUA"
Write-ReplaceContentInFile -Pattern '^  chatname = (.+)' -Substitution "  chatname = ""$NewPlayerAlias""," -FilePath "$InstallDirectory\Homeworld2Classic\Bin\Profiles\Profile1\PLAYERCFG.LUA"
Write-ReplaceContentInFile -Pattern '^PlayerName    (.+)' -Substitution "PlayerName    $NewPlayerAlias" -FilePath "$InstallDirectory\Homeworld1Classic\exe\Homeworld.cfg"