Jump to content

Smiley_McSmiles

Recommended Posts

Getting XEdit to work under Linux/Wine/Steam-Proton

After much time scouring the Internet, you have finally found yourself here for some additional help. You may have also found that XEdit and Linux really don't like each other. Well actually they work just fine together, it's just the setup that is troublesome. I hope to help you solve this problem as it took me forever to figure out by myself what needs to be done by fixing each issue that came up, one-by-one.

 

My Setup:

I am writing this tutorial on an install of Ubuntu 18.04 LTS under a pure Gnome 3.28 install. I have Steam installed using Proton v4. I also have wine-3.0. As for XEdit I am using version 4.0.2.

 

Step By Step:

1: Download XEdit

 

2: Install Wine-3.0

 

3: Unpack XEdit

  1. Right click the XEdit 4_0_2.7z and click 'extract here'.
  2. Navigate to the newly created folder and;
  3. Cut the 'FO3Edit.exe', 'Edit Scripts'(folder), 'FO3EditQuickAutoClean.exe', and paste them in your game installation directory(the directory under Linux will usually be, '/home/<USER>/.steam/steamapps/common/<GAME>')

 

4: Create Symbolic Link of Fallout.ini using your Linux Terminal

ln -s /home/<USER>/.steam/steamapps/compatdata/<STEAM APP ID>/pfx/drive_c/users/steamuser/My\ Documents/My\ Games/<GAME>/<GAME>.ini /home/<USER>/Downloads/XEdit/

 

5: Create launcher for XEdit in Linux Terminal

     1. Create the file with nano(or vi if you like), and save the file with CTRL+X(With nano)

nano /home/<USER>/Downloads/XEdit/XEdit.txt

//XEdit.txt:
[Desktop Entry]
Name=XEdit
Exec=wine /home/<USER>/.steam/steamapps/common/<GAME>/<GAME>.exe -I:/home/<USER>/Downloads/XEdit/<GAME>.ini
Type=Application
Categories=Wine;

     2. Copy the file to create the .desktop application.

cp /home/<USER>/Downloads/XEdit/XEdit.txt /home/<USER>/Downloads/XEdit/XEdit.desktop
sudo chmod a+x /home/<USER>/Downloads/XEdit/XEdit.desktop

     3. Launch the application by double clicking the .desktop file. Everything should work if wine is installed properly, and if you replaced all the variables(<VARIABLE>) with the correct directories for your scenario

 

If anyone is curious, google 'Smiley's Combat Realism Overhaul' for my mods ^_^

Edited by Smiley_McSmiles
Added link to the Launch Options for XEdit
Link to comment
Share on other sites

  • 1 month later...

Thank you very much for this. I was pretty much ready to give up on this as a lost cause until I saw your post. :unworthy:

I'm on Mint 19.2 (Ubuntu 18.04 base) running Cinnamon. I had a different system wine version so I just installed wine 3.0 from lutris and used that instead. since i kept pretty detailed install notes and the process had a few changes for lutris that deviated from your guide, figured I'd post them here as a reference in case anybody finds them helpful.

$ which wine
/usr/bin/wine

$ wine --version
wine-4.16 (Staging)

# note: /lutris is the folder where i stored my lutris wineprefixes
# I think by default Lutris uses ~/.local/share/lutris/runners/winesteam/prefix64 when you install games from steam.
# Or if using proton, see OP as that has better examples
#
$ cd /lutris
$ ls -1ap
vortex/
winesteam/

# note - i was lazy and just used my system wine for setup; i only use v3.0 for the actual exe call further below
$ env WINEPREFIX="/lutris/xedit" WINEARCH=win32 wine wineboot

# if it matters i am using winetricks from github rather than from central repo (i don't think it matters tho)
$ env WINEPREFIX="/lutris/xedit" winetricks corefonts cmd dotnet40 win7

# note to anyone interested in using vortex; symlinks for it are pretty much identical to these
#
$ cd /lutris/xedit/drive_c
$ ln -s '/lutris/winesteam/prefix64/drive_c/Program Files (x86)/Steam' SteamGames
$ cd "/lutris/xedit/drive_c/users/$USER/My Documents/My Games"
$ ln -s '/lutris/winesteam/prefix64/drive_c/users/$USER/My Documents/My Games/FalloutNV" FalloutNV
$ cd "/lutris/xedit/drive_c/users/$USER/Local Settings/Application Data"
$ ln -s "/lutris/winesteam/prefix64/drive_c/users/$USER/Local Settings/Application Data/FalloutNV" FalloutNV

# This assumes that you have Lutris installed and have installed the wine v3.0 runner
# And probably a few other things like Steam version of FONV, etc
$ env WINEPREFIX="/lutris/xedit" "$HOME/.local/share/lutris/runners/wine/3.0-i386/bin/wine" "C:/SteamGames/steamapps/common/Fallout New Vegas/FNVEdit.exe"

 

I did run across a couple weird things while getting it to work. I think the only thing remaining when I did it with the above instruction set was an error message box that I ignored before the app loads. Prior to that while trying to get this working with newer versions of wine / before symlinking all 3 dirs mentioned above, I got some oddities with the menu button (upper left) not working and with not being able to close-out of / dismiss the tooltips pop-up. At one point I noticed that grabbing the main app window title bar and moving it around onscreen caused the tooltip pop-up to disappear. But I didn't have any issues with this under wine 3.0 with the above symlinks.

Also, it didn't seem to care about me passing the ini on the command line.

 

My desktop file contains the following and seems to work fine for me:

#!/usr/bin/env xdg-open

[Desktop Entry]
Type=Application
Name=FNVEdit
Icon=/lutris/xedit/drive_c/icons/f03edit-black.png
Exec=/usr/bin/env WINEPREFIX="/lutris/xedit" "/home/zpangwin/.local/share/lutris/runners/wine/3.0-i386/bin/wine" "C:/SteamGames/steamapps/common/Fallout New Vegas/FNVEdit.exe"
Categories=Game

 

And second desktop file for xEdit's Quick Auto Clean feature (only difference is the  -QuickAutoClean flag):

#!/usr/bin/env xdg-open

[Desktop Entry]
Type=Application
Name=FNVEdit
Icon=/lutris/xedit/drive_c/icons/f03edit-black.png
Exec=/usr/bin/env WINEPREFIX="/lutris/xedit" "/home/zpangwin/.local/share/lutris/runners/wine/3.0-i386/bin/wine" "C:/SteamGames/steamapps/common/Fallout New Vegas/FNVEdit.exe" -QuickAutoClean
Categories=Game

 

Link to comment
Share on other sites

You can also create a script to loop through all your mods and auto-clean them but its not a completely automated process and has some issues.

 

Pros:

  • You don't have to manually select every plugin if you are cleaning a lot of them
  • You don't have to manually save (this is done automatically by virtue of having the -QuickAutoClean flag)

 

Cons:

  • Even if though plugin is auto-selected, you still need to manually click OK to confirm and start the auto-cleaning
  • You always have to close the current instance of xEdit to proceed to the next instance
  • You still have to review if certain mods should be omitted from cleaning (e.g. TTW / YUP / etc)
  • To stop the script without processing the next plugin, click in the terminal window and press Ctrl+Z or kill the bash process that is running the script

 

1. If you've never used xEdit or it's been awhile since you have, I highly recommend checking out the GamerPoets video on youtube because the new Quick Auto Clean process is a bit different than the old cleaning process.

2. If you decide later that you don't want the cleaned version and want to go back to the original, be aware that when using -QuickAutoClean xEdit creates a backup under GAMEDIR/Data/FNVEdit Backups.

Usually this would be applicable if you ran it for everything and then realized you should have omitted some per the mod authors.

3. This assumes that you are using the symlinked /lutris/xedit directory setup described in my previous post; if not, adjust paths etc as needed...

First, create a temp dir to work from and copy the plugins.txt file there.

cd /lutris/xedit/drive_c/

# make a temporary working directory
mkdir cleaning
cd cleaning

# and get a copy of your plugins.txt (don't use the real one!)
cp -a "../users/${USER}/Local Settings/Application Data/FalloutNV/plugins.txt" "./plugins-to-clean.txt"

 

4. Edit plugins-to-clean.txt with your preferred text editor and delete the lines for any mods that should not be cleaned. This will largely rely on reading the mod descriptions. But as mentioned if you miss something initially, you can restore the original plugin from the backups folder. A few that I am aware of which should NOT be cleaned are TTW + and game/dlc ESM's that were processed by TTW (per their FAQ). I would imagine that the major bug-fixing mods like YUP, Unofficial Patch NVSE, Unofficial Patch Plus probably don't need it (for games other than New Vegas this would be USLEEP / USEEP / UOP / UF3P / etc).
 

5. Create a script named clean-plugins.sh in the working directory, add the following, and set it to executable:

#!/bin/bash

WINEPREFIX_TO_USE="/lutris/xedit"
WINE_BINARY_TO_USE="${HOME}/.local/share/lutris/runners/wine/3.0-i386/bin/wine"

if [[ ! -f ./plugins-to-clean.txt ]]; then
	echo 'ERROR: missing plugins-to-clean.txt';
	exit;
fi

echo 'To abort script before it has finished, press Ctrl+Z';
echo '';

total_plugins=$(cat ./plugins-to-clean.txt|wc -l);
current_plugin=1

while IFS="" read -r line || [ -n "${line}" ]
do
	#echo "raw line: '${line}'";
	#remove the \r that are added to plugins.txt
	plugin_name=${line%$'\r'}
	#echo "plugin_name: '${plugin_name}'";

	echo "===========================================================================================================";
	echo "plugin ${current_plugin} of ${total_plugins}: '${plugin_name}'";
	/usr/bin/env WINEDEBUG=-all WINEPREFIX="${WINEPREFIX_TO_USE}" "${WINE_BINARY_TO_USE}" "C:/SteamGames/steamapps/common/Fallout New Vegas/FNVEdit.exe" -QuickAutoClean  "${plugin_name}" 2>&1 >/dev/null;
	current_plugin=$(( current_plugin + 1 ));

done < ./plugins-to-clean.txt

 

6. Run the script. As noted above, to abort press Ctrl+Z. Otherwise, it'll launch a new xEdit process for each plugin. The plugins should get auto-selected (otherwise refer to output from terminal window then manually select them), then you'll have to manually click OK, wait for processing to complete (you should see the text "finished" at the bottom of the Messages tab), and manually close that instance of xEdit before it will launch again for the next plugin.

 

 

Link to comment
Share on other sites

If you were interested in getting the rest of the way to fully automated, you could probably try installing autohotkey with winetricks. then write an ahk script that is launched to background which automatically clicks ok then waits for the text "finished" then closes fnvedit.

UPDATE: Just thought I would clarify that this is intended for a large list of mods that you want to clean but NOT for your entire set of mods. The official xEdit documentation explicitly states that

Quote

It's NOT a good idea for everyone to just go ahead and clean their full load order and then forget about it.

so by providing a means to (semi-)automate, I am not suggesting that you should contradict this statement but only that this might be useful if you still have a large number of mods to process even after appreciating this statement.

 

I wasn't able to detect the "finished" text with autohotkey spy tool even though i can see it in the window. if my mod list grows large enough or interest is expressed i might eventually revisit this and see if I can figure out the last piece.... if you didn't want to put too much effort in, you could probably just put a 5-10 minute wait in there (even though most plugins are fast there are a few that take awhile), add a process kill command to the ahk script, and run the thing overnight...

# install autohotkey - assumes that you are following same setup i described above
$ env WINEPREFIX="/lutris/xedit" winetricks autohotkey

# manually launch ahk spy tool
/usr/bin/env WINEDEBUG=-all WINEPREFIX="/lutris/xedit" "${HOME}/.local/share/lutris/runners/wine/3.0-i386/bin/wine" "C:/Program Files/AutoHotkey/AU3_Spy.exe" 2>&1 >/dev/null &

# manually launch the ahk script (see below)
/usr/bin/env WINEDEBUG=-all WINEPREFIX="/lutris/xedit" "${HOME}/.local/share/lutris/runners/wine/3.0-i386/bin/wine" "C:/Program Files/AutoHotkey/AutoHotkey.exe" "C:/cleaning/ok-and-close.ahk" 2>&1 >/dev/null &

 

create a new script, e.g. /lutris/xedit/drive_c/cleaning/ok-and-close.ahk

;; despite the name, i only figured out handling for OK so far. There is no functionality for closing currently

Loop  ; Since no number is specified with it, this is an infinite loop unless "break" or "return" is encountered inside.
{
	;;	WinWaitActive , WinTitle, WinText, Timeout, ExcludeTitle, ExcludeText
	;;	https://www.autohotkey.com/docs/commands/WinWaitActive.htm
	;;
	WinWaitActive , Please check or double click the module that you want to Quick Auto Clean

	;;	ControlClick , Control-or-Pos, WinTitle, WinText, WhichButton, ClickCount, Options, ExcludeTitle, ExcludeText
	;;	https://www.autohotkey.com/docs/commands/ControlClick.htm
	;;
	ControlClick , OK, Please check or double click the module that you want to Quick Auto Clean
}
return

 

run manually with command shown above or add the launching part to clean-plugins.sh

 

EDIT: Also FNVEdit does not appear to write to its log until after you click the close button (I already thought to monitor the log with tail -f and run something on matching finished text but no bueno)

Link to comment
Share on other sites

Finally figured out how to get the New Vegas GECK (Garden of Eden Creation Kit) working as well.

tl;dr apparently the GECK is pickier about the starting directory than most everything else is. if you cd to the starting dir first or use wine start /d"path" "exe" then it works fine. skip to bottom if you just want to copy/paste for desktop shortcut and edit paths.

Note: I am using the GECK Extender nvse plugin with this and have not noticed any issues loading mods yet (haven't tried making anything thus far; will post back if i find issues)

Note 2: MergePlugins below refers to this mod utility which is based off xedit and seems to work ok (i have only done limited testing with FNV but no issues so far). a good quick tut or the excellent GamerPoets tut - I think the 255 plugin limit is for skyrim. IIRC FNV has a much smaller hard-coded limit imposed by the devs that is ~140 mods. Not sure on FO3 off the top of my head.

 

#Works to launch windows/wine-based version of steam from lutris outside of lutris (assuming you have moved it to the same path as me)/
usr/bin/env WINEPREFIX="/lutris/winesteam/prefix64" "/usr/bin/wine" "C:/Program Files (x86)/Steam/Steam.exe"

#works for Vortex (assuming you have proper symlinks set up for gamedir, game ini's, and plugin.txt/loadorder.txt)

#(I miss a few MO2 features but I like it a lot better than FOMM... has built-in LOOT and archive invalidation)/
usr/bin/env WINEPREFIX="/lutris/vortex" "/usr/bin/wine" "C:/Program Files/Black Tree Gaming Ltd/Vortex/Vortex.exe"

#works for FNVEdit (assuming you have proper symlinks set up for gamedir, game ini's, and plugin.txt/loadorder.txt)/
usr/bin/env WINEPREFIX="/lutris/xedit" "${HOME}/.local/share/lutris/runners/wine/3.0-i386/bin/wine" "C:/SteamGames/steamapps/common/Fallout New Vegas/FNVEdit.exe";

#works for Merge-Plugins (assuming you have proper symlinks set up for gamedir, game ini's, and plugin.txt/loadorder.txt)/
usr/bin/env WINEPREFIX="/lutris/xedit" "${HOME}/.local/share/lutris/runners/wine/3.0-i386/bin/wine" "C:/merge-plugins/MergePlugins.exe"

# GECK - results in crash on launch (pagefault):
WINEPREFIX="/lutris/xedit" "/usr/bin/wine" "C:/SteamGames/steamapps/common/Fallout New Vegas/Geck.exe"

# GECK - results in crash on launch (pagefault):
WINEPREFIX="/lutris/xedit" "/usr/bin/wine" "C:\\SteamGames\\steamapps\\common\\Fallout New Vegas\\Geck.exe"

# GECK - results in crash on launch (pagefault):
WINEPREFIX="/lutris/xedit" "/usr/bin/wine" start "C:/SteamGames/steamapps/common/Fallout New Vegas/Geck.exe"

# GECK - results in crash on launch (pagefault):
WINEPREFIX="/lutris/xedit" "/usr/bin/wine" start "C:\\SteamGames\\steamapps\\common\\Fallout New Vegas\\Geck.exe"

#Works to launch GECK (assuming you have proper symlinks set up for gamedir, game ini's, and plugin.txt/loadorder.txt):cd "/lutris/xedit/drive_c/SteamGames/steamapps/common/Fallout New Vegas"; WINEPREFIX="/lutris/xedit" "/usr/bin/wine" Geck.exe;

#Works to launch GECK (assuming you have proper symlinks set up for gamedir, game ini's, and plugin.txt/loadorder.txt):
WINEPREFIX="/lutris/xedit" "/usr/bin/wine" start /d"C:\\SteamGames\\steamapps\\common\\Fallout New Vegas" "Geck.exe"

#Works to launch GECK (assuming you have proper symlinks set up for gamedir, game ini's, and plugin.txt/loadorder.txt):
WINEPREFIX="/lutris/xedit" "/usr/bin/wine" start /d"C:/SteamGames/steamapps/common/Fallout New Vegas" "Geck.exe"

 

desktop shortcut (and the icon i'm using if you want it)

#!/usr/bin/env xdg-open

[Desktop Entry]
Type=Application
Name=NV-GECK
Icon=/lutris/custom-icons/utils/Icon_geck.png
Exec=/usr/bin/env WINEPREFIX="/lutris/xedit" "/usr/bin/wine" start /d"C:/SteamGames/steamapps/common/Fallout New Vegas" "Geck.exe"
Categories=Game

 

Link to comment
Share on other sites

WOW Clanfriend! Glad I helped, and in turn you helped the Linux community with your posts! Keep up the good work! :D

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...