Far Cry: Difference between revisions

From LANCommander
(Created page with "Category:Games {{Game.InfoBox |Cover = cover.jpg |Developers = {{Game.InfoBox.Developer|Crytek Frankfurt}} {{Game.InfoBox.Developer|Crytek}} |Publishers = {{Game.InfoBox.Publisher|Ubisoft Entertainment}} |Release Date = {{Game.InfoBox.ReleaseDate|Windows|March 23, 2004}} |Genres = {{Game.InfoBox.Genre|Shooter}} | PCGamingWiki = Far_Cry }} {{Game.ActionBox |Actions = {{Game.ActionBox.Row|Name = Play|Path = Bin32/FarCry.exe|Arguments = |WorkingDirectory = |Primary =...")
 
No edit summary
Line 3: Line 3:
|Cover = cover.jpg
|Cover = cover.jpg
|Developers =
|Developers =
{{Game.InfoBox.Developer|Crytek Frankfurt}}
{{Game.InfoBox.Developer|Crytek Frankfurt}}{{Game.InfoBox.Developer|Crytek}}
{{Game.InfoBox.Developer|Crytek}}
|Publishers =
|Publishers =
{{Game.InfoBox.Publisher|Ubisoft Entertainment}}
{{Game.InfoBox.Publisher|Ubisoft Entertainment}}
Line 11: Line 10:
|Genres =
|Genres =
{{Game.InfoBox.Genre|Shooter}}
{{Game.InfoBox.Genre|Shooter}}
| PCGamingWiki = Far_Cry
|PCGamingWiki = Far_Cry}}
}}


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


{{Game.Scripts.NameChange
{{Game.Scripts.NameChange
Line 23: Line 22:
|Description =  
|Description =  
|RequiresAdmin = False
|RequiresAdmin = False
|Contents = <syntaxhighlight lang="powershell" line>
|Contents =
$NewName = $args[0]
<syntaxhighlight lang="powershell" line>
$InstallDir = $PSScriptRoot
Write-ReplaceContentInFile -Pattern '^p_name = (.+)' -Substitution "p_name = ""$NewPlayerAlias""" -FilePath "$InstallDirectory\system.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 '^p_name = (.+)' -Replacement "p_name = ""$NewName""" -FilePath "$InstallDir\system.cfg"
</syntaxhighlight>
</syntaxhighlight>
}}
}}

Revision as of 02:12, 6 January 2024

Developers
Crytek FrankfurtCrytek
Publishers
Ubisoft Entertainment
Release Date
Windows: March 23, 2004
Genres
Shooter
View at PCGamingWiki

Actions

Name Path Arguments Working Directory Primary
Play {InstallDir}\Bin32\FarCry.exe True

Name Change Script

Write-ReplaceContentInFile -Pattern '^p_name = (.+)' -Substitution "p_name = ""$NewPlayerAlias""" -FilePath "$InstallDirectory\system.cfg"