Skip to content
This repository has been archived by the owner on Jan 14, 2025. It is now read-only.

Commit

Permalink
Merge pull request #24 from rockerbacon/v2.0
Browse files Browse the repository at this point in the history
Mod Organizer 2 installer for Skyrim (Oldrim)
  • Loading branch information
rockerbacon authored May 6, 2020
2 parents db9aa2a + 9994395 commit 4ed605a
Show file tree
Hide file tree
Showing 12 changed files with 523 additions and 104 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
*~
*.swp
*.swo

18 changes: 0 additions & 18 deletions config-scripts/install-audio-fix.sh

This file was deleted.

26 changes: 26 additions & 0 deletions installers/modorganizer2_skyrim.README
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
IMPORTANT!!!

Make sure your game is configured to use Proton 5.0 on Steam. You can do so by right clicking on
it > Properties > Force use of a specific Steam Play compatibility tool.

This installer expects Steam to have performed first time setup, so make sure Skyrim
was launched on Steam at least once before proceeding with the installation.

Mod Organizer 2 will not be able to open a browser. In order to connect to your Nexus account,
manually add the API key you got at https://www.nexusmods.com/users/myaccount?tab=api%20access

When uninstalling Mod Organizer 2, untick the option to remove data files in Lutris.
This option will removed all game files, not just files added by this installer.

In order to run Mod Organizer 2, Steam must also be running. If you do not receive
warnings when attempting to launch Mod Organizer 2 before Steam, make sure either
zenity or xmessage or xterm are installed on your system.

This installer contains SKSE 1.07.03 and tweaks which allow usage of ENBs.
In-game ENB commands such as toggle effects, open editor, etc will not work, however.

In case of questions or issues visit https://github.com/rockerbacon/lutris-skyrimse-installers

The contents of this message will be available on 'modorganizer2_skyrim.README',
inside the game's install directory

94 changes: 94 additions & 0 deletions installers/modorganizer2_skyrim.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: Mod Organizer 2
game_slug: mod-organizer-2
slug: mod-organizer-2
version: 2.2.2.1 for Skyrim
runner: linux

script:
requires: the-elder-scrolls-v-skyrim

files:
- proton_launcher: https://github.com/rockerbacon/lutris-skyrimse-installers/releases/download/2.0/proton_launcher.sh
- nxm_broker: https://github.com/rockerbacon/lutris-skyrimse-installers/releases/download/2.0/modorganizer2-nxm-broker.sh
- nxm_mime_handler: https://github.com/rockerbacon/lutris-skyrimse-installers/releases/download/2.0/modorganizer2-nxm-handler.desktop
- readme: https://github.com/rockerbacon/lutris-skyrimse-installers/releases/download/2.0/modorganizer2_skyrim.README
- skse_dll: https://skse.silverlock.org/beta/skse_1_07_03.7z
- mo_archive: https://github.com/ModOrganizer2/modorganizer/releases/download/v2.2.2.1/Mod.Organizer-2.2.2.1.7z

game:
exe: $GAMEDIR/proton_launcher.sh
args: >-
--restart-pulse
--native 'd3dx9_42'
--protonver '5.*'
72850 ModOrganizer2/ModOrganizer.exe
installer:
- input_menu:
description: |-
IMPORTANT!!!
Make sure your game is configured to use Proton 5.0 on Steam. You can do so by right clicking on
it > Properties > Force the use of a specific Steam Play compatibility tool.
This installer expects Steam to have performed first time setup, so make sure Skyrim
was launched on Steam at least once before proceeding with the installation.
Mod Organizer 2 will not be able to open a browser. In order to connect to your Nexus account,
manually add the API key you got at https://www.nexusmods.com/users/myaccount?tab=api%20access
When uninstalling Mod Organizer 2, untick the option to remove data files in Lutris.
This option will removed all game files, not just files added by this installer.
In order to run Mod Organizer 2, Steam must also be running. If you do not receive
warnings when attempting to launch Mod Organizer 2 before Steam, make sure either
zenity or xmessage or xterm are installed on your system.
This installer contains SKSE 1.07.03 and tweaks which allow usage of ENBs.
In-game ENB commands such as toggle effects, open editor, etc will not work, however.
In case of questions or issues visit https://github.com/rockerbacon/lutris-skyrimse-installers
The contents of this message will be available on 'modorganizer2_skyrim.README',
inside the game's install directory
options:
- waiting: Click here after reading everything
- proceed: I'm ready to continue with the installation
preselect: waiting

- copy:
src: readme
dst: $GAMEDIR/

- copy:
src: proton_launcher
dst: $GAMEDIR/
- chmodx: $GAMEDIR/proton_launcher.sh

- copy:
src: nxm_broker
dst: $HOME/.local/bin
- chmodx: $HOME/.local/bin/modorganizer2-nxm-broker.sh

- copy:
src: nxm_mime_handler
dst: $HOME/.local/share/applications
- execute:
command: xdg-mime default modorganizer2-nxm-handler.desktop x-scheme-handler/nxm
- execute:
command: xdg-mime default modorganizer2-nxm-handler.desktop x-scheme-handler/nxm-protocol

- extract:
file: skse_dll
dst: $GAMEDIR/

- extract:
file: mo_archive
dst: $GAMEDIR/ModOrganizer2/

- execute:
command: $HOME/.local/share/lutris/runtime/winetricks/winetricks -q vcrun2019 dotnet48 d3dcompiler_43 d3dx9
env:
WINEPREFIX: $GAMEDIR/../../compatdata/72850/pfx

63 changes: 16 additions & 47 deletions installers/skse64.yml
Original file line number Diff line number Diff line change
@@ -1,63 +1,32 @@
name: "Skyrim Script Extender 64 (SKSE64)"
game_slug: skyrim-script-extender-64
slug: skyrim-script-extender-64
game_slug: skyrim-script-extender-skse64
slug: skyrim-script-extender-skse64
version: v2.00.17
runner: linux

script:
requires: the-elder-scrolls-v-skyrim-special-edition

files:
- skse_dll: https://skse.silverlock.org/beta/skse64_2_00_17.7z
- skse_launcher: https://github.com/rockerbacon/lutris-skyrimse-installers/releases/download/1.9.3/skse_launcher.sh
- selauncher_launcher: https://github.com/rockerbacon/lutris-skyrimse-installers/releases/download/1.9.3/selauncher_launcher.sh
- proton_launcher: https://github.com/rockerbacon/lutris-skyrimse-installers/releases/download/2.0/proton_launcher.sh

game:
exe: $GAMEDIR/proton_runner/selauncher_launcher.sh
args: skse64_loader.exe
working_dir: "$HOME/.steam/steam/steamapps/common/Skyrim Special Edition"

system:
env:
STEAM_COMPAT_DATA_PATH: "$HOME/.steam/steam/steamapps/compatdata/489830"
exe: $GAMEDIR/proton_launcher.sh
args: >-
--noesync
--restart-pulse
--protonver '4.*'
--native 'xaudio2_7'
489830 skse64_loader.exe
installer:
- extract:
file: skse_dll
dst: $GAMEDIR/skse_binaries

- merge:
src: $GAMEDIR/skse_binaries/Data
dst: "$HOME/.steam/steam/steamapps/common/Skyrim Special Edition/Data"
- copy:
src: $GAMEDIR/skse_binaries/skse64_1_5_97.dll
dst: "$HOME/.steam/steam/steamapps/common/Skyrim Special Edition"
- copy:
src: $GAMEDIR/skse_binaries/skse64_loader.exe
dst: "$HOME/.steam/steam/steamapps/common/Skyrim Special Edition"
- copy:
src: $GAMEDIR/skse_binaries/skse64_steam_loader.dll
dst: "$HOME/.steam/steam/steamapps/common/Skyrim Special Edition"

- copy:
src: skse_launcher
dst: $GAMEDIR/proton_runner
- chmodx: $GAMEDIR/proton_runner/skse_launcher.sh
dst: $GAMEDIR/

- copy:
src: selauncher_launcher
dst: $GAMEDIR/proton_runner
- chmodx: $GAMEDIR/proton_runner/selauncher_launcher.sh
src: proton_launcher
dst: $GAMEDIR/
- chmodx: $GAMEDIR/proton_launcher.sh

- input_menu:
description: "MANUAL STEPS REQUIRED:\n
1. Open Steam and find Skyrim Special Edition;\n
2. Right click on it and select the option \"Properties\";\n
3. Click on \"Set Launch Options...\";\n
4. Copy and paste this \"bash $HOME/Games/skyrim-script-extender-64/proton_runner/skse_launcher.sh && echo %command% > /dev/null\" on the textbox (without the quotes);\n
5. Click on \"OK\";\n
6. Still on the properties menu check the option \"Force the use of a specific Steam Play compatibility tool\";\n
7. Select \"Proton 4.11-x\" from the dropdown menu;\n
8. Click on \"Close\""
options:
- waiting: "Click here after you've finished all steps"
- proceed: "I've followed the steps, proceed with the installation"
preselect: waiting
14 changes: 1 addition & 13 deletions installers/skyrimse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,11 @@ version: Steam play
runner: steam

script:
files:
- audio_fix_zip: https://github.com/Kron4ek/FAudio-Builds/releases/download/19.08/faudio-19.08.tar.xz
- install_audio_fix: https://github.com/rockerbacon/lutris-skyrimse-installers/releases/download/1.9.3/install-audio-fix.sh
game:
appid: 489830
installer:
- extract:
file: audio_fix_zip
dst: $GAMEDIR/audiofix
- copy:
src: install_audio_fix
dst: $GAMEDIR/audiofix
- chmodx: $GAMEDIR/audiofix/install-audio-fix.sh
- execute:
file: $GAMEDIR/audiofix/install-audio-fix.sh
system:
env:
PROTON_NO_ESYNC: 1
WINEDLLOVERRIDES: xaudio2_7=n,b
reset_pulse: true
pulse_latency: true
4 changes: 2 additions & 2 deletions installers/vortex.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ runner: wine
script:
files:
- setup: https://github.com/Nexus-Mods/Vortex/releases/download/v1.1.15/vortex-setup-1.1.15.exe
- symlinks_setup: https://github.com/rockerbacon/lutris-skyrimse-installers/releases/download/1.9.3/vortex-symlinks.sh
- downloads_handler: https://github.com/rockerbacon/lutris-skyrimse-installers/releases/download/1.9.3/vortex-downloads-handler.desktop
- symlinks_setup: https://github.com/rockerbacon/lutris-skyrimse-installers/releases/download/2.0/vortex-symlinks.sh
- downloads_handler: https://github.com/rockerbacon/lutris-skyrimse-installers/releases/download/2.0/vortex-downloads-handler.desktop
game:
exe: drive_c/Program Files/Black Tree Gaming Ltd/Vortex/Vortex.exe
prefix: $GAMEDIR
Expand Down
91 changes: 91 additions & 0 deletions runners/modorganizer2-nxm-broker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
#!/bin/bash

declare -A gamesmap

new_game() {
gamesmap[${1}_dir]=$dir
gamesmap[${1}_appid]=$appid
gamesmap[${1}_launcher_opts]=$launcher_opts
}

########################

### SKYRIM ###
dir="Skyrim"
appid=72850
launcher_opts="--restart-pulse --native d3dx9_42 --protonver 5.*"
new_game "skyrim"
### SKYRIM ###

########################

steam_libraries_list_file="$HOME/.steam/steam/steamapps/libraryfolders.vdf"

xtermbox() {
action_on_exit=$1
msg=$2
xterm -e bash -c "
echo '$msg'
echo
echo Press enter to $action_on_exit
read
"
}

if [ -n "$(command -v zenity)" ]; then
errorbox="zenity --ellipsize --error --text"
elif [ -n "$(command -v xmessage)" ]; then
errorbox="xmessage -buttons exit:0"
elif [ -n "$(command -v xterm)" ]; then
errorbox="xtermbox exit"
else
errorbox="echo"
fi

### PARSE POSITIONAL ARGS ###
nxm_link=$1; shift

if [ -z "$nxm_link" ]; then
echo "ERROR: please specify a NXM Link to download"
exit 1
fi

game=$(echo $nxm_link | grep -oE 'nxm://[^/]+' | sed 's/nxm:\/\///')
relative_game_dir=${gamesmap[${game}_dir]}
appid=${gamesmap[${game}_appid]}
launcher_opts=${gamesmap[${game}_launcher_opts]}

if [ -z "$relative_game_dir" ]; then
$errorbox "Could not download file because '$game' is not a supported game"
exit 1
fi
### PARSE POSITIONAL ARGS ###

### FIND GAME LIBRARY ###
steam_libraries=$( \
grep -oE '/[^"]+' "$HOME/.steam/steam/steamapps/libraryfolders.vdf" \
)
steam_libraries=$(echo -e "$HOME/.steam/steam\n$steam_libraries")

for libdir in $steam_libraries; do
echo "Searching for game in library '$libdir'"
game_dir="$libdir/steamapps/common/$relative_game_dir"
echo "$relative_game_dir"
mo2_dir="$game_dir/ModOrganizer2"
if [ -d "$mo2_dir" ]; then
echo "Found game"
break
fi
done

if [ ! -d "$mo2_dir" ]; then
$errorbox "Could not find a Mod Organizer 2 installation for '$game'"
exit 1
fi
### FIND GAME LIBRARY ###

cd "$game_dir"

STEAM_LIBRARY=$libdir \
"$game_dir/proton_launcher.sh" $launcher_opts $appid "$mo2_dir/nxmhandler.exe" "$nxm_link"

8 changes: 8 additions & 0 deletions runners/modorganizer2-nxm-handler.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[Desktop Entry]
Type=Application
Categories=Game;
Exec=modorganizer2-nxm-broker.sh '%u'
Name=Mod Organizer 2 NXM Handler
MimeType=x-scheme-handler/nxm;x-scheme-handler/nxm-protocol
NoDisplay=true

Loading

0 comments on commit 4ed605a

Please sign in to comment.