Baldur's Gate II: Shadows of Amn: Difference between revisions

From LANCommander
(Created page with "Category:Games {{Game.InfoBox |Cover = cover.jpg |Release Date = {{Game.InfoBox.ReleaseDate|Windows|September 21, 2000}} | PCGamingWiki = Baldur%27s_Gate_II:_Shadows_of_Amn }} {{Game.ActionBox |Actions = {{Game.ActionBox.Row|Name = Play|Path = Baldur.exe|Arguments = |WorkingDirectory = |Primary = True}} }} {{Game.Scripts.Install |Name = Install Script |Description = |RequiresAdmin = False |Contents = <syntaxhighlight lang="powershell" line> $InstallDir = $PSScrip...")
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 2: Line 2:
{{Game.InfoBox
{{Game.InfoBox
|Cover = cover.jpg
|Cover = cover.jpg
|Developers =
{{Game.InfoBox.Developer|BioWare}}{{Game.InfoBox.Developer|BioWare Edmonton}}
|Publishers =
{{Game.InfoBox.Publisher|Interplay Entertainment}}{{Game.InfoBox.Publisher|Black Isle Studios}}
|Release Date =
|Release Date =
{{Game.InfoBox.ReleaseDate|Windows|September 21, 2000}}
{{Game.InfoBox.ReleaseDate|Windows|September 21, 2000}}
| PCGamingWiki = Baldur%27s_Gate_II:_Shadows_of_Amn
|Genres =
}}
{{Game.InfoBox.Genre|Role-playing (RPG)}}
|PCGamingWiki = Baldur%27s_Gate_II:_Shadows_of_Amn}}


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


{{Game.Scripts.Install
{{Game.Scripts.Install
Line 16: Line 22:
|Description =  
|Description =  
|RequiresAdmin = False
|RequiresAdmin = False
|Contents = <syntaxhighlight lang="powershell" line>
|Contents =
$InstallDir = $PSScriptRoot
<syntaxhighlight lang="powershell" line>
 
$config = @"
$config = @"
CREATE TABLE options (
CREATE TABLE options (
Line 49: Line 54:
</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 Write-ReplaceContentInFile([string]$Regex, [string]$Replacement, [string]$FilePath)
{
    $content = (Get-Content $FilePath) -replace $Regex, $Replacement
    [IO.File]::WriteAllLines($FilePath, $content)
}
 
# Use regex to replace text within a file. Quotes are escaped by double quoting ("")
# Use regex to replace text within a file. Quotes are escaped by double quoting ("")
Write-ReplaceContentInFile -Regex "^\s+'Multiplayer',\s+'Player Name',\s+'(.+)'," -Replacement "`t'Multiplayer',`t'Player Name',`t'$NewName'," -FilePath "$($env:USERPROFILE)\Documents\Baldur's Gate II - Enhanced Edition\Baldur.ini"
Write-ReplaceContentInFile -Pattern "^\s+'Multiplayer',\s+'Player Name',\s+'(.+)'," -Substitution "`t'Multiplayer',`t'Player Name',`t'$NewPlayerAlias'," -FilePath "$($env:USERPROFILE)\Documents\Baldur's Gate II - Enhanced Edition\Baldur.ini"
Write-ReplaceContentInFile -Regex "^\s+'Multiplayer',\s+'Session Name',\s+'(.+)'" -Replacement "`t'Multiplayer',`t'Session Name',`t'Vintage'," -FilePath "$($env:USERPROFILE)\Documents\Baldur's Gate II - Enhanced Edition\Baldur.ini"
Write-ReplaceContentInFile -Pattern "^\s+'Multiplayer',\s+'Session Name',\s+'(.+)'" -Substitution "`t'Multiplayer',`t'Session Name',`t'Vintage'," -FilePath "$($env:USERPROFILE)\Documents\Baldur's Gate II - Enhanced Edition\Baldur.ini"
</syntaxhighlight>
</syntaxhighlight>
}}
}}

Latest revision as of 00:38, 22 February 2024

Developers
BioWareBioWare Edmonton
Publishers
Interplay EntertainmentBlack Isle Studios
Release Date
Windows: September 21, 2000
Genres
Role-playing (RPG)
View at PCGamingWiki

Actions

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

Install Script

$config = @"
CREATE TABLE options (
	section string,
	name string,
	value string
);
INSERT INTO options ROWS (
	'Fonts',	'ko_KR',	'UNBOM',
	'Fonts',	'zh_CN',	'SIMSUN',
	'Fonts',	'ja_JP',	'MSGOTHIC',
	'Fonts',	'ru_RU',	'PERMIAN',
	'Fonts',	'uk_UA',	'PERMIAN',
	'Window',	'Full Screen',	'1',
	'Graphics',	'version',	'4.6.0 NVIDIA 472.12',
	'Graphics',	'renderer',	'NVIDIA GeForce RTX 3080 Ti/PCIe/SSE2',
	'Graphics',	'vendor',	'NVIDIA Corporation',
	'MOVIES',	'LOGO',	'1',
	'MOVIES',	'INTRO15F',	'1',
	'Multiplayer',	'Last Protocol Used',	'2',
	'Multiplayer',	'Player Name',	'DoctorDalek12345678901234567890123456789',
	'Multiplayer',	'Session Password',	'',
	'Multiplayer',	'Session Name',	'DoctorDalek1234567890123456789012345678901234567890'
);
"@

New-Item -ItemType Directory -Force -Path "$($env:USERPROFILE)\Documents\Baldur's Gate II - Enhanced Edition"

Set-Content "$($env:USERPROFILE)\Documents\Baldur's Gate II - Enhanced Edition\Baldur.ini" $config

Name Change Script

# Use regex to replace text within a file. Quotes are escaped by double quoting ("")
Write-ReplaceContentInFile -Pattern "^\s+'Multiplayer',\s+'Player Name',\s+'(.+)'," -Substitution "`t'Multiplayer',`t'Player Name',`t'$NewPlayerAlias'," -FilePath "$($env:USERPROFILE)\Documents\Baldur's Gate II - Enhanced Edition\Baldur.ini"
Write-ReplaceContentInFile -Pattern "^\s+'Multiplayer',\s+'Session Name',\s+'(.+)'" -Substitution "`t'Multiplayer',`t'Session Name',`t'Vintage'," -FilePath "$($env:USERPROFILE)\Documents\Baldur's Gate II - Enhanced Edition\Baldur.ini"