Dungeon Keeper 2: Difference between revisions

From LANCommander
(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...")
 
No edit summary
Line 5: Line 5:
{{Game.InfoBox.Developer|Bullfrog Productions}}
{{Game.InfoBox.Developer|Bullfrog Productions}}
|Publishers =
|Publishers =
{{Game.InfoBox.Publisher|Electronic Arts}}
{{Game.InfoBox.Developer|Electronic Arts}}
|Release Date =
|Release Date =
{{Game.InfoBox.ReleaseDate|Windows|June 30, 1999}}
{{Game.InfoBox.ReleaseDate|Windows|June 30, 1999}}
|Genres =
|Genres =
{{Game.InfoBox.Genre|Real Time Strategy (RTS)}}
{{Game.InfoBox.Genre|Real Time Strategy (RTS)}}{{Game.InfoBox.Genre|Strategy}}
{{Game.InfoBox.Genre|Strategy}}
|PCGamingWiki = Dungeon_Keeper_2}}
| PCGamingWiki = Dungeon_Keeper_2
}}


{{Game.ActionBox
{{Game.ActionBox
|Actions =  
|Actions =  
{{Game.ActionBox.Row|Name = Play|Path = DKII-DX.exe|Arguments = |WorkingDirectory = |Primary = True}}
{{Game.ActionBox.Row|Name = Play|Path = {InstallDir}\DKII-DX.exe|Arguments = |WorkingDirectory = |Primary = True}}
}}
}}


{{Game.Scripts.Install
{{Game.Scripts.Install
Line 23: Line 22:
|Description = Create some basic registry keys. Multiplayer name one is important so we can override it with the name change script.
|Description = Create some basic registry keys. Multiplayer name one is important so we can override it with the name change script.
|RequiresAdmin = False
|RequiresAdmin = False
|Contents = <syntaxhighlight lang="powershell" line>
|Contents =
$InstallDir = $PSScriptRoot
<syntaxhighlight lang="powershell" line>
 
$BasePath = "HKCU:\SOFTWARE\Bullfrog Productions Ltd\Dungeon Keeper II"
$BasePath = "HKCU:\SOFTWARE\Bullfrog Productions Ltd\Dungeon Keeper II"
$ConfigurationPath = "HKCU:\SOFTWARE\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration"
$ConfigurationPath = "HKCU:\SOFTWARE\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration"
Line 60: Line 58:


New-ItemProperty -Path "$PlayerPath" -Name "Multiplayer Name" -Value "Vintage" -Force
New-ItemProperty -Path "$PlayerPath" -Name "Multiplayer Name" -Value "Vintage" -Force
</syntaxhighlight>
}}


{{Game.Scripts.NameChange
# Bounds are accessible by $Display.Bounds.Width and $Display.Bounds.Height
|Name = Name Change Script
$Display = Get-PrimaryDisplay
|Description =
|RequiresAdmin = False
|Contents = <syntaxhighlight lang="powershell" line>
$InstallDir = $PSScriptRoot
$NewName = $args[0]


# Trim a string down to a specified amount of characters
# Use regex to replace text within a file. Quotes are escaped by double quoting ("")
if ($NewName.Length -gt 10) {
Write-ReplaceContentInFile -Regex '^INGAME_RES=(.+)' -Replacement "INGAME_RES=$($Display.Bounds.Width)x$($Display.Bounds.Height)x32" -FilePath "$InstallDirectory\keeperfx.cfg"
    $NewName = $NewName.Substring(0, 10);
}


New-ItemProperty -Path "HKCU:\SOFTWARE\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Player" -Name "Multiplayer Name" -Value "$NewName" -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "GUID Index" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "GUID Index Verified Working" -Value 1 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "GUID Index Is Default" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "Gamma Level" -Value 4096 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "Ambient Light" -Value 512 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "HighWalls" -Value 1 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "Torture Details" -Value 1 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "Res 1600*1200 Enable" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "Res 1280*1024 Enable" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "Res 1024*768 Enabled" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "Engine Id" -Value 2 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "Cheap Lighting" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "Sine Wave Water" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "View Distance" -Value 12 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "Shadow Level" -Value 3 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "EnvironmentMapping" -Value 1 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "Translucent Water" -Value 1 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "PMesh Reduction Level" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "Texture Reduction Level" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "Solid Blueprints" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "Should Draw Opt Background Alpha" -Value 1 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "Screen Width" -Value $Display.Bounds.Width -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "Screen Height" -Value $Display.Bounds.Height -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "Screen Depth" -Value 32 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "Screen Windowed" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "Screen Swap" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "Screen Hardware3D" -Value 1 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "Machine Spec Level" -Value 10 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "High Res Textures" -Value 1 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "D3D Device Guid" -Value "{84E63DE0-46AA-11CF-816F-0000C020156E}" -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "Version Number" -Value 4 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "StippleAlpha" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "BumpMappingConfig" -Value 1 -Force
</syntaxhighlight>
</syntaxhighlight>
}}
}}
 
           
{{Game.Scripts.Uninstall
{{Game.Scripts.Uninstall
|Name = Uninstall Script
|Name = Uninstall Script
|Description =  
|Description =  
|RequiresAdmin = False
|RequiresAdmin = False
|Contents = <syntaxhighlight lang="powershell" line>
|Contents =
$InstallDir = $PSScriptRoot
<syntaxhighlight lang="powershell" line>
 
$BasePath = "HKCU:\SOFTWARE\Bullfrog Productions Ltd\Dungeon Keeper II"
$BasePath = "HKCU:\SOFTWARE\Bullfrog Productions Ltd\Dungeon Keeper II"


Remove-Item -Path "$BasePath" -Force -Recurse
Remove-Item -Path "$BasePath" -Force -Recurse
</syntaxhighlight>
}}
           
{{Game.Scripts.NameChange
|Name = Name Change Script
|Description =
|RequiresAdmin = False
|Contents =
<syntaxhighlight lang="powershell" line>
# Trim a string down to a specified amount of characters
if ($NewPlayerAlias.Length -gt 10) {
    $NewPlayerAlias = $NewPlayerAlias.Substring(0, 10);
}
New-ItemProperty -Path "HKCU:\SOFTWARE\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Player" -Name "Multiplayer Name" -Value "$NewPlayerAlias" -Force
</syntaxhighlight>
</syntaxhighlight>
}}
}}

Revision as of 02:09, 6 January 2024

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 {InstallDir}\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.

$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

# Bounds are accessible by $Display.Bounds.Width and $Display.Bounds.Height
$Display = Get-PrimaryDisplay

# Use regex to replace text within a file. Quotes are escaped by double quoting ("")
Write-ReplaceContentInFile -Regex '^INGAME_RES=(.+)' -Replacement "INGAME_RES=$($Display.Bounds.Width)x$($Display.Bounds.Height)x32" -FilePath "$InstallDirectory\keeperfx.cfg"

New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "GUID Index" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "GUID Index Verified Working" -Value 1 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "GUID Index Is Default" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "Gamma Level" -Value 4096 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "Ambient Light" -Value 512 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "HighWalls" -Value 1 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "Torture Details" -Value 1 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "Res 1600*1200 Enable" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "Res 1280*1024 Enable" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "Res 1024*768 Enabled" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "Engine Id" -Value 2 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "Cheap Lighting" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "Sine Wave Water" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "View Distance" -Value 12 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "Shadow Level" -Value 3 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "EnvironmentMapping" -Value 1 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "Translucent Water" -Value 1 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "PMesh Reduction Level" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "Texture Reduction Level" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "Solid Blueprints" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "Should Draw Opt Background Alpha" -Value 1 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "Screen Width" -Value $Display.Bounds.Width -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "Screen Height" -Value $Display.Bounds.Height -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "Screen Depth" -Value 32 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "Screen Windowed" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "Screen Swap" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "Screen Hardware3D" -Value 1 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "Machine Spec Level" -Value 10 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "High Res Textures" -Value 1 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "D3D Device Guid" -Value "{84E63DE0-46AA-11CF-816F-0000C020156E}" -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "Version Number" -Value 4 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "StippleAlpha" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video" -Name "BumpMappingConfig" -Value 1 -Force

Uninstall Script

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

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

Name Change Script

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

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