Rune: Difference between revisions

From LANCommander
(Created page with "Category:Games {{Game.InfoBox |Cover = cover.jpg |Developers = {{Game.InfoBox.Developer|Human Head Studios}} {{Game.InfoBox.Developer|Loki Software}} |Publishers = {{Game.InfoBox.Publisher|Nine Realms}} {{Game.InfoBox.Publisher|Gathering of Developers}} |Release Date = {{Game.InfoBox.ReleaseDate|Windows|November 18, 2000}} |Genres = {{Game.InfoBox.Genre|Adventure}} {{Game.InfoBox.Genre|Hack and slash/Beat 'em up}} | PCGamingWiki = Rune }} {{Game.ActionBox |Actions =...")
 
No edit summary
 
Line 3: Line 3:
|Cover = cover.jpg
|Cover = cover.jpg
|Developers =
|Developers =
{{Game.InfoBox.Developer|Human Head Studios}}
{{Game.InfoBox.Developer|Human Head Studios}}{{Game.InfoBox.Developer|Loki Software}}
{{Game.InfoBox.Developer|Loki Software}}
|Publishers =
|Publishers =
{{Game.InfoBox.Publisher|Nine Realms}}
{{Game.InfoBox.Publisher|Nine Realms}}{{Game.InfoBox.Publisher|Gathering of Developers}}
{{Game.InfoBox.Publisher|Gathering of Developers}}
|Release Date =
|Release Date =
{{Game.InfoBox.ReleaseDate|Windows|November 18, 2000}}
{{Game.InfoBox.ReleaseDate|Windows|November 18, 2000}}
|Genres =
|Genres =
{{Game.InfoBox.Genre|Adventure}}
{{Game.InfoBox.Genre|Adventure}}{{Game.InfoBox.Genre|Hack and slash/Beat 'em up}}
{{Game.InfoBox.Genre|Hack and slash/Beat 'em up}}
|PCGamingWiki = Rune}}
| PCGamingWiki = Rune
}}


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


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


function Write-ReplaceContentInFile([string]$Regex, [string]$Replacement, [string]$FilePath)
# Use regex to replace text within a file. Quotes are escaped by double quoting ("")
{
Write-ReplaceContentInFile -Pattern '^FullscreenViewportX=(.+)' -Substitution "FullscreenViewportX=$($Display.Bounds.Width)" -FilePath "$InstallDirectory\System\Rune.ini"
    $content = (Get-Content $FilePath) -replace $Regex, $Replacement
Write-ReplaceContentInFile -Pattern '^FullscreenViewportY=(.+)' -Substitution "FullscreenViewportY=$($Display.Bounds.Height)" -FilePath "$InstallDirectory\System\Rune.ini"
    [IO.File]::WriteAllLines($FilePath, $content)
 
# Might need to set FOV
$FOV = 90
 
if (($Display.Bounds.Width / $Display.Bounds.Height) -eq (16 / 9)) {
    $FOV = 106
} elseif (($Display.Bounds.Width / $Display.Bounds.Height) -eq (16 / 10)) {
    $FOV = 100
}
}


Write-ReplaceContentInFile -Regex 'Name=(.+)' -Replacement "Name=$NewName" -FilePath "$InstallDir\System\User.ini"
Write-ReplaceContentInFile -Pattern '^DesiredFOV=(.+)' -Substitution "DesiredFOV=$FOV" -FilePath "$InstallDirectory\System\User.ini"
Write-ReplaceContentInFile -Pattern '^DefaultFOV=(.+)' -Substitution "DefaultFOV=$FOV" -FilePath "$InstallDirectory\System\User.ini"
</syntaxhighlight>
}}
           
{{Game.Scripts.NameChange
|Name = Name Change Script
|Description =
|RequiresAdmin = False
|Contents =
<syntaxhighlight lang="powershell" line>
Write-ReplaceContentInFile -Pattern 'Name=(.+)' -Substitution "Name=$NewPlayerAlias" -FilePath "$InstallDirectory\System\User.ini"
</syntaxhighlight>
</syntaxhighlight>
}}
}}

Latest revision as of 21:54, 8 January 2024

Developers
Human Head StudiosLoki Software
Publishers
Nine RealmsGathering of Developers
Release Date
Windows: November 18, 2000
Genres
AdventureHack and slash/Beat 'em up
View at PCGamingWiki

Actions

Name Path Arguments Working Directory Primary
Play {InstallDir}\System/Rune.exe True

Install Script

# 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 -Pattern '^FullscreenViewportX=(.+)' -Substitution "FullscreenViewportX=$($Display.Bounds.Width)" -FilePath "$InstallDirectory\System\Rune.ini"
Write-ReplaceContentInFile -Pattern '^FullscreenViewportY=(.+)' -Substitution "FullscreenViewportY=$($Display.Bounds.Height)" -FilePath "$InstallDirectory\System\Rune.ini"

# Might need to set FOV
$FOV = 90

if (($Display.Bounds.Width / $Display.Bounds.Height) -eq (16 / 9)) {
    $FOV = 106
} elseif (($Display.Bounds.Width / $Display.Bounds.Height) -eq (16 / 10)) {
    $FOV = 100
}

Write-ReplaceContentInFile -Pattern '^DesiredFOV=(.+)' -Substitution "DesiredFOV=$FOV" -FilePath "$InstallDirectory\System\User.ini"
Write-ReplaceContentInFile -Pattern '^DefaultFOV=(.+)' -Substitution "DefaultFOV=$FOV" -FilePath "$InstallDirectory\System\User.ini"

Name Change Script

Write-ReplaceContentInFile -Pattern 'Name=(.+)' -Substitution "Name=$NewPlayerAlias" -FilePath "$InstallDirectory\System\User.ini"