Deus Ex: Difference between revisions

From LANCommander
(Created page with "Category:Games {{Game.InfoBox |Cover = cover.jpg |Developers = {{Game.InfoBox.Developer|Ion Storm}} |Publishers = {{Game.InfoBox.Publisher|Aspyr Media}} {{Game.InfoBox.Publisher|Eidos Interactive}} |Release Date = {{Game.InfoBox.ReleaseDate|Windows|June 26, 2000}} |Genres = {{Game.InfoBox.Genre|Shooter}} {{Game.InfoBox.Genre|Role-playing (RPG)}} | PCGamingWiki = Deus_Ex }} {{Game.ActionBox |Actions = {{Game.ActionBox.Row|Name = Play|Path = DeusEx.exe|Arguments = |W...")
 
No edit summary
Line 5: Line 5:
{{Game.InfoBox.Developer|Ion Storm}}
{{Game.InfoBox.Developer|Ion Storm}}
|Publishers =
|Publishers =
{{Game.InfoBox.Publisher|Aspyr Media}}
{{Game.InfoBox.Developer|Eidos Interactive}}{{Game.InfoBox.Developer|Aspyr Media}}
{{Game.InfoBox.Publisher|Eidos Interactive}}
|Release Date =
|Release Date =
{{Game.InfoBox.ReleaseDate|Windows|June 26, 2000}}
{{Game.InfoBox.ReleaseDate|Windows|June 26, 2000}}
|Genres =
|Genres =
{{Game.InfoBox.Genre|Shooter}}
{{Game.InfoBox.Genre|Adventure}}{{Game.InfoBox.Genre|Shooter}}{{Game.InfoBox.Genre|Role-playing (RPG)}}
{{Game.InfoBox.Genre|Role-playing (RPG)}}
|PCGamingWiki = Deus_Ex}}
| PCGamingWiki = Deus_Ex
}}


{{Game.ActionBox
{{Game.ActionBox
Line 20: Line 17:
}}
}}


{{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
# Define the path to the autoexec.cfg file
$filePath = "$InstallDirectory\System\DeusEx.ini"
 
# Get the screen resolution
Add-Type -AssemblyName System.Windows.Forms
$screen = [System.Windows.Forms.Screen]::PrimaryScreen.Bounds.Size
$width = $screen.Width
$height= $screen.Height
 
# Read the content of the file
$content = Get-Content -Path $filePath
 
# Loop through each line in the file
for ($i = 0; $i -lt $content.Count; $i++) {
    $line = $content[$i]


function Write-ReplaceContentInFile([string]$Regex, [string]$Replacement, [string]$FilePath)
    # Check if the line contains "SCREENWIDTH" and "640"
{
    if ($line -like '*FullscreenViewportX*') {
    $content = (Get-Content $FilePath) -replace $Regex, $Replacement
        # Replace the line with the updated width
     [IO.File]::WriteAllLines($FilePath, $content)
        $content[$i] = "FullscreenViewportX=$width"
    }
        if ($line -like '*FullscreenViewportY*') {
        # Replace the line with the updated width
        $content[$i] = "FullscreenViewportY=$height"
     }
}
}


Write-ReplaceContentInFile -Regex '^Name=(.+)' -Replacement "Name=$NewName" -FilePath "$InstallDir\System\User.ini"
# Save the updated content back to the file
$content | Set-Content -Path $filePath
</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>
}}
}}

Revision as of 02:08, 6 January 2024

Developers
Ion Storm
Publishers
Eidos InteractiveAspyr Media
Release Date
Windows: June 26, 2000
Genres
AdventureShooterRole-playing (RPG)
View at PCGamingWiki

Actions

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

Install Script

# Define the path to the autoexec.cfg file
$filePath = "$InstallDirectory\System\DeusEx.ini"

# Get the screen resolution
Add-Type -AssemblyName System.Windows.Forms
$screen = [System.Windows.Forms.Screen]::PrimaryScreen.Bounds.Size
$width = $screen.Width
$height= $screen.Height

# Read the content of the file
$content = Get-Content -Path $filePath

# Loop through each line in the file
for ($i = 0; $i -lt $content.Count; $i++) {
    $line = $content[$i]

    # Check if the line contains "SCREENWIDTH" and "640"
    if ($line -like '*FullscreenViewportX*') {
        # Replace the line with the updated width
        $content[$i] = "FullscreenViewportX=$width"
    }
        if ($line -like '*FullscreenViewportY*') {
        # Replace the line with the updated width
        $content[$i] = "FullscreenViewportY=$height"
    }
}

# Save the updated content back to the file
$content | Set-Content -Path $filePath

Name Change Script

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