Systemcluster / The-Witcher-3-Mod-manager

Mod manager for The Witcher 3 🗃

Home Page:https://www.nexusmods.com/witcher3/mods/2678

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Linux?

poperigby opened this issue · comments

According to this comment on the other repository, it shouldn't be too difficult:

stefan3372/The-WItcher-3-Mod-manager#8 (comment)

commented

I didn't know this game works on Linux! I don't have a Linux machine I could try it on, but I can look into it. Can you give me some information about the setup? I assume you run it through Proton? Since there are a few assumptions about file locations, I'd have to know the paths of the installation and config files.

Thanks! Yeah, I'm running it through Steam Proton. For the Steam version, the config files are in ~/.local/share/Steam/steamapps/compatdata/292030/pfx/drive_c/users/steamuser/My Documents/The Witcher 3. I'm not sure how much you know about Unix filesystems, but the ~ is the user's home directory. The installation directory is in a Steam library folder like it is on Windows, so something like ~/.local/share/Steam/steamapps/common/The Witcher 3. Do you need anymore information?

commented

I think I made all the necessary changes, could you check out the latest commit and let me know if everything works correctly?

From a quick run it seems to work perfectly! I'll do some more testing just to make sure everything works. Just to make sure, I'm just supposed to run py main.py to get it working, right?

commented

That's great to hear!

You should be able to run it with pipenv install (or pipenv install --python 3 depending on the setup) once and then pipenv run python main.py. But thanks to your fork I realized I didn't regenerate the lockfile before, so that might have not worked. I updated the last commit with the correct lockfile (and correct permissions, thank you!).

No problem! I tried to install this mod, and said no when it asked if I wanted to launch the script merger. Then it says:

Installing Complete Animations Redux for vanilla game
module 'subprocess' has no attribute 'STARTUPINFO'
> Installed 0 mods or dlcs (1 errors)

It happened with this mod too, so I'm assuming it happens with all mods.

We might also have some issues with the script merger. I was going to try and compile that from source, but that doesn't seem to be very easy on Linux (I'll go down that rabbit hole later). I decided to use the Windows version, but it says this when I click the "yes I want to open the script merger" dialogue in W3MM:

Installing New Yennefer Concept Hair
module 'subprocess' has no attribute 'STARTUPINFO'
[Errno 13] Permission denied: '/mnt/hdd/.steam/steamapps/common/The Witcher 3/merger/WitcherScriptMerger.exe'
> Installed 0 mods or dlcs (1 errors)

It also happens when I click the "Launch script merger" button. Maybe that has something to do with W3MM trying to run it without WINE?

commented

Ah, the STARTUPINFO parameter seems to be another thing that's Windows specific. As well as the whole extraction process...

commented

I added an alternative library for mod extraction and changed it so that Script Merger is run through wine, could you take another look? I hope this works!

Cool! That seems to fix those issues. Now, none of these buttons work (they didn't work before either):
T_20200902_131534

It says something like this whenever I try to click on any of them:

Couln't open the file:
/mnt/hdd/Games/Steam/The Witcher 3/bin/config/r4game/user_config_matrix/pc/input.xml

Does it exist?

module 'os' has no attribute 'startfile'

I verified that all of the paths these buttons are referencing are actually there, it just can't find them.

Also, it's saying this in the terminal on startup:

detected ~/.local/share/Steam/steamapps/compatdata/292030/pfx/drive_c/users/steamuser/My Documents/The Witcher 3/mods.settings as {'encoding': None, 'confidence': None}
loading translation English.qm
loading translation failed
detected ~/.local/share/Steam/steamapps/compatdata/292030/pfx/drive_c/users/steamuser/My Documents/The Witcher 3/user.settings as {'encoding': 'UTF-16', 'confidence': 0.9900000095367432}
detected ~/.local/share/Steam/steamapps/compatdata/292030/pfx/drive_c/users/steamuser/My Documents/The Witcher 3/mods.settings as {'encoding': None, 'confidence': None}
commented

Opening files and directories should work now!

The other output is expected, since there is no (working) translation file for English, and the encoding detection logging is there for informative purposes.

Great! One last issue (I think), main.py can't be executed if you aren't in the directory where it's located, so desktop shortcuts that aren't in the W3MM directory won't work. When I try to launch it outside its directory, it says:

Traceback (most recent call last):
  File "/mnt/hdd/Games/Steam/The Witcher 3/mod_manager/main.py", line 67, in <module>
    mainWidget = CustomMainWidget(mainWindow, modModel)
  File "/mnt/hdd/.steam/steamapps/common/The Witcher 3/mod_manager/src/gui/main_widget.py", line 246, in __init__
    for lang in os.listdir('translations/'):
FileNotFoundError: [Errno 2] No such file or directory: 'translations/'

The translations/ directory does exist by the way.

commented

Updated, please check again.

Strange, the desktop shortcut now works, but it asks me for the witcher3.exe every time I launch it. My mod list also isn't populated with my mods, but my load order is. It also prompts me for the script merger location when I try to click that button. Also, it says this after I've selected the witcher3.exe:

Another instance of The Witcher 3 Mod Manager is already running.
Opening more than one instance can result in an invalid configuration.

Do you want to continue anyway?
commented

I changed the config path to one without spaces like suggested, so you might have to copy your existing config over, sorry for not mentioning that!

I don't think it's that. It asks me for the paths every time I try to launch it. Maybe it's not saving the settings correctly?

commented

It might be that the exit behavior is different, since the config and mod list were only written after the main window is closed. I changed it so they're written after every change now, which is much more solid anyway.

That fixed it. How can I get it to repopulate my mod list?

commented

Great! Thanks a lot for the suggestion and the help!

Regarding repopulating (and detecting previously installed mods in general), that's a much requested feature but unfortunately there's no such functionality yet. (There will be once I finished the rewrite, but that's going to take a bit still. I've got some more time on my hands now so that might happen rather sooner than later!) You'll have to remove them manually and re-install them for now sadly.

If you want to work on adding that feature here I'd be happy to give you some pointers though!

I don't think I'm proficient enough in Python yet, but I'll be happy to implement it if you haven't already done it by the time I'm feeling confident enough. Thanks for making this work!