flamesfault
Chieftain
- Joined
- Jun 16, 2014
- Messages
- 5
I hope I have posted this in the right place. There are few guides already out there which cover the start of this tutorial but they don't mention a problem I have come across with some mods so I thought I might append a solution to the end of this guide.
Mods are disabled by default on Linux as they are not supported by the Aspyr release however it is not difficult to enable them.
First Enabling the mod menu:
Got to ~/.local/share/Steam/SteamApps/common/Sid Meier's Civilization V/steamassets/assets/ui/frontend/ and edit the file mainmenu.lua with your favorite text editor.
On line 41 (for me) you should find this:
Controls.ModsButton:SetHide( true ); -- MAC_PORT - rickb Comment this line out to re-enable mods. Happy modding!
simply add -- on the front so it becomes:
--Controls.ModsButton:SetHide( true ); -- MAC_PORT - rickb Comment this line out to re-enable
and save you should now be able to see the mods menu next time you launch Civilizations.
Installing the mods:
After downloading the mods you want you have to copy them to ~/.local/share/Aspyr/Sid Meier's Civilization 5/MODS and then extract them yourself - windows does this automatically but you have to do it manually on Linux. Note: .civ5mod are just a zip file so unzip or 7zip should work fine.
They should appear in the mods menu like usual so now you just have to enable them.
Getting mods off the Steam Workshop:
Steam does not automatically copy the mods over for you when you subscribe to mods in the workshop under Linux. It is probably easier to get the mods of the forums and install them as described above. However you can still get them from the workshop.
After subscribing to a mod (and giving sufficient time for it to download) navigate to ~/.local/share/Steam/userdata/ in that folder you should see a few more folders named with just random looking numbers. Look inside all the folders until you find another directory named ugc from there go to ugc/referenced/. Where you should find more randomly named directory's
. These are the folders containing the mods you have subscribed to on the workshop.
So check those directory's until you find the mod your after then copy the zip (.civ5mod) over to the mods folder and extract it as explained above.
Fixing Possible Errors:
Note: This part is slightly risky and a bit more complicated so I would only bother if you are having problems with a particular mod and you know what you are doing.
Some of mods including Really Advanced Setup (I haven't tested that many so I am not sure just how many) don't work properly or at all while still working perfectly fine on the mac version of Aspyr's release.
This could be to do with an case sensitive file systems (most people will likely have this on Linux) compared to an insensitive case file system on mac. This is always an issue but I have seen it cause problems when mods use overrides.
Anyway a possible solution is to put the Civ5 config folder in a case insensitive file system. I used a FAT file system and I will give some vague instructions on how to do so (note I am using Arch Linux).
First create an image with dd, 1GB should be sufficient.
dd if=/dev/zero of=civ5.img bs=1 count=0 seek=1G
Now lets setup the loop device:
The command: lsblk should show all the devices in use - if loop0 appears on the list then use loop1, if loop1 appears on the list too then use loop2 etc... for the following command:
sudo losetup /dev/loop0 civ5.img
lsblk should now show loopX in the list (X being the number that was free)
Now the mkfs.vfat command can be found in the package dosfstools (on both debian and arch linux).
sudo apt-get install dosfstools (for ubuntu/debian users)
Then run the command:
sudo mkfs.vfat /dev/loopX
After that is done we can mount the device and copy all the files from ~/.local/share/Aspyr/Sid Meier's Civilization 5/ to the mount piont. This can be done easily with a file manager (see below for the manual way to mount the loop device). You may want to back up your files somewhere else too and once they are copied over you should delete all the files ~/.local/share/Aspyr/Sid Meier's Civilization 5/ and umount the loop device from the temporary mount point: sudo umount /dev/loopX
The only thing left to do is to mount the loop device with user privileges to the config directory ~/.local/share/Aspyr/Sid Meier's Civilization 5/
for me I use this command, but it may be different for you depending on how your user accounts are setup
sudo mount -o gid=users,fmask=113,dmask=002 /dev/loopX /home/<your user name>/.local/share/Aspyr/Sid Meier's Civilization 5/
If you want to run civ5 again after rebooting you will fist have to run sudo losetup /dev/loopX civ5.img again then the above command. You could automate this but it is out of the scope of this tutorial.
End:
Feel free to contact me about running mods on Linux not that I am very experienced and also feel free to comment on or this tutorial (I am sure there are plenty of errors). I hope it is useful to someone.
Mods are disabled by default on Linux as they are not supported by the Aspyr release however it is not difficult to enable them.
First Enabling the mod menu:
Got to ~/.local/share/Steam/SteamApps/common/Sid Meier's Civilization V/steamassets/assets/ui/frontend/ and edit the file mainmenu.lua with your favorite text editor.
On line 41 (for me) you should find this:
Controls.ModsButton:SetHide( true ); -- MAC_PORT - rickb Comment this line out to re-enable mods. Happy modding!
simply add -- on the front so it becomes:
--Controls.ModsButton:SetHide( true ); -- MAC_PORT - rickb Comment this line out to re-enable
and save you should now be able to see the mods menu next time you launch Civilizations.
Installing the mods:
After downloading the mods you want you have to copy them to ~/.local/share/Aspyr/Sid Meier's Civilization 5/MODS and then extract them yourself - windows does this automatically but you have to do it manually on Linux. Note: .civ5mod are just a zip file so unzip or 7zip should work fine.
They should appear in the mods menu like usual so now you just have to enable them.
Getting mods off the Steam Workshop:
Steam does not automatically copy the mods over for you when you subscribe to mods in the workshop under Linux. It is probably easier to get the mods of the forums and install them as described above. However you can still get them from the workshop.
After subscribing to a mod (and giving sufficient time for it to download) navigate to ~/.local/share/Steam/userdata/ in that folder you should see a few more folders named with just random looking numbers. Look inside all the folders until you find another directory named ugc from there go to ugc/referenced/. Where you should find more randomly named directory's

So check those directory's until you find the mod your after then copy the zip (.civ5mod) over to the mods folder and extract it as explained above.
Fixing Possible Errors:
Note: This part is slightly risky and a bit more complicated so I would only bother if you are having problems with a particular mod and you know what you are doing.
Some of mods including Really Advanced Setup (I haven't tested that many so I am not sure just how many) don't work properly or at all while still working perfectly fine on the mac version of Aspyr's release.
This could be to do with an case sensitive file systems (most people will likely have this on Linux) compared to an insensitive case file system on mac. This is always an issue but I have seen it cause problems when mods use overrides.
Anyway a possible solution is to put the Civ5 config folder in a case insensitive file system. I used a FAT file system and I will give some vague instructions on how to do so (note I am using Arch Linux).
First create an image with dd, 1GB should be sufficient.
dd if=/dev/zero of=civ5.img bs=1 count=0 seek=1G
Now lets setup the loop device:
The command: lsblk should show all the devices in use - if loop0 appears on the list then use loop1, if loop1 appears on the list too then use loop2 etc... for the following command:
sudo losetup /dev/loop0 civ5.img
lsblk should now show loopX in the list (X being the number that was free)
Now the mkfs.vfat command can be found in the package dosfstools (on both debian and arch linux).
sudo apt-get install dosfstools (for ubuntu/debian users)
Then run the command:
sudo mkfs.vfat /dev/loopX
After that is done we can mount the device and copy all the files from ~/.local/share/Aspyr/Sid Meier's Civilization 5/ to the mount piont. This can be done easily with a file manager (see below for the manual way to mount the loop device). You may want to back up your files somewhere else too and once they are copied over you should delete all the files ~/.local/share/Aspyr/Sid Meier's Civilization 5/ and umount the loop device from the temporary mount point: sudo umount /dev/loopX
The only thing left to do is to mount the loop device with user privileges to the config directory ~/.local/share/Aspyr/Sid Meier's Civilization 5/
for me I use this command, but it may be different for you depending on how your user accounts are setup
sudo mount -o gid=users,fmask=113,dmask=002 /dev/loopX /home/<your user name>/.local/share/Aspyr/Sid Meier's Civilization 5/
If you want to run civ5 again after rebooting you will fist have to run sudo losetup /dev/loopX civ5.img again then the above command. You could automate this but it is out of the scope of this tutorial.
End:
Feel free to contact me about running mods on Linux not that I am very experienced and also feel free to comment on or this tutorial (I am sure there are plenty of errors). I hope it is useful to someone.