Dungeon Keeper 2

From LANCommander
Revision as of 00:30, 1 August 2023 by DoctorDalek (talk | contribs) (Created page with "Category:Games {{Game.InfoBox |Cover = cover.jpg |Developers = {{Game.InfoBox.Developer|Bullfrog Productions}} |Publishers = {{Game.InfoBox.Publisher|Electronic Arts}} |Release Date = {{Game.InfoBox.ReleaseDate|Windows|June 30, 1999}} |Genres = {{Game.InfoBox.Genre|Real Time Strategy (RTS)}} {{Game.InfoBox.Genre|Strategy}} | PCGamingWiki = Dungeon_Keeper_2 }} {{Game.ActionBox |Actions = {{Game.ActionBox.Row|Name = Play|Path = DKII-DX.exe|Arguments = |WorkingDirecto...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Developers
Bullfrog Productions
Publishers
Electronic Arts
Release Date
Windows: June 30, 1999
Genres
Real Time Strategy (RTS)

Strategy

View at PCGamingWiki

Actions

Name Path Arguments Working Directory Primary
Play DKII-DX.exe True

Install Script

Create some basic registry keys. Multiplayer name one is important so we can override it with the name change script.

$InstallDir = $PSScriptRoot

$BasePath = "HKCU:\SOFTWARE\Bullfrog Productions Ltd\Dungeon Keeper II"
$ConfigurationPath = "HKCU:\SOFTWARE\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration"
$GamePath = "HKCU:\SOFTWARE\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Game"
$NetworkPath = "HKCU:\SOFTWARE\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Network"
$PathsPath = "HKCU:\SOFTWARE\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Paths"
$PlayerPath = "HKCU:\SOFTWARE\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Player"
$SoundPath = "HKCU:\SOFTWARE\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Sound"
$VideoPath = "HKCU:\SOFTWARE\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video"

Ner-Item -Path "HKCU:\SOFTWARE\Bullfrog Productions Ltd"
New-Item -Path "$BasePath"
New-Item -Path "$ConfigurationPath"
New-Item -Path "$GamePath"
New-Item -Path "$NetworkPath"
New-Item -Path "$PathsPath"
New-Item -Path "$PlayerPath"
New-Item -Path "$SoundPath"
New-Item -Path "$VideoPath"

New-ItemProperty -Path "$BasePath" -Name "Language" -Value 9 -Force 

New-ItemProperty -Path "$ConfigurationPath" -Name "Version Number" -Value 11 -Force 

New-ItemProperty -Path "$GamePath" -Name "GameSpeed" -Value 4 -Force 
New-ItemProperty -Path "$GamePath" -Name "NewCampaign" -Value 1 -Force 
New-ItemProperty -Path "$GamePath" -Name "ShowIntro" -Value 1 -Force 
New-ItemProperty -Path "$GamePath" -Name "Version Number" -Value 0 -Force 

New-ItemProperty -Path "$NetworkPath" -Name "Server Name" -Value  "daphne.eagames.co.uk" -Force 
New-ItemProperty -Path "$NetworkPath" -Name "Version Number" -Value 0 -Force 

New-ItemProperty -Path "$PathsPath" -Name "Version Number" -Value 0 -Force 

New-ItemProperty -Path "$PlayerPath" -Name "Multiplayer Name" -Value "Vintage" -Force

Name Change Script

$InstallDir = $PSScriptRoot
$NewName = $args[0]

# Trim a string down to a specified amount of characters
if ($NewName.Length -gt 10) {
    $NewName = $NewName.Substring(0, 10);
}

New-ItemProperty -Path "HKCU:\SOFTWARE\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Player" -Name "Multiplayer Name" -Value "$NewName" -Force

Uninstall Script

$InstallDir = $PSScriptRoot

$BasePath = "HKCU:\SOFTWARE\Bullfrog Productions Ltd\Dungeon Keeper II"

Remove-Item -Path "$BasePath" -Force -Recurse