Star Wars: Jedi Knight - Jedi Academy

From LANCommander
Revision as of 01:30, 1 August 2023 by DoctorDalek (talk | contribs) (Created page with "Category:Games {{Game.InfoBox |Cover = cover.jpg |Developers = {{Game.InfoBox.Developer|Vicarious Visions}} {{Game.InfoBox.Developer|Raven Software}} |Publishers = {{Game.InfoBox.Publisher|Activision}} {{Game.InfoBox.Publisher|CyberFront}} {{Game.InfoBox.Publisher|LucasArts}} {{Game.InfoBox.Publisher|Aspyr Media}} |Release Date = {{Game.InfoBox.ReleaseDate|Windows|September 16, 2003}} |Genres = {{Game.InfoBox.Genre|Adventure}} {{Game.InfoBox.Genre|Shooter}} | PCGamin...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Developers
Vicarious Visions

Raven Software

Publishers
Activision

CyberFront LucasArts

Aspyr Media
Release Date
Windows: September 16, 2003
Genres
Adventure

Shooter

View at PCGamingWiki

Actions

Name Path Arguments Working Directory Primary
Play (Multiplayer) jamp.exe {InstallDir}/GameData True
Play (Singleplayer) jasp.exe {InstallDir}/GameData True

Install Script

$NewName = $args[0]
$InstallDir = $PSScriptRoot
Add-Type -AssemblyName System.Windows.Forms
$Display = [System.Windows.Forms.Screen]::AllScreens | Where-Object Primary | Select Bounds

$X = $Display.Width
$Y = $Display.Height
$AspectRatio = $X / $Y
$Fov = 90 # 16:10 by default

if ($AspectRatio -eq $(16 / 9)) {
    $Fov = 97
}

$Config = @"
seta r_customwidth $X
seta r_customheight $Y
seta cg_fov 97
seta r_mode -1
seta s_kHz "44"
"@

Set-Content "$InstallDir\GameData\base\autoexec.cfg" $Config

Name Change Script

$NewName = $args[0]
$InstallDir = $PSScriptRoot

function Write-ReplaceContentInFile([string]$Regex, [string]$Replacement, [string]$FilePath)
{
    $content = (Get-Content $FilePath) -replace $Regex, $Replacement
    [IO.File]::WriteAllLines($FilePath, $content)
}

Write-ReplaceContentInFile -Regex '^seta name (.+)' -Replacement "seta name ""$NewName""" -FilePath "$InstallDir\GameData\base\jampconfig.cfg"