Daikatana: Difference between revisions

From LANCommander
(Created page with "Category:Games {{Game.InfoBox |Cover = cover.jpg |Release Date = {{Game.InfoBox.ReleaseDate|Windows|May 23, 2000}} | PCGamingWiki = Daikatana }} {{Game.ActionBox |Actions = {{Game.ActionBox.Row|Name = Play|Path = daikatana.exe|Arguments = |WorkingDirectory = |Primary = True}} }} {{Game.Scripts.NameChange |Name = Name Change Script |Description = |RequiresAdmin = False |Contents = <syntaxhighlight lang="powershell" line> $NewName = $args[0] $InstallDir = $PSScript...")
 
No edit summary
Line 2: Line 2:
{{Game.InfoBox
{{Game.InfoBox
|Cover = cover.jpg
|Cover = cover.jpg
|Developers =
{{Game.InfoBox.Developer|Ion Storm}}{{Game.InfoBox.Developer|Kemco}}
|Publishers =
{{Game.InfoBox.Developer|Square Enix}}{{Game.InfoBox.Developer|Kemco}}
|Release Date =
|Release Date =
{{Game.InfoBox.ReleaseDate|Windows|May 23, 2000}}
{{Game.InfoBox.ReleaseDate|Windows|May 23, 2000}}
| PCGamingWiki = Daikatana
|Genres =
}}
{{Game.InfoBox.Genre|Puzzle}}{{Game.InfoBox.Genre|Shooter}}
|PCGamingWiki = Daikatana}}


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


{{Game.Scripts.NameChange
{{Game.Scripts.NameChange
Line 16: Line 22:
|Description =  
|Description =  
|RequiresAdmin = False
|RequiresAdmin = False
|Contents = <syntaxhighlight lang="powershell" line>
|Contents =
$NewName = $args[0]
<syntaxhighlight lang="powershell" line>
$InstallDir = $PSScriptRoot
Write-ReplaceContentInFile -Pattern '^set name \"(.+)\"' -Substitution "set name ""$NewPlayerAlias""" -FilePath "$InstallDirectory\data\current.cfg"
 
function Write-ReplaceContentInFile([string]$Regex, [string]$Replacement, [string]$FilePath)
{
    $content = (Get-Content $FilePath) -replace $Regex, $Replacement
    [IO.File]::WriteAllLines($FilePath, $content)
}
 
Write-ReplaceContentInFile -Regex '^set name \"(.+)\"' -Replacement "set name ""$NewName""" -FilePath "$InstallDir\data\current.cfg"
</syntaxhighlight>
</syntaxhighlight>
}}
}}

Revision as of 02:08, 6 January 2024

Developers
Ion StormKemco
Publishers
Square EnixKemco
Release Date
Windows: May 23, 2000
Genres
PuzzleShooter
View at PCGamingWiki

Actions

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

Name Change Script

Write-ReplaceContentInFile -Pattern '^set name \"(.+)\"' -Substitution "set name ""$NewPlayerAlias""" -FilePath "$InstallDirectory\data\current.cfg"