Tron 2.0

From LANCommander
Developers
Monolith ProductionsClimax Group
Publishers
MacPlayBuena Vista Games
Release Date
Windows: August 26, 2003
Genres
RacingShooterRole-playing (RPG)
View at PCGamingWiki

Actions

Name Path Arguments Working Directory Primary
Play {InstallDir}\Tron.exe True
Change Resolution {InstallDir}\ka_mod_v1x1a_setup.exe False

Install Script

$Display = Get-PrimaryDisplay
$VirtualStore = "registry::\HKEY_CURRENT_USER\Software\Classes\VirtualStore\MACHINE\SOFTWARE"

New-Item -Path "$VirtualStore\WOW6432Node\Monolith Productions\TRON 2.0 Update 1.2" -Force
New-Item -Path "$VirtualStore\WOW6432Node\Monolith Productions\TRON 2.0 Update 1.2\1.2" -Force
# New-Item -Path "$VirtualStore\WOW6432Node\GOG.com\Games\1655444396" -Force
# New-ItemProperty -Path "$VirtualStore\WOW6432Node\GOG.com\Games\1655444396" -Name "PATH" -Value "$InstallDirectory" -Force
# New-ItemProperty -Path "$VirtualStore\WOW6432Node\GOG.com\Games\1655444396" -Name "GAMENAME" -Value "TRON 2.0" -Force
# New-ItemProperty -Path "$VirtualStore\WOW6432Node\GOG.com\Games\1655444396" -Name "STARTMENULINK" -Value "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\TRON 2.0 [GOG.com]\TRON 2.0" -Force
# New-ItemProperty -Path "$VirtualStore\WOW6432Node\GOG.com\Games\1655444396" -Name "GOGGAMEDLL" -Value "goggame-1655444396.dll" -Force
# New-ItemProperty -Path "$VirtualStore\WOW6432Node\GOG.com\Games\1655444396" -Name "GUID" -Value "{7ddcb00b-8853-4b24-ac6b-6f8b7bfae282}" -Force
# New-ItemProperty -Path "$VirtualStore\WOW6432Node\GOG.com\Games\1655444396" -Name "BUILD" -Value "2" -Force
# New-ItemProperty -Path "$VirtualStore\WOW6432Node\GOG.com\Games\1655444396" -Name "STARTMENU" -Value "TRON 2.0" -Force
# New-ItemProperty -Path "$VirtualStore\WOW6432Node\GOG.com\Games\1655444396" -Name "gameID" -Value "1655444396" -Force
# New-ItemProperty -Path "$VirtualStore\WOW6432Node\GOG.com\Games\1655444396" -Name "uninstallCommand" -Value "$InstallDirectory\unins000.exe" -Force
# New-ItemProperty -Path "$VirtualStore\WOW6432Node\GOG.com\Games\1655444396" -Name "DEPENDSON" -Value "" -Force
# New-ItemProperty -Path "$VirtualStore\WOW6432Node\GOG.com\Games\1655444396" -Name "DLC" -Value "" -Force
# New-ItemProperty -Path "$VirtualStore\WOW6432Node\GOG.com\Games\1655444396" -Name "INSTALLDATE" -Value "2024-01-05 20:31:43" -Force
# New-ItemProperty -Path "$VirtualStore\WOW6432Node\GOG.com\Games\1655444396" -Name "VER" -Value "2.0.0.2" -Force
# New-ItemProperty -Path "$VirtualStore\WOW6432Node\GOG.com\Games\1655444396" -Name "SUPPORTLINK" -Value "tron_20" -Force
# New-ItemProperty -Path "$VirtualStore\WOW6432Node\GOG.com\Games\1655444396" -Name "LANGUAGE" -Value "english" -Force
# New-ItemProperty -Path "$VirtualStore\WOW6432Node\GOG.com\Games\1655444396" -Name "SAVEGAMEFOLDER" -Value "$InstallDirectory\" -Force
# New-ItemProperty -Path "$VirtualStore\WOW6432Node\GOG.com\Games\1655444396" -Name "LAUNCHPARAM" -Value "" -Force
# New-ItemProperty -Path "$VirtualStore\WOW6432Node\GOG.com\Games\1655444396" -Name "LAUNCHCOMMAND" -Value "$InstallDirectory\TRON.exe " -Force
# New-ItemProperty -Path "$VirtualStore\WOW6432Node\GOG.com\Games\1655444396" -Name "EXE" -Value "$InstallDirectory\TRON.exe" -Force
# New-ItemProperty -Path "$VirtualStore\WOW6432Node\GOG.com\Games\1655444396" -Name "EXEFILE" -Value "TRON.exe" -Force
# New-ItemProperty -Path "$VirtualStore\WOW6432Node\GOG.com\Games\1655444396" -Name "WORKINGDIR" -Value "$InstallDirectory" -Force
New-Item -Path "$VirtualStore\WOW6432Node\Monolith Productions\TRON 2.0 Update 1.042" -Force
New-Item -Path "$VirtualStore\WOW6432Node\Monolith Productions\TRON 2.0 Update 1.042\1.042" -Force
New-Item -Path "$VirtualStore\WOW6432Node\Monolith Productions\Tron 2.0" -Force
New-Item -Path "$VirtualStore\WOW6432Node\Monolith Productions\Tron 2.0\1.0" -Force
New-ItemProperty -Path "$VirtualStore\WOW6432Node\Monolith Productions\Tron 2.0\1.0" -Name "Commands" -Value "-windowtitle ""TRON 2.0: Killer App Mod""" -Force
New-ItemProperty -Path "$VirtualStore\WOW6432Node\Monolith Productions\Tron 2.0\1.0" -Name "Disable Animated Load Screen" -Value 0 -Force
New-ItemProperty -Path "$VirtualStore\WOW6432Node\Monolith Productions\Tron 2.0\1.0" -Name "Disable Hardware Cursor" -Value 0 -Force
New-ItemProperty -Path "$VirtualStore\WOW6432Node\Monolith Productions\Tron 2.0\1.0" -Name "Disable Hardware Sound" -Value 1 -Force
New-ItemProperty -Path "$VirtualStore\WOW6432Node\Monolith Productions\Tron 2.0\1.0" -Name "Disable Joysticks" -Value 0 -Force
New-ItemProperty -Path "$VirtualStore\WOW6432Node\Monolith Productions\Tron 2.0\1.0" -Name "Disable Movies" -Value 0 -Force
New-ItemProperty -Path "$VirtualStore\WOW6432Node\Monolith Productions\Tron 2.0\1.0" -Name "Disable Sound" -Value 0 -Force
New-ItemProperty -Path "$VirtualStore\WOW6432Node\Monolith Productions\Tron 2.0\1.0" -Name "Disable Sound Filters" -Value 1 -Force
New-ItemProperty -Path "$VirtualStore\WOW6432Node\Monolith Productions\Tron 2.0\1.0" -Name "Disable Triple Buffering" -Value 0 -Force
New-ItemProperty -Path "$VirtualStore\WOW6432Node\Monolith Productions\Tron 2.0\1.0" -Name "DisplayWarning" -Value 1 -Force
New-ItemProperty -Path "$VirtualStore\WOW6432Node\Monolith Productions\Tron 2.0\1.0" -Name "EndGame" -Value 1 -Force
New-ItemProperty -Path "$VirtualStore\WOW6432Node\Monolith Productions\Tron 2.0\1.0" -Name "InstallDir" -Value "$InstallDirectory" -Force
New-ItemProperty -Path "$VirtualStore\WOW6432Node\Monolith Productions\Tron 2.0\1.0" -Name "Language" -Value "English" -Force
New-ItemProperty -Path "$VirtualStore\WOW6432Node\Monolith Productions\Tron 2.0\1.0" -Name "NetRegionCode" -Value "EN" -Force
New-ItemProperty -Path "$VirtualStore\WOW6432Node\Monolith Productions\Tron 2.0\1.0" -Name "ProfileName" -Value "Player" -Force
New-ItemProperty -Path "$VirtualStore\WOW6432Node\Monolith Productions\Tron 2.0\1.0" -Name "Last Random" -Value 0 -Force
New-ItemProperty -Path "$VirtualStore\WOW6432Node\Monolith Productions\Tron 2.0\1.0" -Name "Num Launcher Runs" -Value 8 -Force
New-ItemProperty -Path "$VirtualStore\WOW6432Node\Monolith Productions\Tron 2.0\1.0" -Name "OptionsWarning" -Value 1 -Force
New-ItemProperty -Path "$VirtualStore\WOW6432Node\Monolith Productions\Tron 2.0\1.0" -Name "Save Commands" -Value 1 -Force
New-ItemProperty -Path "$VirtualStore\WOW6432Node\Monolith Productions\Tron 2.0\1.0" -Name "UpdateCommandLine2" -Value "-rez gamep5.rez" -Force
New-ItemProperty -Path "$VirtualStore\WOW6432Node\Monolith Productions\Tron 2.0\1.0" -Name "UpdateCommandLine3" -Value "-rez gamep6.rez" -Force
New-ItemProperty -Path "$VirtualStore\WOW6432Node\Monolith Productions\Tron 2.0\1.0" -Name "UpdateNum" -Value 5 -Force
New-ItemProperty -Path "$VirtualStore\WOW6432Node\Monolith Productions\Tron 2.0\1.0" -Name "Disable Music" -Value 0 -Force
New-ItemProperty -Path "$VirtualStore\WOW6432Node\Monolith Productions\Tron 2.0\1.0" -Name "KAModResolution" -Value "$($Display.Bounds.Width)x$($Display.Bounds.Height)" -Force
New-ItemProperty -Path "$VirtualStore\WOW6432Node\Monolith Productions\Tron 2.0\1.0" -Name "KAModFOV" -Value "106" -Force
New-ItemProperty -Path "$VirtualStore\WOW6432Node\Monolith Productions\Tron 2.0\1.0" -Name "CDKey" -Value "4214-9798-4350-3817-1567" -Force
New-ItemProperty -Path "$VirtualStore\WOW6432Node\Monolith Productions\Tron 2.0\1.0" -Name "KAModTemp" -Value "$InstallDirectory\Custom\Mods\Retail\KAModTemp\WORLDS\RETAILSINGLEPLAYER" -Force
New-ItemProperty -Path "$VirtualStore\WOW6432Node\Monolith Productions\Tron 2.0\1.0" -Name "SelectedMod" -Value "Retail" -Force
New-ItemProperty -Path "$VirtualStore\WOW6432Node\Monolith Productions\Tron 2.0\1.0" -Name "UpdateCommandLine4" -Value "-rez ""$InstallDirectory\tcdg\game""" -Force

Write-ReplaceContentInFile -Pattern '^"NetSessionName" (.+)' -Substitution """NetSessionName"" ""Vintage Gaming!""" -FilePath "$InstallDirectory\autoexec.cfg"

Write-ReplaceContentInFile -Pattern '^"screenwidth" "(.+)"' -Substitution """screenwidth"" ""$($Display.Bounds.Width)""" -FilePath "$InstallDirectory\display.cfg"
Write-ReplaceContentInFile -Pattern '^"screenheight" "(.+)"' -Substitution """screenheight"" ""$($Display.Bounds.Height)""" -FilePath "$InstallDirectory\display.cfg"
Write-ReplaceContentInFile -Pattern '^"screenwidth" "(.+)"' -Substitution """screenwidth"" ""$($Display.Bounds.Width)""" -FilePath "$InstallDirectory\autoexec.cfg"
Write-ReplaceContentInFile -Pattern '^"screenheight" "(.+)"' -Substitution """screenheight"" ""$($Display.Bounds.Height)""" -FilePath "$InstallDirectory\autoexec.cfg"

$X = $Display.Bounds.Width
$Y = $Display.Bounds.Height

$FOV = 106

if (($X / $Y) -eq (16 / 9)) {
    $FOV = 106
} elseif (($X / $Y) -eq (16 / 10)) {
    $FOV = 100
}

Write-ReplaceContentInFile -Pattern '^"fovx" "(.+)"' -Substitution """fovx"" ""$FOV""" -FilePath "$InstallDirectory\autoexec.cfg"
Write-ReplaceContentInFile -Pattern '^"fovxinterface" "(.+)"' -Substitution """fovxinterface"" ""$FOV""" -FilePath "$InstallDirectory\autoexec.cfg"

Uninstall Script

$VirtualStore = "registry::\HKEY_CURRENT_USER\Software\Classes\VirtualStore\MACHINE\SOFTWARE"

Remove-Item -Path "$VirtualStore\WOW6432Node\Monolith Productions\TRON 2.0 Update 1.2"-Force -Recurse
Remove-Item -Path "$VirtualStore\WOW6432Node\GOG.com\Games\1655444396" -Force -Recurse
Remove-Item -Path "$VirtualStore\WOW6432Node\Monolith Productions\TRON 2.0 Update 1.042"-Force -Recurse
Remove-Item -Path "$VirtualStore\WOW6432Node\Monolith Productions\Tron 2.0"-Force -Recurse

Name Change Script

# Use regex to replace text within a file. Quotes are escaped by double quoting ("")
Write-ReplaceContentInFile -Pattern '^PlayerName = (.+)' -Substitution "PlayerName = ""$($NewPlayerAlias)""" -FilePath "$InstallDirectory\Profiles\Player.txt"