ValveSoftware / Proton

Compatibility tool for Steam Play based on Wine and additional components
Other
23.36k stars 1.02k forks source link

Skyrim Script Extender (365720) #170

Open valeth opened 5 years ago

valeth commented 5 years ago

When trying to launch SKSE Steam just terminates the application immediately.

I'm unsure if this is because it created its own Wine prefix, and it cannot find the Skyrim executable, or something else.

Skyrim (regular 2011 edition without any DLC) is running fine by itself.

9ParsonsB commented 5 years ago

This Patch can be used to fix SKSE and F4SE

linkjay commented 5 years ago

How do we use that patch, @9ParsonsB? If you'll excuse my ignorance...

hdmap commented 5 years ago

If this is about SKSE for original Skyrim and not SKSE64 for SkyrimSE, my patches shouldn't be necessary. To my knowledge SKSE works fine under normal wine.

linkjay commented 5 years ago

Yes. SKSE runs perfectly fine when you Wine Steam and such. However, if you try the installer, archive, or the Steam mod, under the native linux steam with proton, it simply will not start. You open up the SKSE loader and it immediately crashes.

valeth commented 5 years ago

@hdmap this is indeed about original Skyrim with SKSE. Like @linkjay said SKSE is running just fine with regular Wine.

malahx commented 5 years ago

Hello, I have a work around which partially works... 1) I manually installed SKSE 2) I renamed SkyrimLauncher.exe to SkyrimLauncher.exe.backup 3) I renamed skse_loader.exe to SkyrimLauncher.exe And it works, but mods which save data will have issue (I think the same issue with the workshops ... can't write to the directory).

defron commented 5 years ago

@malahx I've not had a chance to play around much with this yet, but based on my research there should be an executable called proton_run created in /tmp that could potentially be used to run skse without needing to rename files. Here's the info (found through Shenmue): https://www.shenmuedojo.com/forum/index.php?threads/request-shenmue-1-ii-for-linux-steam-install-guide-request-even-if-you-dont-use-linux-so-that-linux-users-can-play-the-game-as-well.399/

specifically the steps:

  1. Run the game it will probably fail but will create an important file named proton_run
  2. Open File explorer then Press CTRL + L write /temp
  3. Go to /tmp
  4. Locate file called proton_run inside tmp
  5. Copy the file proton_run, paste it in another location, I put mine inside a folder named proton in my desktop.

Looking forward to trying it out when I get a chance myself, just too much going on for me right now to start playing skyrim again.

kisak-valve commented 5 years ago

Skyrim (72850) Script Extender (SKSE) (365720) fail to load

Issue transferred from https://github.com/ValveSoftware/Proton/issues/1654. @powerman posted on 2018-09-30T20:12:48:

Compatibility Report

System Information

I confirm:

There are compatibility reports for both apps, but no one mention this specific issue.

steam-72850.log

Symptoms

At a glance symptoms looks very similar to https://bugs.winehq.org/show_bug.cgi?id=43844 - any chance this year-old change wasn't merged to Proton yet?

Reproduction

Install (using Steam) Skyrim, Skyrim Script Extender. Then manually install SkyUI mod from https://www.nexusmods.com/skyrim/mods/3863 by copying SkyUI.bsa and SkyUI.esp files into steamapps/common/Skyrim/Data/. Now start Skyrim, start new game, and you'll see error from SkyUI about absent Skyrim Script Externder (SKSE).

powerman commented 5 years ago

I've fixed issue with SKSE by changing kernel from 4.9.74 with GrSecurity/PaX to 4.14.65 without GrSecurity/PaX (more details at https://github.com/ValveSoftware/Proton/issues/460#issuecomment-430826514).

FreeLikeGNU commented 5 years ago

$ ./winedbg_run

WineDbg starting on pid 0028
0x000000007b462bab start_process+0xeb in kernel32: movl 0xffffff24(%ebp),%esi
Wine-dbg>        
Wine-dbg>next
Invalid address (0x000000007b462bc6 start_process+0x106) for breakpoint 0, disabling it
Process of pid=0028 has terminated
Lyle-Tafoya commented 5 years ago

Using these patches I was able to get SKSE working with Proton 3.16-5: https://github.com/hdmap/wine-hackery/tree/master/f4se. I built wine with the patches and then copied ntdll.dll.so into the existing proton directory. Now it works.

I don't know if this needs to be submitted as a request for the wine team or the proton team, but somehow these patches need to become more readily available to the end user.

ThePreviousOne commented 5 years ago

@Lyle-Tafoya what version of wine did you use?

Lyle-Tafoya commented 5 years ago

I did a git clone of proton and used whichever version of wine it uses. I ran the git submodule update --init and then I applied the patches to the wine directory before building. However, I found a post on reddit indicating that it is possible to perform a binary patch against ntdll.dll.so instead of having to build it from source. I have not tried that method, but it's probably faster and easier. You can read more about that here: https://www.reddit.com/r/wine_gaming/comments/9uk36c/fallout_4_how_to_get_fallout_4_script_extender/

I am able to run getskseversion from the console in skyrim and get a version string (which I was unable to do before) and the skse log seems to indicate normal behavior, although I'll admit I haven't yet found a mod which works correctly with skse under proton.

Lyle-Tafoya commented 5 years ago

I just realized that the above comments already discussed this. I didn't realize this was an issue specific to special edition. It looks like this doesn't apply here. My apologies.

kisak-valve commented 5 years ago

Feature Request + Modding Report: The Elder Scrolls V: Skyrim Special Edition (489830)

Issue transferred from https://github.com/ValveSoftware/Proton/issues/2216. @8BitCerberus posted on 2019-01-14T09:10:13:

Feature Request

Integrate patch found here: https://github.com/hdmap/wine-hackery/tree/master/f4se They were originally done for Fallout 4/F4SE but also works for SKSE64.

I confirm:

Description

Non-SKSE64 mods are working. You can either manually drop them in the Data folder and edit your loadorder.txt and plugins.txt files, or you can install a mod manager (I'm using Nexus' Vortex currently) via Wine or Proton. I have played a few hours now with several mods, both plugins and loose files/texture and audio replacers.

SKSE64 however does not work. It silently fails and just goes on to load Skyrim without hooking in. I've been doing some digging and it's a difference in how it loads into memory compared to SKSE for Skyrim Legendary Edition (72850). There are patches for Wine that address the same issue with F4SE for Fallout 4, and because SKSE64 works in the same way this fixes the problem.

Justification [optional]

This would open up Skyrim SE and Fallout 4 modding without needing to jump through hoops or compile their own versions of Proton and/or Wine. They still would need to get a mod manager working on their own if they want to use one, but having SKSE64 or F4SE working without hassle would eliminate a major roadblock.

Combined with the FAudio patches which seem to be already being worked on, this could help make both Skyrim Special Edition and Fallout 4 candidates for whitelisting.

Risks [optional]

None known.

References [optional]

https://github.com/ValveSoftware/Proton/issues/308

zaidalikhan9 commented 5 years ago

At times it happens that Skyrim doesn’t launch. It gets caught in a small loading screen or nothing occurs when you try to open the executable. This problem has been there since the nemesis of the game and irritates users often. We will let you know that how can you fix it without wasting your time.

1- Refreshing Steam Entirely: Let it confirm that you backup your data and have the credentials. You have to change the essential Steam installation files and try not to get your downloaded game data removed. You are supposed to fix the Steam library files and if that doesn’t work then refresh the app on your own.

2- Checking Installed Mods: In case you are utilizing numerous mods to alter the game play or add some features, then you should disable these mods and start the game. Mods alter the main files of the game and twist the behavior. In case there is some mod which is conflicting with the settings, it is better to delete that mod and try to start the game. For more methods open https://appuals.com/fix-skyrim-not-launching/

3- Checking SKSE: Skyrim Script Extender is utilized for broad mod programs and for handling them. It has been observed that although SKSE has a huge follower base, it is still under development and encounter periodic updates. This mod manager deal all the mods that are working at the moment on your system, there are higher possibilities that it might cause issue to the game.

lucifertdark commented 5 years ago

Just tried it with Proton 4.2-2 & no response from SKSE, shame as a lot of mods need it to work.

jarrard commented 5 years ago

SKSE SKSE64 F4SE FO76SE

These are all separate injectors, atm only SKSE (oldrim) works. There is a fix for 64bit versions of SKSE but nobody has merged the work around for it because 'reasons'.

It would be nice if somebody merged the 64bit fix sometime! until then its a matter of manually compiling wine and copying its files into proton, quite a bother for 99% of people out there!

RussianNeuroMancer commented 5 years ago

Is anyone more knowledgable could clarify situation?

  1. SKS64 is only version that works for Special Edition, right?
  2. What is current best approach for launching SKSE64? Select Proton 3.7 in Skyrim properies and apply binary path from reddit? Or it could work for 3.16 too? If not, should I install xact via protontricks since there is no faudio in Proton 3.7?
  3. Is it possible to launch SKSE64 in the same way as it was described for SKSE in ProtonDB? ("Rename skse_loader.exe to SkyrimLauncher.exe")
jarrard commented 5 years ago
  1. Yes

  2. I have renamed the skyrim launcher exe with a copy of the skse64.exe and so whenever I launch skyrim se it just loads the script extender, seems to work well. (after you mount the files correctly)

  3. As above. But keep in mind that proton has not got the skse64 patch (single line code fix) last time I checked. I might have been pushed to latest version of wine staging however, can't be sure.

The best solution is to create your own proton prefix which you can update and use from within steam yourself (there is a proton guide on howto add your own proton versions to steam in the drop down list).

Is proton 3.7 the latest?

cstrahan commented 5 years ago

@hdmap Have you (or anyone else) shared your patches with the Wine devs? It would be nice to have a link here so people can follow the status of any upstream developments.

jarrard commented 5 years ago

Wine devs know, and this is not needed for FO4 anymore. Untested on SkyrimSE, shrug.

Most wine devs are not generally interested in supporting game mod tools/utilities, which is why most of them have issues.

Its also a problem when windows does fundamental updates to their core system that force all these tools to upgrade to something that is 100% not in wines scope (1803/1903 rocked the boat lots).

RussianNeuroMancer commented 5 years ago

The best solution is to create your own proton prefix which you can update and use from within steam yourself (there is a proton guide on howto add your own proton versions to steam in the drop down list).

Did you compiled it? If possible, could you share your build?

d10sfan commented 5 years ago

The best solution is to create your own proton prefix which you can update and use from within steam yourself (there is a proton guide on howto add your own proton versions to steam in the drop down list).

Did you compiled it? If possible, could you share your build?

One option is using this: https://github.com/GloriousEggroll/proton-ge-custom/releases

Lahvuun commented 4 years ago

Wine devs know, and this is not needed for FO4 anymore. Untested on SkyrimSE, shrug.

SKSE64 2.0.16 works out of the box with Skyrim: Special Edition and Proton 4.11-2

kisak-valve commented 4 years ago

Workaround suggested at https://github.com/ValveSoftware/Proton/issues/2340#issuecomment-523106092.

FreeLikeGNU commented 4 years ago

SKSE64 2.0.16 works out of the box with Skyrim: Special Edition and Proton 4.11-2

I tried SkyUI SE and the effect HUD icons don't show up, I do see the timer bars and everything else in SkyUI SE appears to work. Are you seeing the same result?

Skyrim SE 1.5.80.08 SkyUI_5_2_SE-12604-5-2SE Skyrim Script Extender 64 v2.0.16 beta modslist: https://pastebin.com/UHvZMaXS screenshot: https://i.imgur.com/P6NOJBc.png (effect status time in top right)

Myrddin-Wyllt commented 4 years ago

@FreeLikeGNU Yes, this happens for me as well with SkyUI. Is this broken for Windows users as well?

Nanodragon999 commented 4 years ago

It might already be knows, but a simple way to test if SKSE64 work for SkyrimSE is by using the console (ingame, with ~ or ² button on your keyboard) and typing getskseversion it should display something relevant if it worked, as the name suggest. I noticed i'm facing the same problem with latest Proton version (at the time of writing) but only when i'm using it in ModOrganizer (it work without it from my own experience).

Myrddin-Wyllt commented 4 years ago

@Nanodragon999 That command doesn't indicate whether SKSE64 was installed completely/correctly. If a user forgets to copy the contents of the folder ../Data/Scripts, getskseversion will still output the version number correctly; indicating nothing is wrong. Yet SKSE64 will not have any functionality. This only shows that the .dll files and .exe were copied correctly. To quote the SKSE install instructions:

  1. Copy the .dll and .exe files to your Skyrim SE directory. This is usually in your Program Files folder under Steam\SteamApps\common\Skyrim Special Edition. If you see files named SkyrimSE and SkyrimSELauncher, this is the correct folder. Do not copy these files to the Data folder as with a normal mod. The "src" folder is only useful for programmers, most users can ignore it.

  2. Copy the .pex files in Data\Scripts\ into the Data\Scripts\ folder of your installation. The .pex files are needed by all users of SKSE.

Your command does nothing to verify step 2 was performed properly; it only verifies step 1.

Nanodragon999 commented 4 years ago

You're right, i was under the impression it was common sense to copy everything to the indicated path, my bad :) @Myrddin-Wyllt I guess there was a test mod on nexusmods to see if skse was working currently (i recall it was also doing batch tests etc) can't recall the name of the mod but it might be useful in this case.

lavadrop commented 4 years ago

Has anyone been able to load SkyUI properly? I have SKSE64 (supposedly, lower left Esc menu says it is) running, but I have no MCM to load SkyUI and the UI is the normal one, albeit blown up because I have an Ultrawide monitor and I can't see proper menus. Also I can't pass ~ to open the console and run getskseversion because it's a known 7 year old regression no one has fixed yet.

Lahvuun commented 4 years ago

@lavadrop image

lavadrop commented 4 years ago

@Lahvuun How? I followed everything to the letter, Data/Scripts copied to the SkyrimSE folder, use a launch variable to make Steam launch skse_loader.exe instead of the default Skyrim loader and the mod just won't load.

Lahvuun commented 4 years ago

@lavadrop at ~/.local/share/Steam/steamapps/compatdata/489830/pfx/drive_c/users/steamuser/Local\ Settings/Application\ Data/Skyrim\ Special\ Edition there is supposed to be a file called plugins.txt or Plugins.txt. Try putting *SkyUI_SE.esp in it before you start the game.

lavadrop commented 4 years ago

OMG that actually worked. I would kiss you if I weren't an avatar for my Lord... bleep, bloop. How is this not documented anywhere on any modding site?

Lahvuun commented 4 years ago

Because that file is not intended to be edited by hand, as the header at the top says. Usually it's managed by either the game (by going to the "mods" option in the main menu, and then "load order"), or your mod manager of choice.

Enabling it through the main menu doesn't work for whatever reason, so editing that file manually or using a mod manager are the only working options for now.

lavadrop commented 4 years ago

Funny thing is I have Vortex running on Lutris...

jarrard commented 4 years ago

Tried to use Vortex a while ago and parts of it didn't work, it was also somewhat confusing as it didn't have grouping.

zeparu commented 4 years ago

Because that file is not intended to be edited by hand, as the header at the top says. Usually it's managed by either the game (by going to the "mods" option in the main menu, and then "load order"), or your mod manager of choice.

Enabling it through the main menu doesn't work for whatever reason, so editing that file manually or using a mod manager are the only working options for now.

this is because the .esp file doesnt have a "master file" set, which is usually used to tell the game that this esp (elder scrolls plugin, afaik), depends on these other files to work correctly.
most mods have just the skyrim.esm set as master, so just skyrim as dependency, but other mods that are compatibility patches for example may refer to other master files.

for some reason the author of skyui hasnt set any master files on his mod and even with reports on the nexus, etc, he hasnt fixed it, but is usually also not a problem, because most players will probably use a mod manager, that manipulates the plugins.txt file directly.

this also wasnt an issue on the normal / legendary edition of skyrim, because skyrims mod menu didnt really care about that much, but with the special edition, the ingame mod loader will refuse to load esp files that are missing a master file.

tl;dr: this isnt an issue with skyrim running on wine, but just a mod author being a bit lazy

kisak-valve commented 4 years ago

Issues with SKSE64 in Skyrim SE (489830)

Issue transferred from https://github.com/ValveSoftware/Proton/issues/3665. @TheChriZ posted on 2020-03-20T14:11:06:

Since Proton 5.x.x (also GE Versions) SKSE either crashes after failing to load certain plugins (Engine Fixes, RaceMenu, etc) or if I disable certain plugins the starts I load a save and after the loading screen I just get a black screen. The music still plays, but my system locks up and I have to do a hard reset. When using Proton 4.11 everything works thing with all of my mods, using the known fAudio fix and sometimes having to Alt F4 when the game freezes when exiting (but this are known issues which should have been fixed in newer Proton Versions).

ppkovachev commented 4 years ago

I'm not sure of how much help this will be but the wine update that caused the regression was 4.16. Any proton variants up to this point work flawlessly (Official Valve releases, Glorious Eggroll's, etc)

kisak-valve commented 4 years ago

SKSE64

Issue transferred from https://github.com/ValveSoftware/Proton/issues/3801. @Desulate posted on 2020-04-25T22:31:45:

All version of proton past 4.15 break SKSE64 and SKSE compatibility, Mods will fail to run with the script engine. The script engine provides performance improvements in addition to enabling mod functionality.

The fallout 4 script extender functions similarly.

9ParsonsB commented 4 years ago

@ppkovachev For me, from versions above 4.15 the lighting engine stops working - all world lighting doesn't seem to work (all black) but can see UI & hands/weapons. Using SKSE64

AsciiWolf commented 4 years ago

When trying to launch SKSE Steam just terminates the application immediately.

@kisak-valve Could you please remove the offtopic video that this post links to? Thanks.

Patola commented 4 years ago

This also happens with SKSE VR for Skyrim VR. It seems it is unable to find a gap in memory to inject itself into the game. From skse.log:

SKSEVR runtime: initialize (version = 2.0.11 010400F1 01D64866E6D5F2FA, os = 6.1 (7601))
imagebase = 0000000140000000
reloc mgr imagebase = 0000000140000000
couldn't allocate trampoline, no free space before image
couldn't create codegen buffer. this is fatal. skipping remainder of init process.

I emailed the developer of SKSE VR and he said that: "This is a WINE/proton issue. Either there are no gaps in memory before the image base, or VirtualQuery is not implemented correctly."

I read the comments on this thread and it's said that this problem was introduced in Wine 4.16, but I reverted to Proton 4.11-13 (which is before wine's 4.16 changes have been integrated) and skse still fails to load with the same message. Also tried 4.2-9 but this way the game does not start.

Any advice on what to do to get SKSE VR working? It works with DLL injection, does DLL injection works on wine/proton? Also, should I open a separate ticket for that one in Skyrim VR (611670)?

Patola commented 4 years ago

I have made a proton-5.0-9 build that allows SKSE to be run, it's documented here: https://www.gamingonlinux.com/forum/topic/4456

frostworx commented 3 years ago

Currently implementing full seamless support for Vortex into my steamtinkerlaunch Would be nice if the additional implementation of the automatic script extender exes launch would actually work. The issue has its 2nd birthday in a about week btw!

frostworx commented 3 years ago

Thank you @Patola :) Just released v.1.3.5 with Vortex support: https://github.com/frostworx/steamtinkerlaunch/releases/tag/v1.3.5 https://github.com/frostworx/steamtinkerlaunch#Vortex

unfortunately Skyrim/Fallout (flavours) Script Extender doesn't work with default proton since some time. As many mods depend on "SE" I added a function which renames the "SE" exe when found in the gamedir, to ensure that Vortex knows it is uninstalled and would complain if a mod depends on it. To enable that function just set BUG170=170 somewhere (f.e. global.conf

Patola commented 3 years ago

I'm not sure how you are doing it, but if you need other builds of my proton patches, I am keeping them here https://github.com/Patola/wine/releases