GithubHelp home page GithubHelp logo

bmaupin / civ5-cheevos-with-mods Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 118 KB

Enable achievements with mods in Civ 5 or Beyond Earth

Shell 56.11% TypeScript 43.89%
civilization civilization-5 civilization-v civilization-be

civ5-cheevos-with-mods's Introduction

Enable achievements with mods in Civ 5 or Beyond Earth

๐Ÿ’ก See my other Civ projects here

Patches to Sid Meier's Civilization V or Sid Meier's Civilization: Beyond Earth that enable achievements while playing with mods.

Instructions

  1. Install the patch following the instructions below

  2. Start the game in Steam

    โ“˜ If playing Civ 5 in Proton or Windows, choose the patched version of DirectX as indicated below

  3. Open the Mods menu and play the game with mods as desired

Install patch (Civ 5)

Linux (native)

Open a terminal and run this command:

sed -i 's/SELECT ModID from Mods where Activated = 1/SELECT ModID from Mods where Activated = 2/' "/home/$USER/.steam/steam/steamapps/common/Sid Meier's Civilization V/Civ5XP"

Linux (Proton)

For DirectX 11, open a terminal and run this command:

sed -i 's/SELECT ModID from Mods where Activated = 1/SELECT ModID from Mods where Activated = 2/' "/home/$USER/.steam/steam/steamapps/common/Sid Meier's Civilization V/CivilizationV_DX11.exe"

For DirectX 9, run the patch script:

./scripts/apply-patch.sh "/home/$USER/.steam/steam/steamapps/common/Sid Meier's Civilization V/CivilizationV.exe"

macOS

โš ๏ธ This is untested

Open a terminal and run this command:

sed -i 's/SELECT ModID from Mods where Activated = 1/SELECT ModID from Mods where Activated = 2/' "/Users/$USER/Library/Application Support/Steam/steamapps/common/Sid Meier's Civilization V/Civilization V.app/Contents/MacOS/Civilization V"

Windows

  1. Download the patch tool from Releases

  2. Run the patch tool, e.g.

    patchciv.exe 'C:\Program Files (x86)\Steam\steamapps\common\Sid Meier''s Civilization V\CivilizationV.exe'
    
  3. When playing the game, choose DirectX 9 (unfortunately the patch doesn't work for DirectX 11)

Install patch (Beyond Earth)

Linux (native)

Install the patch to fix the crash when playing with mods here: https://github.com/bmaupin/civ-be-linux-fixes. It will also enable achievements with mods.

Linux (Proton)

Open a terminal and run these commands:

sed -i 's/SELECT ModID from Mods where Activated = 1/SELECT ModID from Mods where Activated = 2/' "/home/$USER/.steam/steam/steamapps/common/Sid Meier's Civilization Beyond Earth/CivilizationBE_DX11.exe"
sed -i 's/SELECT ModID from Mods where Activated = 1/SELECT ModID from Mods where Activated = 2/' "/home/$USER/.steam/steam/steamapps/common/Sid Meier's Civilization Beyond Earth/CivilizationBE_Mantle.exe"

Windows

โš ๏ธ This is untested

Paste these commands in PowerShell and then press Enter (source):

โ“˜ It will take a minute or so to run; wait until it says "Patch complete."

function Replace-ContentInFile {
    param (
        [string]$FilePath
    )
    $data = Get-Content -Encoding Byte -ReadCount 0 $FilePath
    $dataAsHexString = [BitConverter]::ToString($data)
    $search = 'SELECT ModID from Mods where Activated = 1'
    $replacement = 'SELECT ModID from Mods where Activated = 2'
    $searchAsHexString = [BitConverter]::ToString([Text.Encoding]::UTF8.GetBytes($search))
    $replaceAsHexString = [BitConverter]::ToString([Text.Encoding]::UTF8.GetBytes($replacement))
    $dataAsHexString = $dataAsHexString.Replace($searchAsHexString, $replaceAsHexString)
    $modifiedData = [byte[]] ($dataAsHexString -split '-' -replace '^', '0x')
    Set-Content -Encoding Byte $FilePath -Value $modifiedData
    Write-Host "Patch complete"
}
Replace-ContentInFile -FilePath 'C:\Program Files (x86)\Steam\steamapps\common\Sid Meier''s Civilization Beyond Earth\CivilizationBE_DX11.exe'
Replace-ContentInFile -FilePath 'C:\Program Files (x86)\Steam\steamapps\common\Sid Meier''s Civilization Beyond Earth\CivilizationBE_Mantle.exe'

Uninstall patch

To uninstall this patch:

  1. Open Steam and go to the game in your library

  2. Right-click on the name of the game on the left > Properties

  3. Installed Files > Verify integrity of game files

How the patch works

See docs/details.md

civ5-cheevos-with-mods's People

Contributors

bmaupin avatar

Watchers

 avatar

civ5-cheevos-with-mods's Issues

Graphical glitches on DX9

8930_24
8930_23
8930_22

The patch causes weird graphical glitches with the UI. The world stays behind it all, and the UI elements leave trails behind them when the world is dragged. This happened on DX9, Windows 10, and I tested playing with and without the mod I'm trying to use.

Doesn't work on Windows

Running the PowerShell command in Windows results in gray tiles and a broken camera

20240531002952_1

Running Windows 10 with a Steam version of Civ5

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.