Mobile Forces: Difference between revisions

From LANCommander
(Created page with "Category:Games {{Game.InfoBox |Cover = cover.jpg |Developers = {{Game.InfoBox.Developer|Rage Software}} |Release Date = {{Game.InfoBox.ReleaseDate|Windows|May 31, 2002}} |Genres = {{Game.InfoBox.Genre|Indie}} {{Game.InfoBox.Genre|Shooter}} {{Game.InfoBox.Genre|Strategy}} | PCGamingWiki = Mobile_Forces }} {{Game.ActionBox |Actions = {{Game.ActionBox.Row|Name = Play|Path = System/MobileForces.exe|Arguments = |WorkingDirectory = |Primary = True}} }} {{Game.Scripts.Na...")
 
No edit summary
Line 4: Line 4:
|Developers =
|Developers =
{{Game.InfoBox.Developer|Rage Software}}
{{Game.InfoBox.Developer|Rage Software}}
|Publishers =
|Release Date =
|Release Date =
{{Game.InfoBox.ReleaseDate|Windows|May 31, 2002}}
{{Game.InfoBox.ReleaseDate|Windows|May 31, 2002}}
|Genres =
|Genres =
{{Game.InfoBox.Genre|Indie}}
{{Game.InfoBox.Genre|Indie}}{{Game.InfoBox.Genre|Shooter}}{{Game.InfoBox.Genre|Strategy}}
{{Game.InfoBox.Genre|Shooter}}
|PCGamingWiki = Mobile_Forces}}
{{Game.InfoBox.Genre|Strategy}}
| PCGamingWiki = Mobile_Forces
}}


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


{{Game.Scripts.Install
|Name = Install Script
|Description =
|RequiresAdmin = False
|Contents =
<syntaxhighlight lang="powershell" line>
$Display = Get-PrimaryDisplay
Write-ReplaceContentInFile -Pattern '^WindowedViewportX=(.+)' -Substitution "WindowedViewportX=$($Display.Bounds.Width)" -FilePath "$InstallDirectory\System\MobileForces.ini"
Write-ReplaceContentInFile -Pattern '^WindowedViewportY=(.+)' -Substitution "WindowedViewportY=$($Display.Bounds.Height)" -FilePath "$InstallDirectory\System\MobileForces.ini"
Write-ReplaceContentInFile -Pattern '^FullscreenViewportX=(.+)' -Substitution "FullscreenViewportX=$($Display.Bounds.Width)" -FilePath "$InstallDirectory\System\MobileForces.ini"
Write-ReplaceContentInFile -Pattern '^FullscreenViewportY=(.+)' -Substitution "FullscreenViewportY=$($Display.Bounds.Height)" -FilePath "$InstallDirectory\System\MobileForces.ini"
</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 =
$NewName = $args[0]
<syntaxhighlight lang="powershell" line>
$InstallDir = $PSScriptRoot
Write-ReplaceContentInFile -Pattern '^Name=(.+)' -Substitution "Name=$NewPlayerAlias" -FilePath "$InstallDirectory\System\Profile00.ini"
 
function Write-ReplaceContentInFile([string]$Regex, [string]$Replacement, [string]$FilePath)
{
    $content = (Get-Content $FilePath) -replace $Regex, $Replacement
    [IO.File]::WriteAllLines($FilePath, $content)
}
 
Write-ReplaceContentInFile -Regex 'Name=(.+)' -Replacement "Name=$NewName" -FilePath "$InstallDir\System\Profile00.ini"
</syntaxhighlight>
</syntaxhighlight>
}}
}}

Revision as of 03:29, 6 January 2024

Developers
Rage Software
Release Date
Windows: May 31, 2002
Genres
IndieShooterStrategy
View at PCGamingWiki

Actions

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

Install Script

$Display = Get-PrimaryDisplay

Write-ReplaceContentInFile -Pattern '^WindowedViewportX=(.+)' -Substitution "WindowedViewportX=$($Display.Bounds.Width)" -FilePath "$InstallDirectory\System\MobileForces.ini"
Write-ReplaceContentInFile -Pattern '^WindowedViewportY=(.+)' -Substitution "WindowedViewportY=$($Display.Bounds.Height)" -FilePath "$InstallDirectory\System\MobileForces.ini"
Write-ReplaceContentInFile -Pattern '^FullscreenViewportX=(.+)' -Substitution "FullscreenViewportX=$($Display.Bounds.Width)" -FilePath "$InstallDirectory\System\MobileForces.ini"
Write-ReplaceContentInFile -Pattern '^FullscreenViewportY=(.+)' -Substitution "FullscreenViewportY=$($Display.Bounds.Height)" -FilePath "$InstallDirectory\System\MobileForces.ini"

Name Change Script

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