Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Starting with Wine #19

Open
DerHy opened this issue Feb 13, 2021 · 13 comments
Open

Starting with Wine #19

DerHy opened this issue Feb 13, 2021 · 13 comments

Comments

@DerHy
Copy link

DerHy commented Feb 13, 2021

I am new to GitHub and I don't know how to submit this right as this is more a question than an issue.
I am using Kubuntu and am running Among Us with Wine. The game itself runs well but trying to use the mod I have got the problem that the game seems to ignore the new files and just runs Among Us as usual.
Is there something I'm missing about the installation or is it just that the mod doesn't work with Wine?

@jpicht
Copy link

jpicht commented Feb 13, 2021

You have to use winecfg to enable override for winhttp.dll. The winhttp.dll that is installed by the mod to hook into the EXE will not be loaded by wine, unless you enable that dll override.
See https://wiki.winehq.org/Winecfg (you need to set it to "Native then Builtin")

@Pankrazius
Copy link

Is it possible that there are other issues, besides the override? Because I had a similiar problem and followed the steps on the WineHQ website to install winecfg and configured it following your comment.

And - funny enough - other Among Us Mods seem to work now (at least mod-names are shown on the start screen), which I am very grateful for. Thanks.
Alas it doesn't seem to work with this mod. Tried it with the ver. 1.2.2 (which my friends use at the moment) and tested it with ver 1.3.0.

@DerHy
Copy link
Author

DerHy commented Feb 14, 2021

Thanks for your fast response, @jpicht.
I have changed the settings for winhttp.dll just like you said but as @Pankrazius already mentioned this did not fix the issue for me as well. Are there maybe some other things to be aware of like passing additional parameters when starting the EXE with Wine?

@jpicht
Copy link

jpicht commented Feb 14, 2021

@Pankrazius Did you start with a clean install of Among Us?

If you already had a mod installed, or another version, you have to delete all the de-obfuscated files, BepInEx etc. The easiest way would be to just create a new and clean installation.

@Pankrazius
Copy link

Pankrazius commented Feb 14, 2021

I have a clean installation copied in another folder, I use to copy when I install mods. Maybe this copy is corrupted. I'll check that.

Edit:
After deleting and re-installing the game I ran in the same problem.
I unpacked the .rar file into the game-folder and started it with wine. Game runs - but mod doesn't show up.

@ct-bess
Copy link

ct-bess commented Feb 19, 2021

You need to override winhttp.dll through wine and replace this dll your wine prefix. Here's what I did to get it working on Ubuntu using wine through proton:

  1. Copy the mod files over as usual to your Among Us game directory (should be something like this /home/${user}/.steam/steam/steamapps/common/Among Us/)
  2. Copy and replace winhttp.dll with the one provided in the mod files in your wine prefix path
    I replaced mine in these 2 locations:
    /home/${user}/.steam/steam/steamapps/compatdata/945360/pfx/drive_c/windows/syswow64/winhttp.dll
    /home/${user}/.steam/steam/steamapps/compatdata/945360/pfx/drive_c/windows/system32/winhttp.dll
    If the 945360 directory doesn't exist yet, run the game once in steam and it'll create it. If you ever mess up, rename or delete this directory and start up the game again; Steam will create a fresh one for you.
  3. Finally you need to tell wine to override this dll. I only chose native so that it would crash if I messed up.
    I ran this command in a bash terminal and manually added winhttp as a library to override as native:
    env WINEPREFIX="/home/${user}/.steam/debian-installation/steamapps/compatdata/945360/pfx" WINEPATH="/home/${user}/.steam/debian-installation/steamapps/common/Proton 5.0/dist/bin/wine64" winecfg
    Of course you'll have to change the wine path and prefix variables depending on what your using. Also you'll need to have wine installed to use winecfg, you could mess with winetricks as an alternative to set the override.

Hope this helps

@DerHy
Copy link
Author

DerHy commented Feb 23, 2021

Thanks for your helping instructions.
Unfortunately it did not work out for me as Wine still ignores the mod inside the folder. I did replace the files and changed the paths with a clean version of the Among Us folder. As you mentioned I tried using the option "native" instead of "native then builtin", resulting with the error message Unable to load the original WINHTTP.dll (looked from system and from WINHTTP_alt.dll). I tried it with another mod it stored in a separate folder and ran into the same error. Changing the preference back to "native then builtin" the other mod did load again but this one was still ignored, loading just the normal game.

@mcinquin
Copy link

Hello,

I already ran successfully Among Us with Sheriff Mod through WIne.

With ExtraRoles, the mod is totally ignored.

I have a log for the preloader with an error

System.Exception: AllocConsole() failed
  at UnityInjector.ConsoleUtil.ConsoleWindow.Attach () [0x000c6] in <35cd0484d463466382598479e049b964>:0 
  at BepInEx.WindowsConsoleDriver.CreateConsole (System.UInt32 codepage) [0x00000] in <35cd0484d463466382598479e049b964>:0 
  at BepInEx.ConsoleManager.CreateConsole () [0x00030] in <35cd0484d463466382598479e049b964>:0 
  at BepInEx.IL2CPP.Preloader.Run () [0x001e9] in <77655fcba4994a7992a13485f2050a0e>:0 
  at BepInEx.IL2CPP.UnityPreloaderRunner.PreloaderMain (System.String[] args) [0x00093] in <77655fcba4994a7992a13485f2050a0e>:0 
  at BepInEx.IL2CPP.DoorstopEntrypoint.Main (System.String[] args) [0x00055] in <77655fcba4994a7992a13485f2050a0e>:0

@ct-bess
Copy link

ct-bess commented Feb 23, 2021

@DerHy seems like the dll override failed based on your error message; Double check the WINEPREFIX and WINEPATH variables you used. When the winecfg gui comes up, there should already be some configuration set in the libraries tab.
If that still fails here's something else to try for step 3 of my initial comment:
If your using Steam, you can try adding WINEDLLOVERRIDES="winhttp=n,b" %command% into your Steam launch options.
If your just running the executable, try env WINEDLLOVERRIDES="winhttp=n,b" wine Among\ Us.exe

@Flova
Copy link

Flova commented Feb 24, 2021

Copying the files in the among us folder (like you do in Windows) and following these steps https://bepinex.github.io/bepinex_docs/master/articles/advanced/steam_interop.html?tabs=tabid-1 fixed everything for me when I am running these mods with steam/proton and arch linux.

@virtualdxs
Copy link

I'm getting an identical error to @Shini31. preloader_20210226_184124_447.log appears with the exact same text.

@virtualdxs
Copy link

Any updates? I've tried both the Steam version and the Itch version now; either way AllocConsole() fails

@amazingidiot
Copy link

made it work, but online mode was disabled and multiple buttons did not work, some even had no text on them... probably not the mods fault...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants