Tony Hawk's Pro Skater 3: Difference between revisions

From LANCommander
(Created page with "Category:Games {{Game.InfoBox |Cover = cover.jpg |Developers = {{Game.InfoBox.Developer|Beenox}} {{Game.InfoBox.Developer|Neversoft Entertainment}} |Publishers = {{Game.InfoBox.Publisher|Activision}} {{Game.InfoBox.Publisher|Aspyr Media}} |Release Date = {{Game.InfoBox.ReleaseDate|Windows|October 28, 2001}} |Genres = {{Game.InfoBox.Genre|Sport}} | PCGamingWiki = Tony_Hawk%27s_Pro_Skater_3 }} {{Game.ActionBox |Actions = {{Game.ActionBox.Row|Name = Play|Path = Skate3...")
 
No edit summary
 
Line 3: Line 3:
|Cover = cover.jpg
|Cover = cover.jpg
|Developers =
|Developers =
{{Game.InfoBox.Developer|Beenox}}
{{Game.InfoBox.Developer|Beenox}}{{Game.InfoBox.Developer|Neversoft Entertainment}}
{{Game.InfoBox.Developer|Neversoft Entertainment}}
|Publishers =
|Publishers =
{{Game.InfoBox.Publisher|Activision}}
{{Game.InfoBox.Publisher|Activision}}{{Game.InfoBox.Publisher|Aspyr Media}}
{{Game.InfoBox.Publisher|Aspyr Media}}
|Release Date =
|Release Date =
{{Game.InfoBox.ReleaseDate|Windows|October 28, 2001}}
{{Game.InfoBox.ReleaseDate|Windows|October 28, 2001}}
|Genres =
|Genres =
{{Game.InfoBox.Genre|Sport}}
{{Game.InfoBox.Genre|Sport}}
| PCGamingWiki = Tony_Hawk%27s_Pro_Skater_3
|PCGamingWiki = Tony_Hawk%27s_Pro_Skater_3}}
}}


{{Game.ActionBox
{{Game.ActionBox
|Actions =  
|Actions =  
{{Game.ActionBox.Row|Name = Play|Path = Skate3.exe|Arguments = |WorkingDirectory = |Primary = True}}
{{Game.ActionBox.Row|Name = Play|Path = {InstallDir}\THPS3.exe|Arguments = |WorkingDirectory = |Primary = True}}
{{Game.ActionBox.Row|Name = Setup|Path = THPS3Setup.exe|Arguments = |WorkingDirectory = |Primary = False}}
{{Game.ActionBox.Row|Name = Setup|Path = {InstallDir}\partyconfig.exe|Arguments = |WorkingDirectory = |Primary = False}}
}}
}}


{{Game.Scripts.NameChange
{{Game.Scripts.NameChange
Line 25: Line 23:
|Description =  
|Description =  
|RequiresAdmin = False
|RequiresAdmin = False
|Contents = <syntaxhighlight lang="powershell" line>
|Contents =
$NewName = $args[0]
<syntaxhighlight lang="powershell" line>
$InstallDir = $PSScriptRoot
# 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 -MaxLength 15 -MinLength 15
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 15


Patch-Binary -FilePath "$InstallDir\Data\Settings\OptionsAndPros.opt" -Offset 0xed -Data $rawBytes
Edit-PatchBinary -FilePath "$InstallDirectory\Data\Settings\OptionsAndPros\net.opt" -Offset 0xed -Data $bytes
</syntaxhighlight>
</syntaxhighlight>
}}
}}

Latest revision as of 21:58, 8 January 2024

Developers
BeenoxNeversoft Entertainment
Publishers
ActivisionAspyr Media
Release Date
Windows: October 28, 2001
Genres
Sport
View at PCGamingWiki

Actions

Name Path Arguments Working Directory Primary
Play {InstallDir}\THPS3.exe True
Setup {InstallDir}\partyconfig.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.
$bytes = ConvertTo-StringBytes -Input $NewPlayerAlias -MaxLength 15 -MinLength 15

Edit-PatchBinary -FilePath "$InstallDirectory\Data\Settings\OptionsAndPros\net.opt" -Offset 0xed -Data $bytes