Descent 3: Difference between revisions

From LANCommander
(Created page with "Category:Games {{Game.InfoBox |Cover = cover.jpg |Developers = {{Game.InfoBox.Developer|Outrage Games}} {{Game.InfoBox.Developer|Loki Software}} |Publishers = {{Game.InfoBox.Publisher|Interplay Entertainment}} {{Game.InfoBox.Publisher|Graphic Simulations}} |Release Date = {{Game.InfoBox.ReleaseDate|Windows|June 17, 1999}} |Genres = {{Game.InfoBox.Genre|Shooter}} {{Game.InfoBox.Genre|Simulator}} | PCGamingWiki = Descent_3 }} {{Game.ActionBox |Actions = {{Game.Action...")
 
No edit summary
Line 3: Line 3:
|Cover = cover.jpg
|Cover = cover.jpg
|Developers =
|Developers =
{{Game.InfoBox.Developer|Outrage Games}}
{{Game.InfoBox.Developer|Loki Software}}{{Game.InfoBox.Developer|Outrage Games}}
{{Game.InfoBox.Developer|Loki Software}}
|Publishers =
|Publishers =
{{Game.InfoBox.Publisher|Interplay Entertainment}}
{{Game.InfoBox.Developer|Interplay Entertainment}}{{Game.InfoBox.Developer|Graphic Simulations}}
{{Game.InfoBox.Publisher|Graphic Simulations}}
|Release Date =
|Release Date =
{{Game.InfoBox.ReleaseDate|Windows|June 17, 1999}}
{{Game.InfoBox.ReleaseDate|Windows|June 17, 1999}}
|Genres =
|Genres =
{{Game.InfoBox.Genre|Shooter}}
{{Game.InfoBox.Genre|Simulator}}{{Game.InfoBox.Genre|Shooter}}
{{Game.InfoBox.Genre|Simulator}}
|PCGamingWiki = Descent_3}}
| PCGamingWiki = Descent_3
}}


{{Game.ActionBox
{{Game.ActionBox
|Actions =  
|Actions =  
{{Game.ActionBox.Row|Name = Patch Configuration|Path = InjectD3Configuration.exe|Arguments = |WorkingDirectory = |Primary = False}}
{{Game.ActionBox.Row|Name = Patch Configuration|Path = {InstallDir}\InjectD3Configuration.exe|Arguments = |WorkingDirectory = |Primary = False}}
{{Game.ActionBox.Row|Name = Play|Path = InjectD3.exe|Arguments = |WorkingDirectory = |Primary = True}}
{{Game.ActionBox.Row|Name = Play|Path = {InstallDir}\InjectD3.exe|Arguments = |WorkingDirectory = |Primary = True}}
{{Game.ActionBox.Row|Name = Level Editor|Path = D3EDIT.EXE|Arguments = |WorkingDirectory = {InstallDir}/Editor|Primary = False}}
{{Game.ActionBox.Row|Name = Level Editor|Path = D3EDIT.EXE|Arguments = |WorkingDirectory = {InstallDir}/Editor|Primary = False}}
}}
}}


{{Game.Scripts.Install
{{Game.Scripts.Install
Line 27: Line 24:
|Description =  
|Description =  
|RequiresAdmin = True
|RequiresAdmin = True
|Contents = <syntaxhighlight lang="powershell" line>
|Contents =
$InstallDir = $PSScriptRoot
<syntaxhighlight lang="powershell" line>
 
New-Item -Path "HKLM:\SOFTWARE\WOW6432Node\Outrage"
New-Item -Path "HKLM:\SOFTWARE\WOW6432Node\Outrage"
New-Item -Path "HKLM:\SOFTWARE\WOW6432Node\Outrage\Descent 3 Level Editor"
New-Item -Path "HKLM:\SOFTWARE\WOW6432Node\Outrage\Descent 3 Level Editor"
Line 36: Line 32:
New-Item -Path "HKLM:\SOFTWARE\WOW6432Node\Outrage\Descent3\Version"
New-Item -Path "HKLM:\SOFTWARE\WOW6432Node\Outrage\Descent3\Version"


New-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\Outrage\Descent 3 Level Editor" -Name "D3Dir" -Value "$InstallDir" -Force
New-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\Outrage\Descent 3 Level Editor" -Name "D3Dir" -Value "$InstallDirectory" -Force


New-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\Outrage\Descent3" -Name "ConnectionSpeed" -Value "Fast" -Force
New-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\Outrage\Descent3" -Name "ConnectionSpeed" -Value "Fast" -Force
Line 47: Line 43:
New-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\Outrage\Descent3\Version" -Name "Major" -Value 1 -Force
New-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\Outrage\Descent3\Version" -Name "Major" -Value 1 -Force
New-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\Outrage\Descent3\Version" -Name "Minor" -Value 4 -Force
New-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\Outrage\Descent3\Version" -Name "Minor" -Value 4 -Force
</syntaxhighlight>
</syntaxhighlight>
}}
}}
 
           
{{Game.Scripts.NameChange
{{Game.Scripts.NameChange
|Name = Name Change Script
|Name = Name Change Script
|Description =  
|Description =  
|RequiresAdmin = False
|RequiresAdmin = False
|Contents = <syntaxhighlight lang="powershell" line>
|Contents =
$NewName = $args[0]
<syntaxhighlight lang="powershell" line>
$InstallDir = $PSScriptRoot
# Takes the variable $Filename, splits it by invalid characters, then joins using _
 
$NewPlayerAlias = $NewPlayerAlias.Split([IO.Path]::GetInvalidFileNameChars()) -join '_'
function Get-AsciiBytes([string]$InputString, [int]$MaxLength)
{
    if ($InputString.Length -gt $MaxLength)
    {
        $InputString = $InputString.Substring(0, $MaxLength)
    }
 
    $bytes = [System.Text.Encoding]::ASCII.GetBytes($InputString)
    $array = @()
    $count = 0
 
    $extraPadding = $MaxLength - $bytes.Length
 
    foreach ($byte in $bytes)
    {
        if ($count -lt $MaxLength)
        {
            $array += $byte
            $count++
        }
    }
 
    for ($i = $count; $i -lt $MaxLength; $i++)
    {
        $array += 0x00
    }
 
    return $array
}
 
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)
}


$rawBytes = Get-AsciiBytes -InputString $newName -MaxLength 19
# 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 -Utf16 1 -MaxLength 19


Copy-Item -Path "$InstallDir\DefaultPilot" -Destination "$InstallDir\$NewName.plt"
Copy-Item -Path "$InstallDirectory\DefaultPilot" -Destination "$InstallDirectory\$NewPlayerAlias.plt"


Patch-Binary -FilePath "$InstallDir\$NewName.plt" -Offset 0x4 -Data $rawBytes
Edit-PatchBinary -FilePath "$InstallDirectory\$NewPlayerAlias" -Offset 0x4 -Data $bytes


New-ItemProperty -Path "HKCU:\SOFTWARE\Outrage\Descent3" -Name "Default_pilot" -Value "$NewName.plt" -Force
New-ItemProperty -Path "HKCU:\SOFTWARE\Outrage\Descent3" -Name "Default_pilot" -Value "$NewPlayerAlias.plt" -Force
</syntaxhighlight>
</syntaxhighlight>
}}
}}

Revision as of 02:08, 6 January 2024

Developers
Loki SoftwareOutrage Games
Publishers
Interplay EntertainmentGraphic Simulations
Release Date
Windows: June 17, 1999
Genres
SimulatorShooter
View at PCGamingWiki

Actions

Name Path Arguments Working Directory Primary
Patch Configuration {InstallDir}\InjectD3Configuration.exe False
Play {InstallDir}\InjectD3.exe True
Level Editor D3EDIT.EXE {InstallDir}/Editor False

Install Script

This script requires admin access to function properly

New-Item -Path "HKLM:\SOFTWARE\WOW6432Node\Outrage"
New-Item -Path "HKLM:\SOFTWARE\WOW6432Node\Outrage\Descent 3 Level Editor"
New-Item -Path "HKLM:\SOFTWARE\WOW6432Node\Outrage\Descent 3 Level Editor\Settings"
New-Item -Path "HKLM:\SOFTWARE\WOW6432Node\Outrage\Descent3"
New-Item -Path "HKLM:\SOFTWARE\WOW6432Node\Outrage\Descent3\Version"

New-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\Outrage\Descent 3 Level Editor" -Name "D3Dir" -Value "$InstallDirectory" -Force

New-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\Outrage\Descent3" -Name "ConnectionSpeed" -Value "Fast" -Force
New-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\Outrage\Descent3" -Name "NetworkConnection" -Value "LAN" -Force
New-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\Outrage\Descent3" -Name "ProfanityPrevention" -Value 0 -Force
New-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\Outrage\Descent3" -Name "PredefDetailSetting" -Value 3 -Force
New-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\Outrage\Descent3" -Name "PreferredRenderer" -Value 2 -Force

New-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\Outrage\Descent3\Version" -Name "Build" -Value 0 -Force
New-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\Outrage\Descent3\Version" -Name "Major" -Value 1 -Force
New-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\Outrage\Descent3\Version" -Name "Minor" -Value 4 -Force

Name Change Script

# Takes the variable $Filename, splits it by invalid characters, then joins using _
$NewPlayerAlias = $NewPlayerAlias.Split([IO.Path]::GetInvalidFileNameChars()) -join '_'

# 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 -Utf16 1 -MaxLength 19

Copy-Item -Path "$InstallDirectory\DefaultPilot" -Destination "$InstallDirectory\$NewPlayerAlias.plt"

Edit-PatchBinary -FilePath "$InstallDirectory\$NewPlayerAlias" -Offset 0x4 -Data $bytes

New-ItemProperty -Path "HKCU:\SOFTWARE\Outrage\Descent3" -Name "Default_pilot" -Value "$NewPlayerAlias.plt" -Force