Shogo: Mobile Armor Division: Difference between revisions

From LANCommander
(Created page with "Category:Games {{Game.InfoBox |Cover = cover.jpg |Developers = {{Game.InfoBox.Developer|Titan Computer}} {{Game.InfoBox.Developer|Monolith Productions}} {{Game.InfoBox.Developer|Hyperion Entertainment}} |Publishers = {{Game.InfoBox.Publisher|Titan Computer}} {{Game.InfoBox.Publisher|Microids}} {{Game.InfoBox.Publisher|Interplay}} {{Game.InfoBox.Publisher|Monolith Productions}} |Release Date = {{Game.InfoBox.ReleaseDate|Windows|September 30, 1998}} |Genres = {{Game.In...")
 
No edit summary
 
Line 3: Line 3:
|Cover = cover.jpg
|Cover = cover.jpg
|Developers =
|Developers =
{{Game.InfoBox.Developer|Titan Computer}}
{{Game.InfoBox.Developer|Titan Computer}}{{Game.InfoBox.Developer|Monolith Productions}}{{Game.InfoBox.Developer|Hyperion Entertainment}}
{{Game.InfoBox.Developer|Monolith Productions}}
{{Game.InfoBox.Developer|Hyperion Entertainment}}
|Publishers =
|Publishers =
{{Game.InfoBox.Publisher|Titan Computer}}
{{Game.InfoBox.Publisher|Titan Computer}}{{Game.InfoBox.Publisher|Microids}}{{Game.InfoBox.Publisher|Interplay}}{{Game.InfoBox.Publisher|Monolith Productions}}
{{Game.InfoBox.Publisher|Microids}}
{{Game.InfoBox.Publisher|Interplay}}
{{Game.InfoBox.Publisher|Monolith Productions}}
|Release Date =
|Release Date =
{{Game.InfoBox.ReleaseDate|Windows|September 30, 1998}}
{{Game.InfoBox.ReleaseDate|Windows|September 30, 1998}}
|Genres =
|Genres =
{{Game.InfoBox.Genre|Adventure}}
{{Game.InfoBox.Genre|Adventure}}{{Game.InfoBox.Genre|Shooter}}{{Game.InfoBox.Genre|Strategy}}
{{Game.InfoBox.Genre|Shooter}}
|PCGamingWiki = Shogo:_Mobile_Armor_Division}}
{{Game.InfoBox.Genre|Strategy}}
| PCGamingWiki = Shogo:_Mobile_Armor_Division
}}


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


{{Game.Scripts.Install
{{Game.Scripts.Install
Line 29: Line 22:
|Description =  
|Description =  
|RequiresAdmin = False
|RequiresAdmin = False
|Contents = <syntaxhighlight lang="powershell" line>
|Contents =
$InstallDir = $PSScriptRoot
<syntaxhighlight lang="powershell" line>
# Accessible via $Display.Width and $Display.Height
# Bounds are accessible by $Display.Bounds.Width and $Display.Bounds.Height
Add-Type -AssemblyName System.Windows.Forms
$Display = Get-PrimaryDisplay
$Display = ([System.Windows.Forms.Screen]::AllScreens | Where-Object Primary).Bounds
 
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 '^"screenwidth" "(.+)"' -Replacement """screenwidth"" ""$($Display.Width)""" -FilePath "$InstallDir\autoexec.cfg"
Write-ReplaceContentInFile -Pattern '^"screenwidth" "(.+)"' -Substitution """screenwidth"" ""$($Display.Bounds.Width)""" -FilePath "$InstallDirectory\autoexec.cfg"
Write-ReplaceContentInFile -Regex '^"screenheight" "(.+)"' -Replacement """screenheight"" ""$($Display.Height)""" -FilePath "$InstallDir\autoexec.cfg"
Write-ReplaceContentInFile -Pattern '^"screenheight" "(.+)"' -Substitution """screenheight"" ""$($Display.Bounds.Height)""" -FilePath "$InstallDirectory\autoexec.cfg"
</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 =
$InstallDir = $PSScriptRoot
<syntaxhighlight lang="powershell" line>
$NewName = $args[0]
Write-ReplaceContentInFile -Pattern '^"NetPlayerName" "(.+)"' -Substitution """NetPlayerName"" ""$NewPlayerAlias""" -FilePath "$InstallDirectory\autoexec.cfg"
 
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 ("")
Write-ReplaceContentInFile -Regex '^"NetPlayerName" "(.+)"' -Replacement """NetPlayerName"" ""$NewName""" -FilePath "$InstallDir\autoexec.cfg"
</syntaxhighlight>
</syntaxhighlight>
}}
}}

Latest revision as of 21:55, 8 January 2024

Developers
Titan ComputerMonolith ProductionsHyperion Entertainment
Publishers
Titan ComputerMicroidsInterplayMonolith Productions
Release Date
Windows: September 30, 1998
Genres
AdventureShooterStrategy
View at PCGamingWiki

Actions

Name Path Arguments Working Directory Primary
Play {InstallDir}\Shogo.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 '^"screenwidth" "(.+)"' -Substitution """screenwidth"" ""$($Display.Bounds.Width)""" -FilePath "$InstallDirectory\autoexec.cfg"
Write-ReplaceContentInFile -Pattern '^"screenheight" "(.+)"' -Substitution """screenheight"" ""$($Display.Bounds.Height)""" -FilePath "$InstallDirectory\autoexec.cfg"

Name Change Script

Write-ReplaceContentInFile -Pattern '^"NetPlayerName" "(.+)"' -Substitution """NetPlayerName"" ""$NewPlayerAlias""" -FilePath "$InstallDirectory\autoexec.cfg"