Plane Crazy: Difference between revisions

From LANCommander
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 10: Line 10:
|Genres =
|Genres =
{{Game.InfoBox.Genre|Racing}}
{{Game.InfoBox.Genre|Racing}}
| PCGamingWiki = Plane_Crazy
|PCGamingWiki = Plane_Crazy}}
 
{{Game.ActionBox
|Actions =
{{Game.ActionBox.Row|Name = Play|Path = {InstallDir}\pcrazy.exe|Arguments = |WorkingDirectory = |Primary = True}}
}}
}}


{{Game.Scripts.Install
{{Game.Scripts.Install
Line 17: Line 22:
|Description =  
|Description =  
|RequiresAdmin = False
|RequiresAdmin = False
|Contents = <syntaxhighlight lang="powershell" line>
|Contents =
$InstallDir = $PSScriptRoot
<syntaxhighlight lang="powershell" line>
$InstallDrive = Split-Path -Path $InstallDir -Qualifier
$Display = Get-PrimaryDisplay
$InstallDrive = Split-Path -Path $InstallDirectory -Qualifier


$User = New-Object System.Security.Principal.NTAccount($env:UserName)
New-Item -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress"
$SID = $User.Translate([System.Security.Principal.SecurityIdentifier]).value
New-Item -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy"
New-Item -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0"
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "language" -Value 1 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "Installed" -Value 1 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "sPath_DataMin" -Value "$InstallDirectory\data\datamin" -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "sPath_DataMax" -Value "$InstallDirectory\data\datamax" -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "sNotBovine" -Value "$InstallDrive" -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "bStartNet" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "bStartA3d" -Value 1 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "iOptionDiff" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "iOptionSoundRes" -Value 2 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "iOptionGraphicsRes" -Value 1 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "iOptionMusicVol" -Value 10 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "iOptionFxVol" -Value 6 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "iOptionCheckTime" -Value 1 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "iOptionKeysUp" -Value 38 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "iOptionKeysDown" -Value 40 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "iOptionKeysLeft" -Value 37 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "iOptionKeysRight" -Value 39 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "iOptionKeysFast" -Value 16 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "iOptionKeysSlow" -Value 17 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "iOptionKeysFireCannon" -Value 18 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "iOptionKeysFire" -Value 32 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "iOptionKeysAirBrakes" -Value 13 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "sOptionKeysUpN" -Value "UP" -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "sOptionKeysDownN" -Value "DOWN" -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "sOptionKeysLeftN" -Value "LEFT" -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "sOptionKeysRightN" -Value "RIGHT" -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "sOptionKeysFastN" -Value "SHIFT" -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "sOptionKeysSlowN" -Value "CTRL" -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "sOptionKeysFireCannonN" -Value "ALT" -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "sOptionKeysFireN" -Value "SPACE" -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "sOptionKeysAirBrakesN" -Value "ENTER" -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "iOptionJoyFast" -Value 7 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "iOptionJoySlow" -Value 8 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "iOptionJoyFireCannon" -Value 2 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "iOptionJoyFire" -Value 1 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "iOptionJoyAirBrakes" -Value 3 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "sOptionJoyFastN" -Value "BUTTON 7" -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "sOptionJoySlowN" -Value "BUTTON 8" -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "sOptionJoyFireCannonN" -Value "BUTTON 2" -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "sOptionJoyFireN" -Value "BUTTON 1" -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "sOptionJoyAirBrakesN" -Value "BUTTON 3" -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "iStartRes" -Value 13 -Force


$BasePath = "registry::\HKEY_USERS\$SID\Software\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Inner Workings"
$Resolution = Convert-AspectRatio -Width $Display.Bounds.Width -Height $Display.Bounds.Height -AspectRatio (4 / 3)
# Non-destructively creates path in registry
New-Item -Path "HKLM:\SOFTWARE\WOW6432Node\<Path>"


# The OS might force your game to read/write to the user's virtual store. This will write a key to the correct SID's virtual store.
Write-ReplaceContentInFile -Pattern '^Resolution (.+)' -Substitution "Resolution = h:$($Resolution.Width), v:$($Resolution.Height), refrate:60" -FilePath "$InstallDirectory\dgVoodoo.conf"
New-Item -Path $BasePath
</syntaxhighlight>
New-Item -Path "$BasePath\Plane Crazy"
}}
New-Item -Path "$BasePath\Plane Crazy\1.0"
           
 
{{Game.Scripts.Uninstall
New-ItemProperty -Path "$BasePath\Plane Crazy\1.0" -Name "bRetail" -Value 1 -Force
|Name = Uninstall Script
New-ItemProperty -Path "$BasePath\Plane Crazy\1.0" -Name "Installed" -Value 1 -Force
|Description =
# The following lines are required for the CD check. sNotBovine will default to the drive letter, e.g. "C:"
|RequiresAdmin = False
New-ItemProperty -Path "$BasePath\Plane Crazy\1.0" -Name "sNotBovine" -Value $InstallDrive -Force
|Contents =
New-ItemProperty -Path "$BasePath\Plane Crazy\1.0" -Name "sPathDataMax" -Value "$InstallDir\data\datamax" -Force
<syntaxhighlight lang="powershell" line>
New-ItemProperty -Path "$BasePath\Plane Crazy\1.0" -Name "sPathDataMin" -Value "$InstallDir\data\datamin" -Force
Remove-Item -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy" -Force -Recurse
</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>
 
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)
}
 
# Plane Crazy stores player/plane strings in a binary .pln file in the data\DataMin\Planes directory
# Plane Crazy stores player/plane strings in a binary .pln file in the data\DataMin\Planes directory
# The following script should change the player name in plane1.pln. THe length of the name seems to
# The following script should change the player name in plane1.pln. The length of the name seems to
# be arbitrary, so make sure MaxLength matches the length of the template plane1.pln file you will
# be arbitrary, so make sure MaxLength matches the length of the template plane1.pln file you will
# have to place at the root of the game's directory before packaging.
# have to place at the root of the game's directory before packaging.
$bytes = Get-AsciiBytes -InputString $NewName -MaxLength 32
$bytes = ConvertTo-StringBytes -Input $NewPlayerAlias -MaxLength 16 -MinLength 16
 
Copy-Item -Path "$InstallDir\Template.pln" -Destination "$InstallDir\data\DataMin\Planes\plane1.pln" -Force


# Writes byte[] to a file at an offset
Edit-PatchBinary -FilePath "$InstallDirectory\data\DataMin\Planes\plane1.pln" -Offset 0x00 -Data $bytes
Patch-Binary -FilePath "$InstallDir\data\DataMin\Planes\plane1.pln" -Offset 0x00 -Data $bytes
</syntaxhighlight>
</syntaxhighlight>
}}
}}

Latest revision as of 00:47, 22 February 2024

Developers
Inner Workings
Publishers
SegaSoft
Release Date
Windows: September 30, 1998
Genres
Racing
View at PCGamingWiki

Actions

Name Path Arguments Working Directory Primary
Play {InstallDir}\pcrazy.exe True

Install Script

$Display = Get-PrimaryDisplay
$InstallDrive = Split-Path -Path $InstallDirectory -Qualifier

New-Item -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress"
New-Item -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy"
New-Item -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0"
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "language" -Value 1 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "Installed" -Value 1 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "sPath_DataMin" -Value "$InstallDirectory\data\datamin" -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "sPath_DataMax" -Value "$InstallDirectory\data\datamax" -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "sNotBovine" -Value "$InstallDrive" -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "bStartNet" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "bStartA3d" -Value 1 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "iOptionDiff" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "iOptionSoundRes" -Value 2 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "iOptionGraphicsRes" -Value 1 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "iOptionMusicVol" -Value 10 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "iOptionFxVol" -Value 6 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "iOptionCheckTime" -Value 1 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "iOptionKeysUp" -Value 38 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "iOptionKeysDown" -Value 40 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "iOptionKeysLeft" -Value 37 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "iOptionKeysRight" -Value 39 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "iOptionKeysFast" -Value 16 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "iOptionKeysSlow" -Value 17 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "iOptionKeysFireCannon" -Value 18 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "iOptionKeysFire" -Value 32 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "iOptionKeysAirBrakes" -Value 13 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "sOptionKeysUpN" -Value "UP" -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "sOptionKeysDownN" -Value "DOWN" -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "sOptionKeysLeftN" -Value "LEFT" -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "sOptionKeysRightN" -Value "RIGHT" -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "sOptionKeysFastN" -Value "SHIFT" -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "sOptionKeysSlowN" -Value "CTRL" -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "sOptionKeysFireCannonN" -Value "ALT" -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "sOptionKeysFireN" -Value "SPACE" -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "sOptionKeysAirBrakesN" -Value "ENTER" -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "iOptionJoyFast" -Value 7 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "iOptionJoySlow" -Value 8 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "iOptionJoyFireCannon" -Value 2 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "iOptionJoyFire" -Value 1 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "iOptionJoyAirBrakes" -Value 3 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "sOptionJoyFastN" -Value "BUTTON 7" -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "sOptionJoySlowN" -Value "BUTTON 8" -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "sOptionJoyFireCannonN" -Value "BUTTON 2" -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "sOptionJoyFireN" -Value "BUTTON 1" -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "sOptionJoyAirBrakesN" -Value "BUTTON 3" -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy\1.0" -Name "iStartRes" -Value 13 -Force

$Resolution = Convert-AspectRatio -Width $Display.Bounds.Width -Height $Display.Bounds.Height -AspectRatio (4 / 3)

Write-ReplaceContentInFile -Pattern '^Resolution (.+)' -Substitution "Resolution = h:$($Resolution.Width), v:$($Resolution.Height), refrate:60" -FilePath "$InstallDirectory\dgVoodoo.conf"

Uninstall Script

Remove-Item -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Europress\Plane Crazy" -Force -Recurse

Name Change Script

# Plane Crazy stores player/plane strings in a binary .pln file in the data\DataMin\Planes directory
# The following script should change the player name in plane1.pln. The length of the name seems to
# be arbitrary, so make sure MaxLength matches the length of the template plane1.pln file you will
# have to place at the root of the game's directory before packaging.
$bytes = ConvertTo-StringBytes -Input $NewPlayerAlias -MaxLength 16 -MinLength 16

Edit-PatchBinary -FilePath "$InstallDirectory\data\DataMin\Planes\plane1.pln" -Offset 0x00 -Data $bytes