modorganizer2-linux-installer icon indicating copy to clipboard operation
modorganizer2-linux-installer copied to clipboard

Cyberpunk 2077 support

Open mattcaron opened this issue 3 years ago • 16 comments

Creating an issue to track a feature I'm going to try to implement this weekend - adding support for Cyberpunk 2077 to the installer.

According to the (release notes)[https://github.com/ModOrganizer2/modorganizer/releases/tag/v2.4.0] Cyberpunk 2077 has been supported since 2.4.0. Since 2.4.4 is currently installed, this should be as simple as adding the game's .sh file and menu entries to the installer and submitting a PR.

If anyone wants to chime in with advice, here there be dragons warnings, etc. feel free, as I am new to this codebase.

mattcaron avatar Aug 10 '22 14:08 mattcaron

I have the installer working but, unfortunately, starting the program (no mods installed) from MO2 gives the dreaded "2077 has flatlined" error.

I will dig into this more later this weekend.

mattcaron avatar Aug 12 '22 18:08 mattcaron

I'm a bit late with this so i'm not sure if this'll still be useful to you https://github.com/rockerbacon/modorganizer2-linux-installer/issues/291#issuecomment-1013203823 These were the steps given to me by rockerbacon to add support for new games.

jake770321 avatar Aug 12 '22 22:08 jake770321

Yeah, I figured those out via judicious use of grep. Now I just need to stop it from flatlining. Feels like a proton thing. Time to put on some Johnny Mnemonic and start digging, choom.

mattcaron avatar Aug 13 '22 00:08 mattcaron

So, this is not ready for a PR yet, but here is the current state of code:

https://github.com/rockerbacon/modorganizer2-linux-installer/compare/master...mattcaron:modorganizer2-linux-installer:add_cyberpunk_2077_support

And here's where I'm stuck.

Before install, I'm using Proton 6.3-8, as recommended. Click play on steam, starts launcher, click play in launcher, game starts and runs.

After install, I click play on Steam, MO2 starts, I set everything up first time run, correct the launcher to use _REDprelauncher.exe, click play, launcher starts, click play in launcher, launcher disappears, then I get the standard "you've flatlined" dialog when 2077 crashes.

If I go into .steam/steam/steamapps/common/Cyberpunk 2077 and replace REDPrelauncher.exe with _REDPrelauncher.exe, then click play on steam, it works as it does originally - no issues.

So, this is what has me confused - the integration works by hijacking what is hardcoded into Steam to launch so MO2 launches in that prefix, and then MO2 (which thinks its running in Windows) is quite happy to run the game, right? Everything should work, because it works when not launched via MO2. So why doesn't it work when launched via MO2?

Any insight would be appreciated - I'm going to actually play some games, then try some more tomorrow.

mattcaron avatar Aug 13 '22 02:08 mattcaron

@mattcaron I tried your branch today, and it seems to work just fine for me. I did have to adjust the executable of Cyberpunk to "...\steamapps\common\Cyberpunk 2077\_REDprelauncher.exe" (it didn't have the underscore). You might want to try it out again.

Edit: Add missing path delimiter.

ksangers avatar Sep 16 '22 14:09 ksangers

@ksangers I assume you mean "...\steamapps\common\Cyberpunk 2077_REDprelauncher.exe" (note the additional path delimiter), because I don't have anything at the exact path you list.

Now, that said, I did try it (after 1.6 update) and the behavior is still the same.

Further, it's worth mentioning - with the release of REDmod and official mod support, is MO2 a better experience?

I haven't had a change to try REDmod so I can't answer this, but I feel the question is worth asking.

mattcaron avatar Sep 16 '22 15:09 mattcaron

@mattcaron You are correct on the invalid path, my bad.

I'm not sure about it being a better experience. As far as I understand the new REDmod feature, MO2 is currently still more complete. Most mods on Nexus mods have not yet been converted to the REDmod format. If I understand REDmod: it does not (yet) support changes outside of scripts, tweaks and sounds.

ksangers avatar Sep 17 '22 14:09 ksangers

After further testing, I noticed that I still had some leftover mods outside of MO2. CET only appears to load when copied in manually, and it requires to be reloaded each time. So… pretty spotty functionality all in all.

ksangers avatar Sep 18 '22 13:09 ksangers

Any progress on this?

poperigby avatar Nov 23 '22 02:11 poperigby

I haven't worked on it any further. It should work, it doesn't, and I can't figure out why.

Now, that said, I haven't tried it with 1.61.

mattcaron avatar Nov 23 '22 03:11 mattcaron

Thanks for trying to get it to work. I wonder if it would be easy to make it work with Vortex.

poperigby avatar Nov 26 '22 22:11 poperigby

@ksangers I assume you mean "...\steamapps\common\Cyberpunk 2077_REDprelauncher.exe" (note the additional path delimiter), because I don't have anything at the exact path you list.

Now, that said, I did try it (after 1.6 update) and the behavior is still the same.

Further, it's worth mentioning - with the release of REDmod and official mod support, is MO2 a better experience?

I haven't had a change to try REDmod so I can't answer this, but I feel the question is worth asking.

From my experience with REDmod and modifying 2077, it'll work fine so long as you're not doing anything with RED4EXT, but throw that into the mix and your game will flatline, so I don't use REDmod at all. And it's not like it's much harder to drop everything in the original mod folder.

Azurion42 avatar Mar 11 '23 20:03 Azurion42

master...mattcaron:modorganizer2-linux-installer:add_cyberpunk_2077_support

And here's where I'm stuck.

Before install, I'm using Proton 6.3-8, as recommended.

Has anyone tried this patch with a more recent version of the installer and/or Proton?

rockerbacon avatar Jan 03 '24 17:01 rockerbacon

How has this not been added yet?

urrrr... pls :3

edit: oh yes and btw it doesnt work. it cant find the modmanager

LethalManBoob avatar Apr 27 '24 11:04 LethalManBoob

So, this is not ready for a PR yet, but here is the current state of code:

master...mattcaron:modorganizer2-linux-installer:add_cyberpunk_2077_support

And here's where I'm stuck.

Before install, I'm using Proton 6.3-8, as recommended. Click play on steam, starts launcher, click play in launcher, game starts and runs.

After install, I click play on Steam, MO2 starts, I set everything up first time run, correct the launcher to use _REDprelauncher.exe, click play, launcher starts, click play in launcher, launcher disappears, then I get the standard "you've flatlined" dialog when 2077 crashes.

If I go into .steam/steam/steamapps/common/Cyberpunk 2077 and replace REDPrelauncher.exe with _REDPrelauncher.exe, then click play on steam, it works as it does originally - no issues.

So, this is what has me confused - the integration works by hijacking what is hardcoded into Steam to launch so MO2 launches in that prefix, and then MO2 (which thinks its running in Windows) is quite happy to run the game, right? Everything should work, because it works when not launched via MO2. So why doesn't it work when launched via MO2?

Any insight would be appreciated - I'm going to actually play some games, then try some more tomorrow.

I haven't worked on it any further. It should work, it doesn't, and I can't figure out why.

Now, that said, I haven't tried it with 1.61.

Have you looked at the updated Cyberpunk Wiki Entry on the MO2 GitHub?

jSQrD-dev avatar Jun 12 '24 00:06 jSQrD-dev

Have you looked at the updated Cyberpunk Wiki Entry on the MO2 GitHub?

I have had neither the time nor the inclination. I've actually pretty much stopped playing video games in favor of TTRPGs and miniature wargames, so I don't know if I will ever get to it.

If someone wants to take my code as a starting point and build off it, feel free. Such things are not precious to me.

mattcaron avatar Jun 12 '24 01:06 mattcaron