Shogo: Mobile Armor Division

From LANCommander
Revision as of 01:27, 1 August 2023 by DoctorDalek (talk | contribs) (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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Developers
Titan Computer

Monolith Productions Hyperion Entertainment

Publishers
Titan Computer

Microids Interplay

Monolith Productions
Release Date
Windows: September 30, 1998
Genres
Adventure

Shooter Strategy

View at PCGamingWiki

Actions

Name Path Arguments Working Directory Primary
Play Shogo.exe True

Install Script

$InstallDir = $PSScriptRoot
# Accessible via $Display.Width and $Display.Height
Add-Type -AssemblyName System.Windows.Forms
$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 ("")
Write-ReplaceContentInFile -Regex '^"screenwidth" "(.+)"' -Replacement """screenwidth"" ""$($Display.Width)""" -FilePath "$InstallDir\autoexec.cfg"
Write-ReplaceContentInFile -Regex '^"screenheight" "(.+)"' -Replacement """screenheight"" ""$($Display.Height)""" -FilePath "$InstallDir\autoexec.cfg"

Name Change Script

$InstallDir = $PSScriptRoot
$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 ("")
Write-ReplaceContentInFile -Regex '^"NetPlayerName" "(.+)"' -Replacement """NetPlayerName"" ""$NewName""" -FilePath "$InstallDir\autoexec.cfg"