3D Ultra Minigolf: Difference between revisions

From LANCommander
(Created page with "Category:Games {{Game.InfoBox |Cover = cover.jpg |Release Date = {{Game.InfoBox.ReleaseDate|Windows|December 31, 1997}} | PCGamingWiki = 3D_Ultra_Minigolf_Adventures }} {{Game.ActionBox |Actions = {{Game.ActionBox.Row|Name = Play|Path = minigolf.exe|Arguments = |WorkingDirectory = |Primary = True}} }} {{Game.Scripts.NameChange |Name = Name Change Script |Description = |RequiresAdmin = False |Contents = <syntaxhighlight lang="powershell" line> $InstallDir = $PSScr...")
 
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 2: Line 2:
{{Game.InfoBox
{{Game.InfoBox
|Cover = cover.jpg
|Cover = cover.jpg
|Developers =
{{Game.InfoBox.Developer|Dynamix}}
|Publishers =
{{Game.InfoBox.Publisher|Sierra On-Line}}
|Release Date =
|Release Date =
{{Game.InfoBox.ReleaseDate|Windows|December 31, 1997}}
{{Game.InfoBox.ReleaseDate|Windows|December 31, 1997}}
| PCGamingWiki = 3D_Ultra_Minigolf_Adventures
|Genres =
}}
{{Game.InfoBox.Genre|Arcade}}
|PCGamingWiki = 3D_Ultra_Minigolf_Adventures}}


{{Game.ActionBox
{{Game.ActionBox
|Actions =  
|Actions =  
{{Game.ActionBox.Row|Name = Play|Path = minigolf.exe|Arguments = |WorkingDirectory = |Primary = True}}
{{Game.ActionBox.Row|Name = Play|Path = {InstallDir}\minigolf.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 =
$InstallDir = $PSScriptRoot
<syntaxhighlight lang="powershell" line>
$NewName = $args[0]
 
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 '^Player1Name=(.+)' -Replacement "Player1Name=$NewName" -FilePath "$InstallDir\minigolf.ini"
Write-ReplaceContentInFile -Pattern '^Player1Name=(.+)' -Substitution "Player1Name=$NewPlayerAlias" -FilePath "$InstallDirectory\minigolf.ini"
</syntaxhighlight>
</syntaxhighlight>
}}
}}

Latest revision as of 00:37, 22 February 2024

Developers
Dynamix
Publishers
Sierra On-Line
Release Date
Windows: December 31, 1997
Genres
Arcade
View at PCGamingWiki

Actions

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

Name Change Script

# Use regex to replace text within a file. Quotes are escaped by double quoting ("")
Write-ReplaceContentInFile -Pattern '^Player1Name=(.+)' -Substitution "Player1Name=$NewPlayerAlias" -FilePath "$InstallDirectory\minigolf.ini"