Star Wars: Jedi Knight - Jedi Academy: Difference between revisions

From LANCommander
(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...")
 
No edit summary
 
Line 3: Line 3:
|Cover = cover.jpg
|Cover = cover.jpg
|Developers =
|Developers =
{{Game.InfoBox.Developer|Vicarious Visions}}
{{Game.InfoBox.Developer|Vicarious Visions}}{{Game.InfoBox.Developer|Raven Software}}
{{Game.InfoBox.Developer|Raven Software}}
|Publishers =
|Publishers =
{{Game.InfoBox.Publisher|Activision}}
{{Game.InfoBox.Publisher|Activision}}{{Game.InfoBox.Publisher|CyberFront}}{{Game.InfoBox.Publisher|LucasArts}}{{Game.InfoBox.Publisher|Aspyr Media}}
{{Game.InfoBox.Publisher|CyberFront}}
{{Game.InfoBox.Publisher|LucasArts}}
{{Game.InfoBox.Publisher|Aspyr Media}}
|Release Date =
|Release Date =
{{Game.InfoBox.ReleaseDate|Windows|September 16, 2003}}
{{Game.InfoBox.ReleaseDate|Windows|September 16, 2003}}
|Genres =
|Genres =
{{Game.InfoBox.Genre|Adventure}}
{{Game.InfoBox.Genre|Adventure}}{{Game.InfoBox.Genre|Shooter}}
{{Game.InfoBox.Genre|Shooter}}
|PCGamingWiki = Star_Wars:_Jedi_Knight_-_Jedi_Academy}}
| PCGamingWiki = Star_Wars:_Jedi_Knight_-_Jedi_Academy
}}


{{Game.ActionBox
{{Game.ActionBox
Line 23: Line 17:
{{Game.ActionBox.Row|Name = Play (Singleplayer)|Path = jasp.exe|Arguments = |WorkingDirectory = {InstallDir}/GameData|Primary = True}}
{{Game.ActionBox.Row|Name = Play (Singleplayer)|Path = jasp.exe|Arguments = |WorkingDirectory = {InstallDir}/GameData|Primary = True}}
}}
}}


{{Game.Scripts.Install
{{Game.Scripts.Install
Line 28: Line 23:
|Description =  
|Description =  
|RequiresAdmin = False
|RequiresAdmin = False
|Contents = <syntaxhighlight lang="powershell" line>
|Contents =
$NewName = $args[0]
<syntaxhighlight lang="powershell" line>
$InstallDir = $PSScriptRoot
# 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 | Select Bounds


$X = $Display.Width
$X = $Display.Bounds.Width
$Y = $Display.Height
$Y = $Display.Bounds.Height
$AspectRatio = $X / $Y
$AspectRatio = $X / $Y
$Fov = 90 # 16:10 by default
$Fov = 90 # 16:10 by default
Line 51: Line 45:
"@
"@


Set-Content "$InstallDir\GameData\base\autoexec.cfg" $Config
Set-Content "$InstallDirectory\GameData\base\autoexec.cfg" $Config
</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 =
$NewName = $args[0]
<syntaxhighlight lang="powershell" line>
$InstallDir = $PSScriptRoot
Write-ReplaceContentInFile -Pattern '^seta name (.+)' -Substitution "seta name ""$NewPlayerAlias""" -FilePath "$InstallDirectory\GameData\base\jampconfig.cfg"
 
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"
</syntaxhighlight>
</syntaxhighlight>
}}
}}

Latest revision as of 21:57, 8 January 2024

Developers
Vicarious VisionsRaven Software
Publishers
ActivisionCyberFrontLucasArtsAspyr Media
Release Date
Windows: September 16, 2003
Genres
AdventureShooter
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

# Bounds are accessible by $Display.Bounds.Width and $Display.Bounds.Height
$Display = Get-PrimaryDisplay

$X = $Display.Bounds.Width
$Y = $Display.Bounds.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 "$InstallDirectory\GameData\base\autoexec.cfg" $Config

Name Change Script

Write-ReplaceContentInFile -Pattern '^seta name (.+)' -Substitution "seta name ""$NewPlayerAlias""" -FilePath "$InstallDirectory\GameData\base\jampconfig.cfg"