aliens

Author Topic: Linux error:game cant open files for ticked mods so openxcom refuses to start  (Read 2732 times)

Offline xander2077

  • Squaddie
  • *
  • Posts: 2
    • View Profile
So, keeping it short as i can, i copied files over to the openxcom data directory for several mods and then ticked a bunch of them to try them out. pretty straight forward, they should work fine, however, when i restarted, the following errors appeared /data/resources/folder/image.png:could not open " ".

and i think i know the cause of the issue. because the repository version of openxcom installs the game into the usr/share directory instead of the home directory, it automatically is locked into root permissions, which doesnt interfere with the unmodded version of the game, but wreaks havoc when trying to mod it.

i tried setting permissions in the data folder to the user, which actually fixed some of the permission problems, but still get this error for one mod in particular even with permissions fixed. it only has trouble reading the sprites for this one mod. every thing else so far is fine. the mod in question is the gauss gun mod. i have since tried setting permissions multiple ways using both command line and gui to try and get it to read finally, but to no avail. it still says the file is missing even though it is right there in the folder with thumbnail too. the only thing i can think of is it is nested in a root permission set of folders under usr/share/openxcom, which would probably cause problems since the main folders need root permission but the data folder has been taken over by me.

so my question is this, is there a way to move the whole openxcom directory to the home directory and still function, or is there a way to fix this without losing the whole install? and perhaps could it be possible to fix this in a later release so the openxcom install itself is not nested in root permission folders? there is no good reson for it to be nested in folders that need root permission at all, it is simply a game. several other games are installed in the home directory where they can easily be modified by the regular user without logging in as root, and i see no reason why openxcom has to be the exception to this rule. i have a feeling this would solve a lot of problems for linux users in the future.

if there is a way to change the mods config file to untick this particular mod or any others and get the game working that is fine too, but methinks later versions should abstain from installing it into root permission folders.

EDIT: i also think something else may be an issue, if in fact it is the same as other games ported to linux or installed in wine. windows is case agnostic, but linux is not, so if the config files or scripts or rules are looking for a case specific file name, and the case is different, it will not find the file in linux, it plays stupid... so usually this is alleviated by changing the case on all files and folders in linux game directories to match the names in the configs or scripts. or just to make them uniform so linux has an easier time. if this is an issue, then i have a problem still, because my batch file renamer must access a non root folder and files or it wont be able to write the case changes. however if the script is written or config is written with mixed case this also poses problems even if i were to change everything to upper case to mimic the original xcom file format.
« Last Edit: August 30, 2017, 12:25:48 pm by xander2077 »

Offline ohartenstein23

  • Commander
  • *****
  • Posts: 1933
  • Flamethrowers fry cyberdisk circuits
    • View Profile
Welcome to the forums!  Which version of OpenXcom are you using?  I'm guessing it's 1.0 since you tried from the repository - the milestone 1.0 release is sorely out-of-date when it comes to installing mods, and most mods require features only added in the nightly versions of OXC.  As for getting it to work, you can move everything to the home directory and use it just fine - make sure the new folder in the home directory has the executable, the files from the original game, and the data folders, and remove /usr/share/openxcom, and that you've set the permissions for everything to the user.  If you open the executable from a terminal in that directory, it should start the search from the data folders in that directory.

I can't speak for all the linux users on this forum, but I think many have not been using the repository.  I personally made a self-contained installation of the latest nightly that sits in my home directory and run it from shell scripts that explicitly point to the data folders inside that directory.  My honest suggestion is to make a backup of all the mods you want to run somewhere, then completely uninstall the repository version of openxcom and make a standalone version in your home folder, preferably using the latest nightly executable.

Also, this game is not ported to linux at all, it's written in C++, so as long as you can get it compiled and all the necessary libraries to work on your system, it's compatible with any OS.

Offline xander2077

  • Squaddie
  • *
  • Posts: 2
    • View Profile
ok that sounds better. i think i figured out what the issue was, but it doesnt seem to be related to anything that needs a nightly build, and the reason i say that is because i tried activating a mod that even says nightly in the mod window and it just gives a nice error in the game explaining why it wont activate, but the game still plays. the mod that was actually stopping it from loading once i did the permissions was the drones mod. so i just removed all those mod files and it loaded fine again. bummer, but maybe installing the nightly will allow the drones mod to work right? or maybe moving the install directory will, not sure yet.

this is kind of a leap from playing the old xcom in dos, but i am slowly figuring out the ins and outs of it, all except hex editing which i failed miserably at, but luckily i had a backup, but i am not too far into the game yet so no huge loss. it was really easy to get working and open xcom is not plagued with bugs that make it crash constantly like other ports or even the wine install of it. so kudos for making it reliable.

i will try out moving it to the home folder after uninstalling and installing the nightly build, since i think the approach to mods is a little more polished just from the fact there is a dedicated mods folder. should not be an issue if i move the folder and just point the icons to the correct location.

still trying to figure out a few other things too though, like how to get optimal resolution and mouse behavior since adjusting the config didnt help much and the mouse seems to not function near the borders as well. wont respond to clicking buttons on the edge sometimes or moving things in iventory if they are too close to the bottom of the screen. but maybe those things will iron out with the nightly build.

i noticed i can add the ppa and it should install like the repository version with little hassle.


EDIT: ok, this is going to be an issue i guess, because it still installs the openxcom files to a root folder, the permissions in user/games/openxcom are once again root permissions, and moving it did not help, since it looks like it behaves like dosbox and is looking for the game in C:/user/games/openxcom per the error when i attempted to load it. i tried making openxcom folder a dot folder to hide it which works, but the executable does not recognize the home directory as a valid location, and from reading the wiki i was under the impression it would recognize it as valid (hard coded)

so it is an issue with the executable still insisting on pointing to the root permission folder? not sure, but running it from the terminal wont help that, since the openxcom executable binary is not in the game folder itself, but in another location. (it installs it somewhere else)

anyway, at least the mods folder is in a non root permissions location so i guess there is a silver lining.

EDIT2: ok, the mod folder being where it is by default actually solved the issue. so that was a good move on the devs part. all mods are working except a couple of them and thankfully it just deactivates them if they dont work for whatever reason. before i would have to manually delete nonworking mods.

side note, is there a terrain mod for xcom1 or is it only for TFTD? that one complained about not finding the correct resources for TFTD and i was not aware that it was only for TFTD. if it is for both then do i need to install TFTD as well to get the features of the additional terrain?

and how does one get multiple sound mods to work together in a custom fashion? i was thinking of modifying the one that actually nullifies the others by copying the same file names over to the specific mod folders and overwriting with the music or sounds i prefer.
« Last Edit: August 30, 2017, 09:19:19 pm by xander2077 »