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

Add The Sims 4 #944

Open
wants to merge 51 commits into
base: master
Choose a base branch
from
Open

Add The Sims 4 #944

wants to merge 51 commits into from

Conversation

Zemogiter
Copy link
Contributor

The game crashes at intro.
wine.log
It happens regardless of D9VK (tested without it - same crash).

@ImperatorS79
Copy link
Contributor

It seems to be an Origin related crash.

@Zemogiter
Copy link
Contributor Author

But origin stays functional after the crash.

@ImperatorS79
Copy link
Contributor

Oh, so I definitely cannot read wine crash dump ^^.

@Zemogiter
Copy link
Contributor Author

OK so I've tried the Lutris script here:
https://lutris.net/games/install/13489/view
But it has issues as well. It forces winxp so Origin can't be installed and even if it could the game wouldn't likey work. It also doesn't install the dotnet20sp2 verbs as well as vcruns. Here is my moddification of that script, after which the game installs and runs fine:

---
count: 1
next: 
previous: 
results:
- id: 13489
  game_id: 6382
  game_slug: the-sims-4
  name: The Sims 4
  year: 2014
  user: PolishWine
  runner: wine
  slug: the-sims-4-origin-d9vk
  version: Origin | D9VK | dotnet&vcrun
  description: Utilizes Vulkan to greatly improve perfomance. And dotnet&vcrun combo to prevent game installation errors. 
  notes: The game will most likely fail to launch with Origin-In-Game enabled. Please
    disable it in Origin's preferences to launch The Sims 4.
  created_at: '2019-05-21T12:32:58.659000Z'
  updated_at: '2019-05-21T12:32:58.659000Z'
  draft: true
  published: true
  published_by: 51687
  rating: '4'
  steamid: 
  gogid: 
  gogslug: ''
  humblestoreid: ''
  script:
    game:
      arch: win64
      exe: drive_c/Program Files (x86)/Origin/Origin.exe
      prefix: "$GAMEDIR"
    files:
    - d9vk: https://github.com/Joshua-Ashton/d9vk/releases/download/0.11/d9vk-0.11.tar.gz
    - updater: https://raw.githubusercontent.com/DrDoctor13/wine-origin-updater/master/updateorigin.sh
    - origin: https://origin-a.akamaihd.net/Origin-Client-Download/origin/live/OriginThinSetup.exe
    installer:
    - extract:
        file: d9vk
        dst: "$CACHE/d9vk-0.11/"
    - copy:
        dst: "$HOME/.local/share/lutris/runtime/dxvk/d9vk-0.11/"
        src: "$CACHE/d9vk-0.11/"
    - task:
        arch: win64
        description: Creating Wine Prefix...
        name: create_prefix
        prefix: "$GAMEDIR"
    - task:
        arch: win64
        name: winetricks
        prefix: "$GAMEDIR"
        app: nocrashdialog
    - task:
        app: dotnet20sp2
        description: Installing .Net
        name: winetricks
        prefix: $GAMEDIR
        silent: true
    - task:
        app: vcrun2010
        name: winetricks
        prefix: $GAMEDIR
        silent: true
    - task:
        app: vcrun2012
        name: winetricks
        prefix: $GAMEDIR
        silent: true
    - task:
        app: vcrun2013
        name: winetricks
        prefix: $GAMEDIR
        silent: true
    - task:
        arch: win64
        description: Installing Origin... Login window will pop-up and close.
        name: wineexec
        executable: origin
        args: "/silent"
        exclude_processes: Origin.exe OriginClientService.exe OriginWebHelperService.exe
          QtWebEngineProcess.exe
        prefix: "$GAMEDIR"
    - task:
        name: winekill
        prefix: "$GAMEDIR"
    - task:
        arch: win64
        description: Spoofing AMD RX 550...
        key: VideoPciVendorID
        value: 1002
        name: set_regedit
        path: HKEY_CURRENT_USER\Software\Wine\Direct3D
        prefix: "$GAMEDIR"
        type: REG_DWORD
    - task:
        arch: win64
        description: Spoofing AMD RX 550...
        key: VideoPciDeviceID
        value: 699f
        name: set_regedit
        path: HKEY_CURRENT_USER\Software\Wine\Direct3D
        prefix: "$GAMEDIR"
        type: REG_DWORD
    - task:
        name: winekill
        prefix: "$GAMEDIR"
    - chmodx: updater
    - merge:
        dst: "$GAMEDIR/drive_c/Program Files (x86)/Origin"
        src: updater
    wine:
      dxvk_version: d9vk-0.11
      overrides:
        nvapi,nvapi64: disabled
      dxvk: true
      version: tkg-4.0-x86_64
      esync: true
    system:
      exclude_processes: QtWebEngineProcess.exe ActivationUI.exe OriginWebHelperService.exe
      ondemand_command: "$GAMEDIR/drive_c/Program Files (x86)/Origin/updateorigin.sh"
      env:
        STAGING_SHARED_MEMORY: '0'
        __GL_SHADER_DISK_CACHE_PATH: "$GAMEDIR"
        __GL_SHADER_DISK_CACHE: '1'

The script above I can convert this to POL5 expect for the following:

  • missing nocrashdialog verb
  • dont know how to implement the exclude_processes part (and I dont know if its even necesseary)
  • I haven't found where Lutris stores the env values. The only option I can think of is writing them manually in /etc/enviroment

@ImperatorS79
Copy link
Contributor

@Zemogiter there is an issue on this repo already to add env variable for game execution #869.

@Zemogiter
Copy link
Contributor Author

OK but should nocrashdialog be in Plugins, Verbs or Settings?

@plata
Copy link
Collaborator

plata commented May 25, 2019

nocrashdialog is not a separate application (like e.g. .NET), therefore it should not be a verb but rather a plugin. If it should be configurable from the GUI, we also need a setting using this plugin. However, we must be careful not to overload the available settings in the GUI.

@Zemogiter
Copy link
Contributor Author

Understood. Blocked until #954 is merged.

@madoar madoar added the requires rebase This PR requires a git rebase label Nov 25, 2019
Applications/Games/The Sims 4/Origin/script.js Outdated Show resolved Hide resolved
Applications/Games/The Sims 4/Origin/script.js Outdated Show resolved Hide resolved
Applications/Games/The Sims 4/Local/script.js Show resolved Hide resolved
@madoar madoar removed the requires rebase This PR requires a git rebase label Nov 26, 2019
@madoar madoar added the requires testing This Pull Request requires by a user that actually owns the software label Nov 27, 2019
Changed the script to reflect on the Lutris one.
@Zemogiter
Copy link
Contributor Author

D9VK installation crashes:

[ERROR] org.phoenicis.multithreading.ControlledThreadPoolExecutorService (l.64) - TypeError: execute on JavaObject[org.phoenicis.scripts.wizard.UiSetupWizardImplementation@71d4ec6b (org.phoenicis.scripts.wizard.UiSetupWizardImplementation)] failed due to: Message not supported.
	at <js> go(Unnamed:57:2081-2088)
	at <js> :anonymous(Unnamed:25:1066-1084)
	at <js> go(Unnamed:55:1802-1836)
	at com.oracle.truffle.polyglot.ObjectProxyHandler.invoke(HostInteropReflect.java:678)
	at com.sun.proxy.$Proxy66.go(Unknown Source)
	at org.phoenicis.javafx.components.application.skin.ApplicationInformationPanelSkin.lambda$installScript$7(ApplicationInformationPanelSkin.java:237)
	at org.phoenicis.scripts.session.PhoenicisInteractiveScriptSession.eval(PhoenicisInteractiveScriptSession.java:35)
	at org.phoenicis.scripts.interpreter.BackgroundScriptInterpreter.lambda$createInteractiveSession$1(BackgroundScriptInterpreter.java:45)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)

[WARNING] 
org.graalvm.polyglot.PolyglotException: TypeError: execute on JavaObject[org.phoenicis.scripts.wizard.UiSetupWizardImplementation@71d4ec6b (org.phoenicis.scripts.wizard.UiSetupWizardImplementation)] failed due to: Message not supported.
    at <js>.go (Unnamed:57)
    at <js>.:anonymous (Unnamed:25)
    at <js>.go (Unnamed:55)
    at com.oracle.truffle.polyglot.ObjectProxyHandler.invoke (HostInteropReflect.java:678)
    at com.sun.proxy.$Proxy66.go (Unknown Source)
    at org.phoenicis.javafx.components.application.skin.ApplicationInformationPanelSkin.lambda$installScript$7 (ApplicationInformationPanelSkin.java:237)
    at org.phoenicis.scripts.session.PhoenicisInteractiveScriptSession.eval (PhoenicisInteractiveScriptSession.java:35)
    at org.phoenicis.scripts.interpreter.BackgroundScriptInterpreter.lambda$createInteractiveSession$1 (BackgroundScriptInterpreter.java:45)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1128)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:628)
    at java.lang.Thread.run (Thread.java:834)

@madoar
Copy link
Collaborator

madoar commented Dec 12, 2019

Can you find out where exactly the script crashes? My guess is that it is somewhere around the menu(...) call.

@Zemogiter
Copy link
Contributor Author

I've copied the version of D9VK script from our repo and the error is gone. Now I eperience the #1148

@Zemogiter
Copy link
Contributor Author

I'm at lost as to why the game crashes here but works fine under Lutris. The scripts are functionally identical! I've tried setting api-ms-win-core-path-l1-1-0 and msvcr120 as Native after stumbling upon similiar bugs in AppDB but it changes nothing. The wine.log mentions Fatal Python error: init_sys_streams: can't initialize sys standard streams but none of google results match the issue.
wine.log

@Zemogiter
Copy link
Contributor Author

Zemogiter commented Dec 24, 2019

Now this is odd. I've reported this problem on d9vk's repo misyltoad/d9vk#478 and they suggested to retest on fresh wineprefix with no workarounds. I did and I get the same thing. However when I did the exact same thing on POL4 the game works just fine.
Both prefixes were using wine 5.0-rc1

@plata
Copy link
Collaborator

plata commented Dec 24, 2019

With or without runtime?

@Zemogiter
Copy link
Contributor Author

With runtime.

@plata
Copy link
Collaborator

plata commented Dec 25, 2019

Can you try without?

@Zemogiter
Copy link
Contributor Author

I've changed this line:

        this._useRuntime = (propertyReader.getProperty("application.environment.wineRuntime") !== "true");

from false to true and I get the same error.

@plata
Copy link
Collaborator

plata commented Dec 28, 2019

To summarize for a better understanding:

  • PoL 4 works
  • PoL 5 doesn't work
  • plain Wine doesn't work

Is that correct?

@Zemogiter
Copy link
Contributor Author

Haven't tested plain wine yet.

@plata
Copy link
Collaborator

plata commented Dec 28, 2019

Can you do that?

@Zemogiter
Copy link
Contributor Author

Tried plain wine. I can't even get Origin to install. The usual installation wizard window shows up but it's blank. Tried full setup and thin installer.

new vcrun2013(wine).go();
new vcrun2015(wine).go();
new D9VK(wine).go();
var configFile = wine.prefixDirectory() + "/drive_c/dxvk.conf";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
requires testing This Pull Request requires by a user that actually owns the software
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants